More work on new appimage build process
This commit is contained in:
@@ -24,49 +24,21 @@ for:
|
||||
# Needed to build binary distribution of wx
|
||||
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libnotify4 libsdl2-2.0-0 libfuse2
|
||||
before_build:
|
||||
- sh: mkdir build && cd build
|
||||
- sh: curl -o $APPIMAGE_TOOL -L https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
|
||||
- sh: chmod +x $APPIMAGE_TOOL
|
||||
- sh: mkdir build
|
||||
- sh: curl -o build/$APPIMAGE_TOOL -L https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
|
||||
- sh: chmod +x build/$APPIMAGE_TOOL
|
||||
build_script:
|
||||
- sh: sleep 60m
|
||||
# Prepare Python base AppImage, stripping Python metadata
|
||||
- sh: ./$PYTHON_APPIMAGE --appimage-extract
|
||||
- sh: mv squashfs-root AppDir
|
||||
- sh: rm AppDir/python*.desktop
|
||||
- sh: rm AppDir/usr/share/applications/*.desktop
|
||||
- sh: rm AppDir/usr/share/metainfo/*.appdata.xml
|
||||
- sh: unlink AppDir/AppRun
|
||||
- sh: mkdir -p $DEPLOY_DIR
|
||||
# run install pyfa packages and any other requirements
|
||||
- sh: AppDir/usr/bin/python -s -m pip install -U pip setuptools wheel
|
||||
# - sh: AppDir/usr/bin/python -s -m pip install -r ../requirements.txt
|
||||
# Speedup, but causes runtime incompatiblities
|
||||
- sh: AppDir/usr/bin/python -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 -r ../requirements.txt
|
||||
|
||||
# Run scripts to prep pyfa data and build database
|
||||
- sh: cd ../
|
||||
- sh: find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \;
|
||||
- sh: build/AppDir/usr/bin/python scripts/compile_lang.py
|
||||
- sh: build/AppDir/usr/bin/python scripts/dump_crowdin_progress.py
|
||||
- sh: build/AppDir/usr/bin/python db_update.py
|
||||
- sh: export PYFA_VERSION="$(python3.11 scripts/dump_version.py)"
|
||||
|
||||
# Copy pyfa files to host
|
||||
- sh: cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml ./build/$DEPLOY_DIR
|
||||
- sh: find ./build/$DEPLOY_DIR | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
|
||||
- sh: build/$APPIMAGE_TOOL --recipe dist_assets/linux/AppImageBuilder.yml
|
||||
|
||||
# Copy static AppImage files
|
||||
- sh: cd dist_assets/linux
|
||||
- sh: chmod +x AppRun
|
||||
- sh: cp AppRun pyfa.desktop ../../build/AppDir/
|
||||
- sh: cp pyfa.desktop ../../build/AppDir/usr/share/applications/
|
||||
- sh: cp pyfa.appdata.xml ../../build/AppDir/usr/share/metainfo/
|
||||
- sh: chmod +x pyfa && cp pyfa ../../build/AppDir/usr/bin
|
||||
- sh: cd ../../
|
||||
|
||||
# Package it all up
|
||||
- sh: mkdir dist
|
||||
- sh: ARCH=x86_64 ./build/$APPIMAGE_TOOL --recipe dist_assets/linux/AppImageBuilder.yml
|
||||
# - sh: cd dist_assets/linux
|
||||
# - sh: chmod +x AppRun
|
||||
# - sh: cp AppRun pyfa.desktop ../../build/AppDir/
|
||||
# - sh: cp pyfa.desktop ../../build/AppDir/usr/share/applications/
|
||||
# - sh: cp pyfa.appdata.xml ../../build/AppDir/usr/share/metainfo/
|
||||
# - sh: chmod +x pyfa && cp pyfa ../../build/AppDir/usr/bin
|
||||
# - sh: cd ../../
|
||||
after_build:
|
||||
- sh: ls -la build
|
||||
artifacts:
|
||||
|
||||
@@ -1,37 +1,44 @@
|
||||
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
|
||||
version: 1
|
||||
|
||||
AppDir:
|
||||
path: ./build/AppDir
|
||||
path: $BUILD_DIR/AppDir
|
||||
|
||||
app_info:
|
||||
id: io.pyfa
|
||||
id: pyfa
|
||||
name: pyfa
|
||||
icon: /home/appveyor/projects/pyfa/build/AppDir/imgs/gui/pyfa64.png
|
||||
version: v2.56.0
|
||||
exec: opt/pyfa
|
||||
exec_args: $@
|
||||
icon: pyfa
|
||||
version: $PYFA_VERSION
|
||||
exec: ${APPDIR}/bin/python3
|
||||
exec_args: "-s ${APPDIR}/opt/pyfa/pyfa.py $@"
|
||||
|
||||
apt:
|
||||
arch: amd64
|
||||
allow_unauthenticated: true
|
||||
sources:
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy main restricted
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy universe
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy-updates universe
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy multiverse
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy-updates multiverse
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy-security main restricted
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy-security universe
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu jammy-security multiverse
|
||||
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse'
|
||||
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
|
||||
|
||||
include: []
|
||||
files:
|
||||
include: []
|
||||
exclude:
|
||||
- usr/share/man
|
||||
- usr/share/doc/*/README.*
|
||||
- usr/share/doc/*/changelog.*
|
||||
- usr/share/doc/*/NEWS.*
|
||||
- usr/share/doc/*/TODO.*
|
||||
exclude: []
|
||||
|
||||
after_bundle:
|
||||
- mkdir -p $BUILD_DIR/AppDir
|
||||
# Detect location of python using venv config and copy it over to our app directory
|
||||
- cp -r `~/venv3.11/bin/python scripts/getConfigVal.py ~/venv3.11/pyvenv.cfg base-prefix`/* $BUILD_DIR/AppDir
|
||||
# Install python dependencies
|
||||
- $BUILD_DIR/AppDir/bin/python3 -s -m pip install -U pip setuptools wheel
|
||||
- $BUILD_DIR/AppDir/bin/python3 -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 -r requirements.txt
|
||||
# Compile app data
|
||||
- find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \;
|
||||
- $BUILD_DIR/AppDir/bin/python3 scripts/compile_lang.py
|
||||
- $BUILD_DIR/AppDir/bin/python3 scripts/dump_crowdin_progress.py
|
||||
- $BUILD_DIR/AppDir/bin/python3 db_update.py
|
||||
# Calculate app version
|
||||
- export PYFA_VERSION="$($BUILD_DIR/AppDir/bin/python3 scripts/dump_version.py)"
|
||||
# Copy app and clean it up
|
||||
- mkdir -p $BUILD_DIR/AppDir/usr/src
|
||||
- cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml $BUILD_DIR/AppDir/usr/src
|
||||
- find $BUILD_DIR/AppDir/usr/src | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
|
||||
|
||||
AppImage:
|
||||
sign-key: None
|
||||
arch: x86_64
|
||||
update-information: None
|
||||
|
||||
Reference in New Issue
Block a user