Add UEFITool win64 build with static Qt 6.4.2

This commit is contained in:
Nikolaj Schlej 2023-02-11 13:58:44 -08:00
parent 0c92f935e4
commit d48955d45a
2 changed files with 66 additions and 22 deletions

View File

@ -134,20 +134,65 @@ jobs:
tag: ${{ github.ref }} tag: ${{ github.ref }}
file_glob: true file_glob: true
build_windows: build_windows_64:
name: Build on Windows 2019 name: Build on Windows 2022 (64-bit)
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Get Qt 6.4.2
uses: actions/checkout@v3
with:
repository: LongSoft/qt-6.4.2-static-x64-msvc2022
path: qt6
lfs: true
- name: Unpack Qt 6.4.2
shell: bash
working-directory: qt6
run: 7z x qt-6.4.2-static-x64-msvc2022.7z -o../..
- name: Create UEFITool win64 build directory
run: cmake -E make_directory ${{runner.workspace}}/build/UEFITool_win64
- name: Configure UEFITool win64
working-directory: ${{runner.workspace}}/build/UEFITool_win64
shell: cmd
run: cmake -DCMAKE_PREFIX_PATH="D:\a\UEFITool\qt-6.4.2-static-x64-msvc2022" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ..\..\UEFITool\UEFITool
- name: Build UEFITool win64
working-directory: ${{runner.workspace}}/build/UEFITool_win64
shell: bash
run: cmake --build . --config Release
- name: Archive UEFITool win64
working-directory: ${{runner.workspace}}/build/UEFITool_win64/Release
shell: bash
run: |
UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
7z a ../../../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_win64.zip UEFITool.exe
- name: Upload to artifacts
uses: actions/upload-artifact@v3
with:
name: Windows 64-bit builds
path: dist/*.zip
- name: Upload to releases
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ github.ref }}
file_glob: true
build_windows_32:
name: Build on Windows 2019 (32-bit)
runs-on: windows-2019 runs-on: windows-2019
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Get Qt - name: Get Qt 5.6.3
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: LongSoft/qt-5.6.3-static-x86-msvc2017 repository: LongSoft/qt-5.6.3-static-x86-msvc2017
path: qt path: qt5
lfs: true lfs: true
- name: Unpack Qt - name: Unpack Qt 5.6.3
shell: bash shell: bash
working-directory: qt working-directory: qt5
run: 7z x qt-5.6.3-static-x86-msvc2017.7z -o../.. run: 7z x qt-5.6.3-static-x86-msvc2017.7z -o../..
- name: Create dist directory - name: Create dist directory
shell: bash shell: bash
@ -171,8 +216,8 @@ jobs:
- name: Create UEFIFind build directory - name: Create UEFIFind build directory
run: cmake -E make_directory ${{runner.workspace}}/build/UEFIFind run: cmake -E make_directory ${{runner.workspace}}/build/UEFIFind
- name: Configure UEFIFind - name: Configure UEFIFind
shell: bash
working-directory: ${{runner.workspace}}/build/UEFIFind working-directory: ${{runner.workspace}}/build/UEFIFind
shell: bash
run: cmake -G "Visual Studio 16 2019" -T "v141_xp" ../../UEFITool/UEFIFind/ run: cmake -G "Visual Studio 16 2019" -T "v141_xp" ../../UEFITool/UEFIFind/
- name: Build UEFIFind - name: Build UEFIFind
working-directory: ${{runner.workspace}}/build/UEFIFind working-directory: ${{runner.workspace}}/build/UEFIFind
@ -184,20 +229,20 @@ jobs:
run: | run: |
UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \ UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
7z a ../../../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_win32.zip UEFIFind.exe 7z a ../../../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_win32.zip UEFIFind.exe
- name: Create UEFITool build directory - name: Create UEFITool win32 build directory
run: cmake -E make_directory ${{runner.workspace}}/build/UEFITool run: cmake -E make_directory ${{runner.workspace}}/build/UEFITool_win32
- name: Configure UEFITool - name: Configure UEFITool win32
shell: bash shell: bash
working-directory: ${{runner.workspace}}/build/UEFITool working-directory: ${{runner.workspace}}/build/UEFITool_win32
run: ../../qt-5.6.3-static-x86-msvc2017/bin/qmake.exe -tp vc ../../UEFITool/UEFITool/ run: ../../qt-5.6.3-static-x86-msvc2017/bin/qmake.exe -tp vc ../../UEFITool/UEFITool/
- name: Build UEFITool - name: Build UEFITool win32
working-directory: ${{runner.workspace}}/build/UEFITool working-directory: ${{runner.workspace}}/build/UEFITool_win32
shell: cmd shell: cmd
run: | run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
msbuild -t:Rebuild -p:PlatformToolset=v141_xp;Configuration=Release msbuild -t:Rebuild -p:PlatformToolset=v141_xp;Configuration=Release
- name: Archive UEFITool - name: Archive UEFITool win32
working-directory: ${{runner.workspace}}/build/UEFITool/release working-directory: ${{runner.workspace}}/build/UEFITool_win32/release
shell: bash shell: bash
run: | run: |
UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \ UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
@ -205,7 +250,7 @@ jobs:
- name: Upload to artifacts - name: Upload to artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: Windows builds name: Windows 32-bit builds
path: dist/*.zip path: dist/*.zip
- name: Upload to releases - name: Upload to releases
if: github.event_name == 'release' if: github.event_name == 'release'

View File

@ -615,15 +615,14 @@ void UEFITool::openImageFile(QString path)
// Parse the image // Parse the image
USTATUS result = ffsParser->parse(buffer); USTATUS result = ffsParser->parse(buffer);
showParserMessages(); showParserMessages();
if (result) { if (result) {
QMessageBox::critical(this, tr("Image parsing failed"), errorCodeToUString(result), QMessageBox::Ok); QMessageBox::critical(this, tr("Image parsing failed"), errorCodeToUString(result), QMessageBox::Ok);
return; return;
} }
else else {
ui->statusBar->showMessage(tr("Opened: %1").arg(fileInfo.fileName())); ui->statusBar->showMessage(tr("Opened: %1").arg(fileInfo.fileName()));
}
ffsParser->outputInfo(); ffsParser->outputInfo();
// Enable or disable FIT tab // Enable or disable FIT tab
@ -728,7 +727,7 @@ void UEFITool::toggleBootGuardMarking(bool enabled)
markingEnabled = enabled; markingEnabled = enabled;
} }
/* emit double click signal of QListWidget on enter/return key pressed */ // Emit double click signal of QListWidget on enter/return key pressed
bool UEFITool::eventFilter(QObject* obj, QEvent* event) bool UEFITool::eventFilter(QObject* obj, QEvent* event)
{ {
if (event->type() == QEvent::KeyPress) { if (event->type() == QEvent::KeyPress) {
@ -917,7 +916,7 @@ void UEFITool::readSettings()
markingEnabled = settings.value("tree/markingEnabled", true).toBool(); markingEnabled = settings.value("tree/markingEnabled", true).toBool();
ui->actionToggleBootGuardMarking->setChecked(markingEnabled); ui->actionToggleBootGuardMarking->setChecked(markingEnabled);
// Set monospace font for some controls // Set monospace font
QString fontName; QString fontName;
int fontSize; int fontSize;
#if defined Q_OS_OSX #if defined Q_OS_OSX