Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[winsparkle] Intitial commit with binary copy #23194

Merged
merged 3 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions ports/winsparkle/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/vslavik/winsparkle/releases/download/v0.7.0/WinSparkle-0.7.0.zip"
FILENAME "winsparkle-070.zip"
SHA512 c2cf29e1880534c170110f8e5a966939aecc9a9e05afc87868400074f1492fcac949b61e2ce4636eadd2f127caad3660e0f763476e9523aad3834d673f6edd77
)

vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
)

file(INSTALL "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h")
file(INSTALL "${SOURCE_PATH}/bin" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}" FILES_MATCHING PATTERN "*.bat")


# Note: It is an explicit design goal for WinSparkle to be a single
# self-contained DLL with no external dependencies (to the point that
# it even links to static CRT!). This matters for e.g. in-app delta updates
# or re-launching the app after update. It is not statically linked even if a
# static linking is used for everything else.
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled)
vicroms marked this conversation as resolved.
Show resolved Hide resolved

if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
file(INSTALL "${SOURCE_PATH}/Release/WinSparkle.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(INSTALL "${SOURCE_PATH}/Release/WinSparkle.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(INSTALL "${SOURCE_PATH}/Release/WinSparkle.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")

# We have no debug, but since Winsparkle is a self-contained dll, we can copy it to the Debug folder as well
file(INSTALL "${SOURCE_PATH}/Release/WinSparkle.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/Debug/bin")
file(INSTALL "${SOURCE_PATH}/Release/WinSparkle.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/Debug/bin")
file(INSTALL "${SOURCE_PATH}/Release/WinSparkle.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/Debug/lib")
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
file(INSTALL "${SOURCE_PATH}/x64/Release/WinSparkle.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(INSTALL "${SOURCE_PATH}/x64/Release/WinSparkle.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(INSTALL "${SOURCE_PATH}/x64/Release/WinSparkle.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")

# We have no debug, but since Winsparkle is a self-contained dll, we can copy it to the Debug folder as well
file(INSTALL "${SOURCE_PATH}/x64/Release/WinSparkle.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/Debug/bin")
file(INSTALL "${SOURCE_PATH}/x64/Release/WinSparkle.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/Debug/bin")
file(INSTALL "${SOURCE_PATH}/x64/Release/WinSparkle.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/Debug/lib")
else()
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

8 changes: 8 additions & 0 deletions ports/winsparkle/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "winsparkle",
"version": "0.7.0",
"description": "WinSparkle is an easy-to-use software update library for Windows developers.",
"homepage": "https://winsparkle.org",
"license": "MIT",
"supports": "windows & !(arm | uwp)"
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7344,6 +7344,10 @@
"baseline": "0.0",
"port-version": 4
},
"winsparkle": {
"baseline": "0.7.0",
"port-version": 0
},
"wintoast": {
"baseline": "1.2.0",
"port-version": 2
Expand Down
9 changes: 9 additions & 0 deletions versions/w-/winsparkle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "3de12a4bb10bb91edb9bb06ce6d089340cd488eb",
"version": "0.7.0",
"port-version": 0
}
]
}