From 2b9f75f75b47e990aeadfa4e7dfd809945675897 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 11:23:02 +0200 Subject: [PATCH 01/19] Update dependency urls --- admin/builders/_urls_and_file_names_.bat | 42 +++++++++++++++++------- admin/builders/install_proteowizard.bat | 2 +- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 232fe4d..9e3aa7b 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -4,7 +4,7 @@ ::: 7-zip set ZIP_BASE=7zi -set ZIP_URL=https://kumisystems.dl.sourceforge.net/project/sevenzip/7-Zip/19.00/7z1900.exe +set ZIP_URL=https://sourceforge.net/projects/sevenzip/files/7-Zip/24.09/7z2409-x64.exe/download ::: CMake set CMAKE_VERSION=3.23.1 @@ -14,18 +14,20 @@ set CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v%CMAKE_VERSION ::: Proteowizard ::: https://teamcity.labkey.org/viewType.html?buildTypeId=bt81 ::: ::: without-t = without tests ::: -set PWIZ_VERSION_URL=https://teamcity.labkey.org/guestAuth/repository/download/bt81/.lastSuccessful/VERSION -call :downloadfile %PWIZ_VERSION_URL% %INSTALL_DIR%\VERSION -set /p PWIZ_VERSION_STRING=<%INSTALL_DIR%\VERSION -set PWIZ_BASE=pwiz-src-without-t-%PWIZ_VERSION_STRING: =_% -set PWIZ_URL=https://teamcity.labkey.org/guestAuth/repository/download/bt81/.lastSuccessful/%PWIZ_BASE%.tar.bz2 +set PWIZ_VERSION_URL=https://proteowizard.sourceforge.io/releases/bt81.xml +call :downloadfile %PWIZ_VERSION_URL% bt81.xml +call :extractbuildinfo +echo ✅ PWIZ_BUILD_ID: %PWIZ_BUILD_ID% +echo ✅ PWIZ_FILE_NAME: %PWIZ_FILE_NAME% +set PWIZ_URL=https://mc-tca-01.s3.us-west-2.amazonaws.com/ProteoWizard/bt81/%PWIZ_BUILD_ID%/%PWIZ_FILE_NAME% + ::: remember to update the boost and zlib version when ProteoWizard updates their versions -set BOOST_BASE=boost_1_76_0 +set BOOST_BASE=boost_1_86_0 set ZLIB_BASE=zlib-1.2.3 ::: Boost asio library -set BOOST_ASIO_BASE=boost_asio_1_18_2 -set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.18.2 (Stable)/%BOOST_ASIO_BASE%.zip/download +set BOOST_ASIO_BASE=boost_asio_1_30_2 +set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2%20%28Stable%29/%BOOST_ASIO_BASE%.zip/download ::: Qt set QT_BASE=qtbase-opensource-src-5.9.9 @@ -33,11 +35,27 @@ set QT_URL=https://download.qt.io/archive/qt/5.9/5.9.9/submodules/%QT_BASE%.zip set JOM_URL=http://download.qt.io/official_releases/jom/jom_1_1_3.zip ::: NSIS -set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS 3/3.04/nsis-3.04-setup.exe/download +set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS%203/3.11/nsis-3.11-setup.exe/download EXIT /B +setlocal enabledelayedexpansion + +:: Macro to download a file using PowerShell :downloadfile -PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" -EXIT /B +echo Downloading %1 to %2 +PowerShell -Command "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (New-Object System.Net.WebClient).DownloadFile('%1', '%2')" +exit /B + +:: Macro to extract BUILD_ID and FILE_NAME using PowerShell regex +:extractbuildinfo +for /f "tokens=1,2 delims=|" %%A in ('PowerShell -Command ^ + "$content = Get-Content -Raw 'bt81.xml'; ^ + if ($content -match 'id:(\d+)/artifacts/content/(pwiz-src-without-t-[^<]+?\.tar\.bz2)') { ^ + Write-Host \"$($matches[1])|$($matches[2])\" }"' ^ +) do ( + set PWIZ_BUILD_ID=%%A + set PWIZ_FILE_NAME=%%B +) +exit /B diff --git a/admin/builders/install_proteowizard.bat b/admin/builders/install_proteowizard.bat index 26ba300..3cffacc 100644 --- a/admin/builders/install_proteowizard.bat +++ b/admin/builders/install_proteowizard.bat @@ -105,7 +105,7 @@ if not exist "%PWIZ_DIR%\lib" ( ::: copy the boost::asio library, which is not included by the ProteoWizard boost tar but is needed for maracluster call :downloadfile "%BOOST_ASIO_URL%" %INSTALL_DIR%\boost_asio.zip %ZIP_EXE% x "%INSTALL_DIR%\boost_asio.zip" -o"%INSTALL_DIR%" -aoa > NUL - PowerShell "Copy-Item -Path '%INSTALL_DIR%\%BOOST_ASIO_BASE%\boost' -Destination '%PWIZ_DIR%\libraries\boost_1_76_0' -Recurse -Force" + PowerShell "Copy-Item -Path '%INSTALL_DIR%\%BOOST_ASIO_BASE%\boost' -Destination '%PWIZ_DIR%\libraries\boost_1_86_0' -Recurse -Force" ) EXIT /B From 35302ce72f13f8c97326ec340107f6f4273c6040 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 11:30:05 +0200 Subject: [PATCH 02/19] Try to fix macros --- admin/builders/_urls_and_file_names_.bat | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 9e3aa7b..7095230 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -44,18 +44,22 @@ setlocal enabledelayedexpansion :: Macro to download a file using PowerShell :downloadfile echo Downloading %1 to %2 -PowerShell -Command "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (New-Object System.Net.WebClient).DownloadFile('%1', '%2')" +PowerShell -Command ^ + "$wc = New-Object System.Net.WebClient; ^ + $wc.Headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)'; ^ + [Net.ServicePointManager]::SecurityProtocol = 'Tls12'; ^ + $wc.DownloadFile('%1', '%2')" exit /B :: Macro to extract BUILD_ID and FILE_NAME using PowerShell regex :extractbuildinfo for /f "tokens=1,2 delims=|" %%A in ('PowerShell -Command ^ - "$content = Get-Content -Raw 'bt81.xml'; ^ - if ($content -match 'id:(\d+)/artifacts/content/(pwiz-src-without-t-[^<]+?\.tar\.bz2)') { ^ - Write-Host \"$($matches[1])|$($matches[2])\" }"' ^ + "$content = Get-Content -Raw ''bt81.xml''; ^ + if ($content -match ''id:(\d+)/artifacts/content/(pwiz-src-without-t-[^<]+?\.tar\.bz2)'') { ^ + Write-Output \"$($matches[1])|$($matches[2])\" }"' ^ ) do ( - set PWIZ_BUILD_ID=%%A - set PWIZ_FILE_NAME=%%B + set "PWIZ_BUILD_ID=%%A" + set "PWIZ_FILE_NAME=%%B" ) exit /B From f74cc6bd38603ef5fb9ba7f8654c65c4ee82a864 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 11:39:24 +0200 Subject: [PATCH 03/19] Try to fix macros again --- admin/builders/_urls_and_file_names_.bat | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 7095230..92b8d84 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -44,22 +44,20 @@ setlocal enabledelayedexpansion :: Macro to download a file using PowerShell :downloadfile echo Downloading %1 to %2 -PowerShell -Command ^ - "$wc = New-Object System.Net.WebClient; ^ - $wc.Headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)'; ^ - [Net.ServicePointManager]::SecurityProtocol = 'Tls12'; ^ - $wc.DownloadFile('%1', '%2')" +PowerShell -NoProfile -Command "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'; (New-Object Net.WebClient).Headers.Add('User-Agent', 'Mozilla/5.0'); (New-Object Net.WebClient).DownloadFile('%1', '%2')" exit /B + :: Macro to extract BUILD_ID and FILE_NAME using PowerShell regex :extractbuildinfo for /f "tokens=1,2 delims=|" %%A in ('PowerShell -Command ^ "$content = Get-Content -Raw ''bt81.xml''; ^ if ($content -match ''id:(\d+)/artifacts/content/(pwiz-src-without-t-[^<]+?\.tar\.bz2)'') { ^ - Write-Output \"$($matches[1])|$($matches[2])\" }"' ^ + Write-Host \"$($matches[1])|$($matches[2])\" }"' ^ ) do ( - set "PWIZ_BUILD_ID=%%A" - set "PWIZ_FILE_NAME=%%B" + set PWIZ_BUILD_ID=%%A + set PWIZ_FILE_NAME=%%B ) + exit /B From 0dc43a5d6a0e33bfb93daf04526895c02b45ff8f Mon Sep 17 00:00:00 2001 From: MatthewThe Date: Thu, 26 Jun 2025 13:44:15 +0200 Subject: [PATCH 04/19] Fix powershell commands --- admin/builders/_urls_and_file_names_.bat | 33 +++++++++++------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 92b8d84..14efde0 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -39,25 +39,22 @@ set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS%203/3.11/nsis-3.11 EXIT /B -setlocal enabledelayedexpansion - -:: Macro to download a file using PowerShell +:: Macro to download a file using curl or PowerShell :downloadfile -echo Downloading %1 to %2 -PowerShell -NoProfile -Command "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'; (New-Object Net.WebClient).Headers.Add('User-Agent', 'Mozilla/5.0'); (New-Object Net.WebClient).DownloadFile('%1', '%2')" -exit /B - +where curl >nul 2>&1 +IF %ERRORLEVEL%==0 ( + curl -L "%~1" -o "%~2" +) ELSE ( + PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +) +EXIT /B :: Macro to extract BUILD_ID and FILE_NAME using PowerShell regex :extractbuildinfo -for /f "tokens=1,2 delims=|" %%A in ('PowerShell -Command ^ - "$content = Get-Content -Raw ''bt81.xml''; ^ - if ($content -match ''id:(\d+)/artifacts/content/(pwiz-src-without-t-[^<]+?\.tar\.bz2)'') { ^ - Write-Host \"$($matches[1])|$($matches[2])\" }"' ^ -) do ( - set PWIZ_BUILD_ID=%%A - set PWIZ_FILE_NAME=%%B -) - -exit /B - +::: Step 1: Run PowerShell and output extracted strings to temp files +PowerShell "$content = Get-Content -Raw 'bt81.xml'; if ($content -match 'id:(\d+)/artifacts/content/(pwiz-src-without-t-[^<]+?\.tar\.bz2)') { $matches[1] | Out-File -Encoding ASCII 'build_id.tmp' }" +PowerShell "$content = Get-Content -Raw 'bt81.xml'; if ($content -match 'id:(\d+)/artifacts/content/(pwiz-src-without-t-[^<]+?\.tar\.bz2)') { $matches[2] | Out-File -Encoding ASCII 'file_name.tmp' }" +::: Step 2: Read from the temp files into batch variables +set /p PWIZ_BUILD_ID= Date: Thu, 26 Jun 2025 13:49:47 +0200 Subject: [PATCH 05/19] Enable curl for all downloads --- admin/builders/_init_msvc_.bat | 7 ++++++- admin/builders/_urls_and_file_names_.bat | 2 ++ admin/builders/install_proteowizard.bat | 8 +++++++- admin/builders/nativew32_build.bat | 8 +++++++- admin/builders/nativew64_build.bat | 9 ++++++++- 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/admin/builders/_init_msvc_.bat b/admin/builders/_init_msvc_.bat index 2546f6b..bbdfd5e 100644 --- a/admin/builders/_init_msvc_.bat +++ b/admin/builders/_init_msvc_.bat @@ -62,5 +62,10 @@ EXIT /B %ERRORLEVEL% :downloadfile echo Downloading %1 to %2 -PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +where curl >nul 2>&1 +IF %ERRORLEVEL%==0 ( + curl -L "%~1" -o "%~2" +) ELSE ( + PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +) EXIT /B diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 14efde0..ebebdd9 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -41,6 +41,7 @@ EXIT /B :: Macro to download a file using curl or PowerShell :downloadfile +echo Downloading %1 to %2 where curl >nul 2>&1 IF %ERRORLEVEL%==0 ( curl -L "%~1" -o "%~2" @@ -49,6 +50,7 @@ IF %ERRORLEVEL%==0 ( ) EXIT /B + :: Macro to extract BUILD_ID and FILE_NAME using PowerShell regex :extractbuildinfo ::: Step 1: Run PowerShell and output extracted strings to temp files diff --git a/admin/builders/install_proteowizard.bat b/admin/builders/install_proteowizard.bat index 3cffacc..7f2e24a 100644 --- a/admin/builders/install_proteowizard.bat +++ b/admin/builders/install_proteowizard.bat @@ -112,5 +112,11 @@ EXIT /B :downloadfile -PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +echo Downloading %1 to %2 +where curl >nul 2>&1 +IF %ERRORLEVEL%==0 ( + curl -L "%~1" -o "%~2" +) ELSE ( + PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +) EXIT /B diff --git a/admin/builders/nativew32_build.bat b/admin/builders/nativew32_build.bat index c66f2cc..54eff1f 100644 --- a/admin/builders/nativew32_build.bat +++ b/admin/builders/nativew32_build.bat @@ -161,9 +161,15 @@ EXIT /B %exit_code% :downloadfile echo Downloading %1 to %2 -PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +where curl >nul 2>&1 +IF %ERRORLEVEL%==0 ( + curl -L "%~1" -o "%~2" +) ELSE ( + PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +) EXIT /B + :copytorelease echo Copying "%1" to "%RELEASE_DIR%" xcopy %1 "%RELEASE_DIR%" /Y diff --git a/admin/builders/nativew64_build.bat b/admin/builders/nativew64_build.bat index 1332acc..60c06f0 100644 --- a/admin/builders/nativew64_build.bat +++ b/admin/builders/nativew64_build.bat @@ -184,11 +184,18 @@ cd /D "%SRC_DIR%" EXIT /B %exit_code% + :downloadfile echo Downloading %1 to %2 -PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +where curl >nul 2>&1 +IF %ERRORLEVEL%==0 ( + curl -L "%~1" -o "%~2" +) ELSE ( + PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" +) EXIT /B + :copytorelease echo Copying "%1" to "%RELEASE_DIR%" xcopy %1 "%RELEASE_DIR%" /Y From c7c9cc2ea76af413f5fbc025febcc1a2536665cc Mon Sep 17 00:00:00 2001 From: MatthewThe Date: Thu, 26 Jun 2025 14:17:41 +0200 Subject: [PATCH 06/19] Fix 7zip path --- admin/builders/_urls_and_file_names_.bat | 4 ++-- admin/builders/nativew32_build.bat | 2 +- admin/builders/nativew64_build.bat | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index ebebdd9..724fc16 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -3,8 +3,8 @@ ::: hardcoded in the respective buiding scripts ::: 7-zip -set ZIP_BASE=7zi -set ZIP_URL=https://sourceforge.net/projects/sevenzip/files/7-Zip/24.09/7z2409-x64.exe/download +set ZIP_BASE=7zip +set ZIP_URL=https://sourceforge.net/projects/sevenzip/files/7-Zip/24.09/7z2409.exe/download ::: CMake set CMAKE_VERSION=3.23.1 diff --git a/admin/builders/nativew32_build.bat b/admin/builders/nativew32_build.bat index 54eff1f..8b0f04a 100644 --- a/admin/builders/nativew32_build.bat +++ b/admin/builders/nativew32_build.bat @@ -51,7 +51,7 @@ set ZIP_DIR=%INSTALL_DIR%\%ZIP_BASE% if not exist "%ZIP_DIR%" ( echo Downloading and installing 7-Zip call :downloadfile %ZIP_URL% %INSTALL_DIR%\7zip.exe - "%INSTALL_DIR%\7zip.exe" /S /D=%INSTALL_DIR%\7zip + "%INSTALL_DIR%\7zip.exe" /S /D=%ZIP_DIR% ) set ZIP_EXE="%ZIP_DIR%\7z.exe" diff --git a/admin/builders/nativew64_build.bat b/admin/builders/nativew64_build.bat index 60c06f0..2f32cad 100644 --- a/admin/builders/nativew64_build.bat +++ b/admin/builders/nativew64_build.bat @@ -57,7 +57,7 @@ set ZIP_DIR=%INSTALL_DIR%\%ZIP_BASE% if not exist "%ZIP_DIR%" ( echo Downloading and installing 7-Zip call :downloadfile %ZIP_URL% %INSTALL_DIR%\7zip.exe - "%INSTALL_DIR%\7zip.exe" /S /D=%INSTALL_DIR%\7zip + "%INSTALL_DIR%\7zip.exe" /S /D=%ZIP_DIR% ) set ZIP_EXE="%ZIP_DIR%\7z.exe" From 248aa8773ec4721ff7d45bdc5d7e1ba6189456bf Mon Sep 17 00:00:00 2001 From: MatthewThe Date: Thu, 26 Jun 2025 14:42:11 +0200 Subject: [PATCH 07/19] Fix boost and nsis paths and add boost unordered --- admin/builders/_urls_and_file_names_.bat | 8 ++++++-- admin/builders/install_proteowizard.bat | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 724fc16..85c596a 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -27,7 +27,11 @@ set ZLIB_BASE=zlib-1.2.3 ::: Boost asio library set BOOST_ASIO_BASE=boost_asio_1_30_2 -set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2%20%28Stable%29/%BOOST_ASIO_BASE%.zip/download +set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2 (Stable)/%BOOST_ASIO_BASE%.zip/download + +::: Boost unordered library +set BOOST_UNORDERED_BASE=unordered-boost-1.86.0 +set BOOST_UNORDERED_URL=https://github.com/boostorg/unordered/archive/refs/tags/boost-1.86.0.zip ::: Qt set QT_BASE=qtbase-opensource-src-5.9.9 @@ -35,7 +39,7 @@ set QT_URL=https://download.qt.io/archive/qt/5.9/5.9.9/submodules/%QT_BASE%.zip set JOM_URL=http://download.qt.io/official_releases/jom/jom_1_1_3.zip ::: NSIS -set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS%203/3.11/nsis-3.11-setup.exe/download +set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS 3/3.11/nsis-3.11-setup.exe/download EXIT /B diff --git a/admin/builders/install_proteowizard.bat b/admin/builders/install_proteowizard.bat index 7f2e24a..ca18398 100644 --- a/admin/builders/install_proteowizard.bat +++ b/admin/builders/install_proteowizard.bat @@ -28,6 +28,7 @@ if not exist "%PWIZ_DIR%\lib" ( pwiz/data/msdata//pwiz_data_msdata ^ pwiz/data/msdata//pwiz_data_msdata_version ^ pwiz/data/msdata/mz5//pwiz_data_msdata_mz5 ^ + pwiz/data/msdata/mzmlb//pwiz_data_msdata_mzmlb ^ pwiz/data/proteome//pwiz_data_proteome ^ pwiz/utility/chemistry//pwiz_utility_chemistry ^ pwiz/utility/minimxml//pwiz_utility_minimxml ^ @@ -106,6 +107,10 @@ if not exist "%PWIZ_DIR%\lib" ( call :downloadfile "%BOOST_ASIO_URL%" %INSTALL_DIR%\boost_asio.zip %ZIP_EXE% x "%INSTALL_DIR%\boost_asio.zip" -o"%INSTALL_DIR%" -aoa > NUL PowerShell "Copy-Item -Path '%INSTALL_DIR%\%BOOST_ASIO_BASE%\boost' -Destination '%PWIZ_DIR%\libraries\boost_1_86_0' -Recurse -Force" + + call :downloadfile "%BOOST_UNORDERED_URL%" %INSTALL_DIR%\boost_unordered.zip + %ZIP_EXE% x "%INSTALL_DIR%\boost_unordered.zip" -o"%INSTALL_DIR%" -aoa > NUL + PowerShell "Copy-Item -Path '%INSTALL_DIR%\%BOOST_UNORDERED_BASE%\include\boost' -Destination '%PWIZ_DIR%\libraries\boost_1_86_0' -Recurse -Force" ) EXIT /B From a1a7c6745927404cd553b8bbd8e7ee373bac36b2 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 17:55:27 +0200 Subject: [PATCH 08/19] Update and reuse download file macro --- admin/builders/_init_msvc_.bat | 14 +++----------- admin/builders/_urls_and_file_names_.bat | 17 ++++------------- admin/builders/download_file_macro.bat | 13 +++++++++++++ admin/builders/install_proteowizard.bat | 13 ++----------- admin/builders/nativew32_build.bat | 12 ++---------- admin/builders/nativew64_build.bat | 13 ++----------- 6 files changed, 26 insertions(+), 56 deletions(-) create mode 100644 admin/builders/download_file_macro.bat diff --git a/admin/builders/_init_msvc_.bat b/admin/builders/_init_msvc_.bat index bbdfd5e..a545d7f 100644 --- a/admin/builders/_init_msvc_.bat +++ b/admin/builders/_init_msvc_.bat @@ -1,3 +1,5 @@ +call download_file_macro.bat >NUL + set BUILD_TARGET=%1 call :downloadfile https://github.com/microsoft/vswhere/releases/download/2.8.4/vswhere.exe vswhere.exe @@ -58,14 +60,4 @@ if not defined DevEnvDir ( ) ) -EXIT /B %ERRORLEVEL% - -:downloadfile -echo Downloading %1 to %2 -where curl >nul 2>&1 -IF %ERRORLEVEL%==0 ( - curl -L "%~1" -o "%~2" -) ELSE ( - PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" -) -EXIT /B +EXIT /B %ERRORLEVEL% \ No newline at end of file diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 85c596a..25e1f11 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -1,3 +1,5 @@ +call download_file_macro.bat >NUL + ::: Centralized place for urls and files for all windows builders ... ::: please do not change compression type in urls, since decompression is ::: hardcoded in the respective buiding scripts @@ -27,7 +29,7 @@ set ZLIB_BASE=zlib-1.2.3 ::: Boost asio library set BOOST_ASIO_BASE=boost_asio_1_30_2 -set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2 (Stable)/%BOOST_ASIO_BASE%.zip/download +set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2%20(Stable)/%BOOST_ASIO_BASE%.zip/download ::: Boost unordered library set BOOST_UNORDERED_BASE=unordered-boost-1.86.0 @@ -39,19 +41,8 @@ set QT_URL=https://download.qt.io/archive/qt/5.9/5.9.9/submodules/%QT_BASE%.zip set JOM_URL=http://download.qt.io/official_releases/jom/jom_1_1_3.zip ::: NSIS -set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS 3/3.11/nsis-3.11-setup.exe/download - -EXIT /B +set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS%203/3.11/nsis-3.11-setup.exe/download -:: Macro to download a file using curl or PowerShell -:downloadfile -echo Downloading %1 to %2 -where curl >nul 2>&1 -IF %ERRORLEVEL%==0 ( - curl -L "%~1" -o "%~2" -) ELSE ( - PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" -) EXIT /B diff --git a/admin/builders/download_file_macro.bat b/admin/builders/download_file_macro.bat new file mode 100644 index 0000000..96cd2fc --- /dev/null +++ b/admin/builders/download_file_macro.bat @@ -0,0 +1,13 @@ +:: Macro to download a file using curl or PowerShell +:downloadfile +SET URL=%~1 +SET OUT=%~2 + +echo Downloading %URL% to %OUT% +where curl >nul 2>&1 +IF %ERRORLEVEL%==0 ( + curl -L "%URL%" -o "%OUT%" +) ELSE ( + PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%URL%','%OUT%')" +) +EXIT /B \ No newline at end of file diff --git a/admin/builders/install_proteowizard.bat b/admin/builders/install_proteowizard.bat index ca18398..ca5ef82 100644 --- a/admin/builders/install_proteowizard.bat +++ b/admin/builders/install_proteowizard.bat @@ -1,3 +1,5 @@ +call download_file_macro.bat >NUL + set BUILD_TARGET=%1 if "%BUILD_TARGET%" == "32bit" ( set ADDRESS_MODEL=32 @@ -114,14 +116,3 @@ if not exist "%PWIZ_DIR%\lib" ( ) EXIT /B - - -:downloadfile -echo Downloading %1 to %2 -where curl >nul 2>&1 -IF %ERRORLEVEL%==0 ( - curl -L "%~1" -o "%~2" -) ELSE ( - PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" -) -EXIT /B diff --git a/admin/builders/nativew32_build.bat b/admin/builders/nativew32_build.bat index 8b0f04a..8086c53 100644 --- a/admin/builders/nativew32_build.bat +++ b/admin/builders/nativew32_build.bat @@ -11,6 +11,8 @@ @echo off +call download_file_macro.bat >NUL + set SRC_DIR=%~dp0..\..\..\ set BUILD_DIR=%SRC_DIR%\build\win32 set RELEASE_DIR=%SRC_DIR%\release\win32 @@ -159,16 +161,6 @@ cd /D "%SRC_DIR%" EXIT /B %exit_code% -:downloadfile -echo Downloading %1 to %2 -where curl >nul 2>&1 -IF %ERRORLEVEL%==0 ( - curl -L "%~1" -o "%~2" -) ELSE ( - PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" -) -EXIT /B - :copytorelease echo Copying "%1" to "%RELEASE_DIR%" diff --git a/admin/builders/nativew64_build.bat b/admin/builders/nativew64_build.bat index 2f32cad..f98bb1d 100644 --- a/admin/builders/nativew64_build.bat +++ b/admin/builders/nativew64_build.bat @@ -14,6 +14,8 @@ @echo off +call download_file_macro.bat >NUL + set SRC_DIR=%~dp0..\..\..\ set BUILD_DIR=%SRC_DIR%\build\win64 set RELEASE_DIR=%SRC_DIR%\release\win64 @@ -185,17 +187,6 @@ cd /D "%SRC_DIR%" EXIT /B %exit_code% -:downloadfile -echo Downloading %1 to %2 -where curl >nul 2>&1 -IF %ERRORLEVEL%==0 ( - curl -L "%~1" -o "%~2" -) ELSE ( - PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')" -) -EXIT /B - - :copytorelease echo Copying "%1" to "%RELEASE_DIR%" xcopy %1 "%RELEASE_DIR%" /Y From f4344b61f77eb77d2b1a74b48698e04a7b92a00a Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 17:58:28 +0200 Subject: [PATCH 09/19] Try fixing path to macro bat file --- admin/builders/_init_msvc_.bat | 2 +- admin/builders/_urls_and_file_names_.bat | 2 +- admin/builders/install_proteowizard.bat | 2 +- admin/builders/nativew32_build.bat | 2 +- admin/builders/nativew64_build.bat | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/builders/_init_msvc_.bat b/admin/builders/_init_msvc_.bat index a545d7f..3a4a7de 100644 --- a/admin/builders/_init_msvc_.bat +++ b/admin/builders/_init_msvc_.bat @@ -1,4 +1,4 @@ -call download_file_macro.bat >NUL +call %~dp0\download_file_macro.bat >NUL set BUILD_TARGET=%1 diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 25e1f11..093d5cf 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -1,4 +1,4 @@ -call download_file_macro.bat >NUL +call %~dp0\download_file_macro.bat >NUL ::: Centralized place for urls and files for all windows builders ... ::: please do not change compression type in urls, since decompression is diff --git a/admin/builders/install_proteowizard.bat b/admin/builders/install_proteowizard.bat index ca5ef82..ed44c02 100644 --- a/admin/builders/install_proteowizard.bat +++ b/admin/builders/install_proteowizard.bat @@ -1,4 +1,4 @@ -call download_file_macro.bat >NUL +call %~dp0\download_file_macro.bat >NUL set BUILD_TARGET=%1 if "%BUILD_TARGET%" == "32bit" ( diff --git a/admin/builders/nativew32_build.bat b/admin/builders/nativew32_build.bat index 8086c53..b202b68 100644 --- a/admin/builders/nativew32_build.bat +++ b/admin/builders/nativew32_build.bat @@ -11,7 +11,7 @@ @echo off -call download_file_macro.bat >NUL +call %~dp0\download_file_macro.bat >NUL set SRC_DIR=%~dp0..\..\..\ set BUILD_DIR=%SRC_DIR%\build\win32 diff --git a/admin/builders/nativew64_build.bat b/admin/builders/nativew64_build.bat index f98bb1d..422e168 100644 --- a/admin/builders/nativew64_build.bat +++ b/admin/builders/nativew64_build.bat @@ -14,7 +14,7 @@ @echo off -call download_file_macro.bat >NUL +call %~dp0\download_file_macro.bat >NUL set SRC_DIR=%~dp0..\..\..\ set BUILD_DIR=%SRC_DIR%\build\win64 From 5e9074c709a748b9fa4091868c87fa99b46a214e Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 18:11:57 +0200 Subject: [PATCH 10/19] Make sure macro is not executed upon inclusion --- admin/builders/download_file_macro.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/builders/download_file_macro.bat b/admin/builders/download_file_macro.bat index 96cd2fc..3973488 100644 --- a/admin/builders/download_file_macro.bat +++ b/admin/builders/download_file_macro.bat @@ -1,3 +1,6 @@ +@echo off +goto :eof + :: Macro to download a file using curl or PowerShell :downloadfile SET URL=%~1 From 389f8f6335d77d4c4794fffe4b16ffcc0bc45594 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 18:49:06 +0200 Subject: [PATCH 11/19] replace macro with calling .bat directly --- admin/builders/_init_msvc_.bat | 4 +--- admin/builders/_urls_and_file_names_.bat | 4 +--- .../{download_file_macro.bat => download_file.bat} | 9 ++------- admin/builders/install_proteowizard.bat | 8 +++----- admin/builders/nativew32_build.bat | 12 +++++------- admin/builders/nativew64_build.bat | 12 +++++------- 6 files changed, 17 insertions(+), 32 deletions(-) rename admin/builders/{download_file_macro.bat => download_file.bat} (74%) diff --git a/admin/builders/_init_msvc_.bat b/admin/builders/_init_msvc_.bat index 3a4a7de..7e375e4 100644 --- a/admin/builders/_init_msvc_.bat +++ b/admin/builders/_init_msvc_.bat @@ -1,8 +1,6 @@ -call %~dp0\download_file_macro.bat >NUL - set BUILD_TARGET=%1 -call :downloadfile https://github.com/microsoft/vswhere/releases/download/2.8.4/vswhere.exe vswhere.exe +call %~dp0\download_file.bat https://github.com/microsoft/vswhere/releases/download/2.8.4/vswhere.exe vswhere.exe for /f "usebackq tokens=*" %%i in (`.\vswhere.exe -legacy -latest -property installationPath`) do ( set MSVC_INSTALL_DIR=%%i ) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 093d5cf..6c67ead 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -1,5 +1,3 @@ -call %~dp0\download_file_macro.bat >NUL - ::: Centralized place for urls and files for all windows builders ... ::: please do not change compression type in urls, since decompression is ::: hardcoded in the respective buiding scripts @@ -17,7 +15,7 @@ set CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v%CMAKE_VERSION ::: https://teamcity.labkey.org/viewType.html?buildTypeId=bt81 ::: ::: without-t = without tests ::: set PWIZ_VERSION_URL=https://proteowizard.sourceforge.io/releases/bt81.xml -call :downloadfile %PWIZ_VERSION_URL% bt81.xml +call %~dp0\download_file.bat %PWIZ_VERSION_URL% bt81.xml call :extractbuildinfo echo ✅ PWIZ_BUILD_ID: %PWIZ_BUILD_ID% echo ✅ PWIZ_FILE_NAME: %PWIZ_FILE_NAME% diff --git a/admin/builders/download_file_macro.bat b/admin/builders/download_file.bat similarity index 74% rename from admin/builders/download_file_macro.bat rename to admin/builders/download_file.bat index 3973488..0f9df39 100644 --- a/admin/builders/download_file_macro.bat +++ b/admin/builders/download_file.bat @@ -1,8 +1,4 @@ -@echo off -goto :eof - -:: Macro to download a file using curl or PowerShell -:downloadfile +:: download a file using curl or PowerShell SET URL=%~1 SET OUT=%~2 @@ -12,5 +8,4 @@ IF %ERRORLEVEL%==0 ( curl -L "%URL%" -o "%OUT%" ) ELSE ( PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%URL%','%OUT%')" -) -EXIT /B \ No newline at end of file +) \ No newline at end of file diff --git a/admin/builders/install_proteowizard.bat b/admin/builders/install_proteowizard.bat index ed44c02..f9365ab 100644 --- a/admin/builders/install_proteowizard.bat +++ b/admin/builders/install_proteowizard.bat @@ -1,5 +1,3 @@ -call %~dp0\download_file_macro.bat >NUL - set BUILD_TARGET=%1 if "%BUILD_TARGET%" == "32bit" ( set ADDRESS_MODEL=32 @@ -13,7 +11,7 @@ set PWIZ_DIR=%INSTALL_DIR%\proteowizard if not exist "%PWIZ_DIR%\lib" ( echo Downloading and installing ProteoWizard if not exist "%PWIZ_DIR%" ( - call :downloadfile %PWIZ_URL% %INSTALL_DIR%\pwiz.tar.bz2 + call %~dp0\download_file.bat %PWIZ_URL% %INSTALL_DIR%\pwiz.tar.bz2 if not exist "%INSTALL_DIR%\pwiz.tar" ( %ZIP_EXE% x "%INSTALL_DIR%\pwiz.tar.bz2" -o"%INSTALL_DIR%" -aoa > NUL ) @@ -106,11 +104,11 @@ if not exist "%PWIZ_DIR%\lib" ( for /r pwiz %%x in (*.hpp, *.h) do copy "%%x" include\ /Y > NUL ::: copy the boost::asio library, which is not included by the ProteoWizard boost tar but is needed for maracluster - call :downloadfile "%BOOST_ASIO_URL%" %INSTALL_DIR%\boost_asio.zip + call %~dp0\download_file.bat "%BOOST_ASIO_URL%" %INSTALL_DIR%\boost_asio.zip %ZIP_EXE% x "%INSTALL_DIR%\boost_asio.zip" -o"%INSTALL_DIR%" -aoa > NUL PowerShell "Copy-Item -Path '%INSTALL_DIR%\%BOOST_ASIO_BASE%\boost' -Destination '%PWIZ_DIR%\libraries\boost_1_86_0' -Recurse -Force" - call :downloadfile "%BOOST_UNORDERED_URL%" %INSTALL_DIR%\boost_unordered.zip + call %~dp0\download_file.bat "%BOOST_UNORDERED_URL%" %INSTALL_DIR%\boost_unordered.zip %ZIP_EXE% x "%INSTALL_DIR%\boost_unordered.zip" -o"%INSTALL_DIR%" -aoa > NUL PowerShell "Copy-Item -Path '%INSTALL_DIR%\%BOOST_UNORDERED_BASE%\include\boost' -Destination '%PWIZ_DIR%\libraries\boost_1_86_0' -Recurse -Force" ) diff --git a/admin/builders/nativew32_build.bat b/admin/builders/nativew32_build.bat index b202b68..a41f1d0 100644 --- a/admin/builders/nativew32_build.bat +++ b/admin/builders/nativew32_build.bat @@ -11,8 +11,6 @@ @echo off -call %~dp0\download_file_macro.bat >NUL - set SRC_DIR=%~dp0..\..\..\ set BUILD_DIR=%SRC_DIR%\build\win32 set RELEASE_DIR=%SRC_DIR%\release\win32 @@ -52,7 +50,7 @@ if not exist "%RELEASE_DIR%" (md "%RELEASE_DIR%") set ZIP_DIR=%INSTALL_DIR%\%ZIP_BASE% if not exist "%ZIP_DIR%" ( echo Downloading and installing 7-Zip - call :downloadfile %ZIP_URL% %INSTALL_DIR%\7zip.exe + call %~dp0\download_file.bat %ZIP_URL% %INSTALL_DIR%\7zip.exe "%INSTALL_DIR%\7zip.exe" /S /D=%ZIP_DIR% ) set ZIP_EXE="%ZIP_DIR%\7z.exe" @@ -60,7 +58,7 @@ set ZIP_EXE="%ZIP_DIR%\7z.exe" set CMAKE_DIR=%INSTALL_DIR%\%CMAKE_BASE% if not exist "%CMAKE_DIR%" ( echo Downloading and installing CMake - call :downloadfile %CMAKE_URL% %INSTALL_DIR%\cmake.zip + call %~dp0\download_file.bat %CMAKE_URL% %INSTALL_DIR%\cmake.zip %ZIP_EXE% x "%INSTALL_DIR%\cmake.zip" -o"%INSTALL_DIR%" -aoa -xr!doc > NUL ) set CMAKE_EXE="%CMAKE_DIR%\bin\cmake.exe" @@ -72,11 +70,11 @@ if not "%NO_GUI%" == "true" ( if not exist "%INSTALL_DIR%\Qt-dynamic" ( ::: use multiple cores with jom instead of single-core nmake ::: echo Downloading Jom - call :downloadfile %JOM_URL% %INSTALL_DIR%\jom.zip + call %~dp0\download_file.bat %JOM_URL% %INSTALL_DIR%\jom.zip %ZIP_EXE% x "%INSTALL_DIR%\jom.zip" -o"%INSTALL_DIR%\jom" -aoa > NUL echo Downloading Qt base - call :downloadfile %QT_URL% %INSTALL_DIR%\qt.zip + call %~dp0\download_file.bat %QT_URL% %INSTALL_DIR%\qt.zip %ZIP_EXE% x "%INSTALL_DIR%\qt.zip" -o"%INSTALL_DIR%" -aoa > NUL cd /D "%QT_DIR%" @@ -99,7 +97,7 @@ if not "%NO_GUI%" == "true" ( set NSIS_DIR=%INSTALL_DIR%\nsis if not exist "%NSIS_DIR%" ( echo Downloading and installing NSIS installer - call :downloadfile "%NSIS_URL%" %INSTALL_DIR%\nsis.exe + call %~dp0\download_file.bat "%NSIS_URL%" %INSTALL_DIR%\nsis.exe "%INSTALL_DIR%\nsis.exe" /S /D=%INSTALL_DIR%\nsis ) setlocal diff --git a/admin/builders/nativew64_build.bat b/admin/builders/nativew64_build.bat index 422e168..2a7167f 100644 --- a/admin/builders/nativew64_build.bat +++ b/admin/builders/nativew64_build.bat @@ -14,8 +14,6 @@ @echo off -call %~dp0\download_file_macro.bat >NUL - set SRC_DIR=%~dp0..\..\..\ set BUILD_DIR=%SRC_DIR%\build\win64 set RELEASE_DIR=%SRC_DIR%\release\win64 @@ -58,7 +56,7 @@ if not exist "%RELEASE_DIR%" (md "%RELEASE_DIR%") set ZIP_DIR=%INSTALL_DIR%\%ZIP_BASE% if not exist "%ZIP_DIR%" ( echo Downloading and installing 7-Zip - call :downloadfile %ZIP_URL% %INSTALL_DIR%\7zip.exe + call %~dp0\download_file.bat %ZIP_URL% %INSTALL_DIR%\7zip.exe "%INSTALL_DIR%\7zip.exe" /S /D=%ZIP_DIR% ) set ZIP_EXE="%ZIP_DIR%\7z.exe" @@ -66,7 +64,7 @@ set ZIP_EXE="%ZIP_DIR%\7z.exe" set CMAKE_DIR=%INSTALL_DIR%\%CMAKE_BASE% if not exist "%CMAKE_DIR%" ( echo Downloading and installing CMake - call :downloadfile %CMAKE_URL% %INSTALL_DIR%\cmake.zip + call %~dp0\download_file.bat %CMAKE_URL% %INSTALL_DIR%\cmake.zip %ZIP_EXE% x "%INSTALL_DIR%\cmake.zip" -o"%INSTALL_DIR%" -aoa -xr!doc > NUL ) set CMAKE_EXE="%CMAKE_DIR%\bin\cmake.exe" @@ -78,11 +76,11 @@ if not "%NO_GUI%" == "true" ( if not exist "%INSTALL_DIR%\Qt-dynamic" ( ::: use multiple cores with jom instead of single-core nmake ::: echo Downloading Jom - call :downloadfile %JOM_URL% %INSTALL_DIR%\jom.zip + call %~dp0\download_file.bat %JOM_URL% %INSTALL_DIR%\jom.zip %ZIP_EXE% x "%INSTALL_DIR%\jom.zip" -o"%INSTALL_DIR%\jom" -aoa > NUL echo Downloading Qt base - call :downloadfile %QT_URL% %INSTALL_DIR%\qt.zip + call %~dp0\download_file.bat %QT_URL% %INSTALL_DIR%\qt.zip %ZIP_EXE% x "%INSTALL_DIR%\qt.zip" -o"%INSTALL_DIR%" -aoa > NUL cd /D "%QT_DIR%" @@ -105,7 +103,7 @@ if not "%NO_GUI%" == "true" ( set NSIS_DIR=%INSTALL_DIR%\nsis if not exist "%NSIS_DIR%" ( echo Downloading and installing NSIS installer - call :downloadfile "%NSIS_URL%" %INSTALL_DIR%\nsis.exe + call %~dp0\download_file.bat "%NSIS_URL%" %INSTALL_DIR%\nsis.exe "%INSTALL_DIR%\nsis.exe" /S /D=%INSTALL_DIR%\nsis ) setlocal From 320dff44d5211413117609b2c1ff70c188bfaffa Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 23:04:13 +0200 Subject: [PATCH 12/19] Trying to figure out where %~dp0 changes --- admin/builders/nativew64_build.bat | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/admin/builders/nativew64_build.bat b/admin/builders/nativew64_build.bat index 2a7167f..d0ff72b 100644 --- a/admin/builders/nativew64_build.bat +++ b/admin/builders/nativew64_build.bat @@ -13,14 +13,14 @@ ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @echo off - +echo %~dp0 set SRC_DIR=%~dp0..\..\..\ set BUILD_DIR=%SRC_DIR%\build\win64 set RELEASE_DIR=%SRC_DIR%\release\win64 set BUILD_TYPE=Release set NO_GUI=false set VENDOR=false - +echo %~dp0 :parse IF "%~1"=="" GOTO endparse IF "%~1"=="-s" (set SRC_DIR=%~2) @@ -35,27 +35,32 @@ GOTO parse del "%BUILD_DIR%\maracluster\mar*.exe" >nul 2>&1 del "%BUILD_DIR%\maracluster-vendor-support\mar*.exe" >nul 2>&1 del "%BUILD_DIR%\maracluster-gui\mar*.exe" >nul 2>&1 - +echo %~dp0 call %SRC_DIR%\maracluster\admin\builders\_init_msvc_.bat 64bit if %ERRORLEVEL% NEQ 0 ( EXIT /B %ERRORLEVEL% ) - +echo %~dp0 :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::: START INSTALL DEPENDENCIES :::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::: +echo %~dp0 + setlocal call %SRC_DIR%\maracluster\admin\builders\_urls_and_file_names_.bat +echo %~dp0 set INSTALL_DIR=%BUILD_DIR%\tools if not exist "%INSTALL_DIR%" (md "%INSTALL_DIR%") if not exist "%RELEASE_DIR%" (md "%RELEASE_DIR%") +echo %~dp0 set ZIP_DIR=%INSTALL_DIR%\%ZIP_BASE% if not exist "%ZIP_DIR%" ( echo Downloading and installing 7-Zip + echo %~dp0 call %~dp0\download_file.bat %ZIP_URL% %INSTALL_DIR%\7zip.exe "%INSTALL_DIR%\7zip.exe" /S /D=%ZIP_DIR% ) From c5eab7a49c7233d5475231b2a57fd542c923faaf Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 23:09:01 +0200 Subject: [PATCH 13/19] Explicitly set SCRIPT_DIR because %~dp0 mysteriously changes --- admin/builders/nativew32_build.bat | 11 ++++++----- admin/builders/nativew64_build.bat | 24 ++++++++++-------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/admin/builders/nativew32_build.bat b/admin/builders/nativew32_build.bat index a41f1d0..b8a65d5 100644 --- a/admin/builders/nativew32_build.bat +++ b/admin/builders/nativew32_build.bat @@ -12,6 +12,7 @@ @echo off set SRC_DIR=%~dp0..\..\..\ +set SCRIPT_DIR=%~dp0 set BUILD_DIR=%SRC_DIR%\build\win32 set RELEASE_DIR=%SRC_DIR%\release\win32 set BUILD_TYPE=Release @@ -50,7 +51,7 @@ if not exist "%RELEASE_DIR%" (md "%RELEASE_DIR%") set ZIP_DIR=%INSTALL_DIR%\%ZIP_BASE% if not exist "%ZIP_DIR%" ( echo Downloading and installing 7-Zip - call %~dp0\download_file.bat %ZIP_URL% %INSTALL_DIR%\7zip.exe + call %SCRIPT_DIR%\download_file.bat %ZIP_URL% %INSTALL_DIR%\7zip.exe "%INSTALL_DIR%\7zip.exe" /S /D=%ZIP_DIR% ) set ZIP_EXE="%ZIP_DIR%\7z.exe" @@ -58,7 +59,7 @@ set ZIP_EXE="%ZIP_DIR%\7z.exe" set CMAKE_DIR=%INSTALL_DIR%\%CMAKE_BASE% if not exist "%CMAKE_DIR%" ( echo Downloading and installing CMake - call %~dp0\download_file.bat %CMAKE_URL% %INSTALL_DIR%\cmake.zip + call %SCRIPT_DIR%\download_file.bat %CMAKE_URL% %INSTALL_DIR%\cmake.zip %ZIP_EXE% x "%INSTALL_DIR%\cmake.zip" -o"%INSTALL_DIR%" -aoa -xr!doc > NUL ) set CMAKE_EXE="%CMAKE_DIR%\bin\cmake.exe" @@ -70,11 +71,11 @@ if not "%NO_GUI%" == "true" ( if not exist "%INSTALL_DIR%\Qt-dynamic" ( ::: use multiple cores with jom instead of single-core nmake ::: echo Downloading Jom - call %~dp0\download_file.bat %JOM_URL% %INSTALL_DIR%\jom.zip + call %SCRIPT_DIR%\download_file.bat %JOM_URL% %INSTALL_DIR%\jom.zip %ZIP_EXE% x "%INSTALL_DIR%\jom.zip" -o"%INSTALL_DIR%\jom" -aoa > NUL echo Downloading Qt base - call %~dp0\download_file.bat %QT_URL% %INSTALL_DIR%\qt.zip + call %SCRIPT_DIR%\download_file.bat %QT_URL% %INSTALL_DIR%\qt.zip %ZIP_EXE% x "%INSTALL_DIR%\qt.zip" -o"%INSTALL_DIR%" -aoa > NUL cd /D "%QT_DIR%" @@ -97,7 +98,7 @@ if not "%NO_GUI%" == "true" ( set NSIS_DIR=%INSTALL_DIR%\nsis if not exist "%NSIS_DIR%" ( echo Downloading and installing NSIS installer - call %~dp0\download_file.bat "%NSIS_URL%" %INSTALL_DIR%\nsis.exe + call %SCRIPT_DIR%\download_file.bat "%NSIS_URL%" %INSTALL_DIR%\nsis.exe "%INSTALL_DIR%\nsis.exe" /S /D=%INSTALL_DIR%\nsis ) setlocal diff --git a/admin/builders/nativew64_build.bat b/admin/builders/nativew64_build.bat index d0ff72b..90714d7 100644 --- a/admin/builders/nativew64_build.bat +++ b/admin/builders/nativew64_build.bat @@ -13,14 +13,15 @@ ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @echo off -echo %~dp0 + set SRC_DIR=%~dp0..\..\..\ +set SCRIPT_DIR=%~dp0 set BUILD_DIR=%SRC_DIR%\build\win64 set RELEASE_DIR=%SRC_DIR%\release\win64 set BUILD_TYPE=Release set NO_GUI=false set VENDOR=false -echo %~dp0 + :parse IF "%~1"=="" GOTO endparse IF "%~1"=="-s" (set SRC_DIR=%~2) @@ -35,33 +36,28 @@ GOTO parse del "%BUILD_DIR%\maracluster\mar*.exe" >nul 2>&1 del "%BUILD_DIR%\maracluster-vendor-support\mar*.exe" >nul 2>&1 del "%BUILD_DIR%\maracluster-gui\mar*.exe" >nul 2>&1 -echo %~dp0 + call %SRC_DIR%\maracluster\admin\builders\_init_msvc_.bat 64bit if %ERRORLEVEL% NEQ 0 ( EXIT /B %ERRORLEVEL% ) -echo %~dp0 + :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::: START INSTALL DEPENDENCIES :::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::: -echo %~dp0 - setlocal call %SRC_DIR%\maracluster\admin\builders\_urls_and_file_names_.bat -echo %~dp0 set INSTALL_DIR=%BUILD_DIR%\tools if not exist "%INSTALL_DIR%" (md "%INSTALL_DIR%") if not exist "%RELEASE_DIR%" (md "%RELEASE_DIR%") -echo %~dp0 set ZIP_DIR=%INSTALL_DIR%\%ZIP_BASE% if not exist "%ZIP_DIR%" ( echo Downloading and installing 7-Zip - echo %~dp0 - call %~dp0\download_file.bat %ZIP_URL% %INSTALL_DIR%\7zip.exe + call %SCRIPT_DIR%\download_file.bat %ZIP_URL% %INSTALL_DIR%\7zip.exe "%INSTALL_DIR%\7zip.exe" /S /D=%ZIP_DIR% ) set ZIP_EXE="%ZIP_DIR%\7z.exe" @@ -69,7 +65,7 @@ set ZIP_EXE="%ZIP_DIR%\7z.exe" set CMAKE_DIR=%INSTALL_DIR%\%CMAKE_BASE% if not exist "%CMAKE_DIR%" ( echo Downloading and installing CMake - call %~dp0\download_file.bat %CMAKE_URL% %INSTALL_DIR%\cmake.zip + call %SCRIPT_DIR%\download_file.bat %CMAKE_URL% %INSTALL_DIR%\cmake.zip %ZIP_EXE% x "%INSTALL_DIR%\cmake.zip" -o"%INSTALL_DIR%" -aoa -xr!doc > NUL ) set CMAKE_EXE="%CMAKE_DIR%\bin\cmake.exe" @@ -81,11 +77,11 @@ if not "%NO_GUI%" == "true" ( if not exist "%INSTALL_DIR%\Qt-dynamic" ( ::: use multiple cores with jom instead of single-core nmake ::: echo Downloading Jom - call %~dp0\download_file.bat %JOM_URL% %INSTALL_DIR%\jom.zip + call %SCRIPT_DIR%\download_file.bat %JOM_URL% %INSTALL_DIR%\jom.zip %ZIP_EXE% x "%INSTALL_DIR%\jom.zip" -o"%INSTALL_DIR%\jom" -aoa > NUL echo Downloading Qt base - call %~dp0\download_file.bat %QT_URL% %INSTALL_DIR%\qt.zip + call %SCRIPT_DIR%\download_file.bat %QT_URL% %INSTALL_DIR%\qt.zip %ZIP_EXE% x "%INSTALL_DIR%\qt.zip" -o"%INSTALL_DIR%" -aoa > NUL cd /D "%QT_DIR%" @@ -108,7 +104,7 @@ if not "%NO_GUI%" == "true" ( set NSIS_DIR=%INSTALL_DIR%\nsis if not exist "%NSIS_DIR%" ( echo Downloading and installing NSIS installer - call %~dp0\download_file.bat "%NSIS_URL%" %INSTALL_DIR%\nsis.exe + call %SCRIPT_DIR%\download_file.bat "%NSIS_URL%" %INSTALL_DIR%\nsis.exe "%INSTALL_DIR%\nsis.exe" /S /D=%INSTALL_DIR%\nsis ) setlocal From 13ee5e025e1498ae9de0fb7e41d8f56a35a8e42b Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 23:29:10 +0200 Subject: [PATCH 14/19] Escape %20 in urls --- admin/builders/_urls_and_file_names_.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 6c67ead..54bcfe3 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -25,9 +25,9 @@ set PWIZ_URL=https://mc-tca-01.s3.us-west-2.amazonaws.com/ProteoWizard/bt81/%PWI set BOOST_BASE=boost_1_86_0 set ZLIB_BASE=zlib-1.2.3 -::: Boost asio library +::: Boost asio library (note the additional % before %20 to prevent interpretation as a variable) set BOOST_ASIO_BASE=boost_asio_1_30_2 -set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2%20(Stable)/%BOOST_ASIO_BASE%.zip/download +set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2%%20(Stable)/%BOOST_ASIO_BASE%.zip/download ::: Boost unordered library set BOOST_UNORDERED_BASE=unordered-boost-1.86.0 @@ -38,8 +38,8 @@ set QT_BASE=qtbase-opensource-src-5.9.9 set QT_URL=https://download.qt.io/archive/qt/5.9/5.9.9/submodules/%QT_BASE%.zip set JOM_URL=http://download.qt.io/official_releases/jom/jom_1_1_3.zip -::: NSIS -set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS%203/3.11/nsis-3.11-setup.exe/download +::: NSIS (note the additional % before %20 to prevent interpretation as a variable) +set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS%%203/3.11/nsis-3.11-setup.exe/download EXIT /B From 328375c5941f4d188b07e2fb082f861e0d925008 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 23:43:04 +0200 Subject: [PATCH 15/19] Escape %20 in urls more --- admin/builders/_urls_and_file_names_.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/builders/_urls_and_file_names_.bat b/admin/builders/_urls_and_file_names_.bat index 54bcfe3..d014e13 100644 --- a/admin/builders/_urls_and_file_names_.bat +++ b/admin/builders/_urls_and_file_names_.bat @@ -25,9 +25,9 @@ set PWIZ_URL=https://mc-tca-01.s3.us-west-2.amazonaws.com/ProteoWizard/bt81/%PWI set BOOST_BASE=boost_1_86_0 set ZLIB_BASE=zlib-1.2.3 -::: Boost asio library (note the additional % before %20 to prevent interpretation as a variable) +::: Boost asio library (note the additional %%% before %20 to prevent interpretation as a variable) set BOOST_ASIO_BASE=boost_asio_1_30_2 -set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2%%20(Stable)/%BOOST_ASIO_BASE%.zip/download +set BOOST_ASIO_URL=https://sourceforge.net/projects/asio/files/asio/1.30.2%%%%20(Stable)/%BOOST_ASIO_BASE%.zip/download ::: Boost unordered library set BOOST_UNORDERED_BASE=unordered-boost-1.86.0 @@ -38,8 +38,8 @@ set QT_BASE=qtbase-opensource-src-5.9.9 set QT_URL=https://download.qt.io/archive/qt/5.9/5.9.9/submodules/%QT_BASE%.zip set JOM_URL=http://download.qt.io/official_releases/jom/jom_1_1_3.zip -::: NSIS (note the additional % before %20 to prevent interpretation as a variable) -set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS%%203/3.11/nsis-3.11-setup.exe/download +::: NSIS (note the additional %%% before %20 to prevent interpretation as a variable) +set NSIS_URL=https://sourceforge.net/projects/nsis/files/NSIS%%%%203/3.11/nsis-3.11-setup.exe/download EXIT /B From 194cc7ce508c37cf932bab5a855a5cb942beea44 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 23:55:26 +0200 Subject: [PATCH 16/19] Adapt build and release directories --- .github/workflows/build_and_release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 86d9606..02e2836 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -103,18 +103,17 @@ jobs: steps: - uses: actions/checkout@v2 - name: create_dirs - run: CD .. || MKDIR my_rel my_build + run: MKDIR my_rel my_build - name: configure_and_make run: | - CD .. SET base_dir=%cd% ECHO %base_dir% - CALL maracluster\admin\builders\nativew64_build.bat -s %base_dir% -r %base_dir%\my_rel -b %base_dir%\my_build -g + CALL maracluster\admin\builders\nativew64_build.bat -s %base_dir%\.. -r %base_dir%\my_rel -b %base_dir%\my_build -g - name: Upload packages uses: actions/upload-artifact@v4 with: name: win64-packages - path: ..\my_rel + path: my_rel pre-release: runs-on: ubuntu-latest From 8c461fa5308a4d9230d9dffcf15283ba8f9578b2 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Thu, 26 Jun 2025 23:56:33 +0200 Subject: [PATCH 17/19] Fix build script path --- .github/workflows/build_and_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 02e2836..d5eacfb 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -108,7 +108,7 @@ jobs: run: | SET base_dir=%cd% ECHO %base_dir% - CALL maracluster\admin\builders\nativew64_build.bat -s %base_dir%\.. -r %base_dir%\my_rel -b %base_dir%\my_build -g + CALL admin\builders\nativew64_build.bat -s %base_dir%\.. -r %base_dir%\my_rel -b %base_dir%\my_build -g - name: Upload packages uses: actions/upload-artifact@v4 with: From 4bb4959307e3cd7dd6fee725266c45ae00ab9f25 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Fri, 27 Jun 2025 00:14:26 +0200 Subject: [PATCH 18/19] Fix src_dir path --- .github/workflows/build_and_release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index d5eacfb..d29e036 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -108,7 +108,10 @@ jobs: run: | SET base_dir=%cd% ECHO %base_dir% - CALL admin\builders\nativew64_build.bat -s %base_dir%\.. -r %base_dir%\my_rel -b %base_dir%\my_build -g + CD .. + SET src_dir=%cd% + ECHO %src_dir% + CALL maracluster\admin\builders\nativew64_build.bat -s %src_dir% -r %base_dir%\my_rel -b %base_dir%\my_build -g - name: Upload packages uses: actions/upload-artifact@v4 with: From b69dd32e55279a7c4b614f791c392a4024ec1d71 Mon Sep 17 00:00:00 2001 From: Matthew The Date: Fri, 27 Jun 2025 00:27:18 +0200 Subject: [PATCH 19/19] Move build directory --- .github/workflows/build_and_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index d29e036..0170a48 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -111,7 +111,7 @@ jobs: CD .. SET src_dir=%cd% ECHO %src_dir% - CALL maracluster\admin\builders\nativew64_build.bat -s %src_dir% -r %base_dir%\my_rel -b %base_dir%\my_build -g + CALL maracluster\admin\builders\nativew64_build.bat -s %src_dir% -r %base_dir%\my_rel -b %src_dir%\my_build -g - name: Upload packages uses: actions/upload-artifact@v4 with: