The forum
[Script] SuperCrateBox Install
Experimental Script
Author | Replies | ||||||
inukaze | Tuesday 2 June 2015 at 9:27 | ||||||
inukaze![]()
|
Now the current version of this script : Hi there , i put here the update for PlayOnLinux Source Code for my script With custom icons:
Without Custom Icons ( i really dont like the icon of the executable )
Well if you don't like the custom icon download from my dropbox , you can use without that icons XD
The first version of this script :
Edited by inukaze |
||||||
petch | Tuesday 2 June 2015 at 21:18 | ||||||
petch![]()
|
Ah, I didn't see you submitted your script in the forum too, I made the review as a comment in the repository:
We don't accept scripts that use DropBox (too brittle) rm -rf "$WINEPREFIX/drive_c/DMAFix" Duplicate statement rm -rf "$HOME/.PlayOnLinux/icones/full_size/SuperCrateBox" Don't hardcode the location of PlayOnLinux/PlayOnMac's state, use $POL_USER_ROOT. Anyway, script should avoid tweaking files under icones or shortcuts directly, just use POL_Shortcut. DLLFix="https://dl.dropboxusercontent.com/u/3164499/Linux/Wine/drive_c/windows/system32/devenum.dll" Use provided components (POL_Install_devenum, quartz, directmusic,...) cat << EOF > "$WINEPREFIX/drive_c/DMAFix/SuperCrateBox.reg" REGEDIT 4 [HKEY_CURRENT_USER\\Software\\Wine\\Direct3D] Use provided statements (POL_Wine_Direct3D,...) My scripts wiki: https://github.com/petchema/playonlinux/wiki GOGmix: https://www.gog.com/en/mix/playonlinux_install_scripts |
||||||
inukaze | Tuesday 2 June 2015 at 22:13 | ||||||
inukaze![]()
|
Hi there , i put here the update for PlayOnLinux Source Code for my script With custom icons:
Without Custom Icons ( i really dont like the icon of the executable )
Well if you don't like the custom icon download from my dropbox , you can use without that icons XD
Edited by inukaze |
||||||
inukaze | Wednesday 3 June 2015 at 2:41 | ||||||
inukaze![]()
|
i update the Source Code for Script , someone can test it , please ??? |
||||||
petch | Wednesday 3 June 2015 at 3:05 | ||||||
petch![]()
|
Hi, That looks way better! POL_Wine_Direct3D "DirectDrawRenderer" "opengl" POL_Wine_Direct3D "StrictDrawOrdering" "disabled" I think those two options are the Wine defaults, are those statements required? For the icon it can be put on the web server so that POL_Shortcut can make use of it, I can probably make final adjustments to the script to do that, I'll need to uploading the icon anyway. if [ $( which unrar) ]; then unrar x supercratebox.rar else POL_SetupWindow_message "$(eval_gettext 'Game Extract failed (Missing unrar).')" "$TITLE" fi I think you should check for unrar as early as possible, right after POL_SetupWindow_Init, and then terminate the script (say using POL_Debug_Fatal) if it's missing. No need to go on if the archive can't be unpacked. And it's too bad they're using some RAR proprietary algorithm, otherwise using 7-zip would have been a better option (p7zip-full is a dependency of PlayOnLinux) :( Edited by petch My scripts wiki: https://github.com/petchema/playonlinux/wiki GOGmix: https://www.gog.com/en/mix/playonlinux_install_scripts |
||||||
inukaze | Wednesday 3 June 2015 at 5:00 | ||||||
inukaze![]()
|
Ok Updating Source Code :
=) well i hope this works well XD . |
||||||
petch | Wednesday 3 June 2015 at 8:24 | ||||||
petch![]()
|
Looks OK to me :) My scripts wiki: https://github.com/petchema/playonlinux/wiki GOGmix: https://www.gog.com/en/mix/playonlinux_install_scripts |
||||||
Ronin DUSETTE | Wednesday 3 June 2015 at 16:10 | ||||||
Ronin DUSETTE![]()
|
There are a couple of redundant variables (WINEVERSION and WORKING_WINE_VERSION), and neither one is used. You should probably just use WINEVERSION, and change: POL_Wine_PrefixCreate "1.7.22" to
POL_Wine_PrefixCreate "$WINEVERSION" Other than that it looks fine to me, as well. Please: Post debug logs & full computer specs in first post No private messages for general help, use the forums Read the wiki, Report broken scripts |
||||||
inukaze | Wednesday 3 June 2015 at 18:15 | ||||||
inukaze![]()
|
Thank you , how i tell before , i dont know what are the diferences between that variables , then just WINEVERSION and POL_Wine_PrefixCreate "$WINVERSION" ? Look here ->
That source code , are right ??? Edited by inukaze |
||||||
Ronin DUSETTE | Wednesday 3 June 2015 at 18:20 | ||||||
Ronin DUSETTE![]()
|
Yes. :) That looks much better. Plus, when you need to update a variable, you don't have to hunt them down if they are unique, organized, and at the top. Please: Post debug logs & full computer specs in first post No private messages for general help, use the forums Read the wiki, Report broken scripts |
||||||
inukaze | Wednesday 3 June 2015 at 19:31 | ||||||
inukaze![]()
|
i ever put the variables on the top , for example , my "Graphical Installer" for Zezenia Online , just bash and external commands #!/bin/bash ThisDIR=(pwd) #CURL=$(whereis -B "/usr/sbin" "/usr/local/sbin" "/sbin" "/usr/bin" "/usr/local/bin" "/bin" -b curl | grep -i "curl" | cut -d " " -f02) #CURL=$(echo $CURL | awk -F'/' '/^/ { print $4 }') WGET=$(whereis -B "/usr/sbin" "/usr/local/sbin" "/sbin" "/usr/bin" "/usr/local/bin" "/bin" -b wget | grep -i "wget" | cut -d " " -f02) WGET=$(echo $WGET | awk -F'/' '/^/ { print $4 }') URLSOFT="http://www.zezeniaonline.com/download/downloadlinux" URLICON="http://s22.postimg.org/rpkttkefl/Zezenia_logo.png" #CURL#if [ "$DOWNLOADER" = "curl" ]; then #CURL# $DOWNLOADER -# -o ZezeniaLinux.zip -O http://www.zezeniaonline.com/download/downloadlinux #CURL# $DOWNLOADER -# -o Zezenia.png -O http://s22.postimg.org/rpkttkefl/Zezenia_logo.png #CURL#else #CURL# "You dont have a downloader tool : curl" #CURL# #CURL#fi #FileList#FILELIST=$(ls /tmp/FileList-$RANDOM) #FileList#if test -f /tmp/FileList-$RANDOM #FileList# then #FileList# rm /tmp/FileList-$RANDOM #FileList# echo "http://s22.postimg.org/rpkttkefl/Zezenia_logo.png #FileList# http://www.zezeniaonline.com/download/downloadlinux"|tee /tmp/FileList-$RANDOM #FileList# FILELIST=$(cat /tmp/FileList-$RANDOM) #FileList#fi # ssft -> Shell Scripts Frontend Tool # python-dialog # kdialog (Package : kdebase-bin / kde-baseapps-bin) # Yad (yet another dialog) is a fork of Zenity with many improvements, such # as custom buttons, additional dialogs, pop-up menu in notification icon # and more. MATE=$(ps -A | grep mate-session | awk '{print $4}') XFCE=$(ps -A | grep xfce-session | awk '{print $4}') XFCE4=$(ps -A | grep xfce4-session | awk '{print $4}') if [ "$MATE" = "mate-session" ];then DESKTOP="$MATE" fi if [ "$XFCE" = "xfce-session" ]; then DESKTOP="$XFCE" fi if [ "$XFCE4" = "xfce4-session" ]; then DESKTOP="$XFCE4" fi MATEDIALOG=$(whereis -B "/usr/sbin" "/usr/local/sbin" "/sbin" "/usr/bin" "/usr/local/bin" "/bin" -b zenity | grep -i "matedialog" | cut -d " " -f02) MATEDIALOG=$(echo $ZENITY | awk -F'/' '/^/ { print $4 }') ZENITY=$(whereis -B "/usr/sbin" "/usr/local/sbin" "/sbin" "/usr/bin" "/usr/local/bin" "/bin" -b zenity | grep -i "zenity" | cut -d " " -f02) ZENITY=$(echo $ZENITY | awk -F'/' '/^/ { print $4 }') KDIALOG=$(whereis -B "/usr/sbin" "/usr/local/sbin" "/sbin" "/usr/bin" "/usr/local/bin" "/bin" -b kdialog | grep -i "kdialog" | cut -d " " -f02) KDIALOG=$(echo $KDIALOG | awk -F'/' '/^/ { print $4 }') if [ "$DESKTOP" = "$XFCE4" ]; then TOOL=$ZENITY CONFIRM_INSTALL=$($TOOL --title "You wanna install?" --question --text "Do you really want to install in this Software?") if [ "$?" = 0 ]; then CONFIRM_INSTALL="Yes" export CONFIRM_INSTALL="Yes" # Falta agregar un "Progreso total" # 1 - Descargar Icono # 2 - Descarga el juego con "wget" si no esta wget usar curl en el directorio seleccionado # 3 - Crear la entrada de Menu del Software en donde fue instalado. # 4 - Finalizar Progreso y mostrar "Instalacion Finalizada" con un boton que diga "Ok" elif [ "$?" = 1 ]; then CONFIRM_INSTALL="No" export CONFIRM_INSTALL="No" echo "You Choose : No" else echo "ERROR" fi if [ "$CONFIRM_INSTALL" = "Yes" ]; then SELECT_DIR=$($TOOL --title "Please Choose a Directory" --file-selection --directory) CONFIRMDIR=$($TOOL --title "Directory Choise" --question --text "Do you really want to install in this directory?") if [ "$?" = 0 ]; then echo "Selected Folder : $SELECT_DIR" SELECT_DIR=$(echo "$SELECT_DIR") cd "$SELECT_DIR" SELECT_DIR=$(pwd) cd "$SELECT_DIR" rm -rf Start .Launch zezenia.gfx zezeniaclient Zezenia.desktop "$HOME/.local/share/applications/Zezenia.desktop" # SELECT_DIR=""$( cd -P "$( dirname "$" )" && pwd )"" # cd "$SELECT_DIR" wget -O .Zezenia.png $URLICON # Begun : Code From -> http://ubuntuforums.org/showthread.php?t=306515&page=2 # Start wget | zenity # Note the & at the end of the pipe, this allows the script to continue with wget running in the background # wget 2>&1 | sed -u 's/.*\ \([0-9]\+%\)\ \+\([0-9.]\+\ [KMB\/s]\+\)$/\1\n# Downloading \2/' | zenity --progress --title="Downloading File..." & wget -O ZezeniaLinux.zip $URLSOFT 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s \n ETA \3/' | zenity --progress --title="Installation" --auto-close #Start a loop testing if zenity is running, and if not kill wget RUNNING=0 while [ $RUNNING -eq 0 ] do if [ -z "$(pidof zenity)" ] then pkill wget RUNNING=1 fi done # Finish : Code From -> http://ubuntuforums.org/showthread.php?t=306515&page=2 unzip ZezeniaLinux.zip rm -rf ZezeniaLinux.zip chmod a+o+x zezeniaclient 2>/dev/null 1>/dev/null $(echo '#!/bin/sh # The Function of this script is # Find the real path of a script or program. # The Original Version From This Script Are From : # 17/FEB/2000 - Sam Lantinga, Loki Entertainment Software # This a retranslated version of the Script , i translate first to spanish # Inukaze From Venezuela # Site : http://inukaze.wordpress.com PATH_FINDER() { fullpath=$(echo $1 | grep /) if [ "$fullpath" = "" ]; then oIFS="$IFS" IFS=: for path in $PATH do if [ -x "$path/$1" ]; then if [ "$path" = "" ]; then path="." fi fullpath="$path/$1" break fi done IFS="$oIFS" fi if [ "$fullpath" = "" ]; then fullpath="$1" fi if [ -L "$fullpath" ]; then 'fullpath='$'"(ls -l "'"$fullpath"'" |sed -e 's/.* -> //' |sed -e 's/\*//')"' fi dirname $fullpath } if [ "${PROGRAM_PATH}" = "" ]; then PROGRAM_PATH="`PATH_FINDER $0`" fi LD_LIBRARY_PATH=.:${PROGRAM_PATH}:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH if [ -x "${PROGRAM_PATH}/.Launch" ] then cd "${PROGRAM_PATH}/" exec "./.Launch" "$@" fi echo "'"I can't run this Software. Its the Statup Script written Correctly?"'" exit 1'|tee Start &> /dev/null) 2>/dev/null 1>/dev/null $(echo '#!/bin/bash PATH_TO_PROGRAM=$(pwd) PROGRAM="zezeniaclient" $(cd "$PATH_TO_PROGRAM" ; ./$PROGRAM "$@")'|tee .Launch &> /dev/null) 2>/dev/null 1>/dev/null $(echo '#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Name=Zezenia Type=Application Exec=sh '$SELECT_DIR'/Start Icon='$SELECT_DIR/.Zezenia.png' Terminal=false Hidden=false Categories=Game StartupNotify=true X-KDE-SubstituteUID=false'|tee Zezenia.desktop &> /dev/null) chmod a+o+x Start .Launch Zezenia.desktop cp Zezenia.desktop $HOME/.local/share/applications CONFIRMRUN=$($TOOL --title "Run?" --question --text "Would you like to run?") if [ "$?" = 0 ]; then CONFIRMRUN="Yes" export CONFIRMRUN="Yes" elif [ "$?" = 1 ]; then CONFIRMRUN="No" export CONFIRMRUN="No" echo "You Choose : No" else echo "ERROR" fi if [ "$CONFIRMRUN" = "Yes" ]; then cd "$SELECT_DIR" if test -f Start then bash Start fi elif [ "$CONFIRMRUN" = "No" ]; then exit 1 fi # elif [ "$DOWNLOADER" = "curl" ]; then # "$DOWNLOADER" -# -o ZezeniaLinux.zip -O $URL_PROGRAM # else # echo "" # echo "You dont have a downloader tool like : wget or curl" # echo "Please install one downloader tool an try again" # echo "" fi # Falta agregar un "Progreso total" # 1 - Descargar Icono # 2 - Descarga el juego con "wget" si no esta wget usar curl en el directorio seleccionado # 3 - Crear la entrada de Menu del Software en donde fue instalado. # 4 - Finalizar Progreso y mostrar "Instalacion Finalizada" con un boton que diga "Ok" elif [ "$?" = 1 ]; then echo "You Choose Cancel" SELECT_DIR=$(echo "$SELECT_DIR") cd "$SELECT_DIR" SELECT_DIR=$(pwd) cd "$SELECT_DIR" rm -rf Start .Launch zezenia.gfx zezeniaclient Zezenia.desktop killall -9 $DOWNLOADER $TOOL else echo "ERROR" fi fi if [ "$DESKTOP" = "$KDE5" ]; then echo #CONFIRM=$(kdialog --title "" --yesno "Do you really want to install in this directory?") fi if [ "$DESKTOP" = "$KDE4" ]; then echo #CONFIRM=$(kdialog --title "" --yesno "Do you really want to install in this directory?") fi if [ "$DESKTOP" = "$KDE3" ]; then echo #CONFIRM=$(kdialog --title "" --yesno "Do you really want to install in this directory?") fi if [ "$DESKTOP" = "$TRINITY" ]; then echo #CONFIRM=$(kdialog --title "" --yesno "Do you really want to install in this directory?") fi
Well that , but i need test on Trinity for KDE3 , for know if works or not XD
|
||||||
Ronin DUSETTE | Wednesday 3 June 2015 at 19:33 | ||||||
Ronin DUSETTE![]()
|
Ooo k. lol. Please: Post debug logs & full computer specs in first post No private messages for general help, use the forums Read the wiki, Report broken scripts |
This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca@playonlinux.com