El Foro

[Script] Renegade X

Autor Respuestas
Zeek Saturday 29 March 2014 at 18:36
ZeekAnonymous

This is a script to help aid the install of Renengade X. It's made with the UT3 engine with the addon of DX11. It's Free to play and still in beta so there's bound to be bugs. One of the guys on our forums got it working with wineskins on mac, http://renegade-x.com/forums/viewtopic.php?f=13&t=72191 . So since I had a few ubuntu clients around I started working on getting it to work.

I haven't added any icons to this yet as it's still a WIP. Also this still crashes on ATI/AMD hardware if started in full screen.

Also, it's kind of been pieced together from other scripts I've found, then updated to the latest POL code standards that I could find in the docs. So, I hope it can be improved upon.

#!/bin/bash
# Date : (2014-03-29 12-00)
# Last revision : (2014-03-29 20-00)
# Wine version used : 1.6.2
# Distribution used to test : Ubuntu 13.10
# Author : Zeek
# Script licence : Free
# Program licence : Free
# Depend : N/A
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Renegade X Open Beta 2"
PREFIX="RenegadeX"


POL_SetupWindow_Init
POL_System_SetArch "x86"
POL_SetupWindow_presentation "$TITLE" "Totem Arts" "http://www.renegade-x.com" "Zeek" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.6.2"

#We require a ton of extra crap to run this game...
POL_Call POL_Install_corefonts
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_msxml3
POL_Call POL_Install_dotnet40
POL_Call POL_Install_FontsSmoothRGB
POL_Call POL_Install_vcrun2010
POL_Call POL_Install_vcrun2008
POL_Call POL_Install_vcrun2005
POL_Call POL_Install_xact


POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
POL_SetupWindow_browse "Select the Renegade X Open Beta 2 Setup" "File selection" ""
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$APP_ANSWER"

elif [[ "$INSTALL_METHOD" = "DOWNLOAD_LINK" ]]; then
    POL_SetupWindow_menu "$(eval_gettext 'Where do you want to download from?')" "Download Selection" \
     "Official Washington|Czech|Official Denver" "|"
case "$APP_ANSWER" in
    "Official Washington")
        DOWNLOAD_LINK="http://seattle1.renegade-x.com/beta/RenegadeX-OpenBeta-2a.exe";;
    "Czech")
        DOWNLOAD_LINK="http://czech1.renegade-x.com/beta/RenegadeX-OpenBeta-2a.exe";;
    "Official Denver")
        DOWNLOAD_LINK="http://denver1.renegade-x.com/beta/RenegadeX-OpenBeta-2a.exe";;
    *)
        exit 1;;
esac
 POL_System_TmpCreate "$PREFIX"
cd "$POL_System_TmpDir"
 POL_Download "$DOWNLOAD_LINK" "a80b7a541881cad9c9e44a4d43f1e1ba"
POL_Wine_WaitExit "$TITLE"
 EXE_FILE="${DOWNLOAD_LINK##*/}" # Get everything after last slash.
 POL_Wine "$POL_System_TmpDir/${EXE_FILE}"
fi
POL_System_TmpDelete

POL_SetupWindow_VMS "512"

POL_Shortcut "UDK.exe" "$TITLE" "" "-dx9"
POL_Shortcut "Renegade X.exe" "$TITLE Launcher"

POL_SetupWindow_Close
exit


Editado por: Zeek

petch Saturday 29 March 2014 at 21:01
petch

Hi Zeek,

[code language=playonlinux]
POL_System_SetArch "x86"
[/code]
This is redundant since it's the default, but it doesn't hurt either

[code language=playonlinux]
POL_SetupWindow_browse "Please select the Renegade X Open Beta 2 Setup file" "File selection" ""
[/code]
All user-oriented messages should support localization, and I strongly encourage you to use a standard message rather than a custom one to avoid some extra work from the localization team, see
http://www.playonlinux.com/en/dev-documentation-10.html

[code language=playonlinux]
POL_SetupWindow_wait_next_signal "Game installation in progress" "$TYTUL"
[/code]
$TYTUL is not defined (copy&paste bug I assume)
Also, use POL_Wine_WaitBefore "$TITLE" instead

[code language=playonlinux]
POL_SetupWindow_detect_exit
[/code]
This statement is obsolete, if you really need one use POL_Wine_WaitExit "$TITLE".
That said if the installation is blocking (not asynchronous), no statement should be required at this place.

[code language=playonlinux]
elif [[ "INSTALL_METHOD" = "DOWNLOAD_LINK" ]]; then
[/code]
You forgot the $ of $INSTALL_METHOD

[code language=playonlinux]
 POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
[/code]
Use POL_Wine_WaitExit "$TITLE"

[code language=playonlinux]
POL_SetupWindow_menu_list "How much memory does your video card have?" "Video RAM" "32/64/128/256/512/768/1024|2048" "/" "32"
VRAM="$APP_ANSWER"
...
POL_Wine_Direct3D "VideoMemorySize" "$VRAM"
[/code]
Use
POL_SetupWindow_VMS "amount of video VM required by the game"
instead, so for this game (I think)
POL_SetupWindow_VMS "256"

[code language=playonlinux]
POL_Wine_Direct3D "DirectDrawRenderer" "opengl"
[/code]
I think this has been Wine default for a long time now, so it should be redundant.

Regards,
Pierre.


Zeek Sunday 30 March 2014 at 3:28
ZeekAnonymous

Wow, thanks for the reply. This was my first POL script, so I expected there to be a few parts I didn't quite get. I didn't expect so many copy/paste errors... The TYTUL/TITLE thing I changed last minute, so that explains why that was there.

I made all the changes you suggested and edited the original post. One thing I did different is I changed the VM from 256 to 512 as I know this games chugs RAM like it was nothing.

Is there any more of an efficient way to do the download mirror thing? I was going back and forth between a couple scripts and the way I put in this one looked to be the most efficient way.