2022-03-03 07:30:25 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2023-11-16 07:48:13 +08:00
|
|
|
URLS "https://github.com/vslavik/winsparkle/releases/download/v0.8.1/WinSparkle-0.8.1.zip"
|
|
|
|
FILENAME "winsparkle-081.zip"
|
|
|
|
SHA512 05588793272618ca13fe884620f1ed421276b011a906f15c92f4879b1787c71b175ae1a170b80fe2adfdb7669eac90c38fac929a9bcf382388983f9aea25ba9c
|
2022-03-03 07:30:25 +08:00
|
|
|
)
|
|
|
|
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2022-03-03 07:30:25 +08:00
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
)
|
|
|
|
|
2022-03-25 05:01:21 +08:00
|
|
|
file(GLOB HEADER_LIST "${SOURCE_PATH}/include/*.h")
|
|
|
|
file(INSTALL ${HEADER_LIST} DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}")
|
|
|
|
file(GLOB TOOLS_LIST "${SOURCE_PATH}/bin/*.bat")
|
|
|
|
file(INSTALL ${TOOLS_LIST} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
2022-03-03 07:30:25 +08:00
|
|
|
|
2023-11-16 07:48:13 +08:00
|
|
|
# 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
|
2022-03-03 07:30:25 +08:00
|
|
|
# static linking is used for everything else.
|
|
|
|
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled)
|
|
|
|
|
|
|
|
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")
|
|
|
|
|
2023-11-16 07:48:13 +08:00
|
|
|
# We have no debug, but since Winsparkle is a self-contained dll, we can copy it to the Debug folder as well
|
2022-03-25 05:01:21 +08:00
|
|
|
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")
|
2022-03-03 07:30:25 +08:00
|
|
|
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")
|
|
|
|
|
2023-11-16 07:48:13 +08:00
|
|
|
# We have no debug, but since Winsparkle is a self-contained dll, we can copy it to the Debug folder as well
|
2022-03-25 05:01:21 +08:00
|
|
|
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")
|
2022-03-03 07:30:25 +08:00
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
|
|
|
endif()
|
|
|
|
|
2023-11-16 07:48:13 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|