@@ -17,9 +17,8 @@ if command -v apt; then
1717 sh <( curl -L https://nixos.org/nix/install)
1818 . /home/$USER /.nix-profile/etc/profile.d/nix.sh
1919
20- echo " Install OFS build dependencies"
21- sudo apt install -y cmake build-essential libmpv-dev libglvnd-dev libxext-dev make \
22- git gcc g++ cmake libmpv-dev libatlas-base-dev
20+ echo " Install OFS AppImage dependencies"
21+ sudo apt install fuse
2322fi
2423
2524if ! command -v nix; then
3534OFS_APP_DIR=" $HOME /.local/share/OFS/application"
3635OFS_EXTENSION_DIR=" $HOME /.local/share/OFS/OFS3_data/extensions"
3736
38- if [ -d $OFS_APP_DIR ]; then
39- echo " >> OpenFunscripter Source already downloaded (Updating...)"
40- pushd $OFS_APP_DIR
41- git pull
42- git reset --hard HEAD
43- git clean -fd
44- git remote prune origin
45- git checkout master
46- git pull
47- git submodule update --init
48- else
49- mkdir -p ` dirname $OFS_APP_DIR `
50- echo " >> Clone OpenFunscripter Source"
51- git clone https://github.com/OpenFunscripter/OFS.git $OFS_APP_DIR
52- pushd $OFS_APP_DIR
53- git submodule update --init
54- echo " >> OpenFunscripter Source downloaded to $OFS_APP_DIR "
55- fi
56-
57- if [ " $arg1 " != " --latest" ]; then
58- echo " Checkout latest OpenFunscripter release"
59- git checkout $( git describe --tags ` git rev-list --tags --max-count=1` )
60- git submodule update --init
61- else
62- echo " Use latest git commit (only for developers!)"
63- fi
37+ ofs_appimage_download_url=$( curl -s -H " Accept: application/vnd.github.v3+json" https://api.github.com/repos/OpenFunscripter/OFS/releases/latest | grep -Eo " https://.*64x.*AppImage" )
6438
65- echo " >> Build OFS in $PWD "
66- rm -rf build
67- mkdir -p build
68- pushd build
69- cmake -DCMAKE_BUILD_TYPE=Release ..
70- make -j$( expr $( nproc) \+ 1)
71- popd # build
72- popd # $OFS_APP_DIR
39+ echo " OFS AppImage Download URL: $ofs_appimage_download_url "
40+ mkdir -p $OFS_APP_DIR /bin
41+ rm -rf $OFS_APP_DIR /bin/OpenFunscripter
42+ wget -c " $ofs_appimage_download_url " -O $OFS_APP_DIR /bin/OpenFunscripter
7343
7444echo " >> Install ofs extension"
7545mkdir -p " $OFS_EXTENSION_DIR /MTFG"
0 commit comments