Forums

[Script Issue] LotR Online

Auteur Réponses
Jompa Lundi 9 Novembre 2009 à 17:36
Jompa

Hello :)

I just started scripting in PlayOnLinux and finds it realy enternatiment. But after have "completing" my very first script i can't make it to run. Here is the script.

 #!/bin/bash

# Date : (2009-10-20)

# Last revision : (2009-10-20)

# Wine version used : 1.1.32 

# Distribution used to test : Ubuntu 9.04

# Author : Johannes 'Jompa' Svedqvist

# Licence : Retail

#Vérifier que PlayOnLinux est bien exécuté avant
[ "$PLAYONLINUX" = "" ] && exit 0 
 
#Charger les librairies
source "$PLAYONLINUX/lib/sources"

 

Title="Lord of the Rings Online: Shadows of Angmar"

Prefix="lotro"



LNG_ACT="I was told that the DVD version of LoTR Online does not work and you will need to download the client from their website."

LNG_LAUNCHER="In order to play Lord of the Rings Online you will need to download the Linux version of the launcher : 



http://lotrolinux.com/



Follow their instructions on the site."



#Get Cover 

cd "$REPERTOIRE/tmp"

rm *.jpg

wget http://img266.imageshack.us/img266/1227/lotrocover.jpg --output-document="$REPERTOIRE/tmp/$Prefix.jpg"

convert "$REPERTOIRE/tmp/$Prefix.jpg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpg"

 

POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"

 

#Initialize the main window

POL_SetupWindow_presentation "$Title" "Turbine" "http://www.lotro-europe.com/" "Jompa" "$Prefix"

 

#Installion WINE version.

POL_SetupWindow_install_wine "1.1.32"

 

select_prefix "$REPERTOIRE/wineprefix/$Prefix"

POL_SetupWindow_prefixcreate

 

#fetching PROGRAMFILES environmental variable

PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`

PROGRAMFILES=${PROGRAMFILES:3}

 

cd "$REPERTOIRE/ressources"

#downloading winetricks

if [ "`sha1sum < winetricks | sed 's/ .*//'`" != "e71457524b2f9a0c81369745ea9018d9278565b2" ]; then

wget http://winezeug.googlecode.com/svn/trunk/winetricks --output-document=winetricks

fi

 

cd "$REPERTOIRE/ressources"

#installing Installing Visual C++ 2005 SP1 Redistributable Package (x86)

POL_SetupWindow_wait_next_signal "Installing Visual C++ 2005 SP1 Redistributable Package (x86)" "$Title"

bash winetricks vcrun2005

POL_SetupWindow_detect_exit

 

#Ask for client version and download the selected.

POL_SetupWindow_menu "Choose your client version" "$Title" "EU Client-US Client" "-" "EU Client"

VMS="$APP_ANSWER"



if [ "$VMS" -lt "EU Client" ]; then

	POL_SetupWindow_message_image "$LNG_ACT" "" "/usr/share/playonlinux/themes/tango/info.png"

	POL_SetupWindow_wait_next_signal "Getting the lates client" "$Title"

	wget http://94.75.196.36/LOTRO/LOTROEU_Moria_Book_8_Installer/ENGB/Lord_Of_The_Rings_Online_Moria_Book_8_Installer_ENGB.exe --output-document="$REPERTOIRE/tmp/lotro_install.exe"

if [ "$VMS" == "US Client" ]; then

	POL_SetupWindow_message_image "$LNG_ACT" "" "/usr/share/playonlinux/themes/tango/info.png"

	POL_SetupWindow_wait_next_signal "Getting the lates client" "$Title"

	wget http://94.75.196.36/LOTRO/LOTROEU_Moria_Book_8_Installer/ENGB/Lord_Of_The_Rings_Online_Moria_Book_8_Installer_ENGB.exe --output-document="$REPERTOIRE/tmp/lotro_install.exe"

fi



wine "$REPERTOIRE/tmp/lotro_install.exe"

 

POL_SetupWindow_message "$LNG_WAIT_END" "$Title"



#Ask if the user whats to remove the install file.

POL_SetupWindow_menu "Do you want to remove the installation file?" "$Title" "Yes-No" "-" "Yes"

VMS="$APP_ANSWER"



if [ "$VMS" -lt "Yes" ]; then

	cd "$REPERTOIRE/tmp"

	rm lotro_install.exe

fi



POL_SetupWindow_message_image "$LNG_LAUNCHER" "" "/usr/share/playonlinux/themes/tango/info.png"

 

Set_WineVersion_Assign "1.1.32" "$Title"

 

POL_SetupWindow_Close
exit 

: : Filen eller katalogen finns inteine 12: /usr/share/playonlinux/lib/sources
: kommandot finns interd/lotro2: line 13:
: kommandot finns interd/lotro2: line 16:
: kommandot finns interd/lotro2: line 23:
: Filen eller katalogen finns inteine 25: cd: /home/johannes/.PlayOnLinux/tmp
rm: kan inte ta bort "*.jpg\\r": Filen eller katalogen finns inte
--2009-11-09 17:38:11-- http://img266.imageshack.us/img266/1227/lotrocover.jpg
Slår upp img266.imageshack.us... 38.99.77.34
Ansluter till img266.imageshack.us|38.99.77.34|:80... ansluten.
HTTP-begäran skickad, väntar på svar... 200 OK
Längd: 70686 (69K) [image/jpeg]".pgar till "/home/johannes/.PlayOnLinux/tmp/lotro

100%[======================================>] 70 686 15,6K/s på 4,4s

" sparad [70686/70686]5,6 KB/s) - "/home/johannes/.PlayOnLinux/tmp/lotro

: kommandot finns interd/lotro2: line 29:
/home/johannes/Skrivbord/lotro2: line 30: POL_SetupWindow_Init: kommandot finns inte
: kommandot finns interd/lotro2: line 31:
/home/johannes/Skrivbord/lotro2: line 33: POL_SetupWindow_presentation: kommandot finns inte
: kommandot finns interd/lotro2: line 34:
/home/johannes/Skrivbord/lotro2: line 36: POL_SetupWindow_install_wine: kommandot finns inte
: kommandot finns interd/lotro2: line 37:
/home/johannes/Skrivbord/lotro2: line 38: select_prefix: kommandot finns inte
: kommandot finns interd/lotro2: line 39: POL_SetupWindow_prefixcreate
: kommandot finns interd/lotro2: line 40:
: kommandot finns interd/lotro2: line 44:
/home/johannes/Skrivbord/lotro2: line 45: cd: /home/johannes/.PlayOnLinux/ressou: Filen eller katalogen finns inte
/home/johannes/Skrivbord/lotro2: line 92: syntaxfel: oväntat filslut


It tells me some syntax error on line 92 (last line), any advice? :)
Thank you in advance for your assistance

Edité par Jompa

Jompa Lundi 9 Novembre 2009 à 17:50
Jompa

I fixed it, i forgot to read that the Prefix needs to have capital letter. :)

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 dmcayonlinux.com