Mafia code test

cd-rom problems. (detection)

Auteur Réponses
lahtis Jeudi 28 Février 2013 à 12:40

I have making with new Mafia code test. I have big problems.

I am getting install first cd by
MafiaLauncher installer. Problem is a how to change second CD. First cd's installed if managed to wine cd-rom drive config by manually to the d:/media/user/MAFIA_CD_1/ but how to changed the cd 2? and how to changed the usernames?

Mafia game is 3 cd's.

user is my username (whoami) in ubuntu 12.10

I did this in this way because POL_SetupWindow_cdrom and
POL_SetupWindow_check_cdrom not working my system.

# Date : (2013-02-26)
# Last revision : (2013-02-26)
# Distribution used to test : Ubuntu 12.10, Nvidia geforce 9800 GT
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.1.9
# CD-version Mafia installer
[-z "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
EDITOR="Illusion Softworks"

POL_GetSetupImages "$PREFIX/top.jpg" "$PREFIX/left.jpg" "$TITLE"
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WINEVERSION"
# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"

# Asking about memory size of graphic card

# Select virtual desktop mode on
Set_Desktop On 1024 768

# Downloading and install MS Visual C++ 6 sp4 libraries
POL_Call POL_Install_vcrun6

# downloading and install mfc42.dll
POL_Call POL_Install_mfc42

POL_SetupWindow_browse "Please select the installation MafiaLauncher.exe file to CD-ROM." "$TITLE installation"
POL_SetupWindow_wait "Installation in progress." "$TITLE installation"
POL_Wine start /unix "$APP_ANSWER" || POL_Debug_Fatal "$(eval_gettext 'Error while installing game.')"
POL_Wine_WaitExit "$TITLE"
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')"
exit 0

do I change my cd-rom Wine settings
with code?
i do not know whoami command working in playonlinux?
And how to manipulate to winecfg to managed three cd's?

# How to edit usernames and three cd's
# Ubuntu 12.10 use whoami name in cdrom names
whoami "$WHOAMI"

$CDSOURCE1 "/media/$WHOAMI/Mafia_CD_1"
$CDSOURCE2 "/media/$WHOAMI/Mafia_CD_2"
$CDSOURCE3 "/media/$WHOAMI/Mafia_CD_3"

# Adding CD-ROM as drive d: to winecfg
cd "$WINEPREFIX/dosdevices"
ln -fs $CDROM d:
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]" > cdrom.reg
echo "\\"d:\\"=\\"cdrom\\"" >> cdrom.reg
regedit cdrom.reg

Edité par lahtis

Using Ubuntu 18.04.4 LTS and latest Playonlinux.
My scripts:
petch Jeudi 28 Février 2013 à 12:56

It seems you're trying to work around bug #1893...
My advice: don't. It's not each script concern to work around Ubuntu Quantal changes.
Of course the alternative requires a new version of PlayOnLinux to be released, and there's no release date announced yet, but that's the only sane solution.
I don't know a thing about problems with CDROM switching however, I never use CDROMs.
It would be very interesting to check how development version behaves, see if that's a problem caused by this first one, or if there's in reality 2 separate problems to fix.

To try the development version: follow instructions on the download page on how to get it (git cloning), then start playonlinux from git workspace directory.
lahtis Jeudi 28 Février 2013 à 17:16

Maybe I should not do this yet. Will be made later....

Using Ubuntu 18.04.4 LTS and latest Playonlinux.
My scripts: