Add AppImage CI build (#1005)
* add AppImage CI build * specify ubuntu 22.04 LTS in CI * change +x bit * use tar to preserve permissions * make folder names nicer in the tar * clone themes before making tar archive --------- Co-authored-by: Salanto <62221668+Salanto@users.noreply.github.com>
This commit is contained in:
parent
f59b41fe08
commit
f91be6b99c
74
.github/workflows/build.yml
vendored
74
.github/workflows/build.yml
vendored
@ -109,14 +109,14 @@ jobs:
|
|||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
needs: formatting-check
|
needs: formatting-check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v3
|
uses: jurplel/install-qt-action@v4
|
||||||
with:
|
with:
|
||||||
aqtversion: '==3.1.*'
|
aqtversion: '==3.1.*'
|
||||||
version: '6.5.3'
|
version: '6.5.3'
|
||||||
@ -161,21 +161,14 @@ jobs:
|
|||||||
cmake . -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE="${{ github.workspace }}/bin/imageformats/"
|
cmake . -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE="${{ github.workspace }}/bin/imageformats/"
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release
|
||||||
|
|
||||||
|
# install plugin
|
||||||
|
cp plugins/imageformats/libqapng.so ${QT_ROOT_DIR}/plugins/imageformats
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake .
|
cmake .
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release
|
||||||
|
|
||||||
- name: Deploy Linux
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/bin
|
|
||||||
mkdir ./imageformats
|
|
||||||
cp ../qtapng/plugins/imageformats/libqapng.so ./imageformats
|
|
||||||
cp ../scripts/launch.sh .
|
|
||||||
chmod +x launch.sh
|
|
||||||
chmod +x Attorney_Online
|
|
||||||
|
|
||||||
- name: Clone Themes
|
- name: Clone Themes
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
@ -188,8 +181,59 @@ jobs:
|
|||||||
rm ./bin/base/themes/.gitattributes
|
rm ./bin/base/themes/.gitattributes
|
||||||
rm -r ./bin/base/themes/.git
|
rm -r ./bin/base/themes/.git
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Deploy Linux
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd ${{ github.workspace }}/bin
|
||||||
|
mkdir ./imageformats
|
||||||
|
cp ../qtapng/plugins/imageformats/libqapng.so ./imageformats
|
||||||
|
cp ../scripts/launch.sh .
|
||||||
|
cp ../README_LINUX.md .
|
||||||
|
chmod +x launch.sh
|
||||||
|
chmod +x Attorney_Online
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
tar --transform='flags=r;s|bin|Attorney_Online|' -cvf Attorney_Online-Dynamic.tar bin
|
||||||
|
|
||||||
|
- name: Create AppImage
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# necessary, apparently
|
||||||
|
sudo apt install libxcb-cursor0
|
||||||
|
# from https://github.com/probonopd/go-appimage/blob/master/src/appimagetool/README.md
|
||||||
|
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
|
||||||
|
mv appimagetool-*-x86_64.AppImage appimagetool
|
||||||
|
chmod +x appimagetool
|
||||||
|
|
||||||
|
mkdir -p AppDir/usr/bin
|
||||||
|
mkdir -p AppDir/usr/lib/plugins/imageformats
|
||||||
|
mkdir -p AppDir/usr/share/applications
|
||||||
|
|
||||||
|
cp bin/Attorney_Online AppDir/usr/bin
|
||||||
|
cp bin/lib*.so AppDir/usr/lib
|
||||||
|
cp scripts/Attorney_Online.desktop AppDir/usr/share/applications
|
||||||
|
cp data/logo-client.png AppDir/Attorney_Online.png
|
||||||
|
|
||||||
|
QTDIR=${QT_ROOT_DIR} ./appimagetool deploy AppDir/usr/share/applications/Attorney_Online.desktop
|
||||||
|
ARCH=x86_64 VERSION=2.11 ./appimagetool AppDir
|
||||||
|
|
||||||
|
mkdir bin-appimage
|
||||||
|
cp -r bin/base bin-appimage
|
||||||
|
cp README_LINUX.md bin-appimage
|
||||||
|
cp Attorney_Online-*-x86_64.AppImage bin-appimage
|
||||||
|
chmod +x bin-appimage/Attorney_Online-*-x86_64.AppImage
|
||||||
|
|
||||||
|
tar -cvf Attorney_Online-AppImage.tar bin-appimage/*
|
||||||
|
tar --transform='flags=r;s|bin-appimage|Attorney_Online|' -cvf Attorney_Online-AppImage.tar bin-appimage
|
||||||
|
|
||||||
|
- name: Upload Dynamic Artifact
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: Attorney_Online-Linux
|
name: Attorney_Online-Linux-Dynamic
|
||||||
path: ${{github.workspace}}/bin
|
path: Attorney_Online-Dynamic.tar
|
||||||
|
|
||||||
|
- name: Upload AppImage Artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Attorney_Online-Linux-AppImage
|
||||||
|
path: Attorney_Online-AppImage.tar
|
||||||
|
26
README_LINUX.md
Normal file
26
README_LINUX.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
## Running on Linux
|
||||||
|
|
||||||
|
There are two download options for running on Linux: the **dynamically-linked** build and the **AppImage**. The dynamic build is lighter, but might only run on newer systems. The AppImage is a bit bigger, but should run seamlessly on most systems (anything newer than Ubuntu 22.04 LTS).
|
||||||
|
|
||||||
|
### AppImage
|
||||||
|
|
||||||
|
If you downloaded the **AppImage** version, it should just be plug-and-play. If you run into errors or bugs, contact us in our [Discord server](https://discord.gg/wWvQ3pw) or open an [issue on Github](https://github.com/AttorneyOnline/AO2-Client/issues).
|
||||||
|
|
||||||
|
### Dynamic
|
||||||
|
|
||||||
|
If you downloaded the **dynamically-linked** version, use the `launch.sh` script to run AO.
|
||||||
|
|
||||||
|
You may need to install some libraries in your system. These are the commands to run on a terminal for some distributions:
|
||||||
|
|
||||||
|
* Arch Linux:
|
||||||
|
```
|
||||||
|
$ sudo pacman -S qt6-base qt6-tools qt6-websockets qt6-imageformats
|
||||||
|
```
|
||||||
|
* Fedora:
|
||||||
|
```
|
||||||
|
$ sudo dnf install qt6-qtbase qt6-qttools qt6-qtwebsockets qt6-qtimageformats
|
||||||
|
```
|
||||||
|
* Ubuntu 22.04 LTS:
|
||||||
|
```
|
||||||
|
$ sudo apt-get install qt6base-dev libqt6uitools6 libqt6websockets6 qt6-image-formats-plugins
|
||||||
|
```
|
7
scripts/Attorney_Online.desktop
Normal file
7
scripts/Attorney_Online.desktop
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Attorney Online
|
||||||
|
Comment=The courtroom drama simulator
|
||||||
|
Exec=Attorney_Online
|
||||||
|
Icon=Attorney_Online
|
||||||
|
Categories=Game;
|
Loading…
Reference in New Issue
Block a user