Move lots of preprocessing out of appimg recipe (to support calculation of app version)
This commit is contained in:
@@ -17,31 +17,31 @@ for:
|
||||
init:
|
||||
- sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
|
||||
install:
|
||||
- sh: sudo add-apt-repository -y ppa:deadsnakes/ppa
|
||||
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y update
|
||||
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install python3.11
|
||||
# Needed for AppImage builder
|
||||
# AppImage dependencies
|
||||
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libfuse2
|
||||
# Needed to build binary distribution of wx
|
||||
# - sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libnotify4 libsdl2-2.0-0 libfuse2
|
||||
# Preparation script dependencies
|
||||
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install python3-wxgtk4.0 python3-sqlalchemy
|
||||
before_build:
|
||||
# Prepare pyfa data
|
||||
- sh: find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \;
|
||||
- sh: python3 -B scripts/compile_lang.py
|
||||
- sh: python3 -B scripts/dump_crowdin_progress.py
|
||||
- sh: python3 -B db_update.py
|
||||
- sh: export APP_VERSION="$(python3 -B scripts/dump_version.py)"
|
||||
- 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
|
||||
# Download packaging tool
|
||||
- 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
|
||||
build_script:
|
||||
- sh: mkdir -p AppDir/usr/src
|
||||
- sh: cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml AppDir/usr/src
|
||||
- sh: mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
|
||||
- sh: cp imgs/gui/pyfa64.png AppDir/usr/share/icons/hicolor/64x64/apps/pyfa.png
|
||||
- sh: sleep 60m
|
||||
- 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 ../../
|
||||
- sh: ./$APPIMAGE_TOOL --recipe dist_assets/linux/AppImageBuilder.yml
|
||||
after_build:
|
||||
- sh: ls -la build
|
||||
- sh: ls -la
|
||||
artifacts:
|
||||
- path: dist/pyfa-$PYFA_VERSION-linux.AppImage
|
||||
deploy:
|
||||
|
||||
@@ -1,31 +1,13 @@
|
||||
version: 1
|
||||
|
||||
script:
|
||||
- rm -rf AppDir | true
|
||||
- mkdir -p AppDir/usr/src
|
||||
# wxpython dependencies to host
|
||||
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libnotify4 libsdl2-2.0-0
|
||||
# Install wx (needed by crowdin script) and sqlalchemy/logbook (needed by db update script)
|
||||
- grep -iE 'wxpython|sqlalchemy|logbook' requirements.txt | xargs python3 -B -s -m pip install --user -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04
|
||||
# Compile app data
|
||||
- find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \;
|
||||
- python3 -B scripts/compile_lang.py
|
||||
- python3 -B scripts/dump_crowdin_progress.py
|
||||
- python3 -B db_update.py
|
||||
- export PYFA_VERSION="$(python3 -B scripts/dump_version.py)"
|
||||
# Copy data over to app dir
|
||||
- cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml AppDir/usr/src
|
||||
- mkdir -p AppDir/usr/share/icons
|
||||
- cp imgs/gui/pyfa64.png AppDir/usr/share/icons
|
||||
|
||||
AppDir:
|
||||
path: ./AppDir
|
||||
|
||||
app_info:
|
||||
id: pyfa
|
||||
name: pyfa
|
||||
icon: pyfa64
|
||||
version: $PYFA_VERSION
|
||||
icon: pyfa
|
||||
version: {{APP_VERSION}}
|
||||
exec: usr/bin/python3.11
|
||||
exec_args: "-s $APPDIR/opt/pyfa/pyfa.py $@"
|
||||
|
||||
@@ -54,7 +36,6 @@ AppDir:
|
||||
- export PYTHONPATH="AppDir/usr/lib/python3.11/site-packages"
|
||||
- curl -L https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
- python3.11 get-pip.py
|
||||
- python3.11 -s -m pip install -U pip setuptools wheel
|
||||
- python3.11 -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 -r requirements.txt
|
||||
|
||||
runtime:
|
||||
@@ -65,3 +46,4 @@ AppDir:
|
||||
AppImage:
|
||||
sign-key: None
|
||||
arch: x86_64
|
||||
file_name: 'pyfa-{{APP_VERSION}}-linux'
|
||||
|
||||
Reference in New Issue
Block a user