Jenkins: Switch AppImage building to the new icon assets
This commit is contained in:
@@ -18,9 +18,9 @@ version: 1
|
|||||||
AppDir:
|
AppDir:
|
||||||
path: ./archive_tmp
|
path: ./archive_tmp
|
||||||
app_info:
|
app_info:
|
||||||
id: !ENV 'net.${project_lower}.${project_lower}'
|
id: !ENV 'net.${project_lower}.${project}'
|
||||||
name: !ENV '${project}'
|
name: !ENV '${project}'
|
||||||
icon: !ENV '${project_lower}'
|
icon: !ENV '${project_icon}'
|
||||||
version: !ENV '${project_version}'
|
version: !ENV '${project_version}'
|
||||||
exec: !ENV 'usr/local/bin/${project}'
|
exec: !ENV 'usr/local/bin/${project}'
|
||||||
exec_args: $@
|
exec_args: $@
|
||||||
|
14
.ci/build.sh
14
.ci/build.sh
@@ -328,7 +328,7 @@ else
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Establish general dependencies.
|
# Establish general dependencies.
|
||||||
pkgs="cmake ninja-build pkg-config git imagemagick wget p7zip-full wayland-protocols tar gzip file"
|
pkgs="cmake ninja-build pkg-config git wget p7zip-full wayland-protocols tar gzip file"
|
||||||
if [ "$(dpkg --print-architecture)" = "$arch_deb" ]
|
if [ "$(dpkg --print-architecture)" = "$arch_deb" ]
|
||||||
then
|
then
|
||||||
pkgs="$pkgs build-essential"
|
pkgs="$pkgs build-essential"
|
||||||
@@ -608,11 +608,11 @@ else
|
|||||||
echo $pkg $version >> archive_tmp/README
|
echo $pkg $version >> archive_tmp/README
|
||||||
done
|
done
|
||||||
|
|
||||||
# Archive icon, while also shrinking it to 512x512 if necessary.
|
# Archive icons.
|
||||||
convert src/win/assets/$project_lower.png -resize '512x512>' icon.png
|
icon_base=archive_tmp/usr/share/icons
|
||||||
icon_base="$(identify -format 'archive_tmp/usr/share/icons/%wx%h' icon.png)"
|
|
||||||
mkdir -p "$icon_base"
|
mkdir -p "$icon_base"
|
||||||
mv icon.png "$icon_base/$project_lower.png"
|
cp -rp src/unix/assets/[0-9]*x[0-9]* "$icon_base/"
|
||||||
|
icon_name=$(ls "$icon_base/"[0-9]*x[0-9]*/* | head -1 | grep -oP '/\K([^/]+)(?=\.[^\.]+$)')
|
||||||
|
|
||||||
# Archive executable, while also stripping it if requested.
|
# Archive executable, while also stripping it if requested.
|
||||||
mkdir -p archive_tmp/usr/local/bin
|
mkdir -p archive_tmp/usr/local/bin
|
||||||
@@ -669,8 +669,8 @@ else
|
|||||||
rm -rf "$project-"*".AppImage"
|
rm -rf "$project-"*".AppImage"
|
||||||
|
|
||||||
# Run appimage-builder in extract-and-run mode for Docker compatibility.
|
# Run appimage-builder in extract-and-run mode for Docker compatibility.
|
||||||
project="$project" project_lower="$project_lower" project_version="$project_version" arch_deb="$arch_deb" arch_appimage="$arch_appimage" \
|
project="$project" project_lower="$project_lower" project_version="$project_version" project_icon="$icon_name" arch_deb="$arch_deb" \
|
||||||
APPIMAGE_EXTRACT_AND_RUN=1 ./appimage-builder.AppImage --recipe .ci/AppImageBuilder.yml
|
arch_appimage="$arch_appimage" APPIMAGE_EXTRACT_AND_RUN=1 ./appimage-builder.AppImage --recipe .ci/AppImageBuilder.yml
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
# Rename AppImage to the final name if the build succeeded.
|
# Rename AppImage to the final name if the build succeeded.
|
||||||
|
Reference in New Issue
Block a user