This is my first script, I hope it complies with your rules.
Tested on
Intel Q6600 2.4 Ghz, 4GB DDR RAM, nVidia GTX560TI
OS
Ubuntu 12.04 32 Bit + Gnome-shell 3.4.1
Wine Version
Standard 1.5.7
Tested
All works great on highest settings.
Everything except Lan game
Known Issues
Serial input doesn't work, you need to download a ske file (click activate(www)) and then click ok. The window isn't drawn correctly.
You need to start the game with a virtual Monitor, otherwise DirectX wont initialize.
For some reason wine ignores the script assignment.
German Translation
$(eval_gettext '$TITLE has been successfully installed.')\\n \\n Starte jetzt Anno 2070, die Serialeingabe funktioniert nicht, du musst Aktivieren(www) auswählen und eine ske Datei generieren lassen.\\n\\n Du musst geduldig sein, es dauert eine Weile, bis das Spiel startet.\\n Nachdem du die ske-Datei eingegeben hast klickst du auf OK (ist von Abbrechen überlagert). POL wird eine crash Meldung ausgeben, das Programm läuft aber noch, es gilt wieder geduldig sein und warten. Nach einer kurzen weile Startet der Autopatcher, sollte dieser einfrieren einfach den Prozess killen und nocheinmal starten. Aus irgendeinem Grund funktioniert der Patcher manchmal nicht. Wenn keine Verbindung hergestellt werden kann, einfach auf Start klicken.\\n\\n
Jetzt kann es losgehen,
Viel Spaß!
Video
Screenshot
Icon
The Script
#!/bin/bash
# Date : 2012-7-23 16:31
# Last revision : 2012-7-23 16:31
# Wine version used : 1.5.7
# Distribution used to test : Ubuntu 12.04 32bit
# Author : Coxtor
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Anno 2070"
PREFIX="Anno2070"
POL_SetupWindow_Init #Get started
POL_Debug_Init #Enable debugging
POL_SetupWindow_presentation "$TITLE" "Ubisoft" "http://anno-game.ubi.com/anno-2070/en-GB/home/" "Coxtor" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.5.7"
Set_Desktop "On" "1024" "768"
POL_System_TmpCreate "$PREFIX"
POL_SetupWindow_InstallMethod "LOCAL,DVD"
if [ "$INSTALL_METHOD" = "LOCAL" ];then
#Local folder
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$APP_ANSWER"
POL_Wine_WaitExit "$TITLE"
elif [ "$INSTALL_METHOD" = "DVD" ];then
#CDROM install
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Files/TargetDir/data/graphics/ui/mousepointer/arc.ani"
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$CDROM/setup.exe"
POL_Wine_WaitExit "setup.exe"
fi
#Config Wine
POL_Call POL_Install_vcrun2010
POL_Call POL_Install_d3dx9
POL_Call POL_Install_d3dx11
POL_Call POL_Install_corefonts
Set_OS "winxp"
POL_Wine_Direct3D "UseGLSL" "disabled"
Set_WineWindowTitle "$TITLE"
POL_Wine_OverrideDLL "builtin,native" "msvcr100"
cd "$POL_System_TmpDir"
POL_Download "http://www.depannagedisquedur.fr/dll/winhttp.dll"
mv "winhttp.dll" "$REPERTOIRE/wineprefix/$PREFIX/drive_c/windows/system32/"
POL_Wine_OverrideDLL "native,builtin" "winhttp"
POL_System_TmpDelete # Delete tmp data
#Shortcuts
POL_Shortcut_InsertBeforeWine "$TITLE" "WINEDEBUG=-all" #stop 100000 of fixmes
POL_Shortcut "Anno5.exe" "$TITLE"
#Additional Information
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')\\n \\n Now start Anno 2070, the serial input doesn't work, you have to chose Activate (www) and download a ske file for your serial.\\n You have to be patient, it takes a while to launch.\\n After you submit your ske file (click OK, its overlayed with abort) POL will give you a crash message, but the program is still running, be patient.\\n After a while the autopatcher starts, if it freezes after a while just kill it and start again, for some reason it works randomly. If it fails, just click start.\\n \\n Now your ready to go, have fun!" "$TITLE"
POL_SetupWindow_Close
exit
I've edited your post (You can do it by yourself btw)
You have some problems:
- For the cdrom POL_SetupWindow_check_cdrom "$CDROM/Files/TargetDir/data/graphics/ui/mousepointer/arc.ani" Should become POL_SetupWindow_check_cdrom "Files/TargetDir/data/graphics/ui/mousepointer/arc.ani"
- Is this link legal? http://www.gm158.com/youxi/Anno2070.exe
- End message POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')\\n \\n Now start Anno 2070, the serial input doesn't work, you have to chose Activate (www) and download a ske file for your serial.\\n You have to be patient, it takes a while to launch.\\n After you submit your ske file (click OK, its overlayed with abort) POL will give you a crash message, but the program is still running, be patient.\\n After a while the autopatcher starts, if it freezes after a while just kill it and start again, for some reason it works randomly. If it fails, just click start.\\n \\n Now your ready to go, have fun!" "$TITLE"
This message appears a bit complicated. Is it really useful?
- Replacement POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE" should become POL_Wine_WaitBefore "$TITLE" (each time)
- Prefer
if []; then
instead of
if [] then
- Respect all tabs
Otherwise, it appears to be good Thank you for your work
Okay, I used the documentation to write the script, it might need an update or two I have edited all things you said. I purchased my anno 2070 version on ebay, the seller just sold me the key, then he sent me the link to that file. For safety reasons I took that option out. The explanation in the end I do find necessary otherwise it isn't obvious how to input the serial, or some inpatient people will start clicking about and not waiting.
Will you sign this script, is more needed? Thanks
I found the edit button ^^ sorry for that. I don't know why the code isn't formatted correctly though, could you please have another look?
Do you know why wine could be ignoring the desktop assignment?
actually it works with the youtube video on this page, youtube itself makes the auto patcher believe its downloading at 200gb/s witch is 200gb to fast for my internet :P (talk talk = very slow download)