Skip to content

Commit

Permalink
fix appimage build - from @Letterus
Browse files Browse the repository at this point in the history
  • Loading branch information
slspencer committed Nov 4, 2022
1 parent 08093db commit 55780c9
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 104 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build manual Linux
name: Build manual Linux Test

on:
workflow_dispatch:
Expand Down
50 changes: 14 additions & 36 deletions .github/workflows/build-manual-prerelease-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ on:
tags:
description: 'Build manual Linux'

env:
QT_SELECT: 5
QT_VERSION: '5.15.2' # quotes required or YAML parser will interpret as float

# The tag name is Test-weekly-YYmmdd-HHMM to enable multiple tests per day
jobs:

release-data:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
upload_url: ${{ steps.create-release-data.outputs.upload_url }}

Expand Down Expand Up @@ -52,7 +48,7 @@ jobs:
echo ${{ steps.create-release-data.outputs.upload_url }}
linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: release-data
env:
UPLOAD_URL: "${{ needs.release-data.outputs.upload_url }}"
Expand All @@ -69,34 +65,16 @@ jobs:
#with:
#submodules: true
#fetch-depth: 0

- name: install kde
run: |
# ---------------------------------
echo "-- register kde neon repository --"
sudo apt install -y debsig-verify
echo 'deb http://archive.neon.kde.org/user focal main' | sudo tee /etc/apt/sources.list.d/neon.list
curl https://origin.archive.neon.kde.org/public.key -o - | sudo apt-key add -
sudo apt update
- name: remove old qt 5.12.8
run: |
#----------------------------------
echo "-- remove previous qt 5.12.8 and config files --"
sudo apt purge -y qtchooser && sudo apt purge -y qtcreator && sudo apt purge -y *qt5*
- name: install new qt 5.15.2
# install-qt-action uses default qt v 5.15.2
uses: jurplel/[email protected]
with:
version: ${{ env.QT_VERSION }}

- name: install build dependencies
run: |
# ---------------------------------
echo "-- install build dependencies --"
sudo add-apt-repository universe
sudo apt update
sudo apt install -y libfuse2
sudo apt install -y build-essential gettext git
sudo apt install -y qttools5-dev libqt5xml5 libqt5svg5-dev libqt5xmlpatterns5-dev
sudo apt install -y qttools5-dev libqt5xml5 libqt5svg5-dev libqt5xmlpatterns5-dev libdrm-dev
sudo apt install -y '^libxcb.*-dev' libxcb-util-dev libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
#----------------------------------
Expand All @@ -105,7 +83,7 @@ jobs:
# --------------------------------
echo "-- install additional packages ---"
sudo apt install -y nickle wish kde-standard kimageformat-plugins libgcrypt20 libjpeg-turbo8 liblz4-1 libpoppler97
sudo apt install -y nickle wish libgcrypt20 libjpeg-turbo8 liblz4-1 libpoppler118 libpoppler-qt5-dev
sudo apt install -y libsm6 libx11-xcb-dev libxau6 libxcb-render-util0 libxcb-sync1 libxcb-xinerama0 libxcb-xkb1
sudo apt install -y libxdmcp6 libxext6 libxfixes3 libxrender1 libxshmfence1 libxxf86vm1
sudo apt install -y qt5-gtk-platformtheme qt5-image-formats-plugins qttranslations5-l10n qtwayland5
Expand All @@ -118,8 +96,8 @@ jobs:
# compile diagrams.qrc to diagrams.rc using rcc resources compiler tool
run: |
echo " =-- Compile src/app/seamlyme/share/resources/diagrams.qrc to src/app/seamlyme/share/resources/diagrams.rcc ---"
rcc -no-compress -binary home/runner/work/Seamly2D/Seamly2D/src/app/seamlyme/share/resources/diagrams.qrc -o home/runner/work/Seamly2D/Seamly2D/src/app/seamlyme/share/resources.rcc
sudo ls -Rla home/runner/work/Seamly2D/Seamly2D/src/app/seamlyme/share/resources | grep '\.rcc$'
rcc -no-compress -binary src/app/seamlyme/share/resources/diagrams.qrc -o src/app/seamlyme/share/resources/diagrams.rcc
sudo ls -Rla src/app/seamlyme/share/resources | grep '\.rcc$'
- name: build Seamly2D appimage
# uses parameters from appimage-builder-recipe.yml to build appimage
Expand All @@ -139,11 +117,11 @@ jobs:
run: |
# ---------------------------------
echo "-- find the Seamly2D appimage file & rename it --"
sudo ls -Rla ./AppDir | grep 'Seamly2D-continuous-x86_64.*'
sudo mv ./Seamly2D-continuous-x86_64.AppImage ./Seamly2D-amd_64.AppImage
ls -la . | grep 'Seamly2D-continuous-x86_64.*'
mv Seamly2D-continuous-x86_64.AppImage Seamly2D-x86_64.AppImage
- name: upload seamly2d-x86_64.tar.gz artifact
# upload ./Seamly2D-x86_64.AppImage as artifact to Github Workflows
- name: Upload Seamly2D-x86_64.AppImage artifact
# upload Seamly2D-x86_64.AppImage as artifact to Github Workflows
uses: actions/[email protected]
with:
name: Seamly2D-x86_64.AppImage
Expand All @@ -167,7 +145,7 @@ jobs:
done
- name: upload file as pre-release
# uploads seamly2d-x86_64.tar.gz as pre-release to Github Releases
# uploads Seamly2D-x86_64.AppImage as pre-release to Github Releases
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ $RECYCLE.BIN/

# target_wrapper.sh files are generated/updated automatically
target_wrapper.sh
*.bak
98 changes: 31 additions & 67 deletions dist/appimage-builder-recipe-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,22 @@ script:
- sudo rm -rf AppDir || true && install -g docker -o runner -d AppDir AppDir/usr && pwd && ls -la && echo '--- AppDir has been recreated ---'

- echo "=== Qmake/make Seamly2D & SeamlyMe ==="
- sudo qmake PREFIX=/usr Seamly2D.pro -r -d CONFIG+=no_ccache CONFIG+=noDebugSymbols && echo "--- END QMAKE ---"
#- INSTALL_ROOT=AppDir make install
- sudo make -j$(nproc) && echo "--- END MAKE ---"
- sudo make install DESTDIR=AppDir && chown runner:docker AppDir/usr AppDir/usr/*.* && ls -Rla AppDir && echo "--- END MAKE INSTALL ---

# copy measurement diagrams (qt's .rcc resource file) into $build/share directory
- echo "=== Copy measurement diagrams ==="
- sudo cp src/app/seamlyme/share/resources/diagrams.rcc AppDir/usr/share && chown runner:docker AppDir/usr/share AppDir/usr/share/*.* && ls -Rla AppDir/usr/share

# copy translations (qt's .qm translation files) into $build/share/translations directory
- echo "=== Copy translation files ==="
- sudo cp share/translations/*.qm AppDir/usr/share/translations && chown runner:docker AppDir/usr/share/translations AppDir/usr/share/translations/*.*

# copy .desktop files from $build/dist directory to $build/share/applications directory
- echo "=== Copy .desktop files from dist/seamly ==="
- sudo ls -la dist/seamly*.desktop
- sudo cp dist/seamly2d.desktop AppDir/usr/share/applications && cp dist/seamlyme.desktop AppDir/usr/share/applications && chown runner:docker AppDir/usr/share/applications AppDir/usr/share/applications/*.* && ls -la AppDir/usr/share/applications
- qmake PREFIX=/usr Seamly2D.pro -r CONFIG+=no_ccache CONFIG+=noDebugSymbols && echo "--- END QMAKE ---"
- make -j$(nproc) && echo "--- END MAKE ---"
- make INSTALL_ROOT=/home/runner/work/Seamly2D/Seamly2D/AppDir install && echo "--- END MAKE INSTALL ---"

# copy icons to the correct directories
- echo "=== Copy icon files ==="
- sudo cp dist/seamly2d.png AppDir/usr/share/icons/hicolor/64x64/apps/ && chown runner:docker AppDir/usr/share/icons/hicolor/64x64/apps/ AppDir/usr/share/icons/hicolor/64x64/apps/*.* && ls -la AppDir/usr/share/icons/hicolor/64x64/apps/
- sudo cp share/img/Seamly2D_logo_256x256.png AppDir/usr/share/icons/hicolor/256x256/seamly2d.png && chown runner:docker AppDir/usr/share/icons/hicolor/256x256/ AppDir/usr/share/icons/hicolor/256x256/*.* && ls -la AppDir/usr/share/icons/hicolor/256x256/

- echo "=== Add AppDir & subdirs to PATH ==="
- echo $PATH
- echo pwd
- sudo chown runner:docker AppDir/usr/bin
- sudo export PATH=${PATH}:home/runner/work/Seamly2D/Seamly2D/AppDir:home/runner/work/Seamly2D/Seamly2D/AppDir/usr:home/runner/work/Seamly2D/Seamly2D/AppDir/usr/share:home/runner/work/Seamly2D/Seamly2D/AppDir/usr/bin && echo $PATH
- mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
- mkdir -p AppDir/usr/share/icons/hicolor/256x256/
- cp dist/seamly2d.png AppDir/usr/share/icons/hicolor/64x64/apps/ && ls -la AppDir/usr/share/icons/hicolor/64x64/apps/
- cp share/img/Seamly2D_logo_256x256.png AppDir/usr/share/icons/hicolor/256x256/seamly2d.png && ls -la AppDir/usr/share/icons/hicolor/256x256/

- echo "=== END APPIMAGE RECIPE 'BEFORE' SCRIPT ==="

AppDir:

path: ./AppDir
path: /home/runner/work/Seamly2D/Seamly2D/AppDir

app_info:
# name & version will be used to name the appimage: Seamly2D-continuous-x86_64.AppImage
Expand All @@ -60,56 +42,38 @@ AppDir:
apt:
arch: amd64
sources:
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
- sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xf6ecb3762474eda9d21b7022871920d1991bc93c'
include:
- bash
- kde-standard
- kimageformat-plugins
- libgcrypt20
- libglu1-mesa-dev
- libjpeg-turbo8
- liblz4-1
- libpoppler97
- libdrm-common
- libgcrypt20
- libjpeg-turbo8
- liblz4-1
- libpoppler118
- libpoppler-qt5-1
- libqt5core5a
- libqt5svg5
- libqt5svg5-dev
- libqt5xml5
- libqt5xmlpatterns5
- libqt5xmlpatterns5-dev
- libsm6
- libwayland-bin
- libwayland-dev
- libmirwayland-dev
- libx11-xcb-dev
- libxau6
- '^libxcb.*-dev'
- libxcb-render-util0
- libwayland-bin
- libxau6
- libxcb-render-util0
- libxcb-sync1
- libxcb-util-dev
- libxcb-xinerama0
- libxcb-xkb1
- libxdmcp6
- libxcb-xkb1
- libxdmcp6
- libxext6
- libxfixes3
- libxi-dev
- libxkbcommon-dev
- libxkbcommon-x11-dev
- libxrender1
- libxrender-dev
- libxshmfence1
- libxrender1
- libxshmfence1
- libxxf86vm1
- make
- nickle
- python
- qt5-gtk-platformtheme
- qt5-image-formats-plugins
- qttools5-dev
- qttranslations5-l10n
- qtwayland5
- sh
- wish
- qtwayland5
exclude:
- dbus
- ubuntu-mono
Expand All @@ -130,13 +94,13 @@ AppDir:

runtime:
env:
APPDIR_LIBRARY_PATH: $APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu
PATH: '${APPDIR}/usr/bin:${PATH}:'
APPDIR_LIBRARY_PATH: $APPDIR/usr/lib64/Seamly2D:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu
PATH: '${APPDIR}/bin:${APPDIR}/usr/bin:${PATH}:'
APP_SRC_DIR: '${APPDIR}/usr/src'

test:
fedora:
image: appimagecrafters/tests-env:fedora-30
image: appimagecrafters/tests-env:fedora-36
command: ./AppRun
use_host_x: true
debian:
Expand All @@ -152,7 +116,7 @@ AppDir:
command: ./AppRun
use_host_x: true
ubuntu:
image: appimagecrafters/tests-env:ubuntu-xenial
image: appimagecrafters/tests-env:ubuntu-jammy
command: ./AppRun
use_host_x: true

Expand Down

0 comments on commit 55780c9

Please sign in to comment.