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
53b5bdb0ac
commit
b3504819bb
2 changed files with 39 additions and 4 deletions
38
install.sh
38
install.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
installpath=$(dirname "$0")
|
installpath=$(dirname "$0")
|
||||||
version='1.0.6'
|
version='1.0.7'
|
||||||
if ! [ -d "$installpath/nwjs" ]; then
|
if ! [ -d "$installpath/nwjs" ]; then
|
||||||
echo "Can't find nwjs folder"
|
echo "Can't find nwjs folder"
|
||||||
exit 1;
|
exit 1;
|
||||||
|
@ -11,12 +11,17 @@ echo "Installing rpgmaker-linux v$version"
|
||||||
mainfd="$HOME/desktopapps/nwjs"
|
mainfd="$HOME/desktopapps/nwjs"
|
||||||
localapplicationsfd="$HOME/.local/share/applications"
|
localapplicationsfd="$HOME/.local/share/applications"
|
||||||
localbin="$HOME/.local/bin"
|
localbin="$HOME/.local/bin"
|
||||||
|
compatibilitytoolsfddef="$HOME/.steam/root/compatibilitytools.d/"
|
||||||
|
compatibilitytoolsfdflatpak="$HOME/.var/app/com.valvesoftware.Steam/data/Steam/compatibilitytools.d/"
|
||||||
|
|
||||||
|
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
archcheckmessage=$(echo "$arch" | sed -e 's@x86_64@, x86-64, version@g' -e 's@aarch64@, ARM aarch64,@g' -e 's@i686@, Intel 80386,@g' -e 's@i386@, Intel 80386,@g' -e 's@armv7l@, ARM,@g' -e 's@armhf@, ARM,@g')
|
archcheckmessage=$(echo "$arch" | sed -e 's@x86_64@, x86-64, version@g' -e 's@aarch64@, ARM aarch64,@g' -e 's@i686@, Intel 80386,@g' -e 's@i386@, Intel 80386,@g' -e 's@armv7l@, ARM,@g' -e 's@armhf@, ARM,@g')
|
||||||
|
|
||||||
rm -rf "$mainfd"
|
rm -rf "$mainfd"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
createfd() {
|
createfd() {
|
||||||
if ! [ -d "$1" ]; then
|
if ! [ -d "$1" ]; then
|
||||||
echo "Missing $1 creating one"
|
echo "Missing $1 creating one"
|
||||||
|
@ -27,6 +32,12 @@ fi
|
||||||
fi;
|
fi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rmfd() {
|
||||||
|
if [ -d "$1" ]; then
|
||||||
|
rm -rf "$1"
|
||||||
|
fi;
|
||||||
|
}
|
||||||
|
|
||||||
lnnew() {
|
lnnew() {
|
||||||
if ! [ -f "$1" ]; then
|
if ! [ -f "$1" ]; then
|
||||||
echo "Can't find the $1 file"
|
echo "Can't find the $1 file"
|
||||||
|
@ -44,6 +55,14 @@ if ! [ -f "$1" ]; then
|
||||||
echo "Missing file $1"
|
echo "Missing file $1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
steamcompatibilitytoolinstaller() {
|
||||||
|
|
||||||
|
createfd "$1"
|
||||||
|
rmfd "$1/rpgmaker-linux-steam-wrapper"
|
||||||
|
cp -r "$installpath/nwjs/packagefiles/rpgmaker-linux-steam-wrapper/" "$1"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
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"
|
||||||
|
@ -57,8 +76,11 @@ createfd "$mainfd"
|
||||||
createfd "$localapplicationsfd"
|
createfd "$localapplicationsfd"
|
||||||
createfd "$localbin"
|
createfd "$localbin"
|
||||||
|
|
||||||
|
|
||||||
checkthebinaryarch "$installpath/nwjs/cicpoffs"
|
checkthebinaryarch "$installpath/nwjs/cicpoffs"
|
||||||
cp "$installpath/install.sh" "$mainfd"
|
cp "$installpath/install.sh" "$mainfd"
|
||||||
|
cp "$installpath/uninstall.sh" "$mainfd"
|
||||||
|
|
||||||
cp -r "$installpath/nwjs" "$mainfd"
|
cp -r "$installpath/nwjs" "$mainfd"
|
||||||
|
|
||||||
# echo "Making a desktop file"
|
# echo "Making a desktop file"
|
||||||
|
@ -80,7 +102,7 @@ Exec=env gamef=\"%u\" $mainfd/nwjs/packagefiles/nwjsstart-cicpoffs.sh --gui
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Games
|
Categories=Games
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
MimeType=application/x-ms-dos-executable;application/x-wine-extension-msp;
|
MimeType=application/x-ms-dos-executable;application/x-wine-extension-msp;x-scheme-handler/rpgmakermp
|
||||||
Icon=$mainfd/nwjs/packagefiles/nwjs128.png
|
Icon=$mainfd/nwjs/packagefiles/nwjs128.png
|
||||||
Terminal=true
|
Terminal=true
|
||||||
NoDisplay=true" > "$localapplicationsfd/nwjsoptions.desktop"
|
NoDisplay=true" > "$localapplicationsfd/nwjsoptions.desktop"
|
||||||
|
@ -91,9 +113,19 @@ chmod +x "$localapplicationsfd/nwjsoptions.desktop"
|
||||||
lnnew "$mainfd/nwjs/packagefiles/nwjsstart-cicpoffs.sh" "$localbin/rpgmaker-linux"
|
lnnew "$mainfd/nwjs/packagefiles/nwjsstart-cicpoffs.sh" "$localbin/rpgmaker-linux"
|
||||||
chmod +x "$localbin/rpgmaker-linux"
|
chmod +x "$localbin/rpgmaker-linux"
|
||||||
update-desktop-database -q ~/.local/share/applications
|
update-desktop-database -q ~/.local/share/applications
|
||||||
|
xdg-mime default nwjsoptions.desktop x-scheme-handler/rpgmakermp
|
||||||
echo "Installation Done"
|
echo "Installation Done"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ -d "$HOME/.steam/" ]; then
|
||||||
|
steamcompatibilitytoolinstaller "$compatibilitytoolsfddef"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "$HOME/.var/app/com.valvesoftware.Steam/data/Steam" ]; then
|
||||||
|
steamcompatibilitytoolinstaller "$compatibilitytoolsfdflatpak"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$nolocalbin" ]; then
|
if [ -n "$nolocalbin" ]; then
|
||||||
echo "$localbin folder was created, you might need to restart your computer if you want to use the program in the terminal
|
echo "$localbin folder was created, you might need to restart your computer if you want to use the program in the terminal
|
||||||
Or use
|
Or use
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
rm -rf "$HOME/desktopapps/nwjs" && rm "$HOME/.local/share/applications/nwjstest.desktop" && rm "$HOME/.local/bin/rpgmaker-linux"
|
|
||||||
|
|
||||||
|
rm -rf "$HOME/desktopapps/nwjs" && rm "$HOME/.local/share/applications/nwjstest.desktop" && rm "$HOME/.local/share/applications/nwjsoptions.desktop" && rm "$HOME/.local/bin/rpgmaker-linux" && rm -rf "$HOME/.steam/steam/compatibilitytools.d/rpgmaker-linux-cicpoffs"
|
||||||
|
sed -e 's@x-scheme-handler/rpgmakermp.*@@g' -i /home/pasha/.config/mimeapps.list
|
||||||
|
|
Loading…
Add table
Reference in a new issue