From a94c0197a723743989306d2c7a65b8d8db69ffc2 Mon Sep 17 00:00:00 2001 From: lepapareil Date: Fri, 16 Sep 2022 10:13:28 +0200 Subject: [PATCH] Add libcurl.dll to windows package --- .github/workflows/release.yml | 6 +++++- .github/workflows/test.yml | 7 ++++++- bin/windows/hurl.nsi | 19 ++++++++++++------- contrib/windows/README.md | 2 +- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd8d285f3..2b60dbc30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,7 +79,11 @@ jobs: run: | # vcpkg build prequisites (Get-Command vcpkg).Path - if (Test-Path C:\vcpkg\installed) {vcpkg update} else {vcpkg install libxml2:x64-windows} + Get-ChildItem -Path C:\vcpkg\installed + if (Test-Path C:\vcpkg\installed\x64-windows\lib\libcurl.lib) {echo "curl already installed"} else {vcpkg install curl:x64-windows} + if (Test-Path C:\vcpkg\installed\x64-windows\lib\libxml2.lib) {echo "libxml2 already installed"} else {vcpkg install libxml2:x64-windows} + vcpkg update + vcpkg upgrade vcpkg integrate install refreshenv # fix known win build bugs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0df0a51ab..b8b5c8015 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -252,8 +252,13 @@ jobs: run: | # vcpkg build prequisites (Get-Command vcpkg).Path - if (Test-Path C:\vcpkg\installed) {vcpkg update} else {vcpkg install libxml2:x64-windows} + Get-ChildItem -Path C:\vcpkg\installed + if (Test-Path C:\vcpkg\installed\x64-windows\lib\libcurl.lib) {echo "curl already installed"} else {vcpkg install curl:x64-windows} + if (Test-Path C:\vcpkg\installed\x64-windows\lib\libxml2.lib) {echo "libxml2 already installed"} else {vcpkg install libxml2:x64-windows} + vcpkg update + vcpkg upgrade vcpkg integrate install + refreshenv # install proxy and server pip3 install --requirement bin/requirements-frozen.txt - name: Run Tests units diff --git a/bin/windows/hurl.nsi b/bin/windows/hurl.nsi index 5ab9cf4f6..7710460d0 100644 --- a/bin/windows/hurl.nsi +++ b/bin/windows/hurl.nsi @@ -63,7 +63,7 @@ SectionGroup "executables" SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 ; Write the uninstall WriteUninstaller "$INSTDIR\uninstall.exe" - ; Write windows uninstall panel informations + ; Write windows uninstall panel informations ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 IntFmt $0 "0x%08X" $0 WriteRegStr HKLM "${UNINSTALLPANELKEY}" "DisplayName" "Hurl" @@ -78,14 +78,14 @@ SectionGroup "executables" WriteRegStr HKLM "${UNINSTALLPANELKEY}" "NoModify" 1 WriteRegStr HKLM "${UNINSTALLPANELKEY}" "NoRepair" 1 WriteRegStr HKLM "${UNINSTALLPANELKEY}" "InstallLocation" "$INSTDIR" - WriteRegStr HKLM "${UNINSTALLPANELKEY}" "Publisher" "Orange-OpenSource" + WriteRegStr HKLM "${UNINSTALLPANELKEY}" "Publisher" "Orange-OpenSource" WriteRegDWORD HKLM "${UNINSTALLPANELKEY}" "EstimatedSize" "$0" SectionEnd Section "hurlfmt.exe" SectionIn RO SetOutPath $INSTDIR File "hurlfmt.exe" - SectionEnd + SectionEnd SectionGroupEnd SectionGroup "dlls" @@ -113,7 +113,12 @@ SectionGroup "dlls" SectionIn RO SetOutPath $INSTDIR File "zlib1.dll" - SectionEnd + SectionEnd + Section "libcurl.dll" + SectionIn RO + SetOutPath $INSTDIR + File "libcurl.dll" + SectionEnd SectionGroupEnd SectionGroup "txt" @@ -131,16 +136,16 @@ SectionGroup "txt" SectionIn 3 SetOutPath $INSTDIR File "..\..\CHANGELOG.md" - SectionEnd + SectionEnd Section "LICENSE" SectionIn 3 SetOutPath $INSTDIR File "..\..\LICENSE" - SectionEnd + SectionEnd SectionGroupEnd ; Uninstaller -Section "Uninstall" +Section "Uninstall" ; Remove installed files Delete $INSTDIR\* RMDir "$INSTDIR" diff --git a/contrib/windows/README.md b/contrib/windows/README.md index 9a30d6d2a..df9a7e94d 100644 --- a/contrib/windows/README.md +++ b/contrib/windows/README.md @@ -26,7 +26,7 @@ $oldpath = Get-ItemProperty -Path HKCU:\Environment -Name Path $newpath = $oldpath.Path += ";c:\vcpkg" Set-ItemProperty -Path HKCU:\Environment -Name Path -Value $newpath $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") -vcpkg install libxml2:x64-windows +vcpkg install libxml2:x64-windows curl:x64-windows vcpkg integrate install Set-ItemProperty -Path HKCU:\Environment -Name VCPKGRS_DYNAMIC -Value "1" $env:VCPKGRS_DYNAMIC = [System.Environment]::GetEnvironmentVariable("VCPKGRS_DYNAMIC","User")