Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 6 additions & 4 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,20 @@ 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
CD ..
SET src_dir=%cd%
ECHO %src_dir%
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:
name: win64-packages
path: ..\my_rel
path: my_rel

pre-release:
runs-on: ubuntu-latest
Expand Down
9 changes: 2 additions & 7 deletions admin/builders/_init_msvc_.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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
)
Expand Down Expand Up @@ -58,9 +58,4 @@ if not defined DevEnvDir (
)
)

EXIT /B %ERRORLEVEL%

:downloadfile
echo Downloading %1 to %2
PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')"
EXIT /B
EXIT /B %ERRORLEVEL%
44 changes: 28 additions & 16 deletions admin/builders/_urls_and_file_names_.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
::: hardcoded in the respective buiding scripts

::: 7-zip
set ZIP_BASE=7zi
set ZIP_URL=https://kumisystems.dl.sourceforge.net/project/sevenzip/7-Zip/19.00/7z1900.exe
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
Expand All @@ -14,30 +14,42 @@ 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 %~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%
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
::: 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

::: 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
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
::: 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

:downloadfile
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
::: 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=<build_id.tmp
set /p PWIZ_FILE_NAME=<file_name.tmp
EXIT /B
11 changes: 11 additions & 0 deletions admin/builders/download_file.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:: download a file using curl or PowerShell
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%')"
)
16 changes: 8 additions & 8 deletions admin/builders/install_proteowizard.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,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
)
Expand All @@ -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 ^
Expand Down Expand Up @@ -103,14 +104,13 @@ 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_76_0' -Recurse -Force"
)

EXIT /B
PowerShell "Copy-Item -Path '%INSTALL_DIR%\%BOOST_ASIO_BASE%\boost' -Destination '%PWIZ_DIR%\libraries\boost_1_86_0' -Recurse -Force"

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"
)

:downloadfile
PowerShell "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; (new-object System.Net.WebClient).DownloadFile('%1','%2')"
EXIT /B
17 changes: 7 additions & 10 deletions admin/builders/nativew32_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -50,15 +51,15 @@ 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
"%INSTALL_DIR%\7zip.exe" /S /D=%INSTALL_DIR%\7zip
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"

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 %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"
Expand All @@ -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 :downloadfile %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 :downloadfile %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%"
Expand All @@ -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 :downloadfile "%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
Expand Down Expand Up @@ -159,10 +160,6 @@ 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')"
EXIT /B

:copytorelease
echo Copying "%1" to "%RELEASE_DIR%"
Expand Down
17 changes: 7 additions & 10 deletions admin/builders/nativew64_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@echo off

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
Expand Down Expand Up @@ -56,15 +57,15 @@ 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
"%INSTALL_DIR%\7zip.exe" /S /D=%INSTALL_DIR%\7zip
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"

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 %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"
Expand All @@ -76,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 :downloadfile %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 :downloadfile %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%"
Expand All @@ -103,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 :downloadfile "%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
Expand Down Expand Up @@ -184,10 +185,6 @@ 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')"
EXIT /B

:copytorelease
echo Copying "%1" to "%RELEASE_DIR%"
Expand Down
Loading