mirror of
https://github.com/bakustarver/rpgmakermlinux-cicpoffs.git
synced 2025-04-29 19:44:52 +02:00
Add files via upload
This commit is contained in:
parent
1289e7a1c3
commit
535de64dec
1 changed files with 50 additions and 7 deletions
|
@ -8,8 +8,8 @@ nwjsfm="$HOME/desktopapps/nwjs/nwjs"
|
||||||
defp="$nwjsfm/nwjs"
|
defp="$nwjsfm/nwjs"
|
||||||
|
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
archcheckmessage=$(echo "$arch" | sed -e 's@x86_64@pie executable, x86-64,@g' -e 's@aarch64@pie executable, ARM aarch64,@g' -e 's@i386@pie executable, Intel 80386,@g' -e 's@armhf@pie executable, ARM,@g')
|
archcheckmessage=$(echo "$arch" | sed -e 's@x86_64@pie executable, x86-64,@g' -e 's@aarch64@pie executable, ARM aarch64,@g' -e 's@i686@pie executable, Intel 80386,@g' -e 's@i386@pie executable, Intel 80386,@g' -e 's@armhf@pie executable, ARM,@g')
|
||||||
version="1.0.0"
|
version='1.0.1'
|
||||||
latestinstallednwjsfd=$(ls -p "$defp" | grep / | sort -V | tail -n 1 )
|
latestinstallednwjsfd=$(ls -p "$defp" | grep / | sort -V | tail -n 1 )
|
||||||
|
|
||||||
checkthebinaryarch() {
|
checkthebinaryarch() {
|
||||||
|
@ -65,6 +65,13 @@ export skipdownloadifexist=true
|
||||||
# nwjsversion=(echo "$nwjsversion"
|
# nwjsversion=(echo "$nwjsversion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkifexist() {
|
||||||
|
if ! [ -f "$1" ]; then
|
||||||
|
echo "Can't find the file $1"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
checkgamepath() {
|
checkgamepath() {
|
||||||
# path="$1"
|
# path="$1"
|
||||||
echo "$1"
|
echo "$1"
|
||||||
|
@ -123,6 +130,22 @@ exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
packagejsonfunc() {
|
||||||
|
if [ -n "$PACKAGEJSONPATH" ]; then
|
||||||
|
packagejson="$PACKAGEJSONPATH"
|
||||||
|
else
|
||||||
|
packagejson="$HOME/desktopapps/nwjs/nwjs/packagefiles/package.json"
|
||||||
|
fi
|
||||||
|
packagejsoninfo=$(cat "$packagejson")
|
||||||
|
newpackagejson=$(echo "$packagejsoninfo" | sed -e 's@"name": "",@"name": "RPG Maker MV/MZ (cicpoffs mount)",@g' -e 's@"main": ".*@"main": "www/index.html",@' -e 's@"title": "",@"title": "RPG Maker MV/MZ (cicpoffs mount)",@g')
|
||||||
|
# ln -s "$packagejson" "$nwjstestpath"
|
||||||
|
if [ -h "$nwjstestpath/package.json" ]; then
|
||||||
|
rm "$nwjstestpath/package.json"
|
||||||
|
fi
|
||||||
|
echo "$newpackagejson" > "$nwjstestpath/package.json"
|
||||||
|
cat "$nwjstestpath/package.json"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
while [ $# -ne 0 ]
|
while [ $# -ne 0 ]
|
||||||
do
|
do
|
||||||
|
@ -177,8 +200,23 @@ do
|
||||||
--gamepath)
|
--gamepath)
|
||||||
checkgamepath "$2"
|
checkgamepath "$2"
|
||||||
;;
|
;;
|
||||||
--usegamepackagejson)
|
--useoriginalgamepackagejson)
|
||||||
usegamepackagejson=true
|
if [ -f "$path/package.json" ]; then
|
||||||
|
PACKAGEJSONPATH="$path/package.json"
|
||||||
|
echo "$path"
|
||||||
|
elif [ -f "$mountpath/package.json" ]; then
|
||||||
|
PACKAGEJSONPATH="$mountpath/package.json"
|
||||||
|
elif [ -f "$PWD/package.json" ]; then
|
||||||
|
PACKAGEJSONPATH="$PWD/package.json"
|
||||||
|
else
|
||||||
|
echo "Can't find the original package.json"
|
||||||
|
fi
|
||||||
|
useoriginalgamepackagejson=true
|
||||||
|
;;
|
||||||
|
--custompackagejsonpath)
|
||||||
|
checkifexist "$2"
|
||||||
|
PACKAGEJSONPATH="$2"
|
||||||
|
custompackagejsonpath=true
|
||||||
;;
|
;;
|
||||||
--nwjspath)
|
--nwjspath)
|
||||||
checknwjspath $2
|
checknwjspath $2
|
||||||
|
@ -246,6 +284,11 @@ echo "You can't use those arguments together --chooselatestnwjs --choosenwjsvers
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$useoriginalgamepackagejson" = "true" ] && [ "$custompackagejsonpath" = "true" ] ; then
|
||||||
|
echo "You can't use those arguments together --useoriginalgamepackagejson --custompackagejsonpath"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$showversion" = true ]; then
|
if [ "$showversion" = true ]; then
|
||||||
echo -e "$version"
|
echo -e "$version"
|
||||||
fi
|
fi
|
||||||
|
@ -265,7 +308,8 @@ https://github.com/bakustarver/rpgmakermlinux-cicpoffs
|
||||||
--clearoldnwjs
|
--clearoldnwjs
|
||||||
--unmount
|
--unmount
|
||||||
--gamepath
|
--gamepath
|
||||||
--usegamepackagejson
|
--useoriginalgamepackagejson
|
||||||
|
--custompackagejsonpath
|
||||||
--nwjspath
|
--nwjspath
|
||||||
--cicpoffspath
|
--cicpoffspath
|
||||||
--printrpgmakerlibversions
|
--printrpgmakerlibversions
|
||||||
|
@ -317,7 +361,6 @@ fi
|
||||||
if [ -z "$cicpoffspath" ]; then
|
if [ -z "$cicpoffspath" ]; then
|
||||||
cicpoffs="$HOME/desktopapps/nwjs/nwjs/cicpoffs"
|
cicpoffs="$HOME/desktopapps/nwjs/nwjs/cicpoffs"
|
||||||
fi
|
fi
|
||||||
packagejson="$HOME/desktopapps/nwjs/nwjs/packagefiles/package.json"
|
|
||||||
|
|
||||||
if [ "$latestnwjs" = "true" ]; then
|
if [ "$latestnwjs" = "true" ]; then
|
||||||
nwjsf="$latestinstallednwjsfd"
|
nwjsf="$latestinstallednwjsfd"
|
||||||
|
@ -367,7 +410,7 @@ rm "$nwjstestpath/www"
|
||||||
}
|
}
|
||||||
|
|
||||||
mountwww() {
|
mountwww() {
|
||||||
ln -s "$packagejson" "$nwjstestpath"
|
packagejsonfunc
|
||||||
if ! [ -d "$nwjstestpath/www" ]; then
|
if ! [ -d "$nwjstestpath/www" ]; then
|
||||||
mkdir -p "$nwjstestpath/www"
|
mkdir -p "$nwjstestpath/www"
|
||||||
fi;
|
fi;
|
||||||
|
|
Loading…
Add table
Reference in a new issue