Star Wars : Rogue Squadron 3D

Informations

Creator Nachricht
med_freeman

Warning

This installer is a beta script. It means that it might not work as expected

Informations

Platforms:
Downloads: 5513
Wine: 1.7.26

Feedbacks

Description

The Death Star has been destroyed thanks to Skywalker's and Wedge Antilles' efforts. But the Empire is quickly regaining strength; Rogue Squadron is formed comprising the best pilots in the Alliance. Their current mission: stop the imperial threats over Alliance planets in twelve missions (plus secret). Their vehicles: X-Wings, A-Wings, V-Wings, the snowspeeder and, with the latest patch, even an Episode 1 Naboo Fighter!

Source code

#!/bin/bash
# Date : (2014-09-18 00:12)
# Last revision : (2014-09-28 17:15)
# Wine version used : 1.7.26
# Distribution used to test : Ubuntu 14.04 Trusty x64 + Debian 7.0 Wheezy x64
# Author : med_freeman
# Licence : Retail

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

TITLE="Rogue Squadron 3D"
PREFIX="RogueSquadron3D"
WINE_VERSION="1.7.26"
WINE_ARCH="x86"
AUTHOR="med_freeman"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init

POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "LucasArts / Factor 5" "http://www.starwars.com/games-apps" "$AUTHOR" "$PREFIX"

POL_System_SetArch "$WINE_ARCH"
POL_System_TmpCreate "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINE_VERSION"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "rogue/rogue\ squadron.exe"

# Downloading installer
cd "$POL_System_TmpDir"
INSTALL_EXE="RS3DInstaller.exe"
POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/installer/$INSTALL_EXE" "f936b30fc8962c99d0413f51b36dcfb9"

# Running installer
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$INSTALL_EXE" "/nocdprompt"
POL_Wine_WaitExit "$TITLE"

# Mandatory dependencies
POL_Call POL_Install_dxdiag
POL_Call POL_Install_dsound
POL_Wine_OverrideDLL "native" "dsound"

# Needed Overrides
Set_Managed "Off"
POL_Wine_X11Drv "Decorated" "N"
POL_Wine_X11Drv "GrabFullscreen" "Y"
Set_OS "win98"

# Shortcuts
POL_Shortcut "ROGUE.exe" "$TITLE"
POL_Shortcut "windows/system32/nglide_config.exe" "$TITLE - Graphic settings"

# Set reg file name
REG_FILE="rs3d.reg"
# Export registry to file
regedit /E "$POL_System_TmpDir/$REG_FILE" "HKEY_LOCAL_MACHINE\Software\LucasArts Entertainment Company LLC\Rogue Squadron\v1.0"
# Get game installation directory
[ -e "$POL_System_TmpDir/$REG_FILE" ] && GAME_INSTALLDIR="$(grep "Install Path" "$POL_System_TmpDir/$REG_FILE" | head -n 1 | tr -d '"' | cut -d= -f2 | tr -d '\015')"

# Convert it to wine path
if [ -n "$GAME_INSTALLDIR" ]; then
    GAME_INSTALLDIR="${GAME_INSTALLDIR/C:\\\\/drive_c/}"
    GAME_INSTALLDIR="$WINEPREFIX/${GAME_INSTALLDIR//\\\\//}"

    cd "$GAME_INSTALLDIR"
    POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
    POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"
fi

POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"

POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribute
Member Nachricht
adg Sunday 20 September 2015 at 22:54
adg Anonymous

Nachricht

Hello, it seems ftp.oktopod.tv is down

Antworten

Saturday 2 January 2016 at 12:52
Yeah. I'll remake a better version of the script during this year, sry for the inconvenience.
med_freeman Wednesday 8 October 2014 at 2:00
med_freeman

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -1,79 +1,95 @@
 #!/bin/bash
 # Date : (2014-09-18 00:12)
-# Last revision : (2014-09-28 17:15)
-# Wine version used : 1.7.26
+# Last revision : (2014-10-08 01:38)
+# Wine version used : 1.7.28
 # Distribution used to test : Ubuntu 14.04 Trusty x64 + Debian 7.0 Wheezy x64
 # Author : med_freeman
 # Licence : Retail
-
+ 
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-
-TITLE="Rogue Squadron 3D"
+ 
+TITLE="Star Wars : Rogue Squadron 3D"
 PREFIX="RogueSquadron3D"
-WINE_VERSION="1.7.26"
+EDITOR="LucasArts / Factor 5"
+GAME_URL="http://www.starwars.com/games-apps"
+WINE_VERSION="1.7.28"
 WINE_ARCH="x86"
 AUTHOR="med_freeman"
-
+ 
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
-
+POL_SetupWindow_SetID 2293
+ 
 POL_Debug_Init
+ 
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+
+# Check game cdrom 
+POL_SetupWindow_cdrom
+POL_SetupWindow_check_cdrom "rogue"
 
-POL_SetupWindow_presentation "$TITLE" "LucasArts / Factor 5" "http://www.starwars.com/games-apps" "$AUTHOR" "$PREFIX"
+# Ask user to enable 16 bit support on newer kernels (3.14~) if not enabled
+_16BIT="$(cat /proc/sys/abi/ldt16)"
+if [ $? -eq 0 ] && [ "$_16BIT" = "0" ]; then
+    POL_Call POL_Function_RootCommand "sudo sysctl -w abi.ldt16=1; exit"
+fi
 
 POL_System_SetArch "$WINE_ARCH"
 POL_System_TmpCreate "$PREFIX"
 POL_Wine_SelectPrefix "$PREFIX"
 POL_Wine_PrefixCreate "$WINE_VERSION"
+ 
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine start /unix "$CDROM/setup.exe"
+POL_Wine_WaitExit "$TITLE"
+ 
+# Update 1.2 installation
+POL_SetupWindow_message "$TITLE : $(eval_gettext 'Installation of update 1.2')" "$TITLE"
+
+POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
+if [ "$INSTALL_METHOD" = "LOCAL" ]; then
+    cd "$HOME"
+    POL_SetupWindow_browse "$(eval_gettext 'Please select the 1.2 update executable')" "$TITLE"
+    UPDATE_EXE="$APP_ANSWER"
+elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
+    cd "$POL_System_TmpDir"
+    UPDATE_EXE="rogueupd12.exe"
+    POL_Download "http://media1.gamefront.com/moddb/2009/03/10/$UPDATE_EXE" "e90984f2e3721fe72e67609aabd6db23"
+fi
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine start /unix "$UPDATE_EXE"
+POL_Wine_WaitExit "$TITLE"
 
-POL_SetupWindow_cdrom
-POL_SetupWindow_check_cdrom "rogue/rogue\ squadron.exe"
+# Dependencies
+POL_Call POL_Install_dsound
 
-# Downloading installer
+# Install nGlide wrapper
 cd "$POL_System_TmpDir"
-INSTALL_EXE="RS3DInstaller.exe"
-POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/installer/$INSTALL_EXE" "f936b30fc8962c99d0413f51b36dcfb9"
-
-# Running installer
+NGLIDE_EXE="nGlide102_setup.exe"
+POL_Download "http://www.zeus-software.com/files/nglide/$NGLIDE_EXE" "3753dd73587af332ad72e7fb73545ab1"
 POL_Wine_WaitBefore "$TITLE"
-POL_Wine start /unix "$INSTALL_EXE" "/nocdprompt"
+POL_Wine start /unix "$NGLIDE_EXE"
 POL_Wine_WaitExit "$TITLE"
 
-# Mandatory dependencies
-POL_Call POL_Install_dxdiag
-POL_Call POL_Install_dsound
-POL_Wine_OverrideDLL "native" "dsound"
+# Set glide renderer
+regfile="$POL_System_TmpDir/rs3d_glide.reg"
+cat <<_EOFREG_ >> "$regfile"
+[HKEY_LOCAL_MACHINE\\Software\\LucasArts Entertainment Company LLC\\Rogue Squadron\\v1.0]
+"3DSetup"="TRUE"
+"VDEVICE"="Voodoo (Glide)"
+_EOFREG_
+regedit $regfile
+rm -f $regfile
 
-# Needed Overrides
-Set_Managed "Off"
-POL_Wine_X11Drv "Decorated" "N"
-POL_Wine_X11Drv "GrabFullscreen" "Y"
+# Joystick fix
 Set_OS "win98"
 
+SHORTCUT="Rogue Squadron 3D"
 # Shortcuts
-POL_Shortcut "ROGUE.exe" "$TITLE"
-POL_Shortcut "windows/system32/nglide_config.exe" "$TITLE - Graphic settings"
-
-# Set reg file name
-REG_FILE="rs3d.reg"
-# Export registry to file
-regedit /E "$POL_System_TmpDir/$REG_FILE" "HKEY_LOCAL_MACHINE\Software\LucasArts Entertainment Company LLC\Rogue Squadron\v1.0"
-# Get game installation directory
-[ -e "$POL_System_TmpDir/$REG_FILE" ] && GAME_INSTALLDIR="$(grep "Install Path" "$POL_System_TmpDir/$REG_FILE" | head -n 1 | tr -d '"' | cut -d= -f2 | tr -d '\015')"
-
-# Convert it to wine path
-if [ -n "$GAME_INSTALLDIR" ]; then
-    GAME_INSTALLDIR="${GAME_INSTALLDIR/C:\\\\/drive_c/}"
-    GAME_INSTALLDIR="$WINEPREFIX/${GAME_INSTALLDIR//\\\\//}"
-
-    cd "$GAME_INSTALLDIR"
-    POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
-    POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"
-fi
-
-POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"
-
+POL_Shortcut "Rogue Squadron.exe" "$SHORTCUT"
+POL_Shortcut "nglide_config.exe" "$SHORTCUT - Graphic settings"
+ 
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0

New source code

#!/bin/bash
# Date : (2014-09-18 00:12)
# Last revision : (2014-10-08 01:38)
# Wine version used : 1.7.28
# Distribution used to test : Ubuntu 14.04 Trusty x64 + Debian 7.0 Wheezy x64
# Author : med_freeman
# Licence : Retail
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Star Wars : Rogue Squadron 3D"
PREFIX="RogueSquadron3D"
EDITOR="LucasArts / Factor 5"
GAME_URL="http://www.starwars.com/games-apps"
WINE_VERSION="1.7.28"
WINE_ARCH="x86"
AUTHOR="med_freeman"
 
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 2293
 
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# Check game cdrom 
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "rogue"

# Ask user to enable 16 bit support on newer kernels (3.14~) if not enabled
_16BIT="$(cat /proc/sys/abi/ldt16)"
if [ $? -eq 0 ] && [ "$_16BIT" = "0" ]; then
    POL_Call POL_Function_RootCommand "sudo sysctl -w abi.ldt16=1; exit"
fi

POL_System_SetArch "$WINE_ARCH"
POL_System_TmpCreate "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINE_VERSION"
 
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$CDROM/setup.exe"
POL_Wine_WaitExit "$TITLE"
 
# Update 1.2 installation
POL_SetupWindow_message "$TITLE : $(eval_gettext 'Installation of update 1.2')" "$TITLE"

POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the 1.2 update executable')" "$TITLE"
    UPDATE_EXE="$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
    cd "$POL_System_TmpDir"
    UPDATE_EXE="rogueupd12.exe"
    POL_Download "http://media1.gamefront.com/moddb/2009/03/10/$UPDATE_EXE" "e90984f2e3721fe72e67609aabd6db23"
fi
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$UPDATE_EXE"
POL_Wine_WaitExit "$TITLE"

# Dependencies
POL_Call POL_Install_dsound

# Install nGlide wrapper
cd "$POL_System_TmpDir"
NGLIDE_EXE="nGlide102_setup.exe"
POL_Download "http://www.zeus-software.com/files/nglide/$NGLIDE_EXE" "3753dd73587af332ad72e7fb73545ab1"
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$NGLIDE_EXE"
POL_Wine_WaitExit "$TITLE"

# Set glide renderer
regfile="$POL_System_TmpDir/rs3d_glide.reg"
cat <<_EOFREG_ >> "$regfile"
[HKEY_LOCAL_MACHINE\\Software\\LucasArts Entertainment Company LLC\\Rogue Squadron\\v1.0]
"3DSetup"="TRUE"
"VDEVICE"="Voodoo (Glide)"
_EOFREG_
regedit $regfile
rm -f $regfile

# Joystick fix
Set_OS "win98"

SHORTCUT="Rogue Squadron 3D"
# Shortcuts
POL_Shortcut "Rogue Squadron.exe" "$SHORTCUT"
POL_Shortcut "nglide_config.exe" "$SHORTCUT - Graphic settings"
 
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Antworten

Wednesday 8 October 2014 at 2:02
Ok, i've reverted to the other approach, simplified the script, removed unnecessary dependencies. But the patch (needed for old versions) download is unreliable, and seems to be available practically nowhere. What should i do then ?
med_freeman Sunday 5 October 2014 at 6:44
med_freeman

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -1,7 +1,7 @@
 #!/bin/bash
 # Date : (2014-09-18 00:12)
-# Last revision : (2014-09-28 17:15)
-# Wine version used : 1.7.26
+# Last revision : (2014-10-05 06:15)
+# Wine version used : 1.7.28
 # Distribution used to test : Ubuntu 14.04 Trusty x64 + Debian 7.0 Wheezy x64
 # Author : med_freeman
 # Licence : Retail
@@ -11,7 +11,7 @@
 
 TITLE="Rogue Squadron 3D"
 PREFIX="RogueSquadron3D"
-WINE_VERSION="1.7.26"
+WINE_VERSION="1.7.28"
 WINE_ARCH="x86"
 AUTHOR="med_freeman"
 
@@ -32,8 +32,8 @@
 
 # Downloading installer
 cd "$POL_System_TmpDir"
-INSTALL_EXE="RS3DInstaller.exe"
-POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/installer/$INSTALL_EXE" "f936b30fc8962c99d0413f51b36dcfb9"
+INSTALL_EXE="RS3DInstaller-0.92_nglide_102.exe"
+POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/installer/$INSTALL_EXE" "f6e3538984ce7ea13423c755b35f180e"
 
 # Running installer
 POL_Wine_WaitBefore "$TITLE"
@@ -49,31 +49,20 @@
 Set_Managed "Off"
 POL_Wine_X11Drv "Decorated" "N"
 POL_Wine_X11Drv "GrabFullscreen" "Y"
+POL_Wine_Direct3D "StrictDrawOrdering" "enabled"
 Set_OS "win98"
 
 # Shortcuts
 POL_Shortcut "ROGUE.exe" "$TITLE"
-POL_Shortcut "windows/system32/nglide_config.exe" "$TITLE - Graphic settings"
+POL_Shortcut "nglide_config.exe" "$TITLE - Graphic settings"
 
-# Set reg file name
-REG_FILE="rs3d.reg"
-# Export registry to file
-regedit /E "$POL_System_TmpDir/$REG_FILE" "HKEY_LOCAL_MACHINE\Software\LucasArts Entertainment Company LLC\Rogue Squadron\v1.0"
-# Get game installation directory
-[ -e "$POL_System_TmpDir/$REG_FILE" ] && GAME_INSTALLDIR="$(grep "Install Path" "$POL_System_TmpDir/$REG_FILE" | head -n 1 | tr -d '"' | cut -d= -f2 | tr -d '\015')"
-
-# Convert it to wine path
-if [ -n "$GAME_INSTALLDIR" ]; then
-    GAME_INSTALLDIR="${GAME_INSTALLDIR/C:\\\\/drive_c/}"
-    GAME_INSTALLDIR="$WINEPREFIX/${GAME_INSTALLDIR//\\\\//}"
-
-    cd "$GAME_INSTALLDIR"
-    POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
-    POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"
-fi
+GAME_INSTALLDIR="$WINEPREFIX/drive_c/Program Files/LucasArts/ROGUE"
+cd "$GAME_INSTALLDIR"
+POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
+POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"
 
 POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"
 
 POL_System_TmpDelete
 POL_SetupWindow_Close
-exit 0
+exit 0
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2014-09-18 00:12)
# Last revision : (2014-10-05 06:15)
# Wine version used : 1.7.28
# Distribution used to test : Ubuntu 14.04 Trusty x64 + Debian 7.0 Wheezy x64
# Author : med_freeman
# Licence : Retail

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

TITLE="Rogue Squadron 3D"
PREFIX="RogueSquadron3D"
WINE_VERSION="1.7.28"
WINE_ARCH="x86"
AUTHOR="med_freeman"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init

POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "LucasArts / Factor 5" "http://www.starwars.com/games-apps" "$AUTHOR" "$PREFIX"

POL_System_SetArch "$WINE_ARCH"
POL_System_TmpCreate "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINE_VERSION"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "rogue/rogue\ squadron.exe"

# Downloading installer
cd "$POL_System_TmpDir"
INSTALL_EXE="RS3DInstaller-0.92_nglide_102.exe"
POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/installer/$INSTALL_EXE" "f6e3538984ce7ea13423c755b35f180e"

# Running installer
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$INSTALL_EXE" "/nocdprompt"
POL_Wine_WaitExit "$TITLE"

# Mandatory dependencies
POL_Call POL_Install_dxdiag
POL_Call POL_Install_dsound
POL_Wine_OverrideDLL "native" "dsound"

# Needed Overrides
Set_Managed "Off"
POL_Wine_X11Drv "Decorated" "N"
POL_Wine_X11Drv "GrabFullscreen" "Y"
POL_Wine_Direct3D "StrictDrawOrdering" "enabled"
Set_OS "win98"

# Shortcuts
POL_Shortcut "ROGUE.exe" "$TITLE"
POL_Shortcut "nglide_config.exe" "$TITLE - Graphic settings"

GAME_INSTALLDIR="$WINEPREFIX/drive_c/Program Files/LucasArts/ROGUE"
cd "$GAME_INSTALLDIR"
POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"

POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"

POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Antworten

Sunday 5 October 2014 at 6:47
Installer was updated, https://github.com/medfreeman/RogueSquadron3DInstaller/blob/master/changelog.txt
Sunday 5 October 2014 at 6:48
Wine version updated to 1.7.28, fixed menu problem with strict draw ordering, removed detection of game path since installer now forbids changing directory in wine.
Sunday 5 October 2014 at 6:49
English:
The Death Star has been destroyed thanks to Skywalker's and Wedge Antilles' efforts. But the Empire is quickly regaining strength; Rogue Squadron is formed comprising the best pilots in the Alliance. Their current mission: stop the imperial threats over Alliance planets in twelve missions (plus secret). Their vehicles: X-Wings, A-Wings, V-Wings, the snowspeeder and, with the latest patch, even an Episode 1 Naboo Fighter!

Français :
Star Wars : Rogue Squadron est un jeu d'action sur PC. Vous jouez le rôle de Luke Skywalker. Avec vos équipiers, vous venez de détruire la terrible Etoile Noire, le repère des troupes de l'Empire. Mais, ce dernier est en train de rassembler toutes ses forces afin de porter une attaque massive sur les forces rebelles. Pour stopper cette contre-offensive, l'escadron Rogue est normé, qui rassemble les meilleurs pilotes de l'Alliance.
Sunday 5 October 2014 at 11:28
Sorry but what is http://ftp.oktopod.tv?
Sunday 5 October 2014 at 15:06
np It's just a personal ftp for now (one of the domains of my own company). Would you prefer to host the installer (it's 2.9MB) ?
Sunday 5 October 2014 at 20:51
Sorry I haven't seen it. You cannot redistribute those files, it's not legal. You must download it from an official source
Monday 6 October 2014 at 3:39
np. Are you talking about the manual ? Or the installer ? because i wrote the installer myself, so i guess it's an official source.
Monday 6 October 2014 at 3:43
The only thing not legal would be the official patch embedded inside the installer, so i could download it instead. What do you think ?
Monday 6 October 2014 at 18:22
What is embeded inside the installer appart from the official patch?
Monday 6 October 2014 at 18:43
The icon, the left banner i made, the top banner i made, and dxwebsetup.exe. That's all.
Monday 6 October 2014 at 23:12
Well you have to use the official installer. It's not legal to repackage it
Tuesday 7 October 2014 at 0:20
Ok. But it asks for the cd and doesn't contain any game file. So it's not really 'repackaging'. Anyway the original is a 16 bit installer, so it has to include POL_Call POL_Function_RootCommand "sudo sysctl -w abi.ldt16=1; exit", has to include explanations why the user has to do this, and is not user friendly at all. And the script becomes really big, since the game has to be patched with official patch, then unofficial, then nglide... Guess i have no choice..
Tuesday 7 October 2014 at 10:10
Yeah that is the point. We just want you to make all things you do appear in the script, instead of "hidding" them in an unofficial installer. Security measures :)
med_freeman Sunday 28 September 2014 at 17:20
med_freeman

Information

This update has been approved by the team.

Differences

@@ -0,0 +1,79 @@
+#!/bin/bash
+# Date : (2014-09-18 00:12)
+# Last revision : (2014-09-28 17:15)
+# Wine version used : 1.7.26
+# Distribution used to test : Ubuntu 14.04 Trusty x64 + Debian 7.0 Wheezy x64
+# Author : med_freeman
+# Licence : Retail
+
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+
+TITLE="Rogue Squadron 3D"
+PREFIX="RogueSquadron3D"
+WINE_VERSION="1.7.26"
+WINE_ARCH="x86"
+AUTHOR="med_freeman"
+
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+
+POL_Debug_Init
+
+POL_SetupWindow_presentation "$TITLE" "LucasArts / Factor 5" "http://www.starwars.com/games-apps" "$AUTHOR" "$PREFIX"
+
+POL_System_SetArch "$WINE_ARCH"
+POL_System_TmpCreate "$PREFIX"
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate "$WINE_VERSION"
+
+POL_SetupWindow_cdrom
+POL_SetupWindow_check_cdrom "rogue/rogue\ squadron.exe"
+
+# Downloading installer
+cd "$POL_System_TmpDir"
+INSTALL_EXE="RS3DInstaller.exe"
+POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/installer/$INSTALL_EXE" "f936b30fc8962c99d0413f51b36dcfb9"
+
+# Running installer
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine start /unix "$INSTALL_EXE" "/nocdprompt"
+POL_Wine_WaitExit "$TITLE"
+
+# Mandatory dependencies
+POL_Call POL_Install_dxdiag
+POL_Call POL_Install_dsound
+POL_Wine_OverrideDLL "native" "dsound"
+
+# Needed Overrides
+Set_Managed "Off"
+POL_Wine_X11Drv "Decorated" "N"
+POL_Wine_X11Drv "GrabFullscreen" "Y"
+Set_OS "win98"
+
+# Shortcuts
+POL_Shortcut "ROGUE.exe" "$TITLE"
+POL_Shortcut "windows/system32/nglide_config.exe" "$TITLE - Graphic settings"
+
+# Set reg file name
+REG_FILE="rs3d.reg"
+# Export registry to file
+regedit /E "$POL_System_TmpDir/$REG_FILE" "HKEY_LOCAL_MACHINE\Software\LucasArts Entertainment Company LLC\Rogue Squadron\v1.0"
+# Get game installation directory
+[ -e "$POL_System_TmpDir/$REG_FILE" ] && GAME_INSTALLDIR="$(grep "Install Path" "$POL_System_TmpDir/$REG_FILE" | head -n 1 | tr -d '"' | cut -d= -f2 | tr -d '\015')"
+
+# Convert it to wine path
+if [ -n "$GAME_INSTALLDIR" ]; then
+    GAME_INSTALLDIR="${GAME_INSTALLDIR/C:\\\\/drive_c/}"
+    GAME_INSTALLDIR="$WINEPREFIX/${GAME_INSTALLDIR//\\\\//}"
+
+    cd "$GAME_INSTALLDIR"
+    POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
+    POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"
+fi
+
+POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"
+
+POL_System_TmpDelete
+POL_SetupWindow_Close
+exit 0

New source code

#!/bin/bash
# Date : (2014-09-18 00:12)
# Last revision : (2014-09-28 17:15)
# Wine version used : 1.7.26
# Distribution used to test : Ubuntu 14.04 Trusty x64 + Debian 7.0 Wheezy x64
# Author : med_freeman
# Licence : Retail

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

TITLE="Rogue Squadron 3D"
PREFIX="RogueSquadron3D"
WINE_VERSION="1.7.26"
WINE_ARCH="x86"
AUTHOR="med_freeman"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init

POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "LucasArts / Factor 5" "http://www.starwars.com/games-apps" "$AUTHOR" "$PREFIX"

POL_System_SetArch "$WINE_ARCH"
POL_System_TmpCreate "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINE_VERSION"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "rogue/rogue\ squadron.exe"

# Downloading installer
cd "$POL_System_TmpDir"
INSTALL_EXE="RS3DInstaller.exe"
POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/installer/$INSTALL_EXE" "f936b30fc8962c99d0413f51b36dcfb9"

# Running installer
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$INSTALL_EXE" "/nocdprompt"
POL_Wine_WaitExit "$TITLE"

# Mandatory dependencies
POL_Call POL_Install_dxdiag
POL_Call POL_Install_dsound
POL_Wine_OverrideDLL "native" "dsound"

# Needed Overrides
Set_Managed "Off"
POL_Wine_X11Drv "Decorated" "N"
POL_Wine_X11Drv "GrabFullscreen" "Y"
Set_OS "win98"

# Shortcuts
POL_Shortcut "ROGUE.exe" "$TITLE"
POL_Shortcut "windows/system32/nglide_config.exe" "$TITLE - Graphic settings"

# Set reg file name
REG_FILE="rs3d.reg"
# Export registry to file
regedit /E "$POL_System_TmpDir/$REG_FILE" "HKEY_LOCAL_MACHINE\Software\LucasArts Entertainment Company LLC\Rogue Squadron\v1.0"
# Get game installation directory
[ -e "$POL_System_TmpDir/$REG_FILE" ] && GAME_INSTALLDIR="$(grep "Install Path" "$POL_System_TmpDir/$REG_FILE" | head -n 1 | tr -d '"' | cut -d= -f2 | tr -d '\015')"

# Convert it to wine path
if [ -n "$GAME_INSTALLDIR" ]; then
    GAME_INSTALLDIR="${GAME_INSTALLDIR/C:\\\\/drive_c/}"
    GAME_INSTALLDIR="$WINEPREFIX/${GAME_INSTALLDIR//\\\\//}"

    cd "$GAME_INSTALLDIR"
    POL_Download "http://ftp.oktopod.tv/POL/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
    POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"
fi

POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"

POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Antworten

Sunday 28 September 2014 at 17:21
Here's the new version ! Highly simplified, all is done by the installer instead of the script.
Sunday 28 September 2014 at 17:22
The assets are available here : https://github.com/medfreeman/playonlinux/tree/master/RogueSquadron3D/gfx
Sunday 28 September 2014 at 17:25
English:
The Death Star has been destroyed thanks to Skywalker's and Wedge Antilles' efforts. But the Empire is quickly regaining strength; Rogue Squadron is formed comprising the best pilots in the Alliance. Their current mission: stop the imperial threats over Alliance planets in twelve missions (plus secret). Their vehicles: X-Wings, A-Wings, V-Wings, the snowspeeder and, with the latest patch, even an Episode 1 Naboo Fighter!

Français :
Star Wars : Rogue Squadron est un jeu d'action sur PC. Vous jouez le rôle de Luke Skywalker. Avec vos équipiers, vous venez de détruire la terrible Etoile Noire, le repère des troupes de l'Empire. Mais, ce dernier est en train de rassembler toutes ses forces afin de porter une attaque massive sur les forces rebelles. Pour stopper cette contre-offensive, l'escadron Rogue est normé, qui rassemble les meilleurs pilotes de l'Alliance.
Sunday 28 September 2014 at 17:25
Thanks !
Sunday 28 September 2014 at 17:28
Please note that the "/nocdprompt" flag running the installer is only here to avoid prompting the user to enter the cd again since it's already done in POL, not any kind of copy protection bypass. thx
Monday 29 September 2014 at 15:24
POL_Shortcut should not take "windows/system32/nglide_config.exe" as argument, but "nglide_config.exe"
Monday 29 September 2014 at 16:19
Ok, i figured that out, but POL won't detect it..
Saturday 4 October 2014 at 15:19
I was wrong, assumed that it would be the same result as in the graphical shortcut creation, where the executable wasn't found.
med_freeman Saturday 20 September 2014 at 1:46
med_freeman

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -0,0 +1,209 @@
+#!/bin/bash
+# Date : (2014-09-18 00-12)
+# Last revision : (2014-09-20 01-35)
+# Wine version used : 1.7.26
+# Distribution used to test : Ubuntu 14.04 Trusty x64
+# Author : med_freeman
+# Licence : Retail
+
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+
+TITLE="Rogue Squadron 3D"
+PREFIX="RogueSquadron3D"
+WINE_VERSION="1.7.26"
+WINE_ARCH="x86"
+SERVER="http://ftp.oktopod.tv/POL"
+
+POL_Wine_CustomExportRegistryKey()
+{
+	# Export a registry key to a registry file in tmp folder
+	# Needs : POL_System_TmpCreate
+	# Usage : POL_Wine_CustomGetRegValue RegKey File
+	# Returns : nothing
+	# Example : POL_Wine_CustomGetRegValue "HKEY_LOCAL_MACHINE\Software\Monolith Productions\No One Lives Forever 2\1.0" "nolf2.reg"
+		
+	[ -z "$POL_System_TmpDir" ] && POL_Debug_Fatal "TEMP DIR not set"
+	regedit /E "$POL_System_TmpDir/$2" "$1"
+}
+
+POL_Wine_CustomGetRegValue()
+{
+	# Get a value in a registry file in tmp folder
+	# Needs : POL_System_TmpCreate
+	# Usage : POL_Wine_CustomGetRegValue RegValue File
+	# Returns : registry value
+	# Example : POL_Wine_CustomGetRegValue "NetRegionCode" "nolf2.reg"
+	
+	[ -z "$POL_System_TmpDir" ] && POL_Debug_Fatal "TEMP DIR not set"
+	local value
+	[ -e "$POL_System_TmpDir/$2" ] && value="$(grep "$1" "$POL_System_TmpDir/$2" | head -n 1 | tr -d '"' | cut -d= -f2 | tr -d '\015')"
+	POL_Debug_Message "Getting registry value $1 on file $2. Return: $value"
+	echo -n "${value:-default}"
+}
+
+POL_Wine_CustomConvertRegPathToLinuxPrefix()
+{
+	# Convert a windows registry path info to a linux path inside prefix
+	# Needs : POL_Wine_SelectPrefix - POL_Wine_PrefixCreate
+	# Usage : POL_Wine_CustomConvertRegPathToLinuxPrefix Path
+	# Returns : linux path inside prefix
+	# Example : POL_Wine_CustomConvertRegPathToLinuxPrefix "C:\\Program Files\\Fox\\No One Lives Forever 2"
+	
+	[ -z "$WINEPREFIX" ] && POL_Debug_Fatal "WINEPREFIX not set"
+	[ -z "$1" ] && POL_Debug_Fatal "Need PATH as only argument"
+	local path
+	# TODO : add drive letter substitution
+	path="${1/C:\\\\/drive_c/}"
+	path="$WINEPREFIX/${path//\\\\//}"
+	echo -n "$path"
+}
+
+POL_Wine_Custom16bitSubsystemEnabled()
+{
+	# Test if linux kernel 16bit subsystem is available (since kernel 3.14 and some backported kernels from 3.14 e.g.: 3.13 in ubuntu 14.04)
+	# Needs : nothing
+	# Usage : POL_Wine_16bitSubsystemEnabled
+	# Returns : true if enabled, false if not
+	# Example : POL_Wine_16bitSubsystemEnabled
+	
+	local _16BIT
+	_16BIT="$(cat /proc/sys/abi/ldt16)"
+	[ $? -eq 0 ] && return true
+	[ "$_16BIT" = "1" ] && return true
+	return false
+}
+
+POL_Wine_CustomEnable16bitSubsystem()
+{
+	# Enable linux kernel 16bit subsystem
+	# Needs : nothing
+	# Usage : POL_Wine_CustomEnable16bitSubsystem
+	# Returns : true if it worked, false if not
+	# Example : POL_Wine_CustomEnable16bitSubsystem
+	
+	POL_Call POL_Function_RootCommand "sudo sysctl -w abi.ldt16=1; exit"
+	[ $? -eq 0 ] && return true
+	return false
+}
+
+POL_Wine_CustomDisable16bitSubsystem()
+{
+	# Disable linux kernel 16bit subsystem
+	# Needs : nothing
+	# Usage : POL_Wine_CustomDisable16bitSubsystem
+	# Returns : true if it worked, false if not
+	# Example : POL_Wine_CustomDisable16bitSubsystem
+	
+	POL_Call POL_Function_RootCommand "sudo sysctl -p; exit"
+	[ $? -eq 0 ] && return true
+	return false
+}
+
+POL_RogueSquadron3D_SetGlideOn()
+{
+	# Sets Rogue Squadron 3D Renderer to Glide in registry
+	# Needs : POL_Wine_SelectPrefix - POL_Wine_PrefixCreate - POL_System_TmpCreate
+	# Usage : POL_RogueSquadron3D_SetGlideOn
+	# Returns : nothing
+	# Example : POL_RogueSquadron3D_SetGlideOn
+	
+	[ -z "$WINEPREFIX" ] && POL_Debug_Fatal "WINEPREFIX not set"
+	[ -z "$POL_System_TmpDir" ] && POL_Debug_Fatal "TEMP DIR not set"
+	local regfile
+	regfile="$POL_System_TmpDir/rs3d_glide.reg"
+	echo "[HKEY_LOCAL_MACHINE\\Software\\LucasArts Entertainment Company LLC\\Rogue Squadron\\v1.0]" > regfile
+	echo "\"3DSetup\"=\"TRUE\"" >> regfile
+	echo "\"VDEVICE\"=\"Voodoo (Glide)\"" >> regfile
+	regedit regfile
+	rm -f regfile
+}
+
+POL_GetSetupImages "$SERVER/$PREFIX/images/top.jpg" "$SERVER/$PREFIX/images/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+
+POL_Debug_Init
+
+POL_SetupWindow_presentation "$TITLE" "LucasArts" "http://www.starwars.com/games-apps" "med_freeman" "$PREFIX"
+
+POL_System_SetArch "$WINE_ARCH"
+POL_System_TmpCreate "$PREFIX"
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate "$WINE_VERSION"
+
+POL_SetupWindow_cdrom
+POL_SetupWindow_check_cdrom "rogue/rogue\ squadron.exe"
+
+_16BITENABLED="$(POL_Wine_Custom16bitSubsystemEnabled)"
+if [ "$_16BITENABLED" = false ]; then
+	POL_Wine_CustomEnable16bitSubsystem
+fi
+
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine start /unix "$CDROM/setup.exe"
+POL_Wine_WaitExit "$TITLE"
+
+# Get game language and installation directory
+POL_Wine_CustomExportRegistryKey "HKEY_LOCAL_MACHINE\Software\LucasArts Entertainment Company LLC\Rogue Squadron\v1.0" "rs3d.reg"
+GAME_INSTALLDIR="$(POL_Wine_CustomGetRegValue "Install Path" "rs3d.reg")"
+GAME_INSTALLDIR="$(POL_Wine_CustomConvertRegPathToLinuxPrefix "$GAME_INSTALLDIR")"
+
+# Update 1.2 installation
+POL_SetupWindow_message "$TITLE : $(eval_gettext 'Installation of update 1.21')" "$TITLE"
+
+POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
+if [ "$INSTALL_METHOD" = "LOCAL" ]; then
+    cd "$HOME"
+    POL_SetupWindow_browse "$(eval_gettext 'Please select the 1.21 update executable')" "$TITLE"
+    UPDATE_EXE="$APP_ANSWER"
+elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
+    cd "$POL_System_TmpDir"
+    UPDATE_EXE="rogueupd121.exe"
+    POL_Download "$SERVER/$PREFIX/updates/$UPDATE_EXE" "e90984f2e3721fe72e67609aabd6db23"
+fi
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine start /unix "$UPDATE_EXE"
+POL_Wine_WaitExit "$TITLE"
+
+if [ "$_16BITENABLED" = false ]; then
+	POL_Wine_CustomDisable16bitSubsystem
+fi
+
+POL_Call POL_Install_directx9
+POL_Call POL_Install_dxdiag
+POL_Call POL_Install_dsound
+POL_Wine_OverrideDLL "native" "dsound"
+POL_Call POL_Install_directmusic
+
+cd "$GAME_INSTALLDIR"
+MISSIONFIX_EXE="RS3Dmissionfix.exe"
+POL_Download "$SERVER/$PREFIX/fix/$MISSIONFIX_EXE" "64936846991dc1bcd0b5054e0ee2d3d6"
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine start /unix "$MISSIONFIX_EXE"
+POL_Wine_WaitExit "$TITLE"
+
+cd "$POL_System_TmpDir"
+NGLIDE_EXE="nGlide102_setup.exe"
+POL_Download "http://www.zeus-software.com/files/nglide/$NGLIDE_EXE" "3753dd73587af332ad72e7fb73545ab1"
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine start /unix "$NGLIDE_EXE"
+POL_Wine_WaitExit "$TITLE"
+
+POL_RogueSquadron3D_SetGlideOn
+
+Set_Managed "Off"
+POL_Wine_X11Drv "Decorated" "N"
+POL_Wine_X11Drv "GrabFullscreen" "Y"
+Set_OS "win98"
+
+POL_Shortcut "ROGUE.exe" "$TITLE"
+POL_Shortcut "windows/system32/nglide_config.exe" "$TITLE - Graphic settings"
+cd "$GAME_INSTALLDIR"
+POL_Download "$SERVER/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
+POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"
+
+POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"
+
+POL_System_TmpDelete
+POL_SetupWindow_Close
+exit

New source code

#!/bin/bash
# Date : (2014-09-18 00-12)
# Last revision : (2014-09-20 01-35)
# Wine version used : 1.7.26
# Distribution used to test : Ubuntu 14.04 Trusty x64
# Author : med_freeman
# Licence : Retail

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

TITLE="Rogue Squadron 3D"
PREFIX="RogueSquadron3D"
WINE_VERSION="1.7.26"
WINE_ARCH="x86"
SERVER="http://ftp.oktopod.tv/POL"

POL_Wine_CustomExportRegistryKey()
{
        # Export a registry key to a registry file in tmp folder
        # Needs : POL_System_TmpCreate
        # Usage : POL_Wine_CustomGetRegValue RegKey File
        # Returns : nothing
        # Example : POL_Wine_CustomGetRegValue "HKEY_LOCAL_MACHINE\Software\Monolith Productions\No One Lives Forever 2\1.0" "nolf2.reg"
                
        [ -z "$POL_System_TmpDir" ] && POL_Debug_Fatal "TEMP DIR not set"
        regedit /E "$POL_System_TmpDir/$2" "$1"
}

POL_Wine_CustomGetRegValue()
{
        # Get a value in a registry file in tmp folder
        # Needs : POL_System_TmpCreate
        # Usage : POL_Wine_CustomGetRegValue RegValue File
        # Returns : registry value
        # Example : POL_Wine_CustomGetRegValue "NetRegionCode" "nolf2.reg"
        
        [ -z "$POL_System_TmpDir" ] && POL_Debug_Fatal "TEMP DIR not set"
        local value
        [ -e "$POL_System_TmpDir/$2" ] && value="$(grep "$1" "$POL_System_TmpDir/$2" | head -n 1 | tr -d '"' | cut -d= -f2 | tr -d '\015')"
        POL_Debug_Message "Getting registry value $1 on file $2. Return: $value"
        echo -n "${value:-default}"
}

POL_Wine_CustomConvertRegPathToLinuxPrefix()
{
        # Convert a windows registry path info to a linux path inside prefix
        # Needs : POL_Wine_SelectPrefix - POL_Wine_PrefixCreate
        # Usage : POL_Wine_CustomConvertRegPathToLinuxPrefix Path
        # Returns : linux path inside prefix
        # Example : POL_Wine_CustomConvertRegPathToLinuxPrefix "C:\\Program Files\\Fox\\No One Lives Forever 2"
        
        [ -z "$WINEPREFIX" ] && POL_Debug_Fatal "WINEPREFIX not set"
        [ -z "$1" ] && POL_Debug_Fatal "Need PATH as only argument"
        local path
        # TODO : add drive letter substitution
        path="${1/C:\\\\/drive_c/}"
        path="$WINEPREFIX/${path//\\\\//}"
        echo -n "$path"
}

POL_Wine_Custom16bitSubsystemEnabled()
{
        # Test if linux kernel 16bit subsystem is available (since kernel 3.14 and some backported kernels from 3.14 e.g.: 3.13 in ubuntu 14.04)
        # Needs : nothing
        # Usage : POL_Wine_16bitSubsystemEnabled
        # Returns : true if enabled, false if not
        # Example : POL_Wine_16bitSubsystemEnabled
        
        local _16BIT
        _16BIT="$(cat /proc/sys/abi/ldt16)"
        [ $? -eq 0 ] && return true
        [ "$_16BIT" = "1" ] && return true
        return false
}

POL_Wine_CustomEnable16bitSubsystem()
{
        # Enable linux kernel 16bit subsystem
        # Needs : nothing
        # Usage : POL_Wine_CustomEnable16bitSubsystem
        # Returns : true if it worked, false if not
        # Example : POL_Wine_CustomEnable16bitSubsystem
        
        POL_Call POL_Function_RootCommand "sudo sysctl -w abi.ldt16=1; exit"
        [ $? -eq 0 ] && return true
        return false
}

POL_Wine_CustomDisable16bitSubsystem()
{
        # Disable linux kernel 16bit subsystem
        # Needs : nothing
        # Usage : POL_Wine_CustomDisable16bitSubsystem
        # Returns : true if it worked, false if not
        # Example : POL_Wine_CustomDisable16bitSubsystem
        
        POL_Call POL_Function_RootCommand "sudo sysctl -p; exit"
        [ $? -eq 0 ] && return true
        return false
}

POL_RogueSquadron3D_SetGlideOn()
{
        # Sets Rogue Squadron 3D Renderer to Glide in registry
        # Needs : POL_Wine_SelectPrefix - POL_Wine_PrefixCreate - POL_System_TmpCreate
        # Usage : POL_RogueSquadron3D_SetGlideOn
        # Returns : nothing
        # Example : POL_RogueSquadron3D_SetGlideOn
        
        [ -z "$WINEPREFIX" ] && POL_Debug_Fatal "WINEPREFIX not set"
        [ -z "$POL_System_TmpDir" ] && POL_Debug_Fatal "TEMP DIR not set"
        local regfile
        regfile="$POL_System_TmpDir/rs3d_glide.reg"
        echo "[HKEY_LOCAL_MACHINE\\Software\\LucasArts Entertainment Company LLC\\Rogue Squadron\\v1.0]" > regfile
        echo "\"3DSetup\"=\"TRUE\"" >> regfile
        echo "\"VDEVICE\"=\"Voodoo (Glide)\"" >> regfile
        regedit regfile
        rm -f regfile
}

POL_GetSetupImages "$SERVER/$PREFIX/images/top.jpg" "$SERVER/$PREFIX/images/left.jpg" "$TITLE"
POL_SetupWindow_Init

POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "LucasArts" "http://www.starwars.com/games-apps" "med_freeman" "$PREFIX"

POL_System_SetArch "$WINE_ARCH"
POL_System_TmpCreate "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINE_VERSION"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "rogue/rogue\ squadron.exe"

_16BITENABLED="$(POL_Wine_Custom16bitSubsystemEnabled)"
if [ "$_16BITENABLED" = false ]; then
        POL_Wine_CustomEnable16bitSubsystem
fi

POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$CDROM/setup.exe"
POL_Wine_WaitExit "$TITLE"

# Get game language and installation directory
POL_Wine_CustomExportRegistryKey "HKEY_LOCAL_MACHINE\Software\LucasArts Entertainment Company LLC\Rogue Squadron\v1.0" "rs3d.reg"
GAME_INSTALLDIR="$(POL_Wine_CustomGetRegValue "Install Path" "rs3d.reg")"
GAME_INSTALLDIR="$(POL_Wine_CustomConvertRegPathToLinuxPrefix "$GAME_INSTALLDIR")"

# Update 1.2 installation
POL_SetupWindow_message "$TITLE : $(eval_gettext 'Installation of update 1.21')" "$TITLE"

POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the 1.21 update executable')" "$TITLE"
    UPDATE_EXE="$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
    cd "$POL_System_TmpDir"
    UPDATE_EXE="rogueupd121.exe"
    POL_Download "$SERVER/$PREFIX/updates/$UPDATE_EXE" "e90984f2e3721fe72e67609aabd6db23"
fi
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$UPDATE_EXE"
POL_Wine_WaitExit "$TITLE"

if [ "$_16BITENABLED" = false ]; then
        POL_Wine_CustomDisable16bitSubsystem
fi

POL_Call POL_Install_directx9
POL_Call POL_Install_dxdiag
POL_Call POL_Install_dsound
POL_Wine_OverrideDLL "native" "dsound"
POL_Call POL_Install_directmusic

cd "$GAME_INSTALLDIR"
MISSIONFIX_EXE="RS3Dmissionfix.exe"
POL_Download "$SERVER/$PREFIX/fix/$MISSIONFIX_EXE" "64936846991dc1bcd0b5054e0ee2d3d6"
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$MISSIONFIX_EXE"
POL_Wine_WaitExit "$TITLE"

cd "$POL_System_TmpDir"
NGLIDE_EXE="nGlide102_setup.exe"
POL_Download "http://www.zeus-software.com/files/nglide/$NGLIDE_EXE" "3753dd73587af332ad72e7fb73545ab1"
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$NGLIDE_EXE"
POL_Wine_WaitExit "$TITLE"

POL_RogueSquadron3D_SetGlideOn

Set_Managed "Off"
POL_Wine_X11Drv "Decorated" "N"
POL_Wine_X11Drv "GrabFullscreen" "Y"
Set_OS "win98"

POL_Shortcut "ROGUE.exe" "$TITLE"
POL_Shortcut "windows/system32/nglide_config.exe" "$TITLE - Graphic settings"
cd "$GAME_INSTALLDIR"
POL_Download "$SERVER/$PREFIX/manual/Manual.pdf" "bbd6697b86ecad0c033525c1502e38b0"
POL_Shortcut_Document "$TITLE" "$GAME_INSTALLDIR/Manual.pdf"

POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"

POL_System_TmpDelete
POL_SetupWindow_Close
exit

Antworten

Saturday 20 September 2014 at 8:09
Why all those overriding functions?
Sunday 21 September 2014 at 13:50
The first three are needed to get values from wine system registry. To my knowledge there's only one available to get keys from user registry.
Sunday 21 September 2014 at 13:52
Since in need the game install path to copy the manual and mission fix, if figured it is the only way to do it. I prefer that over assuming the path will be the default one, even if 99,99% of people won't change it.
Sunday 21 September 2014 at 13:54
The next three concern 16bit subsystem. The game installer is 16bit, and in newer linux kernels (3.14 and older which have the 16bit part backported from 3.13, i.e: the default one in ubuntu 14.04) have 16bit support disabled by default. So these functions are here to check /enable it, or the installer won't run.
Sunday 21 September 2014 at 13:57
I prefered this over using the new 32/64bit installers found on the internet, since it seemed simpler, until i saw the result of POL_Call POL_Function_RootCommand.
Sunday 21 September 2014 at 14:00
Perhaps i'll make a new one with nsis because i don't think that the one found on the net sets registry keys automatically, and i would favor doing this in the installer to avoid over-complicating the installer.
Sunday 21 September 2014 at 14:01
edit : to avoid complicating the playonlinux script
Sunday 21 September 2014 at 14:05
Last one is to avoid explaining you have to set the game to glide and going to the hardware options in the game menu, since it soesn't work with D3D anyway if i'm not mistaken. The game is playable up to 7860x4320.
Sunday 21 September 2014 at 16:28
What would you suggest ?
Thursday 25 September 2014 at 15:10
fyi i'm currently making a new installer for the game with nsis, i'll update the script when finished and give you the url for the assets. thx