Skip to content

Commit

Permalink
Merge pull request #4376 from offhub/buildVariables
Browse files Browse the repository at this point in the history
Build variables are gathered in a single file
  • Loading branch information
DavidXanatos authored Nov 18, 2024
2 parents e5e6bcc + a307347 commit 27819f9
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 47 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ on:
- '**/COPYING'

env:
qt_version: 5.15.16
#qt_version: 5.15.16
qt6_version: 6.3.1
openssl_version: 3.4.0
ghSsl_user: xanasoft
ghSsl_repo: openssl-builds
#openssl_version: 3.4.0
#ghSsl_user: xanasoft
#ghSsl_repo: openssl-builds
#ghQt6Win7_user: DavidXanatos
#ghQt6Win7_repo: qtbase
ghQtBuilds_user: xanasoft
ghQtBuilds_repo: qt-builds
ghQtBuilds_hash_x86: 502e9a36a52918af4e116cd74c16c6c260d029087aaeee3775ab0e5d3f6a2705
ghQtBuilds_hash_x64: 673c288feeabd11ec66f9f454d49cde3945cbd3e3f71283b7a6c4df0893b19f2
#ghQtBuilds_user: xanasoft
#ghQtBuilds_repo: qt-builds
#ghQtBuilds_hash_x86: 502e9a36a52918af4e116cd74c16c6c260d029087aaeee3775ab0e5d3f6a2705
#ghQtBuilds_hash_x64: 673c288feeabd11ec66f9f454d49cde3945cbd3e3f71283b7a6c4df0893b19f2

jobs:
Build_x64:
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
# cache: true

- name: Install Qt5 x64
run: SandboxiePlus\install_qt.cmd x64 ${{ env.qt_version }} ${{ env.qt6_version }} ${{ env.ghQtBuilds_user }} ${{ env.ghQtBuilds_repo }} ${{ env.ghQtBuilds_hash_x86 }} ${{ env.ghQtBuilds_hash_x64 }}
run: SandboxiePlus\install_qt.cmd x64

- name: Installing Jom
# if: steps.cache-qt.outputs.cache-hit != 'true'
Expand All @@ -130,7 +130,7 @@ jobs:
#

- name: Build Sandboxie-Plus x64
run: SandboxiePlus\qmake_plus.cmd x64 ${{ env.qt_version }} ${{ env.qt6_version }}
run: SandboxiePlus\qmake_plus.cmd x64

- name: Build SbieShell x64
run: msbuild /t:restore,build -p:RestorePackagesConfig=true SandboxiePlus\SbieShell\SbieShell.sln /p:Configuration="Release" /p:Platform=x64
Expand All @@ -147,19 +147,19 @@ jobs:
#

# - name: Add Windows 7 compatible Qt6 DLLs
# run: Installer\fix_qt6_win7.cmd ${{ env.qt6_version }} ${{ env.ghQt6Win7_user }} ${{ env.ghQt6Win7_repo }}
# run: Installer\fix_qt6_win7.cmd

- name: Add missing languages for Qt5 (issue 1528)
run: Installer\fix_qt5_languages.cmd x64 ${{ env.qt_version }} ${{ env.qt6_version }}
run: Installer\fix_qt5_languages.cmd x64

- name: Get openssl binaries
run: Installer\get_openssl.cmd ${{ env.openssl_version }} ${{ env.ghSsl_user }} ${{ env.ghSsl_repo }}
run: Installer\get_openssl.cmd

- name: Get 7z binaries
run: Installer\get_7zip.cmd

- name: Merging Build
run: Installer\copy_build.cmd x64 ${{ env.qt_version }} ${{ env.qt6_version }} ${{ env.openssl_version }}
run: Installer\copy_build.cmd x64

- name: Collect installer assets
run: Installer\get_assets.cmd
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
#

- name: Build Sandboxie-Plus ARM64
run: SandboxiePlus\qmake_plus.cmd ARM64 ${{ env.qt_version }} ${{ env.qt6_version }}
run: SandboxiePlus\qmake_plus.cmd ARM64

- name: Build SbieShell ARM64
run: msbuild /t:restore,build -p:RestorePackagesConfig=true SandboxiePlus\SbieShell\SbieShell.sln /p:Configuration="Release" /p:Platform=ARM64
Expand All @@ -259,13 +259,13 @@ jobs:
#

- name: Get openssl binaries
run: Installer\get_openssl.cmd ${{ env.openssl_version }} ${{ env.ghSsl_user }} ${{ env.ghSsl_repo }}
run: Installer\get_openssl.cmd

- name: Get 7z binaries
run: Installer\get_7zip.cmd

- name: Merging Build
run: Installer\copy_build.cmd ARM64 ${{ env.qt_version }} ${{ env.qt6_version }} ${{ env.openssl_version }}
run: Installer\copy_build.cmd ARM64

- name: Upload Sandboxie ARM64
#if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
#

- name: Install Qt5 x86
run: SandboxiePlus\install_qt.cmd Win32 ${{ env.qt_version }} ${{ env.qt6_version }} ${{ env.ghQtBuilds_user }} ${{ env.ghQtBuilds_repo }} ${{ env.ghQtBuilds_hash_x86 }} ${{ env.ghQtBuilds_hash_x64 }}
run: SandboxiePlus\install_qt.cmd Win32

- name: Installing Jom
# if: steps.cache-qt.outputs.cache-hit != 'true'
Expand All @@ -311,7 +311,7 @@ jobs:
#

- name: Build Sandboxie-Plus x86
run: SandboxiePlus\qmake_plus.cmd Win32 ${{ env.qt_version }} ${{ env.qt6_version }}
run: SandboxiePlus\qmake_plus.cmd Win32

#
# Compile Sandboxie Tools
Expand All @@ -325,16 +325,16 @@ jobs:
#

- name: Add missing languages for Qt5 (issue 1528)
run: Installer\fix_qt5_languages.cmd Win32 ${{ env.qt_version }} ${{ env.qt6_version }}
run: Installer\fix_qt5_languages.cmd Win32

- name: Get openssl binaries
run: Installer\get_openssl.cmd ${{ env.openssl_version }} ${{ env.ghSsl_user }} ${{ env.ghSsl_repo }}
run: Installer\get_openssl.cmd

- name: Get 7z binaries
run: Installer\get_7zip.cmd

- name: Merging Build
run: Installer\copy_build.cmd x86 ${{ env.qt_version }} ${{ env.qt6_version }} ${{ env.openssl_version }}
run: Installer\copy_build.cmd x86

- name: Upload Sandboxie x86
#if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
Expand Down
11 changes: 11 additions & 0 deletions Installer/buildVariables.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@echo on

set "qt_version=5.15.16"
set "qt6_version=6.3.1"
set "openssl_version=3.4.0"
set "ghSsl_user=xanasoft"
set "ghSsl_repo=openssl-builds"
set "ghQtBuilds_user=xanasoft"
set "ghQtBuilds_repo=qt-builds"
set "ghQtBuilds_hash_x86=502e9a36a52918af4e116cd74c16c6c260d029087aaeee3775ab0e5d3f6a2705"
set "ghQtBuilds_hash_x64=673c288feeabd11ec66f9f454d49cde3945cbd3e3f71283b7a6c4df0893b19f2"
12 changes: 8 additions & 4 deletions Installer/copy_build.cmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
call "%~dp0..\Installer\buildVariables.cmd"

REM @ECHO OFF

echo %*
IF "%~4" == "" ( set "openssl_version=3.4.0" ) ELSE ( set "openssl_version=%~4" )
IF "%~3" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~3" )
IF "%~2" == "" ( set "qt_version=5.15.16" ) ELSE ( set "qt_version=%~2" )
REM echo %*
REM IF "%~4" == "" ( set "openssl_version=3.4.0" ) ELSE ( set "openssl_version=%~4" )
REM IF "%~3" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~3" )
REM IF "%~2" == "" ( set "qt_version=5.15.16" ) ELSE ( set "qt_version=%~2" )

IF "%openssl_version:~0,3%" == "1.1" ( set "sslMajorVersion=1_1" ) ELSE ( set "sslMajorVersion=3" )

Expand All @@ -12,13 +14,15 @@ IF %1 == x86 (
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
set qtPath=%~dp0..\..\Qt\%qt_version%\msvc2019
set instPath=%~dp0\SbiePlus_x86
set "sslMajorVersion=3"
)
IF %1 == x64 (
set archPath=x64
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
REM set qtPath=%~dp0..\..\Qt\%qt6_version%\msvc2019_64
set qtPath=%~dp0..\..\Qt\%qt_version%\msvc2019_64
set instPath=%~dp0\SbiePlus_x64
set "sslMajorVersion=3"
)
IF %1 == ARM64 (
set archPath=ARM64
Expand Down
8 changes: 5 additions & 3 deletions Installer/fix_qt5_languages.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
echo %*
IF "%~3" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~3" )
IF "%~2" == "" ( set "qt_version=5.15.16" ) ELSE ( set "qt_version=%~2" )
call "%~dp0..\Installer\buildVariables.cmd"

REM echo %*
REM IF "%~3" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~3" )
REM IF "%~2" == "" ( set "qt_version=5.15.16" ) ELSE ( set "qt_version=%~2" )

if %1 == x64 if exist %~dp0..\..\Qt\%qt_version%\msvc2019_64\bin\lrelease.exe set PATH=%PATH%;%~dp0..\..\Qt\%qt_version%\msvc2019_64\bin\
if %1 == Win32 if exist %~dp0..\..\Qt\%qt_version%\msvc2019\bin\lrelease.exe set PATH=%PATH%;%~dp0..\..\Qt\%qt_version%\msvc2019\bin\
Expand Down
10 changes: 6 additions & 4 deletions Installer/fix_qt6_win7.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
echo %*
IF "%~3" == "" ( set "ghQt6Win7_repo=qtbase" ) ELSE ( set "ghQt6Win7_repo=%~3" )
IF "%~2" == "" ( set "ghQt6Win7_user=DavidXanatos" ) ELSE ( set "ghQt6Win7_user=%~2" )
IF "%~1" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~1" )
call "%~dp0..\Installer\buildVariables.cmd"

REM echo %*
REM IF "%~3" == "" ( set "ghQt6Win7_repo=qtbase" ) ELSE ( set "ghQt6Win7_repo=%~3" )
REM IF "%~2" == "" ( set "ghQt6Win7_user=DavidXanatos" ) ELSE ( set "ghQt6Win7_user=%~2" )
REM IF "%~1" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~1" )

curl --ssl-no-revoke -L https://github.com/%ghQt6Win7_user%/%ghQt6Win7_repo%/releases/download/v%qt6_version%-w7/Qt%qt6_version%-w7.zip -o %~dp0..\..\Qt%qt6_version%-w7.zip
"C:\Program Files\7-Zip\7z.exe" x -o%~dp0..\..\Qt\%qt6_version%\msvc2019_64\ %~dp0..\..\Qt%qt6_version%-w7.zip -y
10 changes: 6 additions & 4 deletions Installer/get_openssl.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
echo %*
IF "%~3" == "" ( set "ghSsl_repo=openssl-builds" ) ELSE ( set "ghSsl_repo=%~3" )
IF "%~2" == "" ( set "ghSsl_user=xanasoft" ) ELSE ( set "ghSsl_user=%~2" )
IF "%~1" == "" ( set "openssl_version=3.4.0" ) ELSE ( set "openssl_version=%~1" )
call "%~dp0..\Installer\buildVariables.cmd"

REM echo %*
REM IF "%~3" == "" ( set "ghSsl_repo=openssl-builds" ) ELSE ( set "ghSsl_repo=%~3" )
REM IF "%~2" == "" ( set "ghSsl_user=xanasoft" ) ELSE ( set "ghSsl_user=%~2" )
REM IF "%~1" == "" ( set "openssl_version=3.4.0" ) ELSE ( set "openssl_version=%~1" )

set "openssl_version_underscore=%openssl_version:.=_%"

Expand Down
16 changes: 9 additions & 7 deletions SandboxiePlus/install_qt.cmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
echo %*
IF "%~7" == "" ( set "ghQtBuilds_hash_x64=673c288feeabd11ec66f9f454d49cde3945cbd3e3f71283b7a6c4df0893b19f2" ) ELSE ( set "ghQtBuilds_hash_x64=%~7" )
IF "%~6" == "" ( set "ghQtBuilds_hash_x86=502e9a36a52918af4e116cd74c16c6c260d029087aaeee3775ab0e5d3f6a2705" ) ELSE ( set "ghQtBuilds_hash_x86=%~6" )
IF "%~5" == "" ( set "ghQtBuilds_repo=qt-builds" ) ELSE ( set "ghQtBuilds_repo=%~5" )
IF "%~4" == "" ( set "ghQtBuilds_user=xanasoft" ) ELSE ( set "ghQtBuilds_user=%~4" )
IF "%~3" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~3" )
IF "%~2" == "" ( set "qt_version=5.15.16" ) ELSE ( set "qt_version=%~2" )
call "%~dp0..\Installer\buildVariables.cmd"

REM echo %*
REM IF "%~7" == "" ( set "ghQtBuilds_hash_x64=673c288feeabd11ec66f9f454d49cde3945cbd3e3f71283b7a6c4df0893b19f2" ) ELSE ( set "ghQtBuilds_hash_x64=%~7" )
REM IF "%~6" == "" ( set "ghQtBuilds_hash_x86=502e9a36a52918af4e116cd74c16c6c260d029087aaeee3775ab0e5d3f6a2705" ) ELSE ( set "ghQtBuilds_hash_x86=%~6" )
REM IF "%~5" == "" ( set "ghQtBuilds_repo=qt-builds" ) ELSE ( set "ghQtBuilds_repo=%~5" )
REM IF "%~4" == "" ( set "ghQtBuilds_user=xanasoft" ) ELSE ( set "ghQtBuilds_user=%~4" )
REM IF "%~3" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~3" )
REM IF "%~2" == "" ( set "qt_version=5.15.16" ) ELSE ( set "qt_version=%~2" )

if %1 == Win32 (
if exist %~dp0..\..\Qt\%qt_version%\msvc2019\bin\qmake.exe goto done
Expand Down
8 changes: 5 additions & 3 deletions SandboxiePlus/qmake_plus.cmd
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
call "%~dp0..\Installer\buildVariables.cmd"

REM @echo off
REM echo Current dir: %cd%
REM echo folder: %~dp0
REM echo arch: %1
REM echo qt_version: %2
REM echo qt6_version: %3

echo %*
IF "%~3" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~3" )
IF "%~2" == "" ( set "qt_version=5.15.16" ) ELSE ( set "qt_version=%~2" )
REM echo %*
REM IF "%~3" == "" ( set "qt6_version=6.3.1" ) ELSE ( set "qt6_version=%~3" )
REM IF "%~2" == "" ( set "qt_version=5.15.16" ) ELSE ( set "qt_version=%~2" )

IF %1 == Win32 (
set qt_path=%~dp0..\..\Qt\%qt_version%\msvc2019
Expand Down

0 comments on commit 27819f9

Please sign in to comment.