Forums

[script] gog.com - constructor

best way to choose the folder dosbox mounts as C: ?

Auteur Réponses
Okto Dimanche 5 Octobre 2014 à 21:42
OktoAnonymous

I've made and added this script earlier as I want to try out the dosbox integration. It does a few useful/essential things for the user to setup the dosbox configuration. However, the one I'm wondering about most right now adds some entries which change the folder mounted as the C: drive. The game fails to load and complains it needs a system.ini file when the wine bottle's C: drive is mounted (the default), but works perfectly with the game folder mounted. Previous posts I found suggest it's not just a problem on my computer:

http://www.playonmac.com/en/topic-11727-Constructor_GoG_Version.html

So I added entires to autoexe.bat to unmount the default and then to mount the game folder. Works well it seems, but is there another (maybe simpler) way to choose the folder mounted with play on linux commands?

All other thoughts on other matters also equally welcome, I'm just focusing on this part of the integration as I couldn't find anything yet to suggest I can change it.

 

#!/bin/bash
# Date : (2014-10-5 00-30)
# Wine version used : 1.6.2
# Distribution used to test : OpenSuse 13.1
# Author : Benjamin Hardy

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="GOG.com - Constructor"
PREFIX="Constructor"
WORKING_WINE_VERSION="1.6.2-dos_support_0.6"
SHORTCUT_NAME="Constructor"
GOGID="constructor"

POL_SetupWindow_Init
POL_SetupWindow_SetID
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "System 3" "Retailer: www.gog.com" "Benjamin Hardy" "$PREFIX"

POL_Call POL_GoG_setup "$GOGID" "764f989d66969b3ffefcba3e3d15b281"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_GoG_install

#Creating dosbox configuration file

cat <<'_EOFCONFIG_' >> "$WINEPREFIX/playonlinux_dos.cfg"

sdl_fullscreen=true
sdl_fulldouble=false
sdl_fullresolution=original
sdl_windowresolution=original
sdl_output=overlay
sdl_autolock=true
sdl_sensitivity=85
sdl_waitonerror=true
sdl_priority=higher,normal
sdl_mapperfile=mapper.txt
sdl_usescancodes=true

dosbox_machine=svga_s3
dosbox_captures=capture
dosbox_memsize=32

render_frameskip=0
render_aspect=false
render_scaler=normal2x

cpu_core=auto
cpu_cputype=auto
cpu_cycles=max
cpu_cycleup=1000
cpu_cycledown=1000

mixer_nosound=false
mixer_rate=22050
mixer_blocksize=2048
mixer_prebuffer=80

sblaster_sbtype=sb16
sblaster_sbbase=220
sblaster_irq=5
sblaster_dma=1
sblaster_hdma=5
sblaster_sbmixer=true
sblaster_oplmode=auto
sblaster_oplemu=default
sblaster_oplrate=22050

#Dissabling dosbox emulation of features this game doesn't use (provides better speeds on slower computers)
joystick_joysticktype=none
gus_gus=false
speaker_pcspeaker=false
speaker_tandy=off
speaker_disney=false

_EOFCONFIG_

#The constructor folder, rather than the wine drive, must be mounted as C: to avoid a "cannot find system.ini" crash when loading game.exe
#const.gog is a CD image which must be mounted as a virtual D: drive

cat <<_EOFAUTOEXE_ > "$WINEPREFIX/drive_c/autoexec.bat"
mount -u c
mount c: "$WINEPREFIX/drive_c/GOG Games/Constructor"
imgmount D "$GOGROOT/Constructor/const.gog" -t iso -fs iso
_EOFAUTOEXE_

POL_Wine_reboot

POL_Shortcut "GAME.EXE" "$SHORTCUT_NAME" "" "" "Game;StrategyGame;"

POL_SetupWindow_Close
 
exit 0
petch Mardi 7 Octobre 2014 à 21:25
petch

However, the one I'm wondering about most right now adds some entries which change the folder mounted as the C: drive. The game fails to load and complains it needs a system.ini file when the wine bottle's C: drive is mounted (the default), but works perfectly with the game folder mounted. [...] So I added entires to autoexe.bat to unmount the default and then to mount the game folder. Works well it seems, but is there another (maybe simpler) way to choose the folder mounted with play on linux commands?

Well, the way I've been told how it works by Tinou, the new DOSBox support must be thought as an augmented Wine support, so for consistency C: maps to $WINEPREFIX/drive_c, always.

So with this constraint, I solved similar cases by moving the files around instead (example Ultima 4).

 
Okto Samedi 11 Octobre 2014 à 17:10
OktoAnonymous

Hi Pierre,

Thank you for your help. It makes sense for the two to match. I've altered  the insaller to do things this way now.

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