From e7a078b10a1ac751a69b3655929daad3968f0136 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 25 Oct 2022 16:13:52 -0300 Subject: [PATCH] Jenkins: Fix AppImage missing icons and a .desktop in the correct paths, closes #2358 --- .ci/AppImageBuilder.yml | 15 ++++++++++----- .ci/build.sh | 13 ++++++++++--- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.ci/AppImageBuilder.yml b/.ci/AppImageBuilder.yml index 094a67796..05a7b8fcb 100644 --- a/.ci/AppImageBuilder.yml +++ b/.ci/AppImageBuilder.yml @@ -72,15 +72,20 @@ AppDir: files: exclude: - etc - - usr/[a-km-rt-zA-Z]* # * except lib, local, share + - usr/[!ls]* # * except lib, local, share - usr/lib/*/libasound.so.* # using our own ALSA can cause issues, and the API is pretty stable anyway - usr/lib/*.a # produced by library compilation - usr/lib/cmake # produced by library compilation - usr/lib/pkgconfig # produced by library compilation - - usr/s[a-gi-zA-Z]* # s* except share - - usr/share/[a-hj-ln-zA-Z]* # * except icons, metainfo - - usr/share/i[a-bd-zA-Z]* # i* except icons - - usr/share/m[a-df-zA-Z]* # m* except metainfo + - usr/s[!h]* # s* except share + - usr/share/[!aim]* # * except applications, icons, metainfo + - usr/share/a[!p]* # a* except applications + - usr/share/ap[!p]* # ap* except applications + - usr/share/app[!l]* # app* except applications + - usr/share/i[!c]* # i* except icons + - usr/share/icons/[!h]* # * except hicolor + - usr/share/icons/h[!i]* # h* except hicolor + - usr/share/m[!e]* # m* except metainfo - usr/share/metainfo/*.metainfo.xml # metainfo for libraries - var AppImage: diff --git a/.ci/build.sh b/.ci/build.sh index a8d3e7e62..6d982a042 100644 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -1035,11 +1035,18 @@ else metainfo_base=archive_tmp/usr/share/metainfo mkdir -p "$metainfo_base" cp -p "src/unix/assets/$project_id."*".xml" "$metainfo_base/$project_id.appdata.xml" + applications_base=archive_tmp/usr/share/applications + mkdir -p "$applications_base" + cp -p "src/unix/assets/$project_id.desktop" "$applications_base/" # Archive icons. - icon_base=archive_tmp/usr/share/icons - mkdir -p "$icon_base" - cp -rp src/unix/assets/[0-9]*x[0-9]* "$icon_base/" + icon_base=archive_tmp/usr/share/icons/hicolor + for icon_size in src/unix/assets/[0-9]*x[0-9]* + do + icon_dir="$icon_base/$(basename "$icon_size")" + mkdir -p "$icon_dir" + cp -rp "$icon_size" "$icon_dir/apps" + done project_icon=$(ls "$icon_base/"[0-9]*x[0-9]*/* | head -1 | grep -oP '/\K([^/]+)(?=\.[^\.]+$)') # Archive executable, while also stripping it if requested.