@@ -1,7 +1,7 @@ #!/bin/bash # Date : (2011-12-03 20-32) -# Last revision : (2012-10-29 02-16) -# Wine version used : 1.3.36 +# Last revision : (2013-04-30 23-08) +# Wine version used : 1.3.36, 1.4.1 # Distribution used to test : Debian Sid (Unstable) # Author : Pierre Etchemaite pe-pol@concept-micro.com # Script licence : GPL v.2 @@ -19,7 +19,7 @@ GOGID="ground_control_2_operation_exodus" PREFIX="GrndCtrl2_gog" -WORKING_WINE_VERSION="1.3.36" +WORKING_WINE_VERSION="1.4.1" TITLE="GOG.com - Ground Control 2" SHORTCUT_NAME="Ground Control 2" @@ -28,21 +28,16 @@ POL_SetupWindow_SetID 1016 POL_Debug_Init -POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "http://www.gog.com/en/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX" +POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "http://www.gog.com/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX" POL_Call POL_GoG_setup "$GOGID" "dd1ae6e7ae1420bc52dc5327e974ea9e" POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" -# Prevent GoG installer from installing Acrobat Reader or Foxit in each prefix -POL_Call POL_Function_SetNativeExtension "pdf" - POL_Wine_InstallFonts -POL_Wine_WaitBefore "$TITLE" - -POL_Wine "$POL_GoG_location" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')" +POL_Call POL_GoG_install # GoG work! @@ -53,11 +48,20 @@ # Helps at least when windowed POL_Wine_X11Drv "GrabFullScreen" "Y" +# Remove the "beta DirectX version" warning upon first run +cat <<_EOFREG_ > "$POL_USER_ROOT/tmp/dxtested.reg" +[HKEY_LOCAL_MACHINE\Software\Massive Entertainment AB\Ground Control II] +"HardwareChecks"=dword:00000010 +"HardwareCheckVersion"=dword:00000009 +_EOFREG_ +POL_Wine regedit "$POL_USER_ROOT/tmp/dxtested.reg" +rm "$POL_USER_ROOT/tmp/dxtested.reg" + # Doesn't hurt ;) POL_Wine_reboot -POL_Shortcut "gcii.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" "" +POL_Shortcut "gcii.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" "" "Game;StrategyGame;" POL_Shortcut_Document "$SHORTCUT_NAME" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Ground Control II/Manual.pdf" POL_SetupWindow_Close -exit +exit 0
@@ -1,6 +1,6 @@ #!/bin/bash # Date : (2011-12-03 20-32) -# Last revision : (2012-09-14 20-33) +# Last revision : (2012-10-29 02-16) # Wine version used : 1.3.36 # Distribution used to test : Debian Sid (Unstable) # Author : Pierre Etchemaite pe-pol@concept-micro.com @@ -21,10 +21,11 @@ PREFIX="GrndCtrl2_gog" WORKING_WINE_VERSION="1.3.36" -TITLE="Ground Control 2 (GoG release)" +TITLE="GOG.com - Ground Control 2" SHORTCUT_NAME="Ground Control 2" POL_SetupWindow_Init +POL_SetupWindow_SetID 1016 POL_Debug_Init POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "http://www.gog.com/en/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX"
@@ -1,6 +1,6 @@ #!/bin/bash # Date : (2011-12-03 20-32) -# Last revision : (2012-04-19 00-50) +# Last revision : (2012-09-14 20-33) # Wine version used : 1.3.36 # Distribution used to test : Debian Sid (Unstable) # Author : Pierre Etchemaite pe-pol@concept-micro.com @@ -34,16 +34,14 @@ POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" -POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE" - # Prevent GoG installer from installing Acrobat Reader or Foxit in each prefix POL_Call POL_Function_SetNativeExtension "pdf" POL_Wine_InstallFonts -POL_Wine "$POL_GoG_location" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')" +POL_Wine_WaitBefore "$TITLE" -POL_Wine_WaitExit "$TITLE" +POL_Wine "$POL_GoG_location" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')" # GoG work! @@ -57,7 +55,7 @@ # Doesn't hurt ;) POL_Wine_reboot -POL_Shortcut "gcii.exe" "$SHORTCUT_NAME" +POL_Shortcut "gcii.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" "" POL_Shortcut_Document "$SHORTCUT_NAME" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Ground Control II/Manual.pdf" POL_SetupWindow_Close
@@ -1,9 +1,9 @@ #!/bin/bash # Date : (2011-12-03 20-32) -# Last revision : (2012-04-11 23-51) +# Last revision : (2012-04-19 00-50) # Wine version used : 1.3.36 # Distribution used to test : Debian Sid (Unstable) -# Author : Pierre Etchemaite petchema@concept-micro.com +# Author : Pierre Etchemaite pe-pol@concept-micro.com # Script licence : GPL v.2 # Program licence : Retail # Depend : @@ -29,11 +29,11 @@ POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "http://www.gog.com/en/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX" +POL_Call POL_GoG_setup "$GOGID" "dd1ae6e7ae1420bc52dc5327e974ea9e" + POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" -POL_Call POL_GoG_setup "$GOGID" "dd1ae6e7ae1420bc52dc5327e974ea9e" - POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE" # Prevent GoG installer from installing Acrobat Reader or Foxit in each prefix
@@ -1,6 +1,6 @@ #!/bin/bash # Date : (2011-12-03 20-32) -# Last revision : (2012-04-07 20-55) +# Last revision : (2012-04-11 23-51) # Wine version used : 1.3.36 # Distribution used to test : Debian Sid (Unstable) # Author : Pierre Etchemaite petchema@concept-micro.com @@ -8,9 +8,6 @@ # Program licence : Retail # Depend : -# Tested with install archive: -# setup_ground_control_2.exe 641603732 "dd1ae6e7ae1420bc52dc5327e974ea9e" - # Supposed to be "Gold" on WineHQ with 1.3.23, but I crash it with middle-click + drag # Same for 1.3.27-rawinput2, # very easily with 1.3.33 @@ -20,34 +17,22 @@ [ -z "$PLAYONLINUX" ] && exit 0 source "$PLAYONLINUX/lib/sources" +GOGID="ground_control_2_operation_exodus" PREFIX="GrndCtrl2_gog" WORKING_WINE_VERSION="1.3.36" -INSTALLBIN="setup_ground_control_2.exe" TITLE="Ground Control 2 (GoG release)" -URL="http://www.gog.com/en/gamecard/ground_control_2_operation_exodus" SHORTCUT_NAME="Ground Control 2" POL_SetupWindow_Init POL_Debug_Init -POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "$URL" "Pierre Etchemaite" "$PREFIX" - -if [ -z "$POL_SELECTED_FILE" ]; then - POL_SetupWindow_question "$(eval_gettext 'Do you want to download $TITLE from GOG.com?')" "$TITLE" - [ "$APP_ANSWER" = "TRUE" ] && POL_Browser "$URL" -fi +POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "http://www.gog.com/en/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX" POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" -if [ -n "$POL_SELECTED_FILE" ]; then - ARCHIVE="$POL_SELECTED_FILE" -else - cd $HOME - POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "" - ARCHIVE="$APP_ANSWER" -fi +POL_Call POL_GoG_setup "$GOGID" "dd1ae6e7ae1420bc52dc5327e974ea9e" POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE" @@ -56,7 +41,7 @@ POL_Wine_InstallFonts -POL_Wine start /unix "$ARCHIVE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')" +POL_Wine "$POL_GoG_location" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')" POL_Wine_WaitExit "$TITLE"
@@ -1,6 +1,6 @@
#!/bin/bash
# Date : (2011-12-03 20-32)
-# Last revision : (2012-03-25 18-38)
+# Last revision : (2012-04-07 20-55)
# Wine version used : 1.3.36
# Distribution used to test : Debian Sid (Unstable)
# Author : Pierre Etchemaite petchema@concept-micro.com
@@ -45,7 +45,7 @@
ARCHIVE="$POL_SELECTED_FILE"
else
cd $HOME
- POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "$INSTALLBIN"
+ POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" ""
ARCHIVE="$APP_ANSWER"
fi
@@ -1,6 +1,6 @@ #!/bin/bash # Date : (2011-12-03 20-32) -# Last revision : (2012-02-20 22-32) +# Last revision : (2012-03-25 18-38) # Wine version used : 1.3.36 # Distribution used to test : Debian Sid (Unstable) # Author : Pierre Etchemaite petchema@concept-micro.com @@ -33,15 +33,21 @@ POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "$URL" "Pierre Etchemaite" "$PREFIX" -POL_SetupWindow_question "$(eval_gettext 'Do you want to download $TITLE from GOG.com?')" "$TITLE" -[ "$APP_ANSWER" = "TRUE" ] && POL_Browser "$URL" +if [ -z "$POL_SELECTED_FILE" ]; then + POL_SetupWindow_question "$(eval_gettext 'Do you want to download $TITLE from GOG.com?')" "$TITLE" + [ "$APP_ANSWER" = "TRUE" ] && POL_Browser "$URL" +fi POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" -cd $HOME -POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "$INSTALLBIN" -ARCHIVE="$APP_ANSWER" +if [ -n "$POL_SELECTED_FILE" ]; then + ARCHIVE="$POL_SELECTED_FILE" +else + cd $HOME + POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "$INSTALLBIN" + ARCHIVE="$APP_ANSWER" +fi POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
No change were made in the code
No change were made in the code
@@ -1,6 +1,6 @@ #!/bin/bash # Date : (2011-12-03 20-32) -# Last revision : (2012-01-29 17-15) +# Last revision : (2012-02-20 22-32) # Wine version used : 1.3.36 # Distribution used to test : Debian Sid (Unstable) # Author : Pierre Etchemaite petchema@concept-micro.com @@ -24,7 +24,7 @@ WORKING_WINE_VERSION="1.3.36" INSTALLBIN="setup_ground_control_2.exe" -TITLE="$(eval_gettext 'Ground Control 2 (GoG release)')" +TITLE="Ground Control 2 (GoG release)" URL="http://www.gog.com/en/gamecard/ground_control_2_operation_exodus" SHORTCUT_NAME="Ground Control 2"
@@ -1,85 +1,56 @@ #!/bin/bash -# Date : (2012-12-03 20-32) -# Last revision : (2011-12-04 21-35) -# Wine version used : 1.3.34 +# Date : (2011-12-03 20-32) +# Last revision : (2012-01-29 17-15) +# Wine version used : 1.3.36 # Distribution used to test : Debian Sid (Unstable) -# Author : Pierre Etchemaite+# Author : Pierre Etchemaite petchema@concept-micro.com # Script licence : GPL v.2 # Program licence : Retail # Depend : +# Tested with install archive: +# setup_ground_control_2.exe 641603732 "dd1ae6e7ae1420bc52dc5327e974ea9e" + # Supposed to be "Gold" on WineHQ with 1.3.23, but I crash it with middle-click + drag -# Same for 1.3.27-rawinput2, +# Same for 1.3.27-rawinput2, # very easily with 1.3.33 # couldn't crash it with 1.3.34-rawinput2 -# 1.3.34 ok? +# 1.3.34 ok [ -z "$PLAYONLINUX" ] && exit 0 source "$PLAYONLINUX/lib/sources" -check_install_archive () { - POL_SetupWindow_wait "$(eval_gettext 'Checking install archive...')" "$TITLE" - - EXPECTED_NAME='setup_ground_control_2.exe' - EXPECTED_SIZE=641603732 - EXPECTED_MD5="dd1ae6e7ae1420bc52dc5327e974ea9e" - - # Temporarily prevent word splitting - OLDIFS="$IFS" - IFS='' - NAME="$(basename $ARCHIVE)" - SIZE="$(stat -c%s $ARCHIVE)" - MD5="$(POL_MD5_file $ARCHIVE)" - IFS="$OLDIFS" - - if [ $SIZE -ne $EXPECTED_SIZE -o "$MD5" != "$EXPECTED_MD5" ]; then - POL_Debug_Error "$(eval_gettext 'Install archive mismatch.\nEither your install archive is corrupted, or is not the expected version.\nThis script cannot guarantee that installation will work correctly. Please report success or failure to PlayOnLinux forums.')\n$(eval_gettext 'Name:') $NAME ($(eval_gettext 'expected') $EXPECTED_NAME)\n$(eval_gettext 'Size:') $SIZE ($(eval_gettext 'expected') $EXPECTED_SIZE)\n$(eval_gettext 'MD5:') $MD5\n ($(eval_gettext 'expected') $EXPECTED_MD5)" - POL_SetupWindow_question "$(eval_gettext 'Continue?')" "$TITLE" - [ "$APP_ANSWER" != "TRUE" ] && POL_Debug_Fatal "$(eval_gettext 'Not the expected archive')" - fi -} - - PREFIX="GrndCtrl2_gog" -WORKING_WINE_VERSION="1.3.34" +WORKING_WINE_VERSION="1.3.36" +INSTALLBIN="setup_ground_control_2.exe" TITLE="$(eval_gettext 'Ground Control 2 (GoG release)')" +URL="http://www.gog.com/en/gamecard/ground_control_2_operation_exodus" SHORTCUT_NAME="Ground Control 2" -SHORTCUT_DOC="$SHORTCUT_NAME - $(eval_gettext 'User manual')" POL_SetupWindow_Init POL_Debug_Init -POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "http://www.gog.com/en/gamecard/ground_control_2_operation_exodus" "Pierre Etchemaite" "$PREFIX" +POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "$URL" "Pierre Etchemaite" "$PREFIX" + +POL_SetupWindow_question "$(eval_gettext 'Do you want to download $TITLE from GOG.com?')" "$TITLE" +[ "$APP_ANSWER" = "TRUE" ] && POL_Browser "$URL" POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" cd $HOME -POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" +POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "$INSTALLBIN" ARCHIVE="$APP_ANSWER" -check_install_archive - - POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE" -# Associate .PDF with native app -# http://wiki.winehq.org/FAQ#head-91bf3f0a8ccbfab8dee96f82fae2f1a489e0d243 -# Do it before installing the game, so you have the possibility to open -# PDFs with Win32 reader if you choose to install it -cat <<'EOF' > $REPERTOIRE/tmp/pdfnativereader.reg -[HKEY_CLASSES_ROOT\.pdf] -@="PDFfile" -"Content Type"="application/pdf" -[HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command] -@="winebrowser \"%1\"" -EOF -POL_Wine regedit $REPERTOIRE/tmp/pdfnativereader.reg +# Prevent GoG installer from installing Acrobat Reader or Foxit in each prefix +POL_Call POL_Function_SetNativeExtension "pdf" POL_Wine_InstallFonts -POL_Wine "$ARCHIVE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')" +POL_Wine start /unix "$ARCHIVE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')" POL_Wine_WaitExit "$TITLE" @@ -88,17 +59,15 @@ Set_OS winxp POL_SetupWindow_VMS "32" - -## PlayOnMac Section -[ -n "$PLAYONMAC" ] && Set_SoundDriver "alsa" -[ -n "$PLAYONMAC" ] || Set_Managed "Off" -## End Section + +# Helps at least when windowed +POL_Wine_X11Drv "GrabFullScreen" "Y" # Doesn't hurt ;) POL_Wine_reboot POL_Shortcut "gcii.exe" "$SHORTCUT_NAME" -POL_Shortcut "start.exe" "$SHORTCUT_DOC" "" "'C:/$PROGRAMFILES/GOG.com/Ground Control II/Manual.pdf'" +POL_Shortcut_Document "$SHORTCUT_NAME" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Ground Control II/Manual.pdf" POL_SetupWindow_Close -exit \ No newline at end of file +exit
No change were made in the code
No change were made in the code
@@ -101,4 +101,4 @@ POL_Shortcut "start.exe" "$SHORTCUT_DOC" "" "'C:/$PROGRAMFILES/GOG.com/Ground Control II/Manual.pdf'" POL_SetupWindow_Close -exit +exit \ No newline at end of file
No change were made in the code
@@ -0,0 +1,104 @@ +#!/bin/bash +# Date : (2012-12-03 20-32) +# Last revision : (2011-12-04 21-35) +# Wine version used : 1.3.34 +# Distribution used to test : Debian Sid (Unstable) +# Author : Pierre Etchemaite+# Script licence : GPL v.2 +# Program licence : Retail +# Depend : + +# Supposed to be "Gold" on WineHQ with 1.3.23, but I crash it with middle-click + drag +# Same for 1.3.27-rawinput2, +# very easily with 1.3.33 +# couldn't crash it with 1.3.34-rawinput2 +# 1.3.34 ok? + +[ -z "$PLAYONLINUX" ] && exit 0 +source "$PLAYONLINUX/lib/sources" + +check_install_archive () { + POL_SetupWindow_wait "$(eval_gettext 'Checking install archive...')" "$TITLE" + + EXPECTED_NAME='setup_ground_control_2.exe' + EXPECTED_SIZE=641603732 + EXPECTED_MD5="dd1ae6e7ae1420bc52dc5327e974ea9e" + + # Temporarily prevent word splitting + OLDIFS="$IFS" + IFS='' + NAME="$(basename $ARCHIVE)" + SIZE="$(stat -c%s $ARCHIVE)" + MD5="$(POL_MD5_file $ARCHIVE)" + IFS="$OLDIFS" + + if [ $SIZE -ne $EXPECTED_SIZE -o "$MD5" != "$EXPECTED_MD5" ]; then + POL_Debug_Error "$(eval_gettext 'Install archive mismatch.\nEither your install archive is corrupted, or is not the expected version.\nThis script cannot guarantee that installation will work correctly. Please report success or failure to PlayOnLinux forums.')\n$(eval_gettext 'Name:') $NAME ($(eval_gettext 'expected') $EXPECTED_NAME)\n$(eval_gettext 'Size:') $SIZE ($(eval_gettext 'expected') $EXPECTED_SIZE)\n$(eval_gettext 'MD5:') $MD5\n ($(eval_gettext 'expected') $EXPECTED_MD5)" + POL_SetupWindow_question "$(eval_gettext 'Continue?')" "$TITLE" + [ "$APP_ANSWER" != "TRUE" ] && POL_Debug_Fatal "$(eval_gettext 'Not the expected archive')" + fi +} + + +PREFIX="GrndCtrl2_gog" +WORKING_WINE_VERSION="1.3.34" + +TITLE="$(eval_gettext 'Ground Control 2 (GoG release)')" +SHORTCUT_NAME="Ground Control 2" +SHORTCUT_DOC="$SHORTCUT_NAME - $(eval_gettext 'User manual')" + +POL_SetupWindow_Init +POL_Debug_Init + +POL_SetupWindow_presentation "$TITLE" "Massive Entertainment / Rebellion" "http://www.gog.com/en/gamecard/ground_control_2_operation_exodus" "Pierre Etchemaite" "$PREFIX" + +POL_Wine_SelectPrefix "$PREFIX" +POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" + +cd $HOME +POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" +ARCHIVE="$APP_ANSWER" + +check_install_archive + + +POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE" + +# Associate .PDF with native app +# http://wiki.winehq.org/FAQ#head-91bf3f0a8ccbfab8dee96f82fae2f1a489e0d243 +# Do it before installing the game, so you have the possibility to open +# PDFs with Win32 reader if you choose to install it +cat <<'EOF' > $REPERTOIRE/tmp/pdfnativereader.reg +[HKEY_CLASSES_ROOT\.pdf] +@="PDFfile" +"Content Type"="application/pdf" +[HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command] +@="winebrowser \"%1\"" +EOF +POL_Wine regedit $REPERTOIRE/tmp/pdfnativereader.reg + +POL_Wine_InstallFonts + +POL_Wine "$ARCHIVE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')" + +POL_Wine_WaitExit "$TITLE" + + +# GoG work! +Set_OS winxp + +POL_SetupWindow_VMS "32" + +## PlayOnMac Section +[ -n "$PLAYONMAC" ] && Set_SoundDriver "alsa" +[ -n "$PLAYONMAC" ] || Set_Managed "Off" +## End Section + +# Doesn't hurt ;) +POL_Wine_reboot + +POL_Shortcut "gcii.exe" "$SHORTCUT_NAME" +POL_Shortcut "start.exe" "$SHORTCUT_DOC" "" "'C:/$PROGRAMFILES/GOG.com/Ground Control II/Manual.pdf'" + +POL_SetupWindow_Close +exit