The forum

[Script] Frontier/Atari's RollerCoaster Tycoon 3

Works completely, including audio

Author Replies
MTres19 Friday 3 April 2015 at 3:02
MTres19Anonymous

RollerCoaster Tycoon 3 is a third-person building game where one either plays in sandbox mode, creating enormous rollercoasters, or in career mode, where one must gain enough profit through ride ticket sales to complete the requirements for each level - Apprentice, Entrepreneur, and Tycoon. There are 18 or 19 parks in career mode, (some are locked until previous ones are completed) each with their own financial difficulties. There are also quite a few built-in cheats which can do almost everything from (almost) unlimited speed to making guests drift long distances through the air when struck by a rollercoaster car.

 

In order for RollerCoaster Tycoon 3 to run properly for me, I needed the proprietary AMD driver for the GPU. RCT3 did not run on Linux Mint (on the same computer) and complained about graphics drivers which did not meet the minimum standards. I do not know how RollerCoaster Tycoon 3 will run on computers with hardware other than AMD/ATI.

 

Although my script warns the user about this false-positive, it is worthwhile to mention that POL may complain that the RCT3 disk is mounted on a no-exec filesystem. However, this did not actually cause any problems in my test. I was also forced to use wget to download Mono 2.10.9, due to an error with POL_Call and POL_Download. Possibly, this is an error with DNS resolution, but in that case it must be purely within POL, since wget worked perfectly.

 

Here is my script:

 

#!/bin/bash
#
# Script by MTres19 with some components from massimiliano0790's script.
# I disclaim all liability from anything that might happen as a result of your use of this script.
#
# You may share, distribute and modify this script to fit your needs, but you may not take credit for it.
#
# Completed March 31, 2015
#
# Tested on Debian GNU/Linux 7.8 64-bit. AMD Phenom X4 9750 Processer, AMD/ATI Radeon HD 3200 Graphics. ~6 GB RAM. Dell Inspiron 546.

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

# Create the temporary directory and move to it
POL_System_TmpCreate "RCT3"
cd "$POL_System_TmpDir"

# Make some variables
WINEPREFIX="RCT3"
TITLE="RollerCoaster Tycoon 3"
WINDOWTITLE="Frontier/Atari's RollerCoaster Tycoon 3"

# Open the installer window
POL_SetupWindow_Init

# Start the debugger
POL_Debug_Init

# Set Wine Architecture to x86
POL_System_SetArch "x86"

# Give some information about the script and RollerCoaster Tycoon 3
POL_SetupWindow_free_presentation "RollerCoaster Tycoon 3" "Thank you for choosing this script to install RollerCoaster Tycoon 3. RCT3 was created by Chris Sawyer and Frontier Developments, and was published by Atari. Unfortunately, Linux users are not considered a very large clientelle, and consequentially no Linux version of RollerCoaster Tycoon 3 was ever produced. However, thanks to the teams at WineHQ and PlayOnLinux, you should be able to almost painlessly run RollerCoaster Tycoon 3 on Linux with help of this script. I give credit to massimiliano0790, because some parts of this script use ideas from his. However, I have included in this script support for newer versions of the Wine Compatibility Layer and my own fix to the lack of sound which seems to plague RCT3 on Wine, at least from what I've seen on forums. BY CONTINUING TO USE THIS SCRIPT, YOU ACKNOWLEDGE THAT I AM NOT RESPONSIBLE FOR ANYTHING THAT MAY RESULT FROM YOUR USE OF THIS SCRIPT."

# Request user's preferred Wine version
POL_SetupWindow_menu "What Wine version would you like to use? Wine 1.6.2 is 'stable'." "$WINDOWTITLE - Choose Wine version" "1.6.2 (stable, tested with RCT3)|1.7.39 (Just out of the oven - I mean, CPU)|1.4.1 (Ultra-stable - Debian standards)" "|"

# Notifiy the user that the Wineprefix is being created
POL_SetupWindow_wait "Please be patient. The Wineprefix is being created..." "$WINDOWTITLE - Create Wineprefix"

# Send this value to a different variable, before it's overwritten
RAWWINECHOICE="$APP_ANSWER"

# Convert English to POL-Readable numbers
if [ "$RAWWINECHOICE" = "1.6.2 (stable, tested with RCT3)" ]
then
    WINEVERSION="1.6.2"
    # Search for Wine 1.6.2 in user's POL directory
    WINEVERSIONAVAILABLE=ls $REPERTOIRE/wine/linux-x86 | grep 1.6.2
elif ["$RAWWINECHOICE" = "1.7.39 (Just out of the oven - I mean, CPU)"
then
    WINEVERSION="1.7.39"
    # Search for Wine 1.7.39 in user's POL directory
    WINEVERSIONAVAILABLE=ls $REPERTOIRE/wine/linux-x86 | grep 1.7.39
elif ["$RAWWINECHOICE" = "1.4.1 (Ultra-stable - Debian standards)"
then
    WINEVERSION="1.4.1"
    # Search for Wine 1.4.1 in user's POL directory
    WINEVERSIONAVAILABLE=ls $REPERTOIRE/wine/linux-x86 | grep 1.4.1
fi

# Install specified Wine version if not already installed
if [ "$WINEVERSIONAVAILABLE" != "$WINEVERSION" ]
then
    POL_Wine_InstallVersion "$WINEVERSION"
fi

# Select RCT3 Wineprefix
POL_Wine_SelectPrefix "$WINEPREFIX"

# Create a Wineprefix with the specified Wine version
POL_Wine_PrefixCreate "$WINEVERSION"

# Notify the user that dependancies are being installed
POL_SetupWindow_wait "Dependency Libraries are installing. Please wait..." "$WINDOWTITLE - Installing Dependencies"

# Install dependancies
POL_Call POL_Install_d3dx9
POL_Call POL_Install_d3dx10
POL_Call POL_Install_d3dx11
POL_Call POL_Install_devenum
POL_Call POL_Install_dinput
POL_Call POL_Install_dinput8
POL_Call POL_Install_directmusic
POL_Call POL_Install_directplay
POL_Call POL_Install_directx9
POL_Call POL_Install_dsound
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_quartz
POL_Call POL_Install_wmpcodecs
POL_Call POL_Install_wmp10
POL_Call POL_Install_gecko

# Notify the user that Mono is downloading
POL_SetupWindow_wait "Please wait. Mono 2.10.9 with GTK# 2.12.11 is downloading. This may take several minutes, depending on your internet connection speed. Mono is ~80 MB." "$WINDOWTITLE - Downloading Mono"

# Download Mono (POL_Call POL_Install_mono210 doesn't work, nor does POL_Download. Bug with DNS Lookup? WGET works fine. Google Public DNS & DHCP defaults both tried.)
wget "http://download.mono-project.com/archive/2.10.9/windows-installer/0/mono-2.10.9-gtksharp-2.12.11-win32-0.exe"

# Give the user instructions about installing Mono
POL_SetupWindow_message "Mono has finished downloading. When you click next, the installer for Mono will start and you will be prompted through a series of steps. Leave all settings at their defaults." "$WINDOWTITLE - Install Mono"

# Install Mono
POL_Wine start /unix "mono-2.10.9-gtksharp-2.12.11-win32-0.exe"

# Notify the user that Mono is installing
POL_SetupWindow_wait "Installing Mono Runtime 2.10.9 with GTK# 2.12.11. Use the installer wizard to install Mono. Do not change any settings in the installer." "$WINDOWTITLE - Installing Mono"

# Wait while Mono installs
POL_Wine_WaitExit ""

# Ask the user which desktop environment they use
POL_SetupWindow_menu "What Desktop Environment do you use?" "$WINDOWTITLE - Emulating a Virtual Desktop" "Cinnamon|GNOME 2|GNOME 3|KDE Plasma|LXDE|MATE|Stock Openbox|Xfce|Other" "|"

# Send response to a variable before it's overwritten
DESKTOP=$APP_ANSWER

# Decide if the desktop can handle a temporary resolution change
if [[ $DESKTOP = "Cinnamon" || $DESKTOP = "GNOME 2" || $DESKTOP = "GNOME 3" || $DESKTOP = "MATE" || $DESKTOP = "Other" ]]
then
    BADDESKTOP="TRUE"
elif [[ $DESKTOP = "KDE Plasma" || $DESKTOP = "LXDE" || $DESKTOP = "Stock Openbox" || $DESKTOP = "Xfce" ]]
then
    BADDESKTOP="FALSE"
fi

# Ask the user whether they'd like to emulate a virtual desktop, if they are useing a 'bad' desktop
if [ $BADDESKTOP = "TRUE" ]
then
    POL_SetupWindow_question "In my testing, GNOME 2 and 3 caused problems because of RollerCoaster Tycoon 3's 1024x768 full screen mode. Because Cinnamon is based off of the GNOME Shell, and MATE is based off of GNOME 2, it may prevent problems to emulate a 1024x768 virtual desktop with Wine. If you chose 'Other' you will have to decide this for yourself. All this does is creates a window on your desktop, which will contain RCT3. Note that this may make moving around a bit difficult. Would you like to emulate a virtual desktop?" "$WINDOWTITLE - Emulating a Virtual Desktop"
    
    # Send the response to another variable, before it's overwritten
    USEVIRD=$APP_ANSWER

elif [ $BADDESKTOP = "FALSE" ]
then
    POL_SetupWindow_message "Your desktop environment should not cause problems with RollerCoaster Tycoon 3's full screen mode. Click next to continue." "$WINDOWTITLE - Emulating a Virtual Desktop"
    USEVIRD="FALSE"
fi

# Emulate a 1024x768 virtual desktop, if the user chose to do so
if [ $USEVIRD = "TRUE" ]
then
    Set_Desktop "On" "1024" "768"

    # Name the virtual desktop window 'Frontier/Atari's RollerCoaster Tycoon 3'
    Set_WineWindowTitle "$WINDOWTITLE"
fi

# Tell the user to place their disk in the drive
POL_SetupWindow_message "The RollerCoaster Tycoon 3 disk should now be placed in your disk drive. Be sure that you know where it has been mounted in /media." "$WINDOWTITLE - Insert Installer Disk"

# Ask the user if their RCT3 disk in mounted to /media/RCT3
POL_SetupWindow_question "Is your RollerCoaster Tycoon 3 disk mounted to /media/cdrom0?" "$WINDOWTITLE - Autochoose Installer File"

# Send this value to a different variable, before it's overwritten
INCDROM0=$APP_ANSWER

# Select installer file, or have the user manually select it.
if [ "$INCDROM0" = "TRUE" ]
then
    RCT3SETUP="/media/cdrom0/setup.exe"
elif [ "$INCDROM0" = "FALSE" ]
then
    POL_SetupWindow_browse "Please select setup.exe located on your RCT3 disk. This will probably be somewhere in /media." "$TITLE - Select Installer File"
    RCT3SETUP=$APP_ANSWER
fi

# Give the user instructions about installing RCT3
POL_SetupWindow_message "When you click next, the installer for RollerCoaster Tycoon 3 will start. I do not reccomend attempting to 'Register your product' because Atari seems to have dropped any support for RCT3. PlayOnLinux may complain about the disk not being mounted with executable permissions. If this happens, click next anyway and you should not have any trouble." "$WINDOWTITLE - Install"

# Run the RCT3 setup
POL_Wine start /unix "$RCT3SETUP"

# Display a 'please wait' screen while installing
POL_SetupWindow_wait "RollerCoaster Tycoon 3 is now installing. Do not close this window until the script has completed." "$WINDOWTITLE - Installing"

# Wait for the RCT3 to finish installing
POL_Wine_WaitExit ""

# Notify the user that VLC will be downloaded
POL_SetupWindow_message "On the next screen, PlayOnLinux will download VLC Media player. This is required because RollerCoaster Tycoon 3 requires a backend to play its audio files. When it installs, allow the installer to set VLC as default for all formats it can play. This only takes effect within the Wineprefix." "$WINDOWTITLE - Install VLC Media Player"

# Download VLC Media Player
POL_Download "ftp://ftp.osuosl.org/pub/videolan/vlc/2.2.0/win32/vlc-2.2.0-win32.exe" "d79108c6128a2c93e42a77f88c2f6d16"

# Give the user instructions about installing VLC
POL_SetupWindow_message "VLC Media Player has finished downloading. When you click next, the VLC Media Player installer will open and you will be guided through the installation process. Select the FULL installation when you are given the choice." "$WINDOWTITLE - Install VLC Media Player"

# Start the VLC Media Player installer
POL_Wine start /unix vlc-2.2.0-win32.exe

# Notify the user that VLC is being installed
POL_SetupWindow_wait "Please wait. Installing VLC Media player." "$WINDOWTITLE - Installing VLC Media Player"

# Wait for VLC to finish installing
POL_Wine_WaitExit ""

# Notify the user that Media Player Codec Pack will be downloaded
POL_SetupWindow_message "When you click next, the Media Player Codec Pack will be downloaded. This is necessary to provide codecs for RCT3." "$TITLE - Install MPCP"

# Download Media PLayer Codec Pack
POL_Download "http://download.mediaplayercodecpack.com/files/sp-tb/media.player.codec.pack.v4.3.6.setup.exe" "4c3efa570628feb2af7d677a53bad349"

# Provide the user with a warning about Media Player Codec Pack
POL_SetupWindow_message "A word of warning about Media Player Codec Pack: If you choose 'Easy Installation,' you will get a pretty-much useless systray icon. You can disable it from the menu that appears upon right-clicking it, but to avoid this complication, choose 'Detailed Installation,' and choose not to install the systray icon. Click next to install Media Player Codec Pack." "$WINDOWTITLE - Install MPCP"

# Run Media Player Codec Pack installer
POL_Wine start /unix media.player.codec.pack.v4.3.6.setup.exe

# Wait for Media Player Codec Pack to install
POL_Wine_WaitExit ""

# Perform a windows reboot
POL_Wine_reboot

# Exit temp folder
cd $REPERTOIRE

# Delete temp
POL_System_TmpDelete

# Create a shortcut
POL_Shortcut "$PROGRAMFILES/Atari/RollerCoaster Tycoon 3/RCT3.exe" "RCT3"

# Notify the user that the game has installed successfully
POL_SetupWindow_message "Thank you for using this script. RollerCoaster Tycoon 3 was successfully installed and should work satisfactorily. You may remove the installer disk now. NOTE: RollerCoaster Tycoon 3 does not appear to be compatible with the open-source Gallium/Mesa driver, at least on AMD hardware. However, it will work with the proprietary driver, and may work if your hardware is a brand other than AMD. RCT3 is also a bit slow to start and may show random junk on your screen while it's starting to load. Don't worry though, you shouldn't have any problems." "$WINDOWTITLE - Successfully Installed"

# Close the installer window
POL_SetupWindow_Close
exit

 

Edited by MTres19

MTres19 Friday 3 April 2015 at 3:16
MTres19Anonymous

MTres19 Friday 3 April 2015 at 3:18
MTres19Anonymous

My apologies about the screenshots.  I couldn't get them to work properly when I got the full links from drive, and PlayOnLinux didn't accept them when I copied and pasted them directly into the post.
 

Edited by MTres19

petch Sunday 5 April 2015 at 10:41
petch

Hi MTres19,

Here's my script review:

#!/bin/bash
#
# Script by MTres19 with some components from massimiliano0790's script.
# I disclaim all liability from anything that might happen as a result of your use of this script.
[...]

Script is missing standard header here (http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization)

# Create the temporary directory and move to it
POL_System_TmpCreate "RCT3"
cd "$POL_System_TmpDir"

Do those redundant comments help you read the script? I found them very distracting, and the first thing I had to do when reviewing the script was to remove them all...

# Give some information about the script and RollerCoaster Tycoon 3
POL_SetupWindow_free_presentation "RollerCoaster Tycoon 3" "Thank you for choosing this script to install RollerCoaster Tycoon 3. RCT3 was created by Chris Sawyer and Frontier Developments, and was published by Atari. Unfortunately, Linux users are not considered a very large clientelle, and consequentially no Linux version of RollerCoaster Tycoon 3 was ever produced. However, thanks to the teams at WineHQ and PlayOnLinux, you should be able to almost painlessly run RollerCoaster Tycoon 3 on Linux with help of this script. I give credit to massimiliano0790, because some parts of this script use ideas from his. However, I have included in this script support for newer versions of the Wine Compatibility Layer and my own fix to the lack of sound which seems to plague RCT3 on Wine, at least from what I've seen on forums. BY CONTINUING TO USE THIS SCRIPT, YOU ACKNOWLEDGE THAT I AM NOT RESPONSIBLE FOR ANYTHING THAT MAY RESULT FROM YOUR USE OF THIS SCRIPT."

All user-oriented messages must have localization support: http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation. However I'm not sure the script is the right place for such messages, because they'll have to be translated into nearly 50 languages...
Basically your amount of custom messages are a problem.

POL_SetupWindow_menu "What Wine version would you like to use? Wine 1.6.2 is 'stable'." "$WINDOWTITLE - Choose Wine version" "1.6.2 (stable, tested with RCT3)|1.7.39 (Just out of the oven - I mean, CPU)|1.4.1 (Ultra-stable - Debian standards)" "|"

If it works with Wine 1.6.2, use that; Otherwise maintaining your script means testing it with 3 Wine versions, not to mention the extra script complexity. I hope that people that want to try another Wine version know how to do that in PlayOnLinux GUI.

    POL_Wine_InstallVersion "$WINEVERSION"

POL_Wine_PrefixCreate will download Wine as necessary, did you check that all this logic has any use?

POL_SetupWindow_wait "Dependency Libraries are installing. Please wait..." "$WINDOWTITLE - Installing Dependencies"

Components will display their own messages, so I think this statement is useless, the messsage will just show up for a second or two...

# Install dependancies
POL_Call POL_Install_d3dx9
POL_Call POL_Install_d3dx10
POL_Call POL_Install_d3dx11
POL_Call POL_Install_devenum
POL_Call POL_Install_dinput
POL_Call POL_Install_dinput8
POL_Call POL_Install_directmusic
POL_Call POL_Install_directplay
POL_Call POL_Install_directx9
POL_Call POL_Install_dsound
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_quartz
POL_Call POL_Install_wmpcodecs
POL_Call POL_Install_wmp10
POL_Call POL_Install_gecko

Does it really need all those components? Some like d3dx9 or directx9 should be subsets of dxfullsetup, I'm intrigued. Less is better, try to trim down the list to the minimum

# Download Mono (POL_Call POL_Install_mono210 doesn't work, nor does POL_Download. Bug with DNS Lookup? WGET works fine. Google Public DNS & DHCP defaults both tried.)
wget "http://download.mono-project.com/archive/2.10.9/windows-installer/0/mono-2.10.9-gtksharp-2.12.11-win32-0.exe"

I don't remember seeing any bug report, or comments on the POL_Install_mono210 script. This is a good enough reason to reject this script as it, each script should try to "fix" problems with their own workarounds, this is seriously wrong

POL_SetupWindow_menu "What Desktop Environment do you use?" "$WINDOWTITLE - Emulating a Virtual Desktop" "Cinnamon|GNOME 2|GNOME 3|KDE Plasma|LXDE|MATE|Stock Openbox|Xfce|Other" "|"

Lot more complexity, to enable virtual desktop or not. Mmhh...
I understand what you're trying to do, but I'm not sure it's the right solution, because most (fullscreen) games will suffer from the same issues, so maybe it should be handled elsewhere. And again, that's probably something that users that suffer from Gnome 3 know how to enable (Right click on shortcut > Configure Wine > Display tab > Emulate desktop)

POL_SetupWindow_message "The RollerCoaster Tycoon 3 disk should now be placed in your disk drive. Be sure that you know where it has been mounted in /media." "$WINDOWTITLE - Insert Installer Disk"
[...]

Use POL_SetupWindow_cdrom and POL_SetupWindow_check_cdrom ( http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_7:_Installation_Media)

POL_Wine start /unix "$RCT3SETUP"

Remove "start /unix" if possible. (http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_11:_List_of_Functions#POL_Wine_.284.0.2B.29)

POL_SetupWindow_wait "RollerCoaster Tycoon 3 is now installing. Do not close this window until the script has completed." "$WINDOWTITLE - Installing"
POL_Wine_WaitExit ""

The point of POL_Wine_WaitExit is to display a standard waiting message, remove the redundant custom one before that'll display for a split second.

# Notify the user that VLC will be downloaded
POL_SetupWindow_message "On the next screen, PlayOnLinux will download VLC Media player. This is required because RollerCoaster Tycoon 3 requires a backend to play its audio files. When it installs, allow the installer to set VLC as default for all formats it can play. This only takes effect within the Wineprefix." "$WINDOWTITLE - Install VLC Media Player"
[...]

Maybe that should be converted to a function script, in any case it's way too verbose. One should work on automating those installations, set parameters in registry or configuration files instead of giving user instructions, etc.

# Notify the user that Media Player Codec Pack will be downloaded
POL_SetupWindow_message "When you click next, the Media Player Codec Pack will be downloaded. This is necessary to provide codecs for RCT3." "$TITLE - Install MPCP"

Same thing

# Notify the user that the game has installed successfully
POL_SetupWindow_message "Thank you for using this script. RollerCoaster Tycoon 3 was successfully installed and should work satisfactorily. You may remove the installer disk now. NOTE: RollerCoaster Tycoon 3 does not appear to be compatible with the open-source Gallium/Mesa driver, at least on AMD hardware. However, it will work with the proprietary driver, and may work if your hardware is a brand other than AMD. RCT3 is also a bit slow to start and may show random junk on your screen while it's starting to load. Don't worry though, you shouldn't have any problems." "$WINDOWTITLE - Successfully Installed"

Maybe you should warn about Gallium/Mesa at the beginning of the installation instead of the end?
Also, while not documented, I wonder if POL_SetupWindow_RequiredCard/POL_SetupWindow_AdvisedCard/POL_SetupWindow_TestedCard could be used instead. Documentation really needs updating...

Regards,

Pierre.

MTres19 Monday 6 April 2015 at 21:51
MTres19Anonymous

Thank you for your script review. I've cleaned up the script a lot and I was able to switch back to POL_Call POL_Install_mono210, although I do not know why the function started working again. The only suggestion left that I could not resolve is how I would go about automating the installation of VLC and Media Player Codec Pack. Looking at other scripts which were more automatic, I noticed the /quiet argument in the POL_Wine line, but when I tried this with POL_Wine vlc-2.2.0-win32.exe, it did not change the VLC installer wizard at all. Looking at the documentation on the wiki, the POL_Wine command was shown with the possibility of arguments after the .exe file, but it did not explain what these arguments would be. So, other than automating the installer wizards, I've managed to resolve all the issues you listed. Here's the new script:

#!/bin/bash
# Date : (2015-4-2 12:29 PM)
# Last revision : (2015-4-6 3:47 PM)
# Wine version used : 1.6.2
# Distribution used to test : Debian GNU/Linux 7.8 (Stable)
# Author : MTres19

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

POL_System_TmpCreate "RCT3"
cd "$POL_System_TmpDir"

POL_GetSetupImages "https://90114f04992d1df3ad1c1502d30bbca45b6301ba-www.googledrive.com/host/0B_iE50uqUIIbTVI5NjBZMGFBN1U" "https://dc1c8da66a876b314ba0ff52b91b2d5721d0baf0-www.googledrive.com/host/0B_iE50uqUIIbZmZuUTNZeXcwdzA" "$POL_System_TmpDir/RCT3"

WINEPREFIX="RCT3"
TITLE="RollerCoaster Tycoon 3"
WINEVERSION="1.6.2"

POL_SetupWindow_Init

POL_Debug_Init

POL_System_SetArch "x86"

POL_SetupWindow_presentation "$TITLE" "Frontier Developments, Ltd. & Atari, Inc." "frontier.co.uk" "MTres19, with a few components from massimiliano0790's RCT3 script \n \n RollerCoaster Tycoon 3 might not run without proprietary graphics drivers. This may depend on your hardware." "$WINEPREFIX"

POL_Wine_SelectPrefix "$WINEPREFIX"

POL_Wine_PrefixCreate "$WINEVERSION"

POL_Call POL_Install_devenum
POL_Call POL_Install_dinput
POL_Call POL_Install_dinput8
POL_Call POL_Install_directmusic
POL_Call POL_Install_dsound
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_wmpcodecs
POL_Call POL_Install_wmp10
POL_Call POL_Install_mono210

POL_Download "http://videolan.mirrors.hivelocity.net/vlc/2.2.0/win32/vlc-2.2.0-win32.exe" "d79108c6128a2c93e42a77f88c2f6d16"

POL_Wine vlc-2.2.0-win32.exe

POL_Download "http://download.mediaplayercodecpack.com/files/sp-tb/media.player.codec.pack.v4.3.6.setup.exe" "4c3efa570628feb2af7d677a53bad349"

POL_SetupWindow_message "A word of warning about Media Player Codec Pack: If you choose 'Easy Installation,' you will get a pretty-much useless systray icon. You can disable it from the menu that appears upon right-clicking it, but to avoid this complication, choose 'Detailed Installation,' and choose not to install the systray icon. Click next to install Media Player Codec Pack." "$TITLE - Install MPCP"

POL_Wine media.player.codec.pack.v4.3.6.setup.exe

POL_Wine_reboot

POL_SetupWindow_cdrom

RCT3SETUP="$CDROM/setup.exe"

POL_SetupWindow_check_cdrom "RCT3.ico" "RCT3.dat" "readme.txt"

POL_SetupWindow_message "The RCT3 installer will start when you click Next. Do not attempt to register your game." "$TITLE - Install"

POL_Wine "$RCT3SETUP"

POL_Wine_reboot

cd $REPERTOIRE

POL_System_TmpDelete

POL_Shortcut "$PROGRAMFILES/Atari/RollerCoaster Tycoon 3/RCT3.exe" "RollerCoaster Tycoon 3"

POL_SetupWindow_message "Thank you for using this script. RollerCoaster Tycoon 3 was successfully installed and should work satisfactorily. You may remove the installer disk now. RCT3 may take a while to open, and during this time, you may see random junk on your screen. This should go away after less then a minute, and RollerCoaster Tycoon 3 will start." "$TITLE - Successfully Installed"

POL_SetupWindow_Close
exit

 

Also, it seems that something in the new script allows for the animated developer logos to play as the game is loading. I'm not exactly sure what particular change caused this though.

petch Tuesday 7 April 2015 at 0:56
petch

    Hi,

Thank you for your script review. I've cleaned up the script a lot

Yes, it'll be much easier to maintain this way :)

The only suggestion left that I could not resolve is how I would go about automating the installation of VLC and Media Player Codec Pack. [...] Looking at the documentation on the wiki, the POL_Wine command was shown with the possibility of arguments after the .exe file, but it did not explain what these arguments would be.

Those arguments are for the .exe to interpret, so there's no general rule. Sometimes the /? or /h argument can be used to display all the arguments that can be used, but again it's not a hard rule. Maybe those installers cannot even be fully automated.

So, other than automating the installer wizards, I've managed to resolve all the issues you listed. Here's the new script:

Ok, few things left and as far as I'm concerned the script will be publishable in the scripts repository:

WINEPREFIX="RCT3"

I missed that one the first time around, but you cannot use the $WINEPREFIX variable name, it's a name used internally by Wine; The standard name for this in PoL scripts is just $PREFIX, hence my confusion.

Also, it's recommended to use longer virtual drive names, to lessen the risk of collisions with other scripts. As far as I could tell RCT only stands for Roller Coaster Tycoon today, but who knows tomorrow...

POL_SetupWindow_message "A word of warning about Media Player Codec Pack: If you choose 'Easy Installation,' you will get a pretty-much useless systray icon. You can disable it from the menu that appears upon right-clicking it, but to avoid this complication, choose 'Detailed Installation,' and choose not to install the systray icon. Click next to install Media Player Codec Pack." "$TITLE - Install MPCP"

You forgot to add the $(eval_gettext ...) to support localization of all user oriented messages. Even if it means some work for translators, it's mandatory.

And then a lesser one:

cd $REPERTOIRE

$REPERTOIRE is deprecated (a french legacy ;) ) in PlayOnLinux 4, you can use $POL_USER_ROOT instead.

That's it!

Pierre

MTres19 Tuesday 7 April 2015 at 2:26
MTres19Anonymous

Thank you, once again. I couldn't get any response to /h and /? from the installers, but I fixed all the other issues and resubmitted it as a update to my original post on the Supported Software page, with the icons for the listing on the website and the installed program.

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