Star Wars: Rogue Squadron 3D

Informations

Créateur Messages
med_freeman

Attention

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

Informations

Plate-formes :
Téléchargements : 10309
Wine: 5.0

Retours d'expérience

Description

Arcade-style action game, 1998. Wikipedia.

This script can install the game from : CD-ROM, local file (.EXE, GOG's .EXE).

Appdb.winehq.org, PCGamingWiki.

Captures d'écran

Miniature

Code source

#!/bin/bash
# Date : (2014-09-18 00:12)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits
# Author : med_freeman
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions:  CD v1.3 .
#
# Middlewares used by this software : DirectX 6.
#
#
# CHANGELOG
# [med_freeman] (2014-09-18 00:12)
#   Initial script.
# [Dadu042] (2020-03-31 23-00)
#   Brand new script (add: install from local file).
#   Remove POL_Call POL_Install_dsound
#   Wine 1.7.28 -> 3.0.3
# [Dadu042] (2020-03-31 23-00)
#   Add compatibility with the GOG release (v2.0.0.3)
#   Wine 3.0.3 -> 5.0 (for the GOG release).
#   
#
# KNOWN ISSUES
#  - Wine x86 3.0.3 + GOG release (v2.0.03) : crash when launched (the game. The launcher does run fine).
#  - Wine x86 3.20 + GOG release (v2.0.03) : in the main menu impossible to type a new user name.
#  - Wine x86 3.0.3, 4.0.3, 4.21, 5.5: game does need the CD (and does not see the ISO mounted). I found a NoCD but it fail to install.
#
# KNOWN ISSUES (FIXED):
#
   
[ "$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"
AUTHOR="med_freeman"
STEAM_ID=""
GAME_VMS="128"
SHORTCUT_FILENAME="ROGUE.EXE"
SOFTWARE_CATEGORIES="Game;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE="r*.txt"
         
# Starting the script
POL_SetupWindow_Init
                      
# Starting debugging API
POL_Debug_Init
     
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
   
# POL_SetupWindow_message "$(eval_gettext 'WARNING: this software does exist in Linux native version.\n\nThis script only allow to run the Windows version on Linux, please prefer the Linux edition for better 3D speed.')" "$TITLE"
   
# POL_SetupWindow_message "$(eval_gettext 'This game requires a fast 3D GPU (ie: Intel HD Graphics 4440 is not enough).')" "$TITLE"
   
POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
   
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
         
# Determine Architecture
# POL_System_SetArch "amd64"
POL_System_SetArch "x86"
     
# Downloading wine if necessary and creating prefix
POL_Wine_PrefixCreate "5.0"
   
POL_System_TmpCreate "$PREFIX"
          
Set_OS "win98"
          
#######################################
#  Installing mandatory dependencies  #
#######################################
 
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_mfc42
# POL_Call POL_Install_directmusic
# POL_Call POL_Install_dsound
# POL_Call POL_Install_quartz
# POL_Call POL_Install_d3dx9_43
# POL_Call POL_Install_d3dcompiler_43
# POL_Call POL_Install_wininet
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_dotnet30sp1
# POL_Call POL_Install_mono5.20
# POL_Call POL_Install_dotnet20
# POL_Call POL_Install_dotnet40
# POL_Call POL_Install_dotnet472
# POL_Call POL_Install_dsound
# POL_Call POL_Install_riched30
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_d3dx11
# POL_Call POL_Install_mono210
              
              
################
#      GPU     #
################
          
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
           
# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver
            
# Useful for Nvidia GPUs
# POL_Call POL_Install_physx
 
#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
 [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
 [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
           
          
#######################################
#  Main part of this script           #
#######################################
              
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,CD"
   
POL_SetupWindow_message "Warning: do not install DirectX (nor icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
           
# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                   
elif [ "$INSTALL_METHOD" == "CD" ]; then
        POL_SetupWindow_cdrom
                   
        # POL_Call POL_Function_NoCDWarning
        POL_SetupWindow_check_cdrom "rogue"
        POL_Wine start /unix "$CDROM/SETUP.EXE"
                  
        POL_Wine_WaitExit "$TITLE"
               
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
           
elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
          
        POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo (from Archive.org).')" "$TITLE"
        POL_Download "https://ia800802.us.archive.org/14/items/StarWarsRogueSquadron3dDemo/ROGUEDEMO.EXE"
        
        mv ROGUEDEMO.EXE GameInstaller.exe
        # mv Teacher%20Simulator.rar gameinstaller.rar        
        # mv Facewound.zip gameinstaller.zip
        
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
          
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
          
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
           
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "setup.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
  
        # rm GameInstaller.exe
        rm gameinstaller.zip
          
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
          
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
               
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
        
          
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.EXE GOG')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # APP_ANSWER=".EXE"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
        
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
          
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$APP_ANSWER" == ".EXE GOG" ]; then
        Set_OS "win7"

        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                
        POL_Shortcut "Rogue Squadron.EXE" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
          
        POL_Shortcut_Document "$TITLE" "*.pdf"
   
elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
          
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
   
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
          
        POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
        
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
          
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
        
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
   
fi
fi
          
          
################
# Patch update #
################
     
POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"    
          
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi
           
# POL_SetupWindow_message "$(eval_gettext '\nInstallation is finished ! :)')" "$TITLE"
     
# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
           
# Fail ?
# POL_SetupWindow_message "$LNG_FIN" "$TITLE"
          
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribuer
Membre Messages
Dadu042 Mercredi 1 Avril 2020 à 13:00
Dadu042

Information

Cette mise à jour a été acceptée par l'équipe

Messages

GOG release played for 5 min.

Differences

@@ -18,18 +18,23 @@
 # [Dadu042] (2020-03-31 23-00)
 #   Brand new script (add: install from local file).
 #   Remove POL_Call POL_Install_dsound
+#   Wine 1.7.28 -> 3.0.3
+# [Dadu042] (2020-03-31 23-00)
+#   Add compatibility with the GOG release (v2.0.0.3)
+#   Wine 3.0.3 -> 5.0 (for the GOG release).
+#   
 #
 # KNOWN ISSUES
+#  - Wine x86 3.0.3 + GOG release (v2.0.03) : crash when launched (the game. The launcher does run fine).
+#  - Wine x86 3.20 + GOG release (v2.0.03) : in the main menu impossible to type a new user name.
 #  - Wine x86 3.0.3, 4.0.3, 4.21, 5.5: game does need the CD (and does not see the ISO mounted). I found a NoCD but it fail to install.
 #
 # KNOWN ISSUES (FIXED):
-#  - Wine x86 3.0.3: X
-
-# 
-  
+#
+   
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-         
+          
 TITLE="Star Wars : Rogue Squadron 3D"
 PREFIX="RogueSquadron3D"
 EDITOR="LucasArts / Factor 5"
@@ -41,40 +46,40 @@
 SOFTWARE_CATEGORIES="Game;"
 # http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
 DOCUMENT_FILE="r*.txt"
-        
+         
 # Starting the script
 POL_SetupWindow_Init
-                     
+                      
 # Starting debugging API
 POL_Debug_Init
-    
+     
 # Open dialogue box 
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-  
+   
 # POL_SetupWindow_message "$(eval_gettext 'WARNING: this software does exist in Linux native version.\n\nThis script only allow to run the Windows version on Linux, please prefer the Linux edition for better 3D speed.')" "$TITLE"
-  
+   
 # POL_SetupWindow_message "$(eval_gettext 'This game requires a fast 3D GPU (ie: Intel HD Graphics 4440 is not enough).')" "$TITLE"
-  
-POL_RequiredVersion "4.1.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
-  
+   
+POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
+   
 # Setting prefix path
 POL_Wine_SelectPrefix "$PREFIX"
-        
+         
 # Determine Architecture
 # POL_System_SetArch "amd64"
 POL_System_SetArch "x86"
-    
+     
 # Downloading wine if necessary and creating prefix
-POL_Wine_PrefixCreate "3.0.3"
-  
+POL_Wine_PrefixCreate "5.0"
+   
 POL_System_TmpCreate "$PREFIX"
-         
+          
 Set_OS "win98"
-         
+          
 #######################################
 #  Installing mandatory dependencies  #
 #######################################
-
+ 
 # POL_Call POL_Install_corefonts
 # POL_Call POL_Install_mfc42
 # POL_Call POL_Install_directmusic
@@ -94,40 +99,40 @@
 # POL_Call POL_Install_corefonts
 # POL_Call POL_Install_d3dx11
 # POL_Call POL_Install_mono210
-             
-             
+              
+              
 ################
 #      GPU     #
 ################
-         
+          
 # Asking about memory size of graphic card
 POL_SetupWindow_VMS $GAME_VMS
-          
+           
 # Set Graphic Card information keys for wine
 POL_Wine_SetVideoDriver
-           
+            
 # Useful for Nvidia GPUs
 # POL_Call POL_Install_physx
-
+ 
 #############################################
 #  Sound problem fix - pulseaudio related   #
 #############################################
  [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
  [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
 ## End Fix
+           
           
-         
 #######################################
 #  Main part of this script           #
 #######################################
-             
+              
 # Choose between Steam and other Digital Download versions
 # POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
 POL_SetupWindow_InstallMethod "LOCAL,CD"
-  
+   
 POL_SetupWindow_message "Warning: do not install DirectX (nor icons)." "$TITLE"
 # POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
-          
+           
 # Begin game installation
 if [ "$INSTALL_METHOD" == "STEAM" ]; then
         POL_Call POL_Install_steam
@@ -140,65 +145,65 @@
         cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
         POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
         POL_Wine_WaitExit "$TITLE"
-                  
+                   
 elif [ "$INSTALL_METHOD" == "CD" ]; then
         POL_SetupWindow_cdrom
-                  
+                   
         # POL_Call POL_Function_NoCDWarning
-	POL_SetupWindow_check_cdrom "rogue"
-	POL_Wine start /unix "$CDROM/SETUP.EXE"
-                 
+        POL_SetupWindow_check_cdrom "rogue"
+        POL_Wine start /unix "$CDROM/SETUP.EXE"
+                  
         POL_Wine_WaitExit "$TITLE"
-              
+               
         # Restore screen resolution (game's default is 800x600 ?)
         # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
-                 
+                  
         POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         POL_Shortcut_QuietDebug "$TITLE"
         POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
-          
-          
+           
+           
 elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
         cd "$WINEPREFIX/drive_c"
-         
+          
         POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo (from Archive.org).')" "$TITLE"
         POL_Download "https://ia800802.us.archive.org/14/items/StarWarsRogueSquadron3dDemo/ROGUEDEMO.EXE"
-       
+        
         mv ROGUEDEMO.EXE GameInstaller.exe
         # mv Teacher%20Simulator.rar gameinstaller.rar        
-        # mv Facewound.zip gameinstaller.zip
-       
+        # mv Facewound.zip gameinstaller.zip
+        
         # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
         # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
         # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
-         
+          
         # Extract without sub-folder.
         # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
-         
-        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
           
+        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
+           
         cd  "$WINEPREFIX/drive_c/game/"
         POL_Wine "setup.exe" # "/SILENT"
         POL_Wine_WaitBefore "$TITLE"
- 
+  
         # rm GameInstaller.exe
         rm gameinstaller.zip
-         
+          
         POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         POL_Shortcut_QuietDebug "$TITLE"
-         
+          
         # Restore screen resolution (game's default is 1024x768)
         # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
-              
+               
         POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
-       
-         
+        
+          
 elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
-        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
+        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.EXE GOG')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
         # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
         # APP_ANSWER=".EXE"
         # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
-       
+        
 if [ "$APP_ANSWER" == ".EXE" ]; then
         # Asking then installing local files of the game
         cd "$HOME"
@@ -206,16 +211,33 @@
         SETUP_EXE="$APP_ANSWER"
         POL_Wine start /unix "$SETUP_EXE"
         POL_Wine_WaitExit "$TITLE"
-               
+                
         # Restore screen resolution (game's default is 640x480 ?)
         # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
-               
+                
         POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         POL_Shortcut_QuietDebug "$TITLE"
-         
+          
         POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
-  
-  
+
+elif [ "$APP_ANSWER" == ".EXE GOG" ]; then
+	Set_OS "win7"
+
+        # Asking then installing local files of the game
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+        SETUP_EXE="$APP_ANSWER"
+        POL_Wine start /unix "$SETUP_EXE"
+        POL_Wine_WaitExit "$TITLE"
+                
+        # Restore screen resolution (game's default is 640x480 ?)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+                
+        POL_Shortcut "Rogue Squadron.EXE" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+          
+        POL_Shortcut_Document "$TITLE" "*.pdf"
+   
 elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
        # Asking then installing local files of the game
         cd "$HOME"
@@ -223,28 +245,28 @@
         SETUP_EXE="$APP_ANSWER"
         POL_Wine msiexec /i  "$SETUP_EXE"
         POL_Wine_WaitExit "$TITLE"
-               
+                
         # Restore screen resolution (game's default is 640x480 ?)
         # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
-               
+                
         POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         POL_Shortcut_QuietDebug "$TITLE"
-         
+          
         POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
-  
+   
 elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
         cd "$HOME"
-         
+          
         POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
         POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
         cd "$POL_System_TmpDir"
         POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
         POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
-       
+        
         POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
-         
+          
         POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
-       
+        
 elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
         cd "$HOME"
         POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
@@ -253,33 +275,33 @@
         POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
         POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
         POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
-        
+         
         POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
-  
+   
 fi
 fi
-         
-         
+          
+          
 ################
 # Patch update #
 ################
-    
-POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"     
-         
+     
+POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"    
+          
 if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
         POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
         PATCH_EXE="$APP_ANSWER"
         POL_Wine start /unix "$PATCH_EXE"
         POL_Wine_WaitExit "$PATCH_EXE"
 fi
-          
+           
 # POL_SetupWindow_message "$(eval_gettext '\nInstallation is finished ! :)')" "$TITLE"
-    
+     
 # POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
-          
+           
 # Fail ?
 # POL_SetupWindow_message "$LNG_FIN" "$TITLE"
-         
+          
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

Nouveau code source

#!/bin/bash
# Date : (2014-09-18 00:12)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits
# Author : med_freeman
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions:  CD v1.3 .
#
# Middlewares used by this software : DirectX 6.
#
#
# CHANGELOG
# [med_freeman] (2014-09-18 00:12)
#   Initial script.
# [Dadu042] (2020-03-31 23-00)
#   Brand new script (add: install from local file).
#   Remove POL_Call POL_Install_dsound
#   Wine 1.7.28 -> 3.0.3
# [Dadu042] (2020-03-31 23-00)
#   Add compatibility with the GOG release (v2.0.0.3)
#   Wine 3.0.3 -> 5.0 (for the GOG release).
#   
#
# KNOWN ISSUES
#  - Wine x86 3.0.3 + GOG release (v2.0.03) : crash when launched (the game. The launcher does run fine).
#  - Wine x86 3.20 + GOG release (v2.0.03) : in the main menu impossible to type a new user name.
#  - Wine x86 3.0.3, 4.0.3, 4.21, 5.5: game does need the CD (and does not see the ISO mounted). I found a NoCD but it fail to install.
#
# KNOWN ISSUES (FIXED):
#
   
[ "$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"
AUTHOR="med_freeman"
STEAM_ID=""
GAME_VMS="128"
SHORTCUT_FILENAME="ROGUE.EXE"
SOFTWARE_CATEGORIES="Game;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE="r*.txt"
         
# Starting the script
POL_SetupWindow_Init
                      
# Starting debugging API
POL_Debug_Init
     
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
   
# POL_SetupWindow_message "$(eval_gettext 'WARNING: this software does exist in Linux native version.\n\nThis script only allow to run the Windows version on Linux, please prefer the Linux edition for better 3D speed.')" "$TITLE"
   
# POL_SetupWindow_message "$(eval_gettext 'This game requires a fast 3D GPU (ie: Intel HD Graphics 4440 is not enough).')" "$TITLE"
   
POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
   
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
         
# Determine Architecture
# POL_System_SetArch "amd64"
POL_System_SetArch "x86"
     
# Downloading wine if necessary and creating prefix
POL_Wine_PrefixCreate "5.0"
   
POL_System_TmpCreate "$PREFIX"
          
Set_OS "win98"
          
#######################################
#  Installing mandatory dependencies  #
#######################################
 
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_mfc42
# POL_Call POL_Install_directmusic
# POL_Call POL_Install_dsound
# POL_Call POL_Install_quartz
# POL_Call POL_Install_d3dx9_43
# POL_Call POL_Install_d3dcompiler_43
# POL_Call POL_Install_wininet
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_dotnet30sp1
# POL_Call POL_Install_mono5.20
# POL_Call POL_Install_dotnet20
# POL_Call POL_Install_dotnet40
# POL_Call POL_Install_dotnet472
# POL_Call POL_Install_dsound
# POL_Call POL_Install_riched30
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_d3dx11
# POL_Call POL_Install_mono210
              
              
################
#      GPU     #
################
          
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
           
# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver
            
# Useful for Nvidia GPUs
# POL_Call POL_Install_physx
 
#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
 [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
 [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
           
          
#######################################
#  Main part of this script           #
#######################################
              
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,CD"
   
POL_SetupWindow_message "Warning: do not install DirectX (nor icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
           
# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                   
elif [ "$INSTALL_METHOD" == "CD" ]; then
        POL_SetupWindow_cdrom
                   
        # POL_Call POL_Function_NoCDWarning
        POL_SetupWindow_check_cdrom "rogue"
        POL_Wine start /unix "$CDROM/SETUP.EXE"
                  
        POL_Wine_WaitExit "$TITLE"
               
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
           
elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
          
        POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo (from Archive.org).')" "$TITLE"
        POL_Download "https://ia800802.us.archive.org/14/items/StarWarsRogueSquadron3dDemo/ROGUEDEMO.EXE"
        
        mv ROGUEDEMO.EXE GameInstaller.exe
        # mv Teacher%20Simulator.rar gameinstaller.rar        
        # mv Facewound.zip gameinstaller.zip
        
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
          
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
          
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
           
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "setup.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
  
        # rm GameInstaller.exe
        rm gameinstaller.zip
          
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
          
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
               
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
        
          
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.EXE GOG')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # APP_ANSWER=".EXE"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
        
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
          
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$APP_ANSWER" == ".EXE GOG" ]; then
        Set_OS "win7"

        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                
        POL_Shortcut "Rogue Squadron.EXE" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
          
        POL_Shortcut_Document "$TITLE" "*.pdf"
   
elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
          
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
   
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
          
        POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
        
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
          
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
        
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
   
fi
fi
          
          
################
# Patch update #
################
     
POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"    
          
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi
           
# POL_SetupWindow_message "$(eval_gettext '\nInstallation is finished ! :)')" "$TITLE"
     
# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
           
# Fail ?
# POL_SetupWindow_message "$LNG_FIN" "$TITLE"
          
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Dadu042 Mardi 31 Mars 2020 à 23:53
Dadu042

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Messages

Script not tested (see Known issues). However i post it because the previous script is outdated (2015).

Differences

@@ -1,95 +1,285 @@
 #!/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
+# Last revision : see the changelog below
+# Wine version used : see the changelog below
+# Distribution used to test : XUbuntu 18.04 64 bits
 # Author : med_freeman
 # Licence : Retail
- 
+# Only For : http://www.playonlinux.com
+#
+# TESTED Editions:  CD v1.3 .
+#
+# Middlewares used by this software : DirectX 6.
+#
+#
+# CHANGELOG
+# [med_freeman] (2014-09-18 00:12)
+#   Initial script.
+# [Dadu042] (2020-03-31 23-00)
+#   Brand new script (add: install from local file).
+#   Remove POL_Call POL_Install_dsound
+#
+# KNOWN ISSUES
+#  - Wine x86 3.0.3, 4.0.3, 4.21, 5.5: game does need the CD (and does not see the ISO mounted). I found a NoCD but it fail to install.
+#
+# KNOWN ISSUES (FIXED):
+#  - Wine x86 3.0.3: X
+
+# 
+  
 [ "$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"
+STEAM_ID=""
+GAME_VMS="128"
+SHORTCUT_FILENAME="ROGUE.EXE"
+SOFTWARE_CATEGORIES="Game;"
+# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
+DOCUMENT_FILE="r*.txt"
+        
+# Starting the script
 POL_SetupWindow_Init
-POL_SetupWindow_SetID 2293
- 
+                     
+# Starting debugging API
 POL_Debug_Init
- 
+    
+# Open dialogue box 
 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_SetupWindow_message "$(eval_gettext 'WARNING: this software does exist in Linux native version.\n\nThis script only allow to run the Windows version on Linux, please prefer the Linux edition for better 3D speed.')" "$TITLE"
+  
+# POL_SetupWindow_message "$(eval_gettext 'This game requires a fast 3D GPU (ie: Intel HD Graphics 4440 is not enough).')" "$TITLE"
+  
+POL_RequiredVersion "4.1.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
+  
+# Setting prefix path
 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
+        
+# Determine Architecture
+# POL_System_SetArch "amd64"
+POL_System_SetArch "x86"
+    
+# Downloading wine if necessary and creating prefix
+POL_Wine_PrefixCreate "3.0.3"
+  
+POL_System_TmpCreate "$PREFIX"
+         
 Set_OS "win98"
+         
+#######################################
+#  Installing mandatory dependencies  #
+#######################################
+
+# POL_Call POL_Install_corefonts
+# POL_Call POL_Install_mfc42
+# POL_Call POL_Install_directmusic
+# POL_Call POL_Install_dsound
+# POL_Call POL_Install_quartz
+# POL_Call POL_Install_d3dx9_43
+# POL_Call POL_Install_d3dcompiler_43
+# POL_Call POL_Install_wininet
+# POL_Call POL_Install_corefonts
+# POL_Call POL_Install_dotnet30sp1
+# POL_Call POL_Install_mono5.20
+# POL_Call POL_Install_dotnet20
+# POL_Call POL_Install_dotnet40
+# POL_Call POL_Install_dotnet472
+# POL_Call POL_Install_dsound
+# POL_Call POL_Install_riched30
+# POL_Call POL_Install_corefonts
+# POL_Call POL_Install_d3dx11
+# POL_Call POL_Install_mono210
+             
+             
+################
+#      GPU     #
+################
+         
+# Asking about memory size of graphic card
+POL_SetupWindow_VMS $GAME_VMS
+          
+# Set Graphic Card information keys for wine
+POL_Wine_SetVideoDriver
+           
+# Useful for Nvidia GPUs
+# POL_Call POL_Install_physx
 
-SHORTCUT="Rogue Squadron 3D"
-# Shortcuts
-POL_Shortcut "Rogue Squadron.exe" "$SHORTCUT"
-POL_Shortcut "nglide_config.exe" "$SHORTCUT - Graphic settings"
+#############################################
+#  Sound problem fix - pulseaudio related   #
+#############################################
+ [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
+ [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
+## End Fix
+          
+         
+#######################################
+#  Main part of this script           #
+#######################################
+             
+# Choose between Steam and other Digital Download versions
+# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
+POL_SetupWindow_InstallMethod "LOCAL,CD"
+  
+POL_SetupWindow_message "Warning: do not install DirectX (nor icons)." "$TITLE"
+# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
+          
+# Begin game installation
+if [ "$INSTALL_METHOD" == "STEAM" ]; then
+        POL_Call POL_Install_steam
+        # Mandatory pre-install fix for steam
+        POL_Call POL_Install_steam_flags "$STEAM_ID"
+        # Shortcut done before install for steam version
+        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
+        # Steam install
+        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
+        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
+        POL_Wine_WaitExit "$TITLE"
+                  
+elif [ "$INSTALL_METHOD" == "CD" ]; then
+        POL_SetupWindow_cdrom
+                  
+        # POL_Call POL_Function_NoCDWarning
+	POL_SetupWindow_check_cdrom "rogue"
+	POL_Wine start /unix "$CDROM/SETUP.EXE"
+                 
+        POL_Wine_WaitExit "$TITLE"
+              
+        # Restore screen resolution (game's default is 800x600 ?)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+                 
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+          
+          
+elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
+        cd "$WINEPREFIX/drive_c"
+         
+        POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo (from Archive.org).')" "$TITLE"
+        POL_Download "https://ia800802.us.archive.org/14/items/StarWarsRogueSquadron3dDemo/ROGUEDEMO.EXE"
+       
+        mv ROGUEDEMO.EXE GameInstaller.exe
+        # mv Teacher%20Simulator.rar gameinstaller.rar        
+        # mv Facewound.zip gameinstaller.zip
+       
+        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
+        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
+        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
+         
+        # Extract without sub-folder.
+        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
+         
+        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
+          
+        cd  "$WINEPREFIX/drive_c/game/"
+        POL_Wine "setup.exe" # "/SILENT"
+        POL_Wine_WaitBefore "$TITLE"
  
+        # rm GameInstaller.exe
+        rm gameinstaller.zip
+         
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+         
+        # Restore screen resolution (game's default is 1024x768)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+              
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+       
+         
+elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
+        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
+        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
+        # APP_ANSWER=".EXE"
+        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
+       
+if [ "$APP_ANSWER" == ".EXE" ]; then
+        # Asking then installing local files of the game
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+        SETUP_EXE="$APP_ANSWER"
+        POL_Wine start /unix "$SETUP_EXE"
+        POL_Wine_WaitExit "$TITLE"
+               
+        # Restore screen resolution (game's default is 640x480 ?)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+               
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+         
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+  
+  
+elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
+       # Asking then installing local files of the game
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+        SETUP_EXE="$APP_ANSWER"
+        POL_Wine msiexec /i  "$SETUP_EXE"
+        POL_Wine_WaitExit "$TITLE"
+               
+        # Restore screen resolution (game's default is 640x480 ?)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+               
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+         
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+  
+elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
+        cd "$HOME"
+         
+        POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
+        cd "$POL_System_TmpDir"
+        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
+        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
+       
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+         
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+       
+elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
+        SETUP_EXE="$APP_ANSWER"
+        cd "$POL_System_TmpDir"
+        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
+        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+  
+fi
+fi
+         
+         
+################
+# Patch update #
+################
+    
+POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"     
+         
+if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
+        PATCH_EXE="$APP_ANSWER"
+        POL_Wine start /unix "$PATCH_EXE"
+        POL_Wine_WaitExit "$PATCH_EXE"
+fi
+          
+# POL_SetupWindow_message "$(eval_gettext '\nInstallation is finished ! :)')" "$TITLE"
+    
+# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
+          
+# Fail ?
+# POL_SetupWindow_message "$LNG_FIN" "$TITLE"
+         
 POL_System_TmpDelete
 POL_SetupWindow_Close
-exit 0
+exit 0
\ No newline at end of file

Nouveau code source

#!/bin/bash
# Date : (2014-09-18 00:12)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits
# Author : med_freeman
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions:  CD v1.3 .
#
# Middlewares used by this software : DirectX 6.
#
#
# CHANGELOG
# [med_freeman] (2014-09-18 00:12)
#   Initial script.
# [Dadu042] (2020-03-31 23-00)
#   Brand new script (add: install from local file).
#   Remove POL_Call POL_Install_dsound
#
# KNOWN ISSUES
#  - Wine x86 3.0.3, 4.0.3, 4.21, 5.5: game does need the CD (and does not see the ISO mounted). I found a NoCD but it fail to install.
#
# KNOWN ISSUES (FIXED):
#  - Wine x86 3.0.3: X

# 
  
[ "$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"
AUTHOR="med_freeman"
STEAM_ID=""
GAME_VMS="128"
SHORTCUT_FILENAME="ROGUE.EXE"
SOFTWARE_CATEGORIES="Game;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE="r*.txt"
        
# Starting the script
POL_SetupWindow_Init
                     
# Starting debugging API
POL_Debug_Init
    
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
  
# POL_SetupWindow_message "$(eval_gettext 'WARNING: this software does exist in Linux native version.\n\nThis script only allow to run the Windows version on Linux, please prefer the Linux edition for better 3D speed.')" "$TITLE"
  
# POL_SetupWindow_message "$(eval_gettext 'This game requires a fast 3D GPU (ie: Intel HD Graphics 4440 is not enough).')" "$TITLE"
  
POL_RequiredVersion "4.1.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
  
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
        
# Determine Architecture
# POL_System_SetArch "amd64"
POL_System_SetArch "x86"
    
# Downloading wine if necessary and creating prefix
POL_Wine_PrefixCreate "3.0.3"
  
POL_System_TmpCreate "$PREFIX"
         
Set_OS "win98"
         
#######################################
#  Installing mandatory dependencies  #
#######################################

# POL_Call POL_Install_corefonts
# POL_Call POL_Install_mfc42
# POL_Call POL_Install_directmusic
# POL_Call POL_Install_dsound
# POL_Call POL_Install_quartz
# POL_Call POL_Install_d3dx9_43
# POL_Call POL_Install_d3dcompiler_43
# POL_Call POL_Install_wininet
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_dotnet30sp1
# POL_Call POL_Install_mono5.20
# POL_Call POL_Install_dotnet20
# POL_Call POL_Install_dotnet40
# POL_Call POL_Install_dotnet472
# POL_Call POL_Install_dsound
# POL_Call POL_Install_riched30
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_d3dx11
# POL_Call POL_Install_mono210
             
             
################
#      GPU     #
################
         
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
          
# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver
           
# Useful for Nvidia GPUs
# POL_Call POL_Install_physx

#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
 [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
 [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
          
         
#######################################
#  Main part of this script           #
#######################################
             
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,CD"
  
POL_SetupWindow_message "Warning: do not install DirectX (nor icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
          
# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                  
elif [ "$INSTALL_METHOD" == "CD" ]; then
        POL_SetupWindow_cdrom
                  
        # POL_Call POL_Function_NoCDWarning
        POL_SetupWindow_check_cdrom "rogue"
        POL_Wine start /unix "$CDROM/SETUP.EXE"
                 
        POL_Wine_WaitExit "$TITLE"
              
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                 
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
          
          
elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
         
        POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo (from Archive.org).')" "$TITLE"
        POL_Download "https://ia800802.us.archive.org/14/items/StarWarsRogueSquadron3dDemo/ROGUEDEMO.EXE"
       
        mv ROGUEDEMO.EXE GameInstaller.exe
        # mv Teacher%20Simulator.rar gameinstaller.rar        
        # mv Facewound.zip gameinstaller.zip
       
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
         
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
         
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
          
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "setup.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
 
        # rm GameInstaller.exe
        rm gameinstaller.zip
         
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
              
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
       
         
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # APP_ANSWER=".EXE"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
       
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
               
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
               
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
  
elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
               
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
               
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
         
        POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
       
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
       
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
fi
fi
         
         
################
# Patch update #
################
    
POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"     
         
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi
          
# POL_SetupWindow_message "$(eval_gettext '\nInstallation is finished ! :)')" "$TITLE"
    
# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
          
# Fail ?
# POL_SetupWindow_message "$LNG_FIN" "$TITLE"
         
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

adg Dimanche 20 September 2015 à 22:54
adg Anonymous

Messages

Hello, it seems ftp.oktopod.tv is down

Réponses

Samedi 2 Janvier 2016 à 12:52
Yeah. I'll remake a better version of the script during this year, sry for the inconvenience.
med_freeman Mercredi 8 Octobre 2014 à 2:00
med_freeman

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

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

Nouveau code source

#!/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

Réponses

Mercredi 8 Octobre 2014 à 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 ?
Dimanche 17 Novembre 2019 à 15:54
Script approved. When a file is hard to find for download, just let the user install locally if he can find it.
med_freeman Dimanche 5 Octobre 2014 à 6:44
med_freeman

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

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

Nouveau code source

#!/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

Réponses

Dimanche 5 Octobre 2014 à 6:47
Installer was updated, https://github.com/medfreeman/RogueSquadron3DInstaller/blob/master/changelog.txt
Dimanche 5 Octobre 2014 à 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.
Dimanche 5 Octobre 2014 à 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.
Anonymous
Dimanche 5 Octobre 2014 à 11:28
Sorry but what is http://ftp.oktopod.tv?
Dimanche 5 Octobre 2014 à 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) ?
Anonymous
Dimanche 5 Octobre 2014 à 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
Lundi 6 Octobre 2014 à 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.
Lundi 6 Octobre 2014 à 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 ?
Anonymous
Lundi 6 Octobre 2014 à 18:22
What is embeded inside the installer appart from the official patch?
Lundi 6 Octobre 2014 à 18:43
The icon, the left banner i made, the top banner i made, and dxwebsetup.exe. That's all.
Anonymous
Lundi 6 Octobre 2014 à 23:12
Well you have to use the official installer. It's not legal to repackage it
Mardi 7 Octobre 2014 à 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..
Anonymous
Mardi 7 Octobre 2014 à 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 Dimanche 28 September 2014 à 17:20
med_freeman

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

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

Nouveau code source

#!/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

Réponses

Dimanche 28 September 2014 à 17:21
Here's the new version ! Highly simplified, all is done by the installer instead of the script.
Dimanche 28 September 2014 à 17:22
The assets are available here : https://github.com/medfreeman/playonlinux/tree/master/RogueSquadron3D/gfx
Dimanche 28 September 2014 à 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.
Dimanche 28 September 2014 à 17:25
Thanks !
Dimanche 28 September 2014 à 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
Anonymous
Lundi 29 September 2014 à 15:24
POL_Shortcut should not take "windows/system32/nglide_config.exe" as argument, but "nglide_config.exe"
Lundi 29 September 2014 à 16:19
Ok, i figured that out, but POL won't detect it..
Samedi 4 Octobre 2014 à 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 Samedi 20 September 2014 à 1:46
med_freeman

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

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

Nouveau code source

#!/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

Réponses

Samedi 20 September 2014 à 8:09
Why all those overriding functions?
Dimanche 21 September 2014 à 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.
Dimanche 21 September 2014 à 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.
Dimanche 21 September 2014 à 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.
Dimanche 21 September 2014 à 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.
Dimanche 21 September 2014 à 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.
Dimanche 21 September 2014 à 14:01
edit : to avoid complicating the playonlinux script
Dimanche 21 September 2014 à 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.
Dimanche 21 September 2014 à 16:28
What would you suggest ?
Jeudi 25 September 2014 à 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

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