diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a37919b..1ad8919 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,9 @@ jobs: buildArch: 'Arm64' qtVersion: '6.8.1' qtArch: 'win64_msvc2022_arm64_cross_compiled' + - runner: 'ubuntu-22.04' + buildArch: 'X64' + qtVersion: '6.8.1' runs-on: ${{ matrix.runner }} steps: - name: Checkout diff --git a/ci/build.ps1 b/ci/build.ps1 index 03d9d7f..6a42c83 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -30,7 +30,7 @@ qmake DESTDIR="build" $argDeviceArchs if ($IsWindows) { nmake -} elseif ($IsMacOS) { +} else { make } @@ -51,4 +51,30 @@ if ($IsWindows) { hdiutil convert "temp.sparsebundle" -format ULFO -o "$appName.dmg" Remove-Item -Recurse "temp.sparsebundle" Remove-Item -Recurse "$appName.app" +} elseif ($IsLinux) { + sudo apt update + sudo apt install libfuse2 + + $archName = switch ($env:buildArch) { + 'X64' { 'x86_64' } + 'Arm64' { 'aarch64' } + default { throw 'Unsupported build architecture.' } + } + + Invoke-WebRequest -Uri "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$archName.AppImage" -OutFile "../linuxdeploy-$archName.AppImage" + Invoke-WebRequest -Uri "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-$archName.AppImage" -OutFile "../linuxdeploy-plugin-qt-$archName.AppImage" + chmod +x "../linuxdeploy-$archName.AppImage" + chmod +x "../linuxdeploy-plugin-qt-$archName.AppImage" + + & "../linuxdeploy-$archName.AppImage" ` + --appdir "AppDir" ` + --executable "$appName" ` + --create-desktop-file ` + --icon-file "$env:GITHUB_WORKSPACE/dist/app-generic.svg" ` + --icon-filename "$appName" ` + --plugin qt ` + --output appimage + + Remove-Item -Recurse "AppDir" -Force + Remove-Item $appName } diff --git a/dist/app-generic.svg b/dist/app-generic.svg new file mode 100644 index 0000000..9147173 --- /dev/null +++ b/dist/app-generic.svg @@ -0,0 +1 @@ + \ No newline at end of file