Skip to content

Commit

Permalink
corrected qt version
Browse files Browse the repository at this point in the history
  • Loading branch information
Odizinne committed Aug 11, 2024
1 parent f5090ee commit de198ce
Showing 1 changed file with 50 additions and 8 deletions.
58 changes: 50 additions & 8 deletions .github/workflows/qt-msvc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,58 @@ jobs:
vs-version: 'latest' # Use the latest Visual Studio version

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
add-tools-to-path: true
tools: 'tools_qtcreator,qt.tools.qtcreator'

#- name: Search for jom.exe
# shell: pwsh
# run: |
# $qtRootDir = "D:\a\BigPictureTV\Qt" # Adjust to the root directory of your Qt installation
# $jomPath = Get-ChildItem -Path $qtRootDir -Filter jom.exe -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
#
# if ($jomPath) {
# Write-Host "Found jom.exe at: $($jomPath.FullName)"
# $env:PATH += ";$($jomPath.DirectoryName)"
# [System.Environment]::SetEnvironmentVariable('PATH', $env:PATH, [System.EnvironmentVariableTarget]::Process)
# } else {
# Write-Host "jom.exe not found in the specified directory."
# exit 1
# }
#
# # Verify the jom installation
# where.exe jom

#- name: Set up environment for jom
# run: |
# # Add jom directory to PATH
# $env:PATH += ";C:\Qt\Tools\QtCreator\bin\jom"
# [System.Environment]::SetEnvironmentVariable('PATH', $env:PATH, [System.EnvironmentVariableTarget]::Machine)

- name: Setup MSVC Environment
shell: pwsh
run: |
choco install qt --version=latest --params '/QtAddToPath'
# Ensure the PATH is updated
echo "##vso[task.setvariable variable=PATH]$($env:PATH);C:\Qt\$(Get-Item C:\Qt\*\msvc*\bin).Name"
# Set up Visual Studio environment
& 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat'
- name: Build with qmake
#- name: Build with qmake and jom
# shell: pwsh
# run: |
# # Add jom directory to PATH
# $env:PATH += ";C:\Qt\Tools\QtCreator\bin\jom"
# [System.Environment]::SetEnvironmentVariable('PATH', $env:PATH, [System.EnvironmentVariableTarget]::Process)
# where.exe jom
# mkdir build
# cd build
# qmake ..\BigPictureTV-CPP.pro
# D:\a\BigPictureTV\Qt\Tools\QtCreator\bin\jom\jom.exe

- name: Build with qmake and jom
shell: pwsh
run: |
mkdir build
cd build
qmake ..\yourproject.pro
nmake
# Optionally, you can add steps for packaging or deploying the application
qmake ..\BigPictureTV-CPP.pro
D:\a\BigPictureTV\Qt\Tools\QtCreator\bin\jom\jom.exe

0 comments on commit de198ce

Please sign in to comment.