Last active
June 26, 2022 00:44
-
-
Save matsuu/81839ea3021d9996d9e6efcb7cdbec30 to your computer and use it in GitHub Desktop.
aarch64用AppImageを作成するためのパッチ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
docker image build -t neovim . | |
docker run --rm neovim cat build/bin/nvim.appimage > nvim.appimage | |
chmod +x nvim.appimage | |
#docker image rm neovim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN \ | |
apt update && \ | |
apt upgrade -y && \ | |
apt install -y automake cmake curl g++ gettext git libtool-bin make pkg-config unzip && \ | |
git clone -b stable --single-branch --depth 1 https://github.com/neovim/neovim.git | |
WORKDIR neovim | |
ADD nvim-appimage-appimagetool.patch nvim-appimage-appimagetool.patch | |
RUN \ | |
patch -p1 <nvim-appimage-appimagetool.patch && \ | |
make appimage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scripts/genappimage.sh b/scripts/genappimage.sh | |
index cc88ab555..06636ecec 100755 | |
--- a/scripts/genappimage.sh | |
+++ b/scripts/genappimage.sh | |
@@ -37,21 +37,23 @@ VERSION=$("$ROOT_DIR"/build/bin/nvim --version | head -n 1 | grep -o 'v.*') | |
cd "$APP_BUILD_DIR" | |
-# Only downloads linuxdeploy if the remote file is different from local | |
-if [ -e "$APP_BUILD_DIR"/linuxdeploy-x86_64.AppImage ]; then | |
- curl -Lo "$APP_BUILD_DIR"/linuxdeploy-x86_64.AppImage \ | |
- -z "$APP_BUILD_DIR"/linuxdeploy-x86_64.AppImage \ | |
- https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
+# Only downloads appimagetool if the remote file is different from local | |
+if [ -e "$APP_BUILD_DIR"/appimagetool-$ARCH.AppImage ]; then | |
+ curl -Lo "$APP_BUILD_DIR"/appimagetool-$ARCH.AppImage \ | |
+ -z "$APP_BUILD_DIR"/appimagetool-$ARCH.AppImage \ | |
+ https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$ARCH.AppImage | |
else | |
- curl -Lo "$APP_BUILD_DIR"/linuxdeploy-x86_64.AppImage \ | |
- https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
+ curl -Lo "$APP_BUILD_DIR"/appimagetool-$ARCH.AppImage \ | |
+ https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$ARCH.AppImage | |
fi | |
-chmod +x "$APP_BUILD_DIR"/linuxdeploy-x86_64.AppImage | |
+chmod +x "$APP_BUILD_DIR"/appimagetool-$ARCH.AppImage | |
-# metainfo is not packaged automatically by linuxdeploy | |
+# metainfo is not packaged automatically by appimagetool | |
mkdir "$APP_DIR/usr/share/metainfo/" | |
cp "$ROOT_DIR/runtime/nvim.appdata.xml" "$APP_DIR/usr/share/metainfo/" | |
+cp "$ROOT_DIR/runtime/nvim.desktop" "$APP_DIR/" | |
+cp "$ROOT_DIR/runtime/nvim.png" "$APP_DIR/" | |
cd "$APP_DIR" | |
@@ -85,8 +87,7 @@ fi | |
# - Expects: $ARCH, $APP, $VERSION env vars | |
# - Expects: ./$APP.AppDir/ directory | |
# - Produces: ./nvim.appimage | |
-./linuxdeploy-x86_64.AppImage --appdir $APP.AppDir -d $ROOT_DIR/runtime/nvim.desktop -i \ | |
-"$ROOT_DIR/runtime/nvim.png" --output appimage | |
+./appimagetool-$ARCH.AppImage $APP.AppDir $OUTPUT | |
# Moving the final executable to a different folder so it isn't in the | |
# way for a subsequent build. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment