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
5aae934005
commit
bed8e5ddc7
1 changed files with 91 additions and 18 deletions
|
@ -1,15 +1,39 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
# kdialog --msgbox "$CPATH"
|
||||||
|
|
||||||
# curdesktop=$(echo "$XDG_CURRENT_DESKTOP")
|
# curdesktop=$(echo "$XDG_CURRENT_DESKTOP")
|
||||||
# defp="$HOME/deskappbin/nwjs/nwjs/"
|
# defp="$HOME/deskappbin/nwjs/nwjs/"
|
||||||
|
version='1.0.2'
|
||||||
|
|
||||||
nwjsfm="$HOME/desktopapps/nwjs/nwjs"
|
nwjsfm="$HOME/desktopapps/nwjs/nwjs"
|
||||||
|
|
||||||
defp="$nwjsfm/nwjs"
|
defp="$nwjsfm/nwjs"
|
||||||
|
|
||||||
|
|
||||||
|
githubscriptwget=$(timeout 5s wget -qO- "https://raw.githubusercontent.com/bakustarver/rpgmakermlinux-cicpoffs/main/installgithub.sh" )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ -n "$githubscriptwget" ]; then
|
||||||
|
githubversion=$(echo "$githubscriptwget" | sed -n 's/version=//p')
|
||||||
|
if [ "$version" != "$githubversion" ]; then
|
||||||
|
if { echo "$version"; echo "$githubversion"; } | sort --version-sort -C; then
|
||||||
|
echo "A new rpgmaker-linux update has been found, to get the latest version use
|
||||||
|
$ rpgmaker-linux --fullupdate
|
||||||
|
|
||||||
|
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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@i686@pie executable, Intel 80386,@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.1'
|
|
||||||
latestinstallednwjsfd=$(ls -p "$defp" | grep / | sort -V | tail -n 1 )
|
latestinstallednwjsfd=$(ls -p "$defp" | grep / | sort -V | tail -n 1 )
|
||||||
|
|
||||||
checkthebinaryarch() {
|
checkthebinaryarch() {
|
||||||
|
@ -20,8 +44,9 @@ fi
|
||||||
if ! file "$1" | grep -q "$archcheckmessage" ; then
|
if ! file "$1" | grep -q "$archcheckmessage" ; then
|
||||||
# Use $ wget -qO- installscript.sh | bash
|
# Use $ wget -qO- installscript.sh | bash
|
||||||
file "$1"
|
file "$1"
|
||||||
echo "Wrong architecture!!
|
echo "Wrong architecture!! Use
|
||||||
Download corrent archive with $arch"
|
$ rpgmaker-linux --fullupdate
|
||||||
|
to get correct version"
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -54,6 +79,10 @@ echo "https://github.com/bakustarver/rpgmakermlinux-cicpoffs"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fullupdatereinstall() {
|
||||||
|
echo "$githubscriptwget" | bash
|
||||||
|
}
|
||||||
|
|
||||||
updatenwjs() {
|
updatenwjs() {
|
||||||
export latestlocal=$(echo "$latestinstallednwjsfd" | sed -e 's@nwjs-@@g' -e 's@-linux.*@@g')
|
export latestlocal=$(echo "$latestinstallednwjsfd" | sed -e 's@nwjs-@@g' -e 's@-linux.*@@g')
|
||||||
"$nwjsfm/dwnwjs.sh"
|
"$nwjsfm/dwnwjs.sh"
|
||||||
|
@ -72,33 +101,46 @@ exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
checkgamepath() {
|
pchange() {
|
||||||
# path="$1"
|
|
||||||
echo "$1"
|
|
||||||
|
|
||||||
if [ -f "$1" ]; then
|
if [ -f "$1" ]; then
|
||||||
path=$(readlink -f "$1")
|
dirname "$1"
|
||||||
elif [ -d "$1" ]; then
|
elif [ -d "$1" ]; then
|
||||||
path=$(echo "$1")
|
echo "$1"
|
||||||
else
|
else
|
||||||
echo "Use "$arg' "/path/rpggame/"'
|
echo "Use "$arg' "/path/rpggame/"'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [ -d "$path/www" ] && [ -e "$path/package.json" ] && [ -e "$path/www/js/plugins.js" ]; then
|
checkgamefilesfd() {
|
||||||
mountpath="$path/www"
|
if [ -d "$1/www" ] && [ -e "$1/package.json" ] && [ -e "$1/www/js/plugins.js" ]; then
|
||||||
|
mountpath="$1/www"
|
||||||
found=true
|
found=true
|
||||||
gamepath=true
|
gamepath=true
|
||||||
elif [ -d "$path/data" ] && [ -e "$path/package.json" ] && [ -e "$path/js/plugins.js" ]; then
|
elif [ -d "$1/data" ] && [ -e "$1/package.json" ] && [ -e "$1/js/plugins.js" ]; then
|
||||||
mountpath="$path"
|
mountpath="$1"
|
||||||
gamepath=true
|
gamepath=true
|
||||||
found=true
|
found=true
|
||||||
else
|
else
|
||||||
echo "Can't find game with $arg"
|
echo "Can't find game with $1"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
checkgamepath() {
|
||||||
|
# path="$1"
|
||||||
|
echo "$1"
|
||||||
|
|
||||||
|
if ! [ -n "$CPATH" ]; then
|
||||||
|
path=$(pchange "$1")
|
||||||
|
else
|
||||||
|
path="$CPATH"
|
||||||
|
fi
|
||||||
|
# kdialog --msbox "$path"
|
||||||
|
checkgamefilesfd "$path"
|
||||||
|
}
|
||||||
|
|
||||||
if [ -z "$gamepath" ]; then
|
if [ -z "$gamepath" ]; then
|
||||||
if [ -d ./www ] && [ -f ./package.json ]; then
|
if [ -d ./www ] && [ -f ./package.json ]; then
|
||||||
mountpath="$PWD/www"
|
mountpath="$PWD/www"
|
||||||
|
@ -109,6 +151,12 @@ found=true
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$found" ] && [ -n "$gamef" ] ; then
|
||||||
|
checkgamefilesfd "$gamef"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
checknwjspath() {
|
checknwjspath() {
|
||||||
path="$1"
|
path="$1"
|
||||||
if [ -d "$path/lib" ] && [ -e "$path/nw" ]; then
|
if [ -d "$path/lib" ] && [ -e "$path/nw" ]; then
|
||||||
|
@ -143,7 +191,6 @@ if [ -h "$nwjstestpath/package.json" ]; then
|
||||||
rm "$nwjstestpath/package.json"
|
rm "$nwjstestpath/package.json"
|
||||||
fi
|
fi
|
||||||
echo "$newpackagejson" > "$nwjstestpath/package.json"
|
echo "$newpackagejson" > "$nwjstestpath/package.json"
|
||||||
cat "$nwjstestpath/package.json"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -181,6 +228,9 @@ do
|
||||||
--updatenwjs)
|
--updatenwjs)
|
||||||
updatenwjs
|
updatenwjs
|
||||||
;;
|
;;
|
||||||
|
--fullupdate)
|
||||||
|
fullupdatereinstall
|
||||||
|
;;
|
||||||
--updatescripts)
|
--updatescripts)
|
||||||
disableCopperBld=true
|
disableCopperBld=true
|
||||||
incompletefeaturefunc
|
incompletefeaturefunc
|
||||||
|
@ -198,6 +248,7 @@ do
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
--gamepath)
|
--gamepath)
|
||||||
|
echo "$@ $2"
|
||||||
checkgamepath "$2"
|
checkgamepath "$2"
|
||||||
;;
|
;;
|
||||||
--useoriginalgamepackagejson)
|
--useoriginalgamepackagejson)
|
||||||
|
@ -318,6 +369,7 @@ https://github.com/bakustarver/rpgmakermlinux-cicpoffs
|
||||||
--checkreleaseupdates
|
--checkreleaseupdates
|
||||||
--checkbetaupdates
|
--checkbetaupdates
|
||||||
--updatescripts
|
--updatescripts
|
||||||
|
--fullupdate
|
||||||
--sourcelinks"
|
--sourcelinks"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -334,18 +386,34 @@ else
|
||||||
nwdllpath="nw.dll"
|
nwdllpath="nw.dll"
|
||||||
nodedllpath="node.dll"
|
nodedllpath="node.dll"
|
||||||
fi
|
fi
|
||||||
|
# echo "$mountpath"
|
||||||
|
rpgmvcorefilepath="$mountpath/js/rpg_core.js"
|
||||||
|
rpgmzcorefilepath="$mountpath/js/rmmz_core.js"
|
||||||
|
|
||||||
|
if [ -f "$rpgmvcorefilepath" ]; then
|
||||||
|
rpgcorefilepath="$rpgmvcorefilepath"
|
||||||
|
elif [ -f "$rpgmzcorefilepath" ]; then
|
||||||
|
rpgcorefilepath="$rpgmzcorefilepath"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
nwdlltext=$(strings "$nwdllpath")
|
nwdlltext=$(strings "$nwdllpath")
|
||||||
|
rpgcoretext=$(cat "$rpgcorefilepath")
|
||||||
nodeversion=$(strings "$nodedllpath" | grep '/win-.*/node.lib' | sed -e 's@https://nodejs.org/download/release/@@g' -e 's@/win-.*/node.lib@@g')
|
nodeversion=$(strings "$nodedllpath" | grep '/win-.*/node.lib' | sed -e 's@https://nodejs.org/download/release/@@g' -e 's@/win-.*/node.lib@@g')
|
||||||
nwjsversiondll=$(echo "$nwdlltext" | sed -n "s/process.versions\['nw'\] = '//p" | sed -e "s@'.*@@g")
|
nwjsversiondll=$(echo "$nwdlltext" | sed -n "s/process.versions\['nw'\] = '//p" | sed -e "s@'.*@@g")
|
||||||
chromiumversion=$(echo "$nwdlltext" | grep -B 4 '::SHGetSpecialFolderPathW' | grep '\.[0-9]\.[0-9]' | sed -e 's@.*\.\$@@g')
|
chromiumversion=$(echo "$nwdlltext" | grep -B 4 '::SHGetSpecialFolderPathW' | grep '\.[0-9]\.[0-9]' | sed -e 's@.*\.\$@@g')
|
||||||
|
rpgmakername=$(echo -e "$rpgcoretext" | sed -n "s/Utils.RPGMAKER_NAME = .//p" | sed -e 's@.;@@g')
|
||||||
|
rpgmakerversion=$(echo -e "$rpgcoretext" | sed -n 's/Utils.RPGMAKER_VERSION = .//p' | sed -e 's@.;@@g')
|
||||||
|
|
||||||
|
|
||||||
echo "NWJS version - $nwjsversiondll
|
echo "NWJS version - $nwjsversiondll
|
||||||
Chromium version - $chromiumversion
|
Chromium version - $chromiumversion
|
||||||
Node version - $nodeversion
|
Node version - $nodeversion
|
||||||
|
RPG Maker Name - $rpgmakername
|
||||||
|
RPG Maker version - $rpgmakerversion
|
||||||
|
|
||||||
ffmpeg prebuild link
|
ffmpeg prebuild link
|
||||||
https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt/releases/tag/$nwjsversion"
|
https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt/releases/tag/$nwjsversiondll"
|
||||||
else
|
else
|
||||||
echo "Can't find the game path"
|
echo "Can't find the game path"
|
||||||
fi
|
fi
|
||||||
|
@ -367,11 +435,16 @@ nwjsf="$latestinstallednwjsfd"
|
||||||
else
|
else
|
||||||
nwjsf=$(ls -tp "$defp" | grep / | head -n 1)
|
nwjsf=$(ls -tp "$defp" | grep / | head -n 1)
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$NWJSPATH" ]; then
|
||||||
|
nwjstestpath="$NWJSPATH"
|
||||||
|
echo "$NWJSPATH"
|
||||||
|
else
|
||||||
if [ -n "$nwjsversion" ]; then
|
if [ -n "$nwjsversion" ]; then
|
||||||
nwjstestpath="$defp/nwjs/$nwjsversion"
|
nwjstestpath="$defp/nwjs/$nwjsversion"
|
||||||
else
|
else
|
||||||
nwjstestpath="$defp/$nwjsf"
|
nwjstestpath="$defp/$nwjsf"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# wwwsavesymlink.sh "$@"
|
# wwwsavesymlink.sh "$@"
|
||||||
# echo "$nwjstestpath"
|
# echo "$nwjstestpath"
|
||||||
|
@ -383,10 +456,10 @@ fi
|
||||||
startnw() {
|
startnw() {
|
||||||
if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
|
if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
|
||||||
echo "wayland detected"
|
echo "wayland detected"
|
||||||
"$nwjstestpath/nw" --ozone-platform=wayland
|
"$nwjstestpath/nw" --remote-debugging-port=9222 --ozone-platform=wayland
|
||||||
else
|
else
|
||||||
echo "wayland not detected, starting in x11"
|
echo "wayland not detected, starting in x11"
|
||||||
"$nwjstestpath/nw" --ozone-platform=x11
|
"$nwjstestpath/nw" --remote-debugging-port=9222 --ozone-platform=x11
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue