Skip to content

(ARM64) Compilar y Empaquetar AppImage #13

(ARM64) Compilar y Empaquetar AppImage

(ARM64) Compilar y Empaquetar AppImage #13

Workflow file for this run

name: (Debian ARM64) Compilar y Empaquetar AppImage
on:
workflow_dispatch:
jobs:
build-and-package-arm64:
runs-on: ubuntu-24.04-arm
container: debian:12
permissions:
contents: write
steps:
- name: Preparar entorno base del contenedor
run: |
apt-get update
apt-get install -y --no-install-recommends git sudo ca-certificates curl wget
git config --global --add safe.directory '*'
- name: Clonar repositorio Trinity
uses: actions/checkout@v4
with:
path: 'trinity'
- name: Clonar Manifiesto de mcpelauncher
uses: actions/checkout@v4
with:
repository: 'minecraft-linux/mcpelauncher-manifest'
ref: 'ng'
submodules: 'recursive'
path: 'mcpelauncher'
- name: Clonar mcpe-extract
run: git clone https://codeberg.org/javiercplus/mcpe-extract.git
- name: Clonar mcpelauncher-linux-bin
uses: actions/checkout@v4
with:
repository: 'minecraft-linux/mcpelauncher-linux-bin'
path: 'linux-bin'
- name: Instalar dependencias del sistema
run: |
apt-get install -y --no-install-recommends \
build-essential cmake clang ninja-build \
qt6-base-dev qt6-base-dev-tools qt6-declarative-dev qt6-webengine-dev qt6-svg-dev qt6-tools-dev \
qt6-wayland-dev \
qt6-wayland \
libcurl4-openssl-dev libssl-dev libasound2-dev libpulse-dev libjack-jackd2-dev \
libpipewire-0.3-dev libsndio-dev libx11-dev libxi-dev libxext-dev libxfixes-dev \
libxcursor-dev libxrandr-dev libxss-dev libxtst-dev libgl1-mesa-dev libegl1-mesa-dev \
libgles2-mesa-dev libvulkan-dev vulkan-validationlayers libdrm-dev libgbm-dev \
libudev-dev libevdev-dev libusb-1.0-0-dev libdbus-1-dev libbluetooth-dev bluez \
libibus-1.0-dev libxkbcommon-dev libpng-dev libzip-dev libcups2-dev \
libwayland-dev libunwind-dev libdecor-0-dev libfuse2 file python3
- name: Compilar mcpelauncher (Modo sin GUI)
run: |
export CC=clang
export CXX=clang++
cd mcpelauncher
wget https://huggingface.co/datasets/ccoffee20/trinity-installer/resolve/main/patch.sh
bash patch.sh
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja \
-DBUILD_WEBVIEW=OFF \
-DBUILD_UI=OFF \
-Wno-dev
ninja -v
- name: Compilar mcpe-extract
run: |
cd mcpe-extract
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja \
-Wno-dev
ninja
- name: Compilar Trinity Launcher
run: |
useradd -m builder
echo "builder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
chown -R builder:builder .
cd trinity
chmod +x build.sh
su builder -c "./build.sh --deps"
su builder -c "./build.sh --release"
- name: Preparar estructura AppDir
run: |
mkdir -p APPIMAGE-TRINITY/usr/bin
mkdir -p APPIMAGE-TRINITY/usr/lib
mkdir -p APPIMAGE-TRINITY/usr/share/applications
mkdir -p APPIMAGE-TRINITY/usr/share/icons/hicolor/scalable/apps
mkdir -p APPIMAGE-TRINITY/usr/share/metainfo
mkdir -p APPIMAGE-TRINITY/usr/share/mcpelauncher
cp mcpelauncher/build/mcpelauncher-client/mcpelauncher-client APPIMAGE-TRINITY/usr/bin/
cp mcpe-extract/build/mcpelauncher-extract APPIMAGE-TRINITY/usr/bin/
cp trinity/build/app/trinity APPIMAGE-TRINITY/usr/bin/
find mcpelauncher/build -type f -name "msa-daemon" -exec cp {} APPIMAGE-TRINITY/usr/bin/ \;
find mcpelauncher/build -type f -name "mcpelauncher-error" -exec cp {} APPIMAGE-TRINITY/usr/bin/ \;
cp trinity/resources/shortcuts/com.trench.trinity.launcher.desktop APPIMAGE-TRINITY/usr/share/applications/
cp trinity/resources/branding/com.trench.trinity.launcher.svg APPIMAGE-TRINITY/usr/share/icons/hicolor/scalable/apps/
cp -r linux-bin/* APPIMAGE-TRINITY/usr/share/mcpelauncher/
- name: Integrar Librería libzip (Portabilidad Total)
run: |
LIBZIP_REAL=$(find /usr/lib/aarch64-linux-gnu -name "libzip.so*" -type f | head -n 1)
cp -v "$LIBZIP_REAL" APPIMAGE-TRINITY/usr/lib/libzip.so.5
chmod +w APPIMAGE-TRINITY/usr/lib/libzip.so.5
- name: Crear script AppRun y enlaces en raíz
run: |
cat << 'EOF' > APPIMAGE-TRINITY/AppRun
#!/bin/sh
HERE="$(dirname "$(readlink -f "$0")")"
export LD_LIBRARY_PATH="$HERE/usr/lib:$LD_LIBRARY_PATH"
export QT_PLUGIN_PATH="$HERE/usr/plugins:$HERE/usr/lib/plugins:$HERE/usr/lib/qt6/plugins:$QT_PLUGIN_PATH"
export QT_QPA_PLATFORM_PLUGIN_PATH="$HERE/usr/plugins/platforms:$HERE/usr/lib/plugins/platforms:$HERE/usr/lib/qt6/plugins/platforms"
# Forzar el uso de XCB (X11) para garantizar el movimiento de ventanas
export QT_QPA_PLATFORM=xcb
echo "Usando plugin XCB (X11)"
export MCPELAUNCHER_DATA_DIR="$HERE/usr/share/mcpelauncher"
export PATH="$HERE/usr/bin:$PATH"
exec "$HERE/usr/bin/trinity" "$@"
EOF
chmod +x APPIMAGE-TRINITY/AppRun
ln -s usr/share/applications/com.trench.trinity.launcher.desktop APPIMAGE-TRINITY/com.trench.trinity.launcher.desktop
ln -s usr/share/icons/hicolor/scalable/apps/com.trench.trinity.launcher.svg APPIMAGE-TRINITY/com.trench.trinity.launcher.svg
- name: Descargar y preparar linuxdeploy y plugin Qt (ARM64)
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-aarch64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-aarch64.AppImage
chmod +x linuxdeploy*.AppImage
./linuxdeploy-aarch64.AppImage --appimage-extract
mv squashfs-root linuxdeploy-bin
./linuxdeploy-plugin-qt-aarch64.AppImage --appimage-extract
mv squashfs-root linuxdeploy-qt-bin
rm linuxdeploy-aarch64.AppImage linuxdeploy-plugin-qt-aarch64.AppImage
ln -s $PWD/linuxdeploy-qt-bin/AppRun $PWD/linuxdeploy-plugin-qt
- name: Integrar Qt (copiar librerías)
run: |
export PATH=$PWD:$PATH
export QMAKE=/usr/lib/qt6/bin/qmake
export LD_LIBRARY_PATH=$PWD/APPIMAGE-TRINITY/usr/lib:/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH
ARCH=aarch64 ./linuxdeploy-bin/AppRun \
--appdir APPIMAGE-TRINITY \
--desktop-file APPIMAGE-TRINITY/usr/share/applications/com.trench.trinity.launcher.desktop \
--icon-file APPIMAGE-TRINITY/usr/share/icons/hicolor/scalable/apps/com.trench.trinity.launcher.svg \
--plugin qt
- name: Copiar plugins XCB y dependencias (ARM64)
run: |
mkdir -p APPIMAGE-TRINITY/usr/plugins/platforms
mkdir -p APPIMAGE-TRINITY/usr/lib/plugins/platforms
mkdir -p APPIMAGE-TRINITY/usr/lib/qt6/plugins/platforms
PLATFORM_DIR=$(find /usr/lib -path "*/qt6/plugins/platforms" -type d 2>/dev/null | head -n 1)
if [ -d "$PLATFORM_DIR" ]; then
cp -v "$PLATFORM_DIR"/*.so APPIMAGE-TRINITY/usr/plugins/platforms/
cp -v "$PLATFORM_DIR"/*.so APPIMAGE-TRINITY/usr/lib/plugins/platforms/
cp -v "$PLATFORM_DIR"/*.so APPIMAGE-TRINITY/usr/lib/qt6/plugins/platforms/
fi
for lib in $(ldd /usr/lib/*/qt6/plugins/platforms/libqxcb.so 2>/dev/null | grep -E "libX|libxcb" | awk '{print $3}'); do
if [ -f "$lib" ]; then
cp -v "$lib" APPIMAGE-TRINITY/usr/lib/
fi
done
- name: Generar AppImage final (ARM64)
run: |
export PATH=$PWD:$PATH
export QMAKE=/usr/lib/qt6/bin/qmake
export LD_LIBRARY_PATH=$PWD/APPIMAGE-TRINITY/usr/lib:/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH
export UPDATE_INFORMATION="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}-aarch64.AppImage.zsync"
ARCH=aarch64 ./linuxdeploy-bin/AppRun \
--appdir APPIMAGE-TRINITY \
--desktop-file APPIMAGE-TRINITY/usr/share/applications/com.trench.trinity.launcher.desktop \
--icon-file APPIMAGE-TRINITY/usr/share/icons/hicolor/scalable/apps/com.trench.trinity.launcher.svg \
--output appimage
- name: Subir a Release 2.6-beta (ARM64)
uses: softprops/action-gh-release@v2
with:
tag_name: 2.6-beta
files: |
*.AppImage
*.zsync
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GIT }}