From c5ed0d0fffcfc9c6843cbf2d02c4f9c4648b3e91 Mon Sep 17 00:00:00 2001 From: GleammerRay <101527589+GleammerRay@users.noreply.github.com> Date: Sat, 16 Jul 2022 13:06:06 +0100 Subject: [PATCH] AppImage building improved --- appimage_builder => appimage/appimage_builder | 45 ++++++++++-------- appimage/logo.png | Bin 0 -> 4439 bytes logo.svg | 10 ++-- 3 files changed, 30 insertions(+), 25 deletions(-) rename appimage_builder => appimage/appimage_builder (52%) create mode 100644 appimage/logo.png diff --git a/appimage_builder b/appimage/appimage_builder similarity index 52% rename from appimage_builder rename to appimage/appimage_builder index 056335cc..074ebe39 100755 --- a/appimage_builder +++ b/appimage/appimage_builder @@ -2,6 +2,11 @@ # downloaded from https://gist.github.com/naveenadi/8dbe75c04cae7739f5cce0a260eb3e08 +if [ ! -d ../build ]; then + echo 'ERROR: current directory is not contained within a flutter project'; + exit 0; +fi + export ARCH=$(uname -m) echo "INFO:Generator:Searching AppDir" @@ -19,25 +24,25 @@ read -p "? Version [Eg: 1.0.0]: " appVersion # read -p "? Architecture: " x86_64 function download_appimagetool() { - if [ ! -d ./build ]; then mkdir ./build; fi - if [ ! -d ./build/appimage ]; then mkdir ./build/appimage; fi - if [ ! -d ./build/appimage/appimage-build ]; then mkdir ./build/appimage/appimage-build; fi - if [ ! -x ./build/appimage/appimage-build/appimagetool-$ARCH.AppImage ]; then - curl -L -o ./build/appimage/appimage-build/appimagetool-$ARCH.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$ARCH.AppImage - chmod a+x ./build/appimage/appimage-build/appimagetool-$ARCH.AppImage + if [ ! -d ../build ]; then mkdir ../build; fi + if [ ! -d ../build/appimage ]; then mkdir ../build/appimage; fi + if [ ! -d ../build/appimage/appimage-build ]; then mkdir ../build/appimage/appimage-build; fi + if [ ! -x ../build/appimage/appimage-build/appimagetool-$ARCH.AppImage ]; then + curl -L -o ../build/appimage/appimage-build/appimagetool-$ARCH.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$ARCH.AppImage + chmod a+x ../build/appimage/appimage-build/appimagetool-$ARCH.AppImage fi } function create_appdir() { - if [ -d "./build/appimage/$appName.AppDir" ]; then rm -rf ./build/appimage/$appName.AppDir; fi - mkdir ./build/appimage/$appName.AppDir + if [ -d "../build/appimage/$appName.AppDir" ]; then rm -rf ../build/appimage/$appName.AppDir; fi + mkdir ../build/appimage/$appName.AppDir } function after_bundle() { - cp build/linux/x64/release/bundle/assistant build/appimage/$appName.AppDir - cp -r build/linux/x64/release/bundle/lib/. build/appimage/$appName.AppDir/lib - cp -r build/linux/x64/release/bundle/data build/appimage/$appName.AppDir - cp -r build/linux/x64/release/bundle/passy build/appimage/$appName.AppDir + cp ../build/linux/x64/release/bundle/assistant ../build/appimage/$appName.AppDir + cp -r ../build/linux/x64/release/bundle/lib/ ../build/appimage/$appName.AppDir/lib + cp -r ../build/linux/x64/release/bundle/data ../build/appimage/$appName.AppDir + cp -r ../build/linux/x64/release/bundle/passy ../build/appimage/$appName.AppDir # cp $appIcon AppDir/usr/share/icons/ # cp -r build/linux/*/release/bundle/ $appName.AppDir @@ -45,16 +50,16 @@ function after_bundle() { # if [[ $(file -b "$appIcon.[ps]*g") =~ ]]; if [ ! -b "$appIcon.[ps]*g" ]; then - cp $appIcon.[ps]*g build/appimage/$appName.AppDir + cp $appIcon.[ps]*g ../build/appimage/$appName.AppDir # mkdir -p $appName.AppDir/usr/share/icons/ # cp $appIcon.[ps]*g $appName.AppDir/usr/share/icons/ fi } function create_apprun() { - touch build/appimage/$appName.AppDir/AppRun - echo -e '#!/bin/sh\n\ncd "$(dirname "$0")"\nexec ./'$appExec'' > ./build/appimage/$appName.AppDir/AppRun - chmod +x ./build/appimage/$appName.AppDir/AppRun + touch ../build/appimage/$appName.AppDir/AppRun + echo -e '#!/bin/sh\n\ncd "$(dirname "$0")"\nexec ./'$appExec'' > ../build/appimage/$appName.AppDir/AppRun + chmod +x ../build/appimage/$appName.AppDir/AppRun } function create_desktop() { @@ -71,17 +76,17 @@ function create_desktop() { local ca="Categories=Utility;" local co="Comment=Cross-Platform Password Manager" - touch ./build/appimage/$appName.AppDir/$appId.desktop - echo -e "$de\n$xaa\n$xav\n$xan\n$v\n$ty\n$te\n$n\n$e\n$i\n$ca\n$co" > ./build/appimage/$appName.AppDir/$appId.desktop + touch ../build/appimage/$appName.AppDir/$appId.desktop + echo -e "$de\n$xaa\n$xav\n$xan\n$v\n$ty\n$te\n$n\n$e\n$i\n$ca\n$co" > ../build/appimage/$appName.AppDir/$appId.desktop } function build_appimage() { # the build command itself: - ./build/appimage/appimage-build/appimagetool-$ARCH.AppImage ./build/appimage/$appName.AppDir + ../build/appimage/appimage-build/appimagetool-$ARCH.AppImage ../build/appimage/$appName.AppDir # move result in build folder - mv ./$appName-$ARCH.AppImage ./build/appimage/$appName-$appVersion-$ARCH.AppImage + mv ./$appName-$ARCH.AppImage ../build/appimage/$appName-$appVersion-$ARCH.AppImage } diff --git a/appimage/logo.png b/appimage/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..523ed225508bddae75d692d2605a5aefc37a47b9 GIT binary patch literal 4439 zcmb7I2{@GN+ka*ZgEAB<`w-cZWG5LRQAyFUA7l+#hBc`2jhQSZV;M{K<^Sq@*SB2f|6SkpJ=gVK@B7@(^}O%%-1q(a{qEjslPY7VQwuJ zs<85M5^i>=^*Y`WXZ0RpyScQriOd-rtUj5zvl{Y%_KoWsb6WfQT(Wk6`y9K(!pByJ z4}t+lE%npxBBe2F>PZqDjWL(N!l*AZFfL=XGjLL8hUkyzNb7AJjft=PG$8i zy)rnJyhJa?%buk2Ctg0D+ow%~M@d4&XSW}CNj3EVmoi%!9#T=3;|(KyS`8$7@6f;n zVz)qNPm1L0vjuuOCrr@MCCBDwAXSAokixx#UC~u*aoXI^IxYez=*`oOOo3^1c-xA`atmR=cPzs zkuJ6_#e0I-lN+oHkOGxH`5ICwPK?|55M2OXTBFT!EViTO;106RjfzV>xSJO?%1z|` zv7?I&>D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