Skip to content

Commit

Permalink
release #47
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Nov 29, 2024
1 parent 721532d commit 631258b
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,34 @@ jobs:
run: |
choco install ninja -y
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
choco install perl -y
choco install python -y
choco install git -y
- name: Download and Extract Qt Prebuilt Binaries (Windows)
- name: Download and Build Qt (Windows)
if: matrix.os == 'windows-latest'
run: |
$qtDownloadUrl = "https://download.qt.io/official_releases/qt/6.5/6.5.3/qt-opensource-windows-x86-6.5.3.exe"
$qtInstaller = "C:\\QtInstaller.exe"
Invoke-WebRequest -Uri $qtDownloadUrl -OutFile $qtInstaller
Start-Process -FilePath $qtInstaller -ArgumentList "--silent", "--platform", "msvc2019_64" -Wait
Remove-Item -Path $qtInstaller
$qtSourceUrl = "https://download.qt.io/official_releases/qt/6.8/6.8.0/single/qt-everywhere-src-6.8.0.zip"
$qtSourceZip = "C:\\qt-src.zip"
$qtSourceDir = "C:\\qt-src"
Invoke-WebRequest -Uri $qtSourceUrl -OutFile $qtSourceZip
Expand-Archive -Path $qtSourceZip -DestinationPath $qtSourceDir
cd $qtSourceDir
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="C:\\Qt\\6.8.0\\msvc2019_64" -G "Ninja"
cmake --build . --config Release --target install
shell: pwsh

- name: Verify Qt Installation (Windows)
if: matrix.os == 'windows-latest'
run: |
$qtPath = "C:\\Qt\\6.5.3\\msvc2019_64\\lib\\cmake"
$qtPath = "C:\\Qt\\6.8.0\\msvc2019_64\\lib\\cmake"
if (!(Test-Path $qtPath)) {
Write-Error "Qt prebuilt binaries not found at $qtPath. Installation failed."
Write-Error "Qt build failed. $qtPath not found."
exit 1
} else {
Write-Output "Qt installation found at $qtPath"
Write-Output "Qt successfully built and installed at $qtPath"
}
shell: pwsh

Expand All @@ -111,7 +119,7 @@ jobs:
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" && ^
cmake -B D:\\a\\Notepad--\\Notepad--\\build ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH="C:\\Qt\\6.5.3\\msvc2019_64\\lib\\cmake" ^
-DCMAKE_PREFIX_PATH="C:\\Qt\\6.8.0\\msvc2019_64\\lib\\cmake" ^
-G Ninja ^
-S D:\\a\\Notepad--\\Notepad--
shell: cmd
Expand Down

0 comments on commit 631258b

Please sign in to comment.