From abcd01b724d62651a5b4b173a20c15dfe91582db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 28 Apr 2021 21:30:41 -0800 Subject: [PATCH 1/8] [winsparkle] inital port Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> --- ports/winsparkle/portfile.cmake | 44 +++++++++++++++++++++++++++++++++ ports/winsparkle/vcpkg.json | 6 +++++ 2 files changed, 50 insertions(+) create mode 100644 ports/winsparkle/portfile.cmake create mode 100644 ports/winsparkle/vcpkg.json diff --git a/ports/winsparkle/portfile.cmake b/ports/winsparkle/portfile.cmake new file mode 100644 index 00000000000000..21df7122b191df --- /dev/null +++ b/ports/winsparkle/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_fail_port_install(MESSAGE "winsparkle only supports Windows platforms" ON_TARGET "osx" "linux" "uwp") + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/vslavik/winsparkle/releases/download/v0.7.0/WinSparkle-0.7.0-src.zip" + FILENAME "winsparkle-070.zip" + SHA512 58991c821b31bbc2e7af342af6cfce2fc095841200a2a2359d3fd784d804e1bfddcb640ba8427614732e43bc1608f203e2f03274d8f942e66ad40d5ac2554891 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +# build and install +vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "WinSparkle-2017.sln" + PLATFORM ${BUILD_ARCH} + TARGET_PLATFORM_VERSION ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} + PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET} + OPTIONS /t:restore /p:RestorePackagesConfig=true + USE_VCPKG_INTEGRATION +) + +# These libraries are useless, so remove. +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libcharset-1.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libcharset-1.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libgcc_s_dw2-1.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libgcc_s_dw2-1.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libgettextlib-0-20-2.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libgettextlib-0-20-2.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libgettextpo-0.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libgettextpo-0.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libgettextsrc-0-20-2.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libgettextsrc-0-20-2.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libgomp-1.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libgomp-1.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libiconv-2.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libiconv-2.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libintl-8.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libintl-8.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libstdc++-6.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libstdc++-6.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libtextstyle-0.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libtextstyle-0.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libwinpthread-1.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libwinpthread-1.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libcharset-1.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libcharset-1.dll) + +# Install includes +file(INSTALL ${SOURCE_PATH}/include/winsparkle.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/winsparkle.h) +file(INSTALL ${SOURCE_PATH}/include/winsparkle-version.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/winsparkle-version.h) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/winsparkle RENAME copyright) diff --git a/ports/winsparkle/vcpkg.json b/ports/winsparkle/vcpkg.json new file mode 100644 index 00000000000000..68d33736597aab --- /dev/null +++ b/ports/winsparkle/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "winsparkle", + "version": "0.7.0", + "homepage": "https://winsparkle.org", + "description": "WinSparkle is an easy-to-use software update library for Windows developers." +} From d191f0fecde45456a1195566bbc23d3eaf5e22c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 28 Apr 2021 21:56:29 -0800 Subject: [PATCH 2/8] [winsparkle] update baseline.json --- versions/baseline.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/versions/baseline.json b/versions/baseline.json index fbe7ce75ff48f9..13b3aaa7bfcb05 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7268,6 +7268,10 @@ "baseline": "0.0", "port-version": 3 }, + "winsparkle": { + "baseline": "0.7.0", + "port-version": 0 + }, "wintoast": { "baseline": "1.2.0", "port-version": 1 From 13f27343f82413dfc9fe0caac14bfda3b8e5e615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 28 Apr 2021 22:14:18 -0700 Subject: [PATCH 3/8] [winsparkle] use supports filed in vcpkg.json Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> --- ports/winsparkle/portfile.cmake | 2 -- ports/winsparkle/vcpkg.json | 13 +++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ports/winsparkle/portfile.cmake b/ports/winsparkle/portfile.cmake index 21df7122b191df..8aa66e7ac37680 100644 --- a/ports/winsparkle/portfile.cmake +++ b/ports/winsparkle/portfile.cmake @@ -1,5 +1,3 @@ -vcpkg_fail_port_install(MESSAGE "winsparkle only supports Windows platforms" ON_TARGET "osx" "linux" "uwp") - vcpkg_download_distfile(ARCHIVE URLS "https://github.com/vslavik/winsparkle/releases/download/v0.7.0/WinSparkle-0.7.0-src.zip" FILENAME "winsparkle-070.zip" diff --git a/ports/winsparkle/vcpkg.json b/ports/winsparkle/vcpkg.json index 68d33736597aab..eda751656604d1 100644 --- a/ports/winsparkle/vcpkg.json +++ b/ports/winsparkle/vcpkg.json @@ -1,6 +1,7 @@ -{ - "name": "winsparkle", - "version": "0.7.0", - "homepage": "https://winsparkle.org", - "description": "WinSparkle is an easy-to-use software update library for Windows developers." -} +{ + "name": "winsparkle", + "version": "0.7.0", + "homepage": "https://winsparkle.org", + "description": "WinSparkle is an easy-to-use software update library for Windows developers.", + "supports": "windows & !(arm | uwp)" +} From f429cc2249abcc8976a4b1196dbd3d06bf8a26ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 28 Apr 2021 22:17:09 -0700 Subject: [PATCH 4/8] [winsparkle] use ${PORT} Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> --- ports/winsparkle/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/winsparkle/portfile.cmake b/ports/winsparkle/portfile.cmake index 8aa66e7ac37680..30ef543267ee0f 100644 --- a/ports/winsparkle/portfile.cmake +++ b/ports/winsparkle/portfile.cmake @@ -39,4 +39,4 @@ file(INSTALL ${SOURCE_PATH}/include/winsparkle.h DESTINATION ${CURRENT_PACKAGES_ file(INSTALL ${SOURCE_PATH}/include/winsparkle-version.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/winsparkle-version.h) # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/winsparkle RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) From 822d56e5c367b3e592215d1483273c404a0787b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 29 Apr 2021 06:18:32 -0800 Subject: [PATCH 5/8] [winsparkle] format vcpkg.json --- ports/winsparkle/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/winsparkle/vcpkg.json b/ports/winsparkle/vcpkg.json index eda751656604d1..32904057228159 100644 --- a/ports/winsparkle/vcpkg.json +++ b/ports/winsparkle/vcpkg.json @@ -1,7 +1,7 @@ { "name": "winsparkle", "version": "0.7.0", - "homepage": "https://winsparkle.org", "description": "WinSparkle is an easy-to-use software update library for Windows developers.", + "homepage": "https://winsparkle.org", "supports": "windows & !(arm | uwp)" } From 275e565c4412d5f9d5a970ff711918721d65fd92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 30 Dec 2021 17:25:54 -0800 Subject: [PATCH 6/8] [winsparkle] move install steps to vcpkg_install_msbuild() and remove COPYING.lib and dlls in a static build --- ports/winsparkle/portfile.cmake | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ports/winsparkle/portfile.cmake b/ports/winsparkle/portfile.cmake index 30ef543267ee0f..9ee1d863345615 100644 --- a/ports/winsparkle/portfile.cmake +++ b/ports/winsparkle/portfile.cmake @@ -13,6 +13,9 @@ vcpkg_extract_source_archive_ex( vcpkg_install_msbuild( SOURCE_PATH "${SOURCE_PATH}" PROJECT_SUBPATH "WinSparkle-2017.sln" + LICENSE_SUBPATH "COPYING" + INCLUDES_SUBPATH "include" + ALLOW_ROOT_INCLUDES PLATFORM ${BUILD_ARCH} TARGET_PLATFORM_VERSION ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET} @@ -33,10 +36,10 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libstdc++-6.dll ${CURRENT_PACKAGES_DIR}/ file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libtextstyle-0.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libtextstyle-0.dll) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libwinpthread-1.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libwinpthread-1.dll) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libcharset-1.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libcharset-1.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/COPYING.lib ${CURRENT_PACKAGES_DIR}/debug/lib/COPYING.lib) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() -# Install includes -file(INSTALL ${SOURCE_PATH}/include/winsparkle.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/winsparkle.h) -file(INSTALL ${SOURCE_PATH}/include/winsparkle-version.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/winsparkle-version.h) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) From d58875966b2b99731c1247a4dc0b09ac67b1855c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 28 Dec 2021 11:56:16 +0100 Subject: [PATCH 7/8] [winsparkle] added versions/w-/winsparkle.json --- versions/w-/winsparkle.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 versions/w-/winsparkle.json diff --git a/versions/w-/winsparkle.json b/versions/w-/winsparkle.json new file mode 100644 index 00000000000000..9bfb290525d39b --- /dev/null +++ b/versions/w-/winsparkle.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "e37cbdd793f6a4e11e3560cb69e41bd234b8d457", + "version": "0.7.0", + "port-version": 0 + } + ] +} From e0d7f76f6822f68070c00af5d3809aa10a08a6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 30 Dec 2021 18:01:26 -0800 Subject: [PATCH 8/8] [winsparkle] x64-windows-static-md fails --- scripts/ci.baseline.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index c7f6083e377a8c..343e1f447b509b 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1648,6 +1648,7 @@ v8:x64-windows-static-md=fail yato:x64-windows-static-md=fail zyre:x64-windows-static-md=fail usbmuxd:x64-windows-static-md=fail +winsparkle:x64-windows-static-md=fail workflow:x64-uwp=fail workflow:arm-uwp=fail