diff --git a/scripts/create_app_image.sh b/scripts/create_app_image.sh index f3a31c4..b43a2f7 100644 --- a/scripts/create_app_image.sh +++ b/scripts/create_app_image.sh @@ -1,36 +1,17 @@ #!/usr/bin/env bash set -e -TOOL_DIR=$(pwd)/target/linux/linuxdeploy TARGET_DIR=$(pwd)/target/linux/AppImage BUILD_DIR=$TARGET_DIR/build OUTPUT_DIR=$TARGET_DIR/out BASE_DIR=$(pwd) -mkdir -p $TOOL_DIR - -if ls $TOOL_DIR/linuxdeploy*.AppImage 1> /dev/null 2>&1; then - echo "Skipping download of linuxdeploy" -else - echo "Downloading linuxdeploy tool" - wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -P "$TOOL_DIR" - chmod +x $TOOL_DIR/linuxdeploy*.AppImage -fi - -if ls $TOOL_DIR/appimagetool*.AppImage 1> /dev/null 2>&1; then - echo "Skipping download of appimagetool" -else - echo "Downloading appimagetool" - wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -P "$TOOL_DIR" - chmod +x $TOOL_DIR/appimagetool*.AppImage -fi - rm -Rf "$TARGET_DIR" mkdir -p $OUTPUT_DIR mkdir -p $BUILD_DIR echo Building AppImage into $OUTPUT_DIR pushd $OUTPUT_DIR -$TOOL_DIR/linuxdeploy*.AppImage --appimage-extract-and-run -e "$BASE_DIR/$EXEC_PATH" \ +$BASE_DIR/scripts/vendor-app-image/linuxdeploy*.AppImage --appimage-extract-and-run -e "$BASE_DIR/$EXEC_PATH" \ -d "$BASE_DIR/espanso/src/res/linux/espanso.desktop" \ -i "$BASE_DIR/espanso/src/res/linux/icon.png" \ --appdir $BUILD_DIR \ @@ -45,7 +26,7 @@ echo "Applying patch for libgmodule" ./Espanso*.AppImage --appimage-extract rm -Rf ./Espanso*.AppImage rm -Rf squashfs-root/usr/lib/libgmodule* -$TOOL_DIR/appimagetool*.AppImage --appimage-extract-and-run -v squashfs-root +$BASE_DIR/scripts/vendor-app-image/appimagetool*.AppImage --appimage-extract-and-run -v squashfs-root rm -Rf squashfs-root popd \ No newline at end of file diff --git a/scripts/vendor-app-image/LICENSE-appimagetool.txt b/scripts/vendor-app-image/LICENSE-appimagetool.txt new file mode 100644 index 0000000..4a50f94 --- /dev/null +++ b/scripts/vendor-app-image/LICENSE-appimagetool.txt @@ -0,0 +1,28 @@ +MIT License + +If not stated otherwise within the individual file or subdirectory, the +original source code in this repository is licensed as below. This does not +necessarily apply for all dependencies. For the sake of clarity, this license +does NOT apply to the contents of AppImages that anyone may create. +Software contained inside an AppImage may be licensed under any license at the +discretion of the respecive rights holder(s). + +Copyright (c) 2004-20 Simon Peter + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/scripts/vendor-app-image/LICENSE-linuxdeploy.txt b/scripts/vendor-app-image/LICENSE-linuxdeploy.txt new file mode 100644 index 0000000..74189f7 --- /dev/null +++ b/scripts/vendor-app-image/LICENSE-linuxdeploy.txt @@ -0,0 +1,19 @@ +Copyright 2018 TheAssassin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/scripts/vendor-app-image/README.md b/scripts/vendor-app-image/README.md new file mode 100644 index 0000000..1bdb589 --- /dev/null +++ b/scripts/vendor-app-image/README.md @@ -0,0 +1,4 @@ +I'm vendoring these build tools here to have reproducible builds, otherwise +we might run into these issues again: + +* https://github.com/federico-terzi/espanso/issues/900 \ No newline at end of file diff --git a/scripts/vendor-app-image/appimagetool-x86_64.AppImage b/scripts/vendor-app-image/appimagetool-x86_64.AppImage new file mode 100755 index 0000000..3adc741 Binary files /dev/null and b/scripts/vendor-app-image/appimagetool-x86_64.AppImage differ diff --git a/scripts/vendor-app-image/linuxdeploy-x86_64.AppImage b/scripts/vendor-app-image/linuxdeploy-x86_64.AppImage new file mode 100755 index 0000000..43fcd99 Binary files /dev/null and b/scripts/vendor-app-image/linuxdeploy-x86_64.AppImage differ