Forums

[Script] Anno 2070

Auteur Réponses
coxtor Samedi 23 Juin 2012 à 22:28
coxtorAnonymous

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
[video]http://www.youtube.com/watch?v=FMqNsS1zSp8[/video]


Screenshot
[URL=http://imageshack.us/photo/my-images/210/bildschirmfotovom201206.png/][IMG]http://img210.imageshack.us/img210/9480/bildschirmfotovom201206.th.png[/IMG][/URL]
[URL=http://imageshack.us/photo/my-images/835/bildschirmfotovom201206.png/][IMG]http://img835.imageshack.us/img835/9480/bildschirmfotovom201206.th.png[/IMG][/URL]
[URL=http://imageshack.us/photo/my-images/440/bildschirmfotovom201206.png/][IMG]http://img440.imageshack.us/img440/9480/bildschirmfotovom201206.th.png[/IMG][/URL]

Icon
[URL=http://imageshack.us/photo/my-images/94/annowork.png/][IMG]http://img94.imageshack.us/img94/5525/annowork.png[/IMG][/URL]

The Script
[code language=playonlinux]
#!/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
[/code]

Edité par coxtor

coxtor Samedi 23 Juin 2012 à 22:33
coxtorAnonymous

.

Edité par coxtor

Quentin PÂRIS Samedi 23 Juin 2012 à 23:16
Quentin PÂRISAnonymous

Hi,

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 :)

Edité par Tinou

coxtor Samedi 23 Juin 2012 à 23:40
coxtorAnonymous

.

Edité par coxtor

Quentin PÂRIS Dimanche 24 Juin 2012 à 1:03
Quentin PÂRISAnonymous

Sorry, We've had a problem with the forum (I've just fixed it) and I was forced to put back your script as it was...

Can your repost your change?
coxtor Dimanche 24 Juin 2012 à 9:05
coxtorAnonymous

updated :)
Quentin PÂRIS Dimanche 24 Juin 2012 à 10:15
Quentin PÂRISAnonymous

Are you copying your script from a word text processor ?
coxtor Dimanche 24 Juin 2012 à 10:18
coxtorAnonymous

.

Edité par coxtor

Quentin PÂRIS Dimanche 24 Juin 2012 à 17:00
Quentin PÂRISAnonymous

I don't think it will be possible to sign your script because of the download problem
coxtor Dimanche 24 Juin 2012 à 17:07
coxtorAnonymous

.

Edité par coxtor

Quentin PÂRIS Dimanche 24 Juin 2012 à 17:46
Quentin PÂRISAnonymous

I mean it won't be accepted for legal reasons
coxtor Dimanche 24 Juin 2012 à 17:52
coxtorAnonymous

Oh that, I have removed that part
Quentin PÂRIS Dimanche 24 Juin 2012 à 17:53
Quentin PÂRISAnonymous

Ok thats good. You can submit it now
pure1 Samedi 1 September 2012 à 23:48
pure1Anonymous

If you play a youtube video or something you know downloads reliably, it forces the auto patcher to stay connected and not crash...
pure1 Samedi 1 September 2012 à 23:56
pure1Anonymous

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)
pure1 Dimanche 2 September 2012 à 0:11
pure1Anonymous

actually not looking at it seems to be doing the trick...
LinuxScripter Lundi 22 Décembre 2014 à 10:27
LinuxScripterAnonymous

Hello. I have a problem with that script. It keeps showing the error when trying to download winhttp.dll.


petch Lundi 22 Décembre 2014 à 23:00
petch

The script should be modified to use

POL_Call POL_Install_winhttp

 

LinuxScripter Lundi 28 September 2015 à 22:42
LinuxScripterAnonymous

I upddated the script but when I start the game, AutoPatcher.exe asks for proxy adress and whetever you give it or not the update wont start. Anyone help?

 

#!/bin/bash
# Date : 2012-7-23 16:31
# Last revision : 2015-9-28 22:00
# Wine version used : 1.5.7 (Coxtor),17.50 (LinuxScripter)
# Distribution used to test : Ubuntu 12.04 32bit (Coxtor),Ubuntu 15.40 32bit (LinuxScripter)
# Author : Coxtor (initial version),LinuxScripter (Uplay option and various fixes)
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Anno 2070"
PREFIX="Anno2070"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "Ubisoft" "http://anno-game.ubi.com/anno-2070/en-GB/home/" "Coxtor" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
Set_Desktop "On"
POL_System_TmpCreate "$PREFIX"

POL_SetupWindow_InstallMethod "LOCAL,DVD,UPLAY"
if [ "$INSTALL_METHOD" = "LOCAL" ];then
    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
    POL_SetupWindow_cdrom
    POL_SetupWindow_check_cdrom "autorun.exe"
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine start /unix "$CDROM/setup.exe"
    POL_Wine_WaitExit "setup.exe"
elif [ "$INSTALL_METHOD" = "UPLAY" ];then
    POL_Call POL_install_uplay
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_Call POL_Install_winhttp
POL_Wine_OverrideDLL "native" "winhttp"

POL_System_TmpDelete # Delete tmp data

#Shortcuts
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

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-notice@playonlinux.com