mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2026-06-22 04:11:37 +10:00
(build_appimage.sh) add basic arch detection
This commit is contained in:
+15
-8
@@ -2,20 +2,27 @@
|
|||||||
|
|
||||||
# run this from the root of the git repo to make this work
|
# run this from the root of the git repo to make this work
|
||||||
|
|
||||||
|
arch="$(uname -m)"
|
||||||
git_dir="./"
|
git_dir="./"
|
||||||
target_dir="$git_dir/src-tauri/target/"
|
target_dir="$git_dir/src-tauri/target/"
|
||||||
appimage_dir="$git_dir/build/appimage"
|
appimage_dir="$git_dir/build/appimage"
|
||||||
appdir="$appimage_dir/drop-oss-app.d"
|
appdir="$appimage_dir/drop-oss-app.d"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
# set up the repo
|
||||||
|
git submodule init
|
||||||
|
git submodule update --recursive
|
||||||
|
|
||||||
|
# set up yarn and build
|
||||||
|
yarn
|
||||||
|
yarn tauri build
|
||||||
|
}
|
||||||
|
|
||||||
rm -f $appdir/usr/bin/* $appdir/usr/lib/*
|
rm -f $appdir/usr/bin/* $appdir/usr/lib/*
|
||||||
|
|
||||||
# set up the repo
|
if [[ ! "$1" == "--nobuild" ]]; then
|
||||||
git submodule init
|
build
|
||||||
git submodule update --recursive
|
fi
|
||||||
|
|
||||||
# set up yarn and build
|
|
||||||
yarn
|
|
||||||
yarn tauri build
|
|
||||||
|
|
||||||
# install binaries in the appdir, then the libraries
|
# install binaries in the appdir, then the libraries
|
||||||
cp $target_dir/release/drop-app $appdir/usr/bin
|
cp $target_dir/release/drop-app $appdir/usr/bin
|
||||||
@@ -24,7 +31,7 @@ do
|
|||||||
sudo install -g $USER -o $USER -Dm755 "$(ls -L1 /usr/lib/$i)" $appdir/usr/lib
|
sudo install -g $USER -o $USER -Dm755 "$(ls -L1 /usr/lib/$i)" $appdir/usr/lib
|
||||||
done
|
done
|
||||||
|
|
||||||
wget -O $appimage_dir/appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
wget -O $appimage_dir/appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$arch.AppImage
|
||||||
|
|
||||||
cd $appimage_dir
|
cd $appimage_dir
|
||||||
chmod u+x appimagetool
|
chmod u+x appimagetool
|
||||||
|
|||||||
Reference in New Issue
Block a user