Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,16 @@ jobs:
cd ${{ github.workspace }}/bin
mkdir ./imageformats
cp ../qtapng/plugins/imageformats/libqapng.so ./imageformats
cp ../scripts/launch.sh .
cp ../data/logo-client.png ./icon.png
cp ../README_LINUX.md .
chmod +x launch.sh
cp ../scripts/DYNAMIC_INSTALL.sh ./INSTALL.sh
chmod +x INSTALL.sh
chmod +x Attorney_Online

patchelf --add-rpath . Attorney_Online

cd ..
tar --transform='flags=r;s|bin|Attorney_Online|' -cvf Attorney_Online-Dynamic.tar bin
tar --transform='flags=r;s|bin|Attorney Online|' -cvf Attorney_Online-Dynamic.tar bin

- name: Create AppImage
shell: bash
Expand All @@ -214,17 +217,23 @@ jobs:
cp scripts/Attorney_Online.desktop AppDir/usr/share/applications
cp data/logo-client.png AppDir/Attorney_Online.png

GIT_SHORT_SHA="${GITHUB_SHA::8}"
QTDIR=${QT_ROOT_DIR} ./appimagetool deploy AppDir/usr/share/applications/Attorney_Online.desktop
ARCH=x86_64 VERSION=2.11 ./appimagetool AppDir
ARCH=x86_64 VERSION=${GIT_SHORT_SHA} ./appimagetool AppDir

- name: Deploy AppImage
shell: bash
run: |
mkdir bin-appimage
cp -r bin/base bin-appimage
cp data/logo-client.png bin-appimage/icon.png
cp README_LINUX.md bin-appimage
cp scripts/APPIMAGE_INSTALL.sh bin-appimage/INSTALL.sh
cp Attorney_Online-*-x86_64.AppImage bin-appimage
chmod +x bin-appimage/INSTALL.sh
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
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
Expand Down
2 changes: 2 additions & 0 deletions README_LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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).

Each version also accompanies an `INSTALL.sh` script that will create a desktop file for AO pointing to where the script was ran. This will enable you to run AO from an app launcher. Note that moving AO's folder will require running this script again.

### 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).
Expand Down
32 changes: 32 additions & 0 deletions scripts/APPIMAGE_INSTALL.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# exit on error
set -e

# Move to script's directory
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd "${SCRIPT_DIR}"

#add .desktop file (which should allow most DE's easy access to the program
mkdir -p ~/.local/share/applications

# desktop files don't like spaces in the Exec field, we have to replace them with "\s"
appimage="$(echo Attorney_Online-*-x86_64.AppImage)"
escaped_exec="$(echo "$(pwd)" | sed 's/ /\\s/g')"/"$appimage"

desktop_file="\
[Desktop Entry]
Type=Application
Name=Attorney Online
Comment=The courtroom drama simulator
Path=$(pwd)
Exec=\"$escaped_exec\"
Icon=$(pwd)/icon.png"

echo "$desktop_file" > ~/.local/share/applications/'Attorney Online'.desktop

#marking the program as executable
chmod +x Attorney_Online-*-x86_64.AppImage

#running the executable
./Attorney_Online-*-x86_64.AppImage
29 changes: 29 additions & 0 deletions scripts/DYNAMIC_INSTALL.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# exit on error
set -e

# Move to script's directory
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd "${SCRIPT_DIR}"

#add .desktop file (which should allow most DE's easy access to the program
mkdir -p ~/.local/share/applications

# desktop files don't like spaces in the Exec field, we have to replace them with "\s"
escaped_exec="$(echo "$(pwd)" | sed 's/ /\\s/g')"/Attorney_Online

desktop_file="\
[Desktop Entry]
Type=Application
Name=Attorney Online
Comment=The courtroom drama simulator
Path=$(pwd)
Exec=\"$escaped_exec\"
Icon=$(pwd)/icon.png"

echo "$desktop_file" > ~/.local/share/applications/'Attorney Online'.desktop

#running the program
chmod +x Attorney_Online
./Attorney_Online
10 changes: 0 additions & 10 deletions scripts/launch.sh

This file was deleted.