Skip to content

Commit 78c41bf

Browse files
committed
prepare for flatpak
1 parent 34f1d26 commit 78c41bf

18 files changed

Lines changed: 165 additions & 88 deletions

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
env:
4646
CI_COMPILER: ${{ matrix.c_compiler }}
47-
QT_VERSION: '6.8.1'
47+
QT_VERSION: '6.9.3'
4848
QT_HOST: ${{ matrix.os == 'windows-latest' && 'windows' || 'linux' }}
4949
QT_ARCH: ${{ matrix.os == 'windows-latest' && 'win64_msvc2022_64' || 'linux_gcc_64' }}
5050

.github/workflows/flatpak.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Flatpak build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
flatpak:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.9
14+
options: --privileged
15+
strategy:
16+
matrix:
17+
arch: [x86_64, aarch64]
18+
# Don't fail the whole workflow if one architecture fails
19+
fail-fast: false
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
submodules: 'recursive'
24+
- name: Install deps
25+
if: ${{ matrix.arch != 'x86_64' }}
26+
run: |
27+
# Use the static binaries because it's unable to use a package manager
28+
curl https://download.docker.com/linux/static/stable/x86_64/docker-26.0.0.tgz --output ./docker.tgz
29+
tar xzvf docker.tgz
30+
mv docker/* /usr/bin
31+
- name: Set up QEMU
32+
if: ${{ matrix.arch != 'x86_64' }}
33+
id: qemu
34+
uses: docker/setup-qemu-action@v3
35+
with:
36+
platforms: arm64
37+
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
38+
with:
39+
bundle: UnCSO2.flatpak
40+
manifest-path: tf.harmony.UnCSO2.yml
41+
cache-key: flatpak-builder-${{ matrix.arch }}-${{ github.sha }}
42+
arch: ${{ matrix.arch }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,3 +410,7 @@ CMakeLists.txt.user*
410410
*.AppImage
411411

412412
/CMakeUserPresets.json
413+
414+
/.flatpak-builder
415+
/repo
416+
/builddir

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ You may download the latest build of UnCSO2 [here](https://github.com/harmonytf/
1818

1919
Aside from extracting files from Counter-Strike: Online 2's and Titanfall Online's proprietary archive format, PKG, UnCSO2 can:
2020

21-
- Explore and extract from individual PKG archives;
22-
- Explore and extract from entire game's filesystems (loads every PKG archive in their PKG index);
23-
- Preview and/or extract individual file entries;
24-
- Decrypt Counter-Strike: Online 2 files with an `.e*` prepended in their extension;
25-
- Decompress Counter-Strike: Online 2 texture files.
21+
- Explore and extract from individual PKG archives
22+
- Explore and extract from entire game's filesystem (loads every PKG archive in their PKG index)
23+
- Preview and/or extract individual file entries
24+
- Decrypt Counter-Strike: Online 2 files with an `.e*` prepended in their extension
25+
- Decompress Counter-Strike: Online 2 texture files
2626

2727
### Compatible CSO2 regions
2828

@@ -35,7 +35,7 @@ Those regions are: South Korea, China, Taiwan and Japan.
3535
### Requirements
3636

3737
- [CMake](https://cmake.org/download/) (must be in PATH)
38-
- [Qt 6.8](https://www.qt.io/download)
38+
- [Qt 6.9](https://www.qt.io/download)
3939
- A C++20 compile.
4040

4141
#### With Visual Studio (new way)

appimage/UnCSO2.png

-22.4 KB
Binary file not shown.

appveyor.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

ci/pack.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $isGccBuild = $curCompiler -eq 'gcc'
1717
$isClangBuild = $curCompiler -eq 'clang'
1818
#$isMingwBuild = $curBuildCombo -eq 'windows-mingw'
1919
#$isMsvcBuild = $curBuildCombo -eq 'windows-msvc'
20-
$qtVersion = if ($env:QT_VERSION) { $env:QT_VERSION } else { "6.8.0" };
20+
$qtVersion = if ($env:QT_VERSION) { $env:QT_VERSION } else { "6.9.0" };
2121

2222
Write-Host "Running packaging script..."
2323
Write-Host "Current setup build combo is: $curBuildCombo"
@@ -33,7 +33,7 @@ if ($isLinux) {
3333
#Copy-Item ./build/libuncso2/external/cryptopp/libcryptopp.so* -Destination ./build/package/
3434

3535
# copy AppImage prebuilt files
36-
Copy-Item ./appimage/* -Destination ./build/package/
36+
Copy-Item ./tf.harmony.UnCSO2.* -Destination ./build/package/
3737

3838
# copy uncso2 itself to the package dir
3939
Copy-Item ./build/uc2 -Destination ./build/package/
@@ -79,13 +79,13 @@ if ($isLinux) {
7979
chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage
8080

8181
$env:VERSION = $versionStr;
82-
./linuxdeploy-x86_64.AppImage --appdir=./package/ --library=./package/libuncso2.so --executable=./package/uc2 --desktop-file=./package/UnCSO2.desktop --icon-file=./package/UnCSO2.png --plugin qt --output appimage
82+
./linuxdeploy-x86_64.AppImage --appdir=./package/ --library=./package/libuncso2.so --executable=./package/uc2 --desktop-file=./package/tf.harmony.UnCSO2.desktop --icon-file=./package/tf.harmony.UnCSO2.svg --plugin qt --output appimage
8383

8484
if ($isGccBuild) {
85-
Move-Item UnCSO2*.AppImage -Destination "../UnCSO2-$versionStr-linux64_gcc.AppImage"
85+
Move-Item UnCSO2*.AppImage -Destination "../UnCSO2-$versionStr-linux-x86_64-gcc.AppImage"
8686
}
8787
elseif ($isClangBuild) {
88-
Move-Item UnCSO2*.AppImage -Destination "../UnCSO2-$versionStr-linux64_clang.AppImage"
88+
Move-Item UnCSO2*.AppImage -Destination "../UnCSO2-$versionStr-linux-x86_64-clang.AppImage"
8989
}
9090
}
9191
elseif ($isWindows) {
@@ -115,10 +115,10 @@ elseif ($isWindows) {
115115
Pop-Location
116116

117117
#if ($isMingwBuild) {
118-
# 7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on "../UnCSO2-$versionStr-win64_mingw.7z" ./package/*
118+
# 7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on "../UnCSO2-$versionStr-windows-x86_64_mingw.7z" ./package/*
119119
#}
120120
#elseif ($isMsvcBuild) {
121-
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on "../UnCSO2-$versionStr-win64_msvc.7z" ./package/*
121+
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on "../UnCSO2-$versionStr-windows-x86_64_msvc.7z" ./package/*
122122
#}
123123
}
124124

resources/icons-uncso2.qrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<RCC>
22
<qresource prefix="/icons">
3-
<file>uncso2.svg</file>
3+
<file alias="uncso2.svg">../tf.harmony.UnCSO2.svg</file>
44
</qresource>
55
</RCC>

screenshots/screenshot1.png

89.6 KB
Loading

0 commit comments

Comments
 (0)