Skip to content

Add character & NPC map-images (in GroupManager and on map) #302

Add character & NPC map-images (in GroupManager and on map)

Add character & NPC map-images (in GroupManager and on map) #302

Workflow file for this run

name: build-appimage
on:
push:
tags:
- 'v*'
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build-appimage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Get Git tag description
id: git_info
run: |
git tag -d beta 2>/dev/null || echo "Tag 'beta' not found"
echo "GIT_TAG=$(git describe --tags --always --long)" >> $GITHUB_ENV
- name: Install Build Dependencies
run: |
sudo apt update -qq
sudo apt install -y \
qt6-base-dev qt6-base-dev-tools libqt6opengl6-dev libqt6websockets6-dev \
libgl1-mesa-dev qt6-wayland qtkeychain-qt6-dev build-essential mold git \
zlib1g-dev libssl-dev wget zsync fuse file cmake libxcb-cursor-dev
- name: Download linuxdeploy
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
- name: Download linuxdeploy-plugin-qt
run: |
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
- name: Build AppImage
run: |
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_MOLD=true \
-DWITH_WEBSOCKET=ON \
-DWITH_QTKEYCHAIN=ON \
-DWITH_TESTS=OFF
make -j$(getconf _NPROCESSORS_ONLN)
make DESTDIR=appdir install
# Extract version from CPackConfig.cmake
export VERSION=$(grep -i "SET(CPACK_PACKAGE_VERSION " CPackConfig.cmake | cut -d\" -f 2)
# Configure linuxdeploy and make sure the plugin can be found
export PATH=$PATH:$(pwd)/..
export UPDATE_INFORMATION="gh-releases-zsync|MUME|MMapper|latest|MMapper-*-x86_64.AppImage.zsync"
export QMAKE=/usr/bin/qmake6
export EXTRA_PLATFORM_PLUGINS="libqoffscreen.so;libqwayland-egl.so;libqwayland-generic.so"
export EXTRA_QT_PLUGINS="wayland-decoration-client;wayland-graphics-integration-client;wayland-shell-integration;waylandcompositor"
export LIBSECRET_PATH=$(find /usr/lib -name "libsecret-1.so.0" 2>/dev/null | head -n 1)
if [ -z "$LIBSECRET_PATH" ]; then
echo "Error: libsecret-1.so.0 not found in common library paths. Please install it."
exit 1
fi
# Run linuxdeploy
../linuxdeploy-x86_64.AppImage --appdir appdir --output appimage \
--executable appdir/usr/bin/mmapper \
--desktop-file appdir/usr/share/applications/org.mume.MMapper.desktop \
--icon-file appdir/usr/share/icons/hicolor/256x256/apps/org.mume.MMapper.png \
--library "$LIBSECRET_PATH" \
--plugin qt
- name: Generate SHA256 checksum for AppImage
run: |
sudo chown -R $USER:$USER build/
mv build/*.AppImage* .
export FILE=$(find . -type f -name MMapper*.AppImage | sed 's#./##')
sha256sum $FILE > $FILE.sha256
mkdir ${{ github.workspace }}/artifact
mv MMapper*.AppImage* ${{ github.workspace }}/artifact
- name: Get Linux package file base name
id: get_linux_package_name
run: |
PACKAGE_FILE=$(ls ${{ github.workspace }}/artifact/*.AppImage)
PACKAGE_BASENAME=$(basename "$PACKAGE_FILE" | sed 's/\./-/g')
echo "PACKAGE_BASENAME=$PACKAGE_BASENAME" >> $GITHUB_OUTPUT
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: ${{ steps.get_linux_package_name.outputs.PACKAGE_BASENAME }}
path: ${{ github.workspace }}/artifact/*.AppImage*