[CURA-12375] Add support for Linux AARCH64

This commit is contained in:
Frederic98 2025-01-20 08:37:36 +01:00
parent 75cf32c58b
commit 2219d82b7f
3 changed files with 24 additions and 7 deletions

View File

@ -34,6 +34,7 @@ on:
type: choice type: choice
options: options:
- ubuntu-22.04 - ubuntu-22.04
- ubuntu-24.04-arm
- self-hosted-Ubuntu22-X64 - self-hosted-Ubuntu22-X64
jobs: jobs:

View File

@ -11,12 +11,22 @@ AppDir:
exec_args: $@ exec_args: $@
apt: apt:
arch: arch:
- amd64 {% if arch == "x86_64" %}
- amd64
{% elif arch == "aarch64" %}
- arm64
{% endif %}
allow_unauthenticated: true allow_unauthenticated: true
sources: sources:
{% if arch == "x86_64" %}
- sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse - sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
{% elif arch == "aarch64" %}
- sourceline: deb http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe multiverse
- sourceline: deb http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe multiverse
- sourceline: deb http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse
{% endif %}
include: include:
- xdg-desktop-portal-kde - xdg-desktop-portal-kde
- libgtk-3-0 - libgtk-3-0
@ -41,17 +51,21 @@ AppDir:
- usr/lib/x86_64-linux-gnu/libssl.so* - usr/lib/x86_64-linux-gnu/libssl.so*
runtime: runtime:
env: env:
APPDIR_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders" APPDIR_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/usr/lib/{{ arch }}-linux-gnu:$APPDIR/lib/{{ arch }}-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/{{ arch }}-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders"
LD_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders" LD_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/usr/lib/{{ arch }}-linux-gnu:$APPDIR/lib/{{ arch }}-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/{{ arch }}-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders"
PYTHONPATH: "$APPDIR" PYTHONPATH: "$APPDIR"
QT_PLUGIN_PATH: "$APPDIR/qt/plugins" QT_PLUGIN_PATH: "$APPDIR/qt/plugins"
QML2_IMPORT_PATH: "$APPDIR/qt/qml" QML2_IMPORT_PATH: "$APPDIR/qt/qml"
QT_QPA_PLATFORMTHEME: xdgdesktopportal QT_QPA_PLATFORMTHEME: xdgdesktopportal
QT_QPA_PLATFORM: xcb QT_QPA_PLATFORM: xcb
GDK_PIXBUF_MODULEDIR: $APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders GDK_PIXBUF_MODULEDIR: $APPDIR/usr/lib/{{ arch }}-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders
GDK_PIXBUF_MODULE_FILE: $APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache GDK_PIXBUF_MODULE_FILE: $APPDIR/usr/lib/{{ arch }}-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
path_mappings: path_mappings:
- /usr/share:$APPDIR/usr/share - /usr/share:$APPDIR/usr/share
{% if arch == "aarch64" %}
after_runtime:
- ln -sr "$TARGET_APPDIR/runtime/compat/usr/lib" "$TARGET_APPDIR/runtime/compat/lib"
{% endif %}
test: test:
fedora-30: fedora-30:
image: appimagecrafters/tests-env:fedora-30 image: appimagecrafters/tests-env:fedora-30
@ -77,3 +91,4 @@ AppImage:
arch: {{ arch }} arch: {{ arch }}
file_name: {{ file_name }} file_name: {{ file_name }}
update-information: guess update-information: guess
comp: zstd

View File

@ -5,6 +5,7 @@ import argparse
import os import os
import shutil import shutil
import subprocess import subprocess
import platform
from pathlib import Path from pathlib import Path
@ -49,9 +50,9 @@ def generate_appimage_builder_config(dist_path, version, appimage_filename):
appimage_builder = template.render(app_dir = "./AppDir", appimage_builder = template.render(app_dir = "./AppDir",
icon = "cura-icon.png", icon = "cura-icon.png",
version = version, version = version,
arch = "x86_64", arch = platform.machine(),
file_name = appimage_filename) file_name = appimage_filename)
print(appimage_builder)
with open(os.path.join(Path(__file__).parent, "AppImageBuilder.yml"), "w") as appimage_builder_file: with open(os.path.join(Path(__file__).parent, "AppImageBuilder.yml"), "w") as appimage_builder_file:
appimage_builder_file.write(appimage_builder) appimage_builder_file.write(appimage_builder)