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 31a8011
Showing 1 changed file with 62 additions and 9 deletions.
71 changes: 62 additions & 9 deletions .github/workflows/qt-msvc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,72 @@ jobs:
- name: Setup MSVC
uses: microsoft/setup-msbuild@v1
with:
vs-version: 'latest' # Use the latest Visual Studio version
vs-version: 'latest'

- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x64

- name: Install Qt
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"
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
add-tools-to-path: true
tools: 'tools_qtcreator,qt.tools.qtcreator'

- name: Build with qmake
- name: Build with qmake and jom
shell: pwsh
run: |
mkdir build
cd build
qmake ..\yourproject.pro
nmake
qmake ..\BigPictureTV-CPP.pro
D:\a\BigPictureTV\Qt\Tools\QtCreator\bin\jom\jom.exe
- name: Search for windeployqt executables
shell: pwsh
run: |
# Define the Qt root directory from the environment variable
$qtRootDir = $env:QT_ROOT_DIR
# Search for windeployqt6.exe and windeployqt.exe within the Qt directory
$searchResults = Get-ChildItem -Path $qtRootDir -Recurse -Filter "windeployqt*.exe" -ErrorAction SilentlyContinue
# Check if the files were found and print their paths
if ($searchResults) {
foreach ($file in $searchResults) {
Write-Output "Found $($file.Name) at: $($file.FullName)"
}
} else {
Write-Output "No windeployqt executable found in $qtRootDir"
}
- name: Run windeployqt
shell: pwsh
run: |
# Navigate to the directory containing the executable
cd build
# Optionally, you can add steps for packaging or deploying the application
# Use the found path to windeployqt
$windeployqtPath = "D:\a\BigPictureTV\Qt\6.7.2\msvc2019_64\bin\windeployqt6.exe"
# Check if the executable exists
if (Test-Path $windeployqtPath) {
# Run windeployqt to deploy the executable with the specified options
& $windeployqtPath `
--no-translations `
--no-opengl-sw `
--no-system-d3d-compiler `
--no-compiler-runtime `
BigPictureTV-CPP.exe
} else {
Write-Error "windeployqt not found at the expected path!"
exit 1
}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: qt-build-artifacts
path: build/

0 comments on commit 31a8011

Please sign in to comment.