Hey there,
I am trying to get FlatCAM into an AppImage and I’m facing some problems.
First I tried to install the stable version 8.5, but there I ran into issues with the python versions.
Now I use the current beta 8.994 and trie to stick as close as possible to the appimage-builder docs following the example of an python qt application.
I use appimage-builder
and build process exits successfully. However when I start the AppImage i get:
./FlatCAM-8.994-x86_64.AppImage
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
fish: “./FlatCAM-8.994-x86_64.AppImage” terminated by signal SIGABRT (Abbruch)
Here is my AppImageBuilder.yml
:
version: 1
script:
# Clear AppDir
- rm -Rf AppDir | true
# Make usr and icons dirs
- mkdir -p AppDir/usr/src
# Copy the python application code into the AppDir
- cp FlatCAM_beta_Download/ AppDir/usr/src/FlatCAM -r
# Install application dependencies from setup_ubuntu.sh
# - PYTHONUSERBASE=AppDir/usr easy_install -U distribute
# - python3 -m pip install --ignore-installed --prefix=/usr --root=AppDir pip numpy shapely rtree tk lxml cycler python-dateutil kiwisolver dill vispy pyopengl setuptools svg.path ortools freetype-py fontTools rasterio matplotlib qrcode pyqt5 reportlab svglib 'ezdxf>=0.14,<0.15' pyserial
# Copy Icons
- mkdir -p AppDir/usr/share/icons/256x256/
- cp FlatCAM_beta_Download/assets/resources/flatcam_icon256.png AppDir/usr/share/icons/256x256/
AppDir:
path: ./AppDir
app_info:
id: org.tijuca.flatcam
name: FlatCAM
icon: flatcam_icon256
version: '8.994'
exec: /usr/bin/python3
exec_args: "$APPDIR/usr/src/FlatCAM/FlatCAM.py $@"
apt:
arch: amd64
sources:
- sourceline: 'deb [arch=amd64] http://deb.debian.org/debian/ buster main'
key_url: 'https://ftp-master.debian.org/keys/archive-key-10.asc'
include:
# From setup_ubuntu.sh
- libfreetype6 libfreetype6-dev
- libgeos-dev
- libspatialindex-dev
- libpng-dev
- qt5-style-plugins
- python3-dev
- python3-gdal
- python3-simplejson
- python3-pyqt5
- python3-pyqt5.qtopengl
- python3-pip
- python3-tk
- python3
- libxcb1
after_bundle: |
# Set python 3.7 env
export PYTHONHOME=${APPDIR}/usr
export PYTHONPATH=${APPDIR}/usr/lib/python3.7/site-packages:$APPDIR/usr/lib/python3.7
export PATH=${APPDIR}/usr/bin:$PATH
# Set python 3.7 as default
ln -fs python3.7 $APPDIR/usr/bin/python3
# Install pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.7 get-pip.py
# Install pipenv
python3.7 -m pip install pipenv
# Install application dependencies in AppDir
python3.7 -m pip install --upgrade --isolated --no-input --ignore-installed --prefix=$APPDIR/usr pip numpy shapely rtree tk lxml cycler python-dateutil kiwisolver dill vispy pyopengl setuptools svg.path ortools freetype-py fontTools rasterio matplotlib qrcode pyqt5 reportlab svglib 'ezdxf>=0.14,<0.15' pyserial
runtime:
env:
# Set python home
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
PYTHONHOME: '${APPDIR}/usr'
# Path to the site-packages dir or other modules dirs
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
PYTHONPATH: '${APPDIR}/usr/lib/python3.7/site-packages'
#PYTHONPATH: '${APPDIR}/usr/lib/python2.7/dist-packages'
# test:
# centos:
# image: appimage-builder/test-env:centos-7
# command: "./AppRun -c \"ls\""
# use_host_x: True
AppImage:
update-information: None
sign-key: None
arch: x86_64
I’m a newbie in creating Appimages so every little help is welcome!
Best regards
Samuel