The forum

Empire Earth I -- test script

directory not found

Author Replies
Jump to the page: 1 - 2
realta_taisteal Sunday 4 December 2011 at 9:20
realta_taistealAnonymous

I'm trying to create a script for 'Empire Earth I'. I figured out it's a basic file not found problem. The script has an error. I used the simplest GOG script and modified it. If I click on the empire earth icon. The debugger gives directory not found. The install works fine, all the files are there.

What did I do wrong?



#!/bin/bash
if [ "$PLAYONLINUX" = "" ]; then
exit 0
fi
source "$PLAYONLINUX/lib/sources"

POL_SetupWindow_Init
POL_SetupWindow_presentation "EmpireEarth" "Real Steel Studios" "http://fallout.bethsoft.com/" "username" "EmpireEarth"


select_prefix "$REPERTOIRE/wineprefix/EmpireEarth/"
POL_SetupWindow_prefixcreate
cd $HOME
POL_SetupWindow_browse "Plese select the location of the install file" "Select file"

POL_SetupWindow_wait_next_signal "Installing EmpireEarth..." "EmpireEarth"
wine $APP_ANSWER

POL_SetupWindow_detect_exit

POL_SetupWindow_reboot


POL_SetupWindow_make_shortcut "EmpireEarth" "Program Files/GOG.com/Empire Earth Gold Edition/EmpireEarth/" "Empire Earth.exe" "" "EmpireEarth"

POL_SetupWindow_Close
exit[code language=playonlinux]

Edited by realta_taisteal

petch Sunday 4 December 2011 at 21:42
petch

I'm still learning POL scripting, so, for what it's worth:
Some things in your script are deprecated (POL v.3 stuff, really), like you should use POL_Wine_SelectPrefix "EmpireEarth" instead of select_prefix...

But since you said the game seems to have been deployed correctly, I suppose it's still ok (until some deprecated things are totally removed...)

I wonder it you could show the content of the shortcut file, that is,
~/.PlayOnLinux/shortcuts/EmpireEarth ?
Hopefully it can give a clue about what is this directory that cannot be found...

Pierre.
realta_taisteal Sunday 4 December 2011 at 22:22
realta_taistealAnonymous

I corrected the script. There no way to copy and paste the debugger text. I have to send to pastebin and it's a hassle. There needs to be a copy and paste in the debugger.

#!/bin/bash
if [ "$PLAYONLINUX" = "" ]; then
exit 0
fi
source "$PLAYONLINUX/lib/sources"

POL_SetupWindow_Init
POL_SetupWindow_presentation "EmpireEarth" "Real Steel Studios" "http://fallout.bethsoft.com/" "username" "EmpireEarth"


POL_Wine_SelectPrefix "EmpireEarth"
POL_SetupWindow_prefixcreate
cd $HOME
POL_SetupWindow_browse "Plese select the location of the install file" "Select file"

POL_SetupWindow_wait_next_signal "Installing EmpireEarth..." "EmpireEarth"
wine $APP_ANSWER

POL_SetupWindow_detect_exit

POL_SetupWindow_reboot


POL_SetupWindow_make_shortcut "EmpireEarth" "Program Files/GOG.com/Empire Earth Gold Edition/EmpireEarth/" "Empire Earth.exe" "" "EmpireEarth"

POL_SetupWindow_Close
exit


File :EmpireEarth
Date : 12/05/11 13:15:30
PlayOnLinux Version : 4.0.14
File content :
    #!/bin/bash
    [ "$PLAYONLINUX" = "" ] \\&\\& exit 0
    source "$PLAYONLINUX/lib/sources"
    export WINEPREFIX="/home/username/.PlayOnLinux//wineprefix/EmpireEarth"
    export WINEDEBUG=""
    cd "/home/username/.PlayOnLinux//wineprefix/EmpireEarth/drive_c/Program Files/GOG.com/Empire Earth Gold Edition/EmpireEarth/"
    POL_Wine "Empire Earth.exe"  $@
    

Output :
12/05/11 13:15:30 - [main] Message: Debugger is starting
EmpireEarth: line 6: cd: /home/username/.PlayOnLinux//wineprefix/EmpireEarth/drive_c/Program Files/GOG.com/Empire Earth Gold Edition/EmpireEarth/: No such file or directory
[POL_Wine] Message: Running wine- Empire Earth.exe
wine: cannot find 'Empire Earth.exe'
[POL_Wine] Message: Wine return: 2

Other :

Using 'program files (x86)' gives the same error.


Edited by realta_taisteal

petch Monday 5 December 2011 at 17:50
petch

The shortcut file looks ok, so, I suppose the directory
/home/alex/.PlayOnLinux//wineprefix/EmpireEarth/drive_c/Program Files/GOG.com/Empire Earth Gold Edition/EmpireEarth/
really doesn't exist (seems ok at least 'til GOG.com, can't tell for the end of the path) and need to be adjusted?
realta_taisteal Monday 5 December 2011 at 21:45
realta_taistealAnonymous

/home/username/.PlayOnLinux//wineprefix/EmpireEarth/drive_c/Program Files/GOG.com/Empire Earth Gold Edition/EmpireEarth/

// has to be an error. That must be the problem. How to fix it??

Look at the other gog scripts. There must be a clue there.

Search: gog

Edited by realta_taisteal

petch Wednesday 7 December 2011 at 16:54
petch

// should not be a problem, it's explicitly stated in POSIX norm that multiple consecutive slashes in paths have the same meaning as one...
realta_taisteal Wednesday 7 December 2011 at 22:31
realta_taistealAnonymous

Note: username hidden for privacy

The installer shows this:
C:\\Program Files (x86)\\GOG.com\\Empire Earth Gold Edition

-----------------------------------------------------------------------------------
This is the location of EE-AOC and filename.

/home/[username]/.PlayOnLinux/wineprefix/EmpireEarth/drive_c/Program Files (x86)/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest/

EE-AOC.exe
-----------------------------------------------------------------------------------

This is the location of EE and filename:
----------------------------------------------------------------------------------
/home/[username]/.PlayOnLinux/wineprefix/EmpireEarth/drive_c/Program Files (x86)/GOG.com/Empire Earth Gold Edition/Empire Earth/

Empire Earth.exe
-----------------------------------------------------------------------------------

Does this help?

realta_taisteal Friday 9 December 2011 at 3:08
realta_taistealAnonymous


#!/bin/bash
if [ "$PLAYONLINUX" = "" ]; then
exit 0
fi
source "$PLAYONLINUX/lib/sources"

POL_SetupWindow_Init
POL_SetupWindow_presentation "EmpireEarth" "Real Steel Studios" "http://fallout.bethsoft.com/" "username" "EmpireEarth"


POL_Wine_SelectPrefix "EmpireEarth"
POL_SetupWindow_prefixcreate
cd '$HOME'
POL_SetupWindow_browse "Plese select the location of the install file" "Select file"

POL_SetupWindow_wait_next_signal "Installing EmpireEarth..." "EmpireEarth"
WINEDLLOVERRIDES=winemenubuilder.exe=d wine $APP_ANSWER

POL_SetupWindow_detect_exit

POL_SetupWindow_reboot


POL_SetupWindow_make_shortcut "EmpireEarth" "/Program Files (x86)/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest/" "EE-AOC.exe" "" "EmpireEarth"

POL_SetupWindow_Close
exit


It works. Now, I get this. I'm looking for solution to my new problem. winemenubuilder.exe not found. Looking for the solution, nothing useful.

petch Monday 12 December 2011 at 20:54
petch

From what I understand, in PlayOnLinux, winemenubuilder is disabled so that installations don't create entries in your environment menu; It's up to the script to create desired shortcuts in PlayOnLinux.
realta_taisteal Tuesday 13 December 2011 at 7:01
realta_taistealAnonymous

Script Update:


#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

# Setting the variables
TITLE="GOG - Empire Earth Gold Edition"
PREFIX="EmpireEarth"
WORKING_WINE_VERSION="1.3.34"

DEVELOPER="Stainless Steel Studios/Mad Doc Software"
SCRIPTCREATOR="Realta Taisteal"
COMPANYSITE="http://www.gog.com/en/gamecard/empire_earth_gold_edition"
SHORTCUT_NAME_BASIC="Empire Earth"
SHORTCUT_NAME_AOC="Empire Earth AOC"


# Starting the script
POL_SetupWindow_Init

POL_SetupWindow_presentation "$TITLE" "$DEVELOPER" "$COMPANYSITE" "$SCRIPTCREATOR" "$PREFIX"

select_prefix "$POL_USER_ROOT/wineprefix/$PREFIX/"

# Downloading specific Wine
if [ "$MACHTYPE" == "x86_64-pc-linux-gnu" ]; then
     POL_Call POL_Install_wine64b
else
     POL_SetupWindow_install_wine "$WORKING_WINE_VERSION"
fi
Use_WineVersion "$WORKING_WINE_VERSION"

# Creating prefix
POL_SetupWindow_prefixcreate


cd $HOME
POL_SetupWindow_browse "Plese select the location of the install file" "Select file"

POL_SetupWindow_wait_next_signal "Installing EmpireEarth..." "$PREFIX"
wine $APP_ANSWER

POL_SetupWindow_detect_exit

#POL_SetupWindow_reboot

# Making Shortcut
POL_SetupWindow_auto_shortcut "$PREFIX" "EE-AOC.exe" "$TITLE" "FarCry2.xpm" ""
Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"

POL_SetupWindow_Close
exit


It's there, check.


File :GOG - Empire Earth Gold Edition
Date : 12/13/11 21:53:56
PlayOnLinux Version : 4.0.14
File content :
#!/bin/bash
[ "$PLAYONLINUX" = "" ] \\&\\& exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/username/.PlayOnLinux//wineprefix/EmpireEarth"
export WINEDEBUG=""
cd "/home/username/.PlayOnLinux//wineprefix/EmpireEarth/drive_c/./Program Files/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest"
POL_Wine "EE-AOC.exe"  $@

Output :
12/13/11 21:53:56 - [main] Message: Debugger is starting
[POL_Wine_SetVersionEnv] Message: Setting wine version path: 1.3.34, x86
[POL_Wine_SetVersionEnv] Message: "/home/username/.PlayOnLinux//wine/linux-x86/1.3.34" exists
[POL_Wine] Message: Running wine-1.3.34 EE-AOC.exe
wine: cannot find L"C:\\\\windows\\\\system32\\\\winemenubuilder.exe"
err:wineboot:ProcessRunKeys Error running cmd L"C:\\\\windows\\\\system32\\\\winemenubuilder.exe -a -r" (2)
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f2d0,0x00000000), stub!
err:wgl:internal_SetPixelFormat Invalid operation on root_window
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f2d0,0x00000000), stub!
err:wgl:internal_SetPixelFormat Invalid operation on root_window
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f218,0x00000000), stub!
err:wgl:internal_SetPixelFormat Invalid operation on root_window
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f218,0x00000000), stub!
err:wgl:internal_SetPixelFormat Invalid operation on root_window
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f2e8,0x00000000), stub!
fixme:imm:ImmReleaseContext (0xe005a, 0x389de48): stub
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 32 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 32 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
err:dmloader:IDirectMusicLoaderImpl_IDirectMusicLoader_SetObject : could not attach stream to file
fixme:dmime:IDirectMusicPerformance8Impl_Init (iface = 0xdf4d978, dmusic = 0x32fb64, dsound = 0x3914770, hwnd = (nil))
fixme:dmusic:IDirectMusicPortImpl_SetNumChannelGroups (0xdf4dce0, 8): semi-stub
fixme:dmime:IDirectMusicPerformance8Impl_AddPort (0xdf4d978, 0xdf4dce0): stub
fixme:dmime:IDirectMusicPerformance8Impl_AssignPChannelBlock (0xdf4d978, 0, 0xdf4dce0, 0): semi-stub
fixme:dmime:IDirectMusicPerformance8Impl_AssignPChannelBlock (0xdf4d978, 1, 0xdf4dce0, 1): semi-stub
fixme:dmime:IDirectMusicPerformance8Impl_AssignPChannelBlock (0xdf4d978, 2, 0xdf4dce0, 2): semi-stub
fixme:dmime:IDirectMusicPerformance8Impl_AssignPChannelBlock (0xdf4d978, 3, 0xdf4dce0, 3): semi-stub
fixme:dmime:IDirectMusicPerformance8Impl_AssignPChannelBlock (0xdf4d978, 4, 0xdf4dce0, 4): semi-stub
fixme:dmime:IDirectMusicPerformance8Impl_AssignPChannelBlock (0xdf4d978, 5, 0xdf4dce0, 5): semi-stub
fixme:dmime:IDirectMusicPerformance8Impl_AssignPChannelBlock (0xdf4d978, 6, 0xdf4dce0, 6): semi-stub
fixme:dmime:IDirectMusicPerformance8Impl_AssignPChannelBlock (0xdf4d978, 7, 0xdf4dce0, 7): semi-stub
fixme:dmusic:IDirectMusic8Impl_Activate (0x3912940, 1): stub
fixme:dmime:IDirectMusicPerformance8Impl_SetNotificationHandle (0xdf4d978, 0x108, 0x0): stub
fixme:dmime:IDirectMusicPerformance8Impl_AddNotificationType (0xdf4d978, GUID_NOTIFICATION_PERFORMANCE): stub
fixme:dmime:IDirectMusicPerformance8Impl_AddNotificationType (0xdf4d978, GUID_NOTIFICATION_SEGMENT): stub
wine: Unhandled page fault on read access to 0x00000004 at address 0xacd8be (thread 0009), starting debugger...
/home/username/playonlinux/lib/wine.lib: line 397: 12872 Terminated wine "$@"
[POL_Wine] Message: Wine return: 143

Other :

Edited by realta_taisteal

petch Tuesday 13 December 2011 at 20:52
petch

Maybe it needs native DirectMusic libs?
Add
POL_Call POL_Install_directmusic
to you script and see...
realta_taisteal Wednesday 14 December 2011 at 1:12
realta_taistealAnonymous

Maybe it needs native DirectMusic libs?
Add
POL_Call POL_Install_directmusic
to you script and see...

Quote from petch



#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

# Setting the variables
TITLE="GOG - Empire Earth Gold Edition"
PREFIX="EmpireEarth"
WORKING_WINE_VERSION="1.3.34"

DEVELOPER="Stainless Steel Studios/Mad Doc Software"
SCRIPTCREATOR="Realta Taisteal"
COMPANYSITE="http://www.gog.com/en/gamecard/empire_earth_gold_edition"
SHORTCUT_NAME_BASIC="Empire Earth"
SHORTCUT_NAME_AOC="Empire Earth AOC"


# Starting the script
POL_SetupWindow_Init

POL_SetupWindow_presentation "$TITLE" "$DEVELOPER" "$COMPANYSITE" "$SCRIPTCREATOR" "$PREFIX"

select_prefix "$POL_USER_ROOT/wineprefix/$PREFIX/"

# Downloading specific Wine
if [ "$MACHTYPE" == "x86_64-pc-linux-gnu" ]; then
     POL_Call POL_Install_wine64b
else
     POL_SetupWindow_install_wine "$WORKING_WINE_VERSION"
fi
Use_WineVersion "$WORKING_WINE_VERSION"

# Creating prefix
POL_SetupWindow_prefixcreate

#POL_Install_d3dx9
POL_Call POL_Install_directmusic

cd "$HOME"
POL_SetupWindow_browse "Please select the location of the install file" "$TITLE" "setup_empire_earth_gold.exe"
SETUP_EXE="$APP_ANSWER"
POL_SetupWindow_wait_next_signal "$LNG_INSTALL_ON" "$TITLE"
wine start /unix "$SETUP_EXE"
wineserver -w
POL_SetupWindow_detect_exit


#POL_SetupWindow_reboot

# Making Shortcut
POL_SetupWindow_auto_shortcut "$PREFIX" "Empire Earth.exe" "$SHORTCUT_NAME_BASIC" "" ""
#POL_SetupWindow_auto_shortcut "$PREFIX" "EE-AOC.exe" "$SHORTCUT_NAME_AOC" "" ""

Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"

POL_SetupWindow_Close
exit



File :Empire Earth
Date : 12/14/11 16:06:24
PlayOnLinux Version : 4.0.14
File content :
#!/bin/bash
[ "$PLAYONLINUX" = "" ] \\&\\& exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/alex/.PlayOnLinux//wineprefix/EmpireEarth"
export WINEDEBUG=""
cd "/home/alex/.PlayOnLinux//wineprefix/EmpireEarth/drive_c/./Program Files/GOG.com/Empire Earth Gold Edition/Empire Earth"
POL_Wine "Empire Earth.exe"  $@

Output :
12/14/11 16:06:24 - [main] Message: Debugger is starting
[POL_Wine_SetVersionEnv] Message: Setting wine version path: 1.3.34, x86
[POL_Wine_SetVersionEnv] Message: "/home/alex/.PlayOnLinux//wine/linux-x86/1.3.34" exists
[POL_Wine] Message: Running wine-1.3.34 Empire Earth.exe
wine: cannot find L"C:\\\\windows\\\\system32\\\\winemenubuilder.exe"
err:wineboot:ProcessRunKeys Error running cmd L"C:\\\\windows\\\\system32\\\\winemenubuilder.exe -a -r" (2)
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f334,0x00000000), stub!
err:wgl:internal_SetPixelFormat Invalid operation on root_window
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f334,0x00000000), stub!
err:wgl:internal_SetPixelFormat Invalid operation on root_window
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f27c,0x00000000), stub!
err:wgl:internal_SetPixelFormat Invalid operation on root_window
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f27c,0x00000000), stub!
err:wgl:internal_SetPixelFormat Invalid operation on root_window
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000007 not handled
fixme:win:EnumDisplayDevicesW ((null),0,0x32f34c,0x00000000), stub!
fixme:imm:ImmReleaseContext (0xe005a, 0x18e9c0): stub
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 32 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 32 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 10000 channels, pretending there's only 2 channels
err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\\\windows\\\\system32\\\\dmloader.dll"
err:ole:CoGetClassObject no class object {d2ac2892-b39b-11d1-8704-00600893b1bd} could be created for context 0x3
fixme:d3d:wined3d_device_decref Device released with resources still bound, acceptable but unexpected.
fixme:d3d:wined3d_device_decref Leftover resource 0x1b0a78 with type WINED3DRTYPE_BUFFER (0x6).
err:mmtime:TIME_MMTimeStop Timer still active?!
[POL_Wine] Message: Wine return: 3

Other :
petch Wednesday 14 December 2011 at 8:16
petch


Since the game is available for free for a short while on gog, I took it and give it a try, and obviously saw the same problem. On WineHQ there's a suggestion of totally disabling DirectMusic in the game (thru registry), by then the game starts, I see logos and introduction video, then I get the main menu with a very slow mouse and pointer leaving lots of graphic garbage... and it seems nobody has a solution yet for that.
realta_taisteal Wednesday 14 December 2011 at 22:04
realta_taistealAnonymous

I tried to disable direct music. I couldn't find the registry entry. Where is it? I'v googled the problem on the internet. It offered some solutions for other games. Can you take a look at them?

The earlier versions of wine worked according to the APP database on winehq. Once, I get it running. I'll try other wine versions.

http://appdb.winehq.org/objectManager.php?sClass=version&iId=2174

I don't think directmusic is installing. I didn't see it downloading. I'm going to try it manually(no POL_call).

Also, I want to install everything POL can install, everything. Where the complete install list?

POL_Call POL_Install_d3dx10
POL_Call POL_Install_d3dx11
POL_Call POL_Install_d3dx9
POL_Call POL_Install_devenum
POL_Call POL_Install_dinput
POL_Call POL_Install_dinput8
POL_Call POL_Install_directmusic
POL_Call POL_Install_directplay
POL_Call POL_Install_directx9
POL_Call POL_Install_dsound
POL_Call POL_Install_quartz





Edited by realta_taisteal

petch Friday 16 December 2011 at 9:59
petch

Here's the script I came up with for GoG release of Empire Earth: Gold Edition (again, the result is far from being playable):
https://raw.github.com/petchema/playonlinux/dev/broken/empireearth-gog
#!/bin/bash
# Date : (2012-12-14 02-03)
# Last revision : (2011-12-14 02-03)
# Wine version used : 1.3.34
# Distribution used to test : Debian Sid (Unstable)
# Author : Pierre Etchemaite petchema@concept-micro.com
# Script licence : GPL v.2
# Program licence : Retail
# Depend :

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

check_install_archive () {
    FILE="$1"
    EXPECTED_NAME="$2"
    EXPECTED_SIZE="$3"
    EXPECTED_MD5="$4"

    POL_SetupWindow_wait "$(eval_gettext 'Checking install archive...')" "$TITLE"
    # Temporarily prevent word splitting
    OLDIFS="$IFS"
    IFS=''
    NAME="$(basename $FILE)"
    SIZE="$(stat -c%s $FILE)"
    MD5="$(POL_MD5_file $FILE)"
    IFS="$OLDIFS"

    if [ $SIZE -ne $EXPECTED_SIZE -o "$MD5" != "$EXPECTED_MD5" ]; then
        POL_Debug_Error "$(eval_gettext 'Install archive mismatch.\\nEither your install archive is corrupted, or is not the expected version.\\nThis script cannot guarantee that installation will work correctly. Please report success or failure to PlayOnLinux forums.')\\n$(eval_gettext 'Name:') $NAME ($(eval_gettext 'expected') $EXPECTED_NAME)\\n$(eval_gettext 'Size:') $SIZE ($(eval_gettext 'expected') $EXPECTED_SIZE)\\n$(eval_gettext 'MD5:') $MD5\\n     ($(eval_gettext 'expected') $EXPECTED_MD5)"
        POL_SetupWindow_question "$(eval_gettext 'Continue?')" "$TITLE"
        [ "$APP_ANSWER" != "TRUE" ] && POL_Debug_Fatal "$(eval_gettext 'Not the expected archive')"
    fi
}


PREFIX="EmpireEarth_gog"
WORKING_WINE_VERSION="1.3.34"

TITLE="$(eval_gettext 'Empire Earth: Gold Edition (GoG release)')"
SHORTCUT_NAME1="Empire Earth"
SHORTCUT_DOC1="$SHORTCUT_NAME1 - $(eval_gettext 'Manual')"
SHORTCUT_DOC_TECHTREE1="$SHORTCUT_NAME1 - $(eval_gettext 'Technology tree')"
SHORTCUT_DOC_EDITOR1="$SHORTCUT_NAME1 - $(eval_gettext 'Scenario editor manual')"
SHORTCUT_NAME2="Empire Earth: The Art of Conquest"
SHORTCUT_DOC2="$SHORTCUT_NAME2 - $(eval_gettext 'Manual')"
SHORTCUT_DOC_TECHTREE2="$SHORTCUT_NAME2 - $(eval_gettext 'Technology tree')"
SHORTCUT_README2="$SHORTCUT_NAME2 - $(eval_gettext 'Readme')"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Stainless Steel Studios / Rebellion" "http://www.gog.com/en/gamecard/empire_earth_gold_edition" "Pierre Etchemaite" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

cd $HOME
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
ARCHIVE="$APP_ANSWER"

check_install_archive "$ARCHIVE" setup_empire_earth_gold.exe 564162686 1d5c5587ab26488b3a38f1ba288ce89a


POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"

# Associate .PDF with native app
# http://wiki.winehq.org/FAQ#head-91bf3f0a8ccbfab8dee96f82fae2f1a489e0d243
# Do it before installing the game, so you have the possibility to open
# PDFs with Win32 reader if you choose to install it
cat <<'_EOF_' > $REPERTOIRE/tmp/pdfnativereader.reg
[HKEY_CLASSES_ROOT\\.pdf]
@="PDFfile"
"Content Type"="application/pdf"
[HKEY_CLASSES_ROOT\\PDFfile\\Shell\\Open\\command]
@="winebrowser \\"%1\\""
_EOF_
POL_Wine regedit $REPERTOIRE/tmp/pdfnativereader.reg

POL_Wine_InstallFonts

POL_Wine start /unix "$ARCHIVE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')"

POL_Wine_WaitExit "$TITLE"

POL_Call POL_install_vcrun6

cat <<_EOFINI_ > "$REPERTOIRE/tmp/disable_directmusic.reg"
REGEDIT4

[HKEY_CURRENT_USER\\Software\\SSSI\\Empire Earth]
"Music Enabled"=dword:00000000
_EOFINI_
POL_Wine regedit "$REPERTOIRE/tmp/disable_directmusic.reg"
rm "$REPERTOIRE/tmp/disable_directmusic.reg"

# GoG work!?
Set_OS win2k

POL_SetupWindow_VMS "4"

POL_Wine_X11Drv "DXGrab" "Y"
POL_Wine_X11Drv "GrabFullScreen" "Y"

## PlayOnMac Section
[ -n "$PLAYONMAC" ] && Set_SoundDriver "alsa"
[ -n "$PLAYONMAC" ] || Set_Managed "Off"
## End Section

# Doesn't hurt ;)
POL_Wine_reboot

POL_Shortcut "Empire Earth.exe" "$SHORTCUT_NAME1"
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME1" "POL_Wine_AutoSetVersionEnv\\nwineserver -k\\nnice -19 wineserver"
POL_Shortcut "start.exe" "$SHORTCUT_DOC1" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth/Manual.pdf'"
POL_Shortcut "start.exe" "$SHORTCUT_DOC_TECHTREE1" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth/technology_tree.pdf'"
POL_Shortcut "start.exe" "$SHORTCUT_DOC_EDITOR1" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth/scenario_editor_manual.pdf'"

POL_Shortcut "EE-AOC.exe" "$SHORTCUT_NAME2"
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME2" "POL_Wine_AutoSetVersionEnv\\nwineserver -k\\nnice -19 wineserver"
POL_Shortcut "start.exe" "$SHORTCUT_README2" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest/readme.txt'"
POL_Shortcut "start.exe" "$SHORTCUT_DOC2" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest/manual_aoc.pdf'"
POL_Shortcut "start.exe" "$SHORTCUT_DOC_TECHTREE2" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest/technology_tree_aoc.pdf'"

POL_SetupWindow_Close
exit


To see all what POL_Call can call, open "Supported software", then "Functions":
http://www.playonmac.com/repository/?cat=100

Edited by petch

realta_taisteal Friday 16 December 2011 at 21:57
realta_taistealAnonymous

Thanks for the assist. Since I started it, you helped, this is a co-credit project. I'll test it more and some more finishing work. There might be a way to get direct music working. Can you comment it more? There is lot I don't understand.

>POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"

I have simpler version of this line. Please explain.

The mouse point garbage and other problems were in the nvidia driver for windows as well till they fixed it. I'v read about similar mouse problems on the google search. They mentioned mouse acceleration.

I need to understand the whole project so I use this info to get "Nexus the Jupiter Incident" game working.

Also, it's Stainless Steel Studios Basic / Mad-DOC software -- Sierra Entertainment
distributed by GOG games.

I'm able to run it, but for some reason. I can't break out with control-alt-escape.

In suse, use alt-tab to bring up another window. Don't cross the wine window with your mouse, it will lock again. Move the window near the bar at the bottom of your screen. Then try to use control-alt-esc on wine to end program.

google: linux wine "mouse frozen"
http://appdb.winehq.org/appview.php?iVersionId=3696

Relative vs Absolute positioning of mouse
http://wiki.winehq.org/Bug6971

This offers a dirty hack patch to wine that might fix the problem.
http://www.playonmac.com/en/topic-3718-WineBuild_Demand.html
This looks promising.

http://www.playonmac.com/en/page-19-PlayOnLinux_script_functions_reference.html
WineCFG

Direct Input for mouse
http://wiki.winehq.org/DInput

Related wine source code
http://www.winehq.org/pipermail/wine-bugs/2006-March/027503.html

You can move the mouse, but it takes very large movements. Maybe changing wine mouse sensitivity.






Edited by realta_taisteal

realta_taisteal Friday 16 December 2011 at 23:34
realta_taistealAnonymous


#!/bin/bash
# Date : (2012-12-14 02-03)
# Last revision : (2011-12-14 02-03)
# Wine version used : 1.3.34
# Distribution used to test : Debian Sid (Unstable), Suse 12.1-kde
# Authors : Pierre Etchemaite petchema@concept-micro.com, realta_taisteal
# Script licence : GPL v.2
# Program licence : Retail
# Depend :

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

check_install_archive () {
FILE="$1"
EXPECTED_NAME="$2"
EXPECTED_SIZE="$3"
EXPECTED_MD5="$4"

POL_SetupWindow_wait "$(eval_gettext 'Checking install archive...')" "$TITLE"
# Temporarily prevent word splitting
OLDIFS="$IFS"
IFS=''
NAME="$(basename $FILE)"
SIZE="$(stat -c%s $FILE)"
MD5="$(POL_MD5_file $FILE)"
IFS="$OLDIFS"

if [ $SIZE -ne $EXPECTED_SIZE -o "$MD5" != "$EXPECTED_MD5" ]; then
POL_Debug_Error "$(eval_gettext 'Install archive mismatch.\\nEither your install archive is corrupted, or is not the expected version.\\nThis script cannot guarantee that installation will work correctly. Please report success or failure to PlayOnLinux forums.')\\n$(eval_gettext 'Name:') $NAME ($(eval_gettext 'expected') $EXPECTED_NAME)\\n$(eval_gettext 'Size:') $SIZE ($(eval_gettext 'expected') $EXPECTED_SIZE)\\n$(eval_gettext 'MD5:') $MD5\\n ($(eval_gettext 'expected') $EXPECTED_MD5)"
POL_SetupWindow_question "$(eval_gettext 'Continue?')" "$TITLE"
[ "$APP_ANSWER" != "TRUE" ] && POL_Debug_Fatal "$(eval_gettext 'Not the expected archive')"
fi
}


PREFIX="EmpireEarth_gog"
WORKING_WINE_VERSION="1.3.34"

TITLE="$(eval_gettext 'Empire Earth: Gold Edition (GoG release)')"
SHORTCUT_NAME1="Empire Earth"
SHORTCUT_DOC1="$SHORTCUT_NAME1 - $(eval_gettext 'Manual')"
SHORTCUT_DOC_TECHTREE1="$SHORTCUT_NAME1 - $(eval_gettext 'Technology tree')"
SHORTCUT_DOC_EDITOR1="$SHORTCUT_NAME1 - $(eval_gettext 'Scenario editor manual')"
SHORTCUT_NAME2="Empire Earth: The Art of Conquest"
SHORTCUT_DOC2="$SHORTCUT_NAME2 - $(eval_gettext 'Manual')"
SHORTCUT_DOC_TECHTREE2="$SHORTCUT_NAME2 - $(eval_gettext 'Technology tree')"
SHORTCUT_README2="$SHORTCUT_NAME2 - $(eval_gettext 'Readme')"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Stainless Steel Studios / Mad Doc Software" "http://www.gog.com/en/gamecard/empire_earth_gold_edition" "Pierre Etchemaite" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

#Set_Desktop
#Arguments:
#1 = "On/Off"
#2 = "Width" *
#3 = "Height" *

Set_Desktop "On" "1024" "768"

Set_DXGrab "On"

cd $HOME
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "setup_empire_earth_gold.exe"
ARCHIVE="$APP_ANSWER"

check_install_archive "$ARCHIVE" setup_empire_earth_gold.exe 564162686 1d5c5587ab26488b3a38f1ba288ce89a


POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"

# Associate .PDF with native app
# http://wiki.winehq.org/FAQ#head-91bf3f0a8ccbfab8dee96f82fae2f1a489e0d243
# Do it before installing the game, so you have the possibility to open
# PDFs with Win32 reader if you choose to install it
cat <<'_EOF_' > $REPERTOIRE/tmp/pdfnativereader.reg
[HKEY_CLASSES_ROOT\\.pdf]
@="PDFfile"
"Content Type"="application/pdf"
[HKEY_CLASSES_ROOT\\PDFfile\\Shell\\Open\\command]
@="winebrowser \\"%1\\""
_EOF_
POL_Wine regedit $REPERTOIRE/tmp/pdfnativereader.reg

POL_Wine_InstallFonts

POL_Wine start /unix "$ARCHIVE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')"

POL_Wine_WaitExit "$TITLE"

POL_Call POL_install_vcrun6

cat <<_EOFINI_ > "$REPERTOIRE/tmp/disable_directmusic.reg"
REGEDIT4

[HKEY_CURRENT_USER\\Software\\SSSI\\Empire Earth]
"Music Enabled"=dword:00000000
_EOFINI_
POL_Wine regedit "$REPERTOIRE/tmp/disable_directmusic.reg"
rm "$REPERTOIRE/tmp/disable_directmusic.reg"

# GoG work!?
Set_OS win2k

POL_SetupWindow_VMS "4"

POL_Wine_X11Drv "DXGrab" "Y"
POL_Wine_X11Drv "GrabFullScreen" "Y"

## PlayOnMac Section
[ -n "$PLAYONMAC" ] && Set_SoundDriver "alsa"
[ -n "$PLAYONMAC" ] || Set_Managed "Off"
## End Section

# Doesn't hurt ;)
POL_Wine_reboot

POL_Shortcut "Empire Earth.exe" "$SHORTCUT_NAME1"
#POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME1" "POL_Wine_AutoSetVersionEnv\\nwineserver -k\\nnice -19 wineserver"
#POL_Shortcut "start.exe" "$SHORTCUT_DOC1" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth/Manual.pdf'"
#POL_Shortcut "start.exe" "$SHORTCUT_DOC_TECHTREE1" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth/technology_tree.pdf'"
#POL_Shortcut "start.exe" "$SHORTCUT_DOC_EDITOR1" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth/scenario_editor_manual.pdf'"

#POL_Shortcut "EE-AOC.exe" "$SHORTCUT_NAME2"
#POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME2" "POL_Wine_AutoSetVersionEnv\\nwineserver -k\\nnice -19 wineserver"
#POL_Shortcut "start.exe" "$SHORTCUT_README2" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest/readme.txt'"
#POL_Shortcut "start.exe" "$SHORTCUT_DOC2" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest/manual_aoc.pdf'"
#POL_Shortcut "start.exe" "$SHORTCUT_DOC_TECHTREE2" "" "'C:/$PROGRAMFILES/GOG.com/Empire Earth Gold Edition/Empire Earth - The Art of Conquest/technology_tree_aoc.pdf'"

POL_SetupWindow_Close
exit

petch Saturday 17 December 2011 at 17:16
petch

Thanks for the assist. Since I started it, you helped, this is a co-credit project. I'll test it more and some more finishing work. There might be a way to get direct music working. Can you comment it more? There is lot I don't understand.

>POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"

I have simpler version of this line. Please explain.

Quote from realta_taisteal

This is the new POL4 way for script localization, based on gettext: once the script is registered here, it will be possible for translators to replace the text with a localized one at runtime.

I'm able to run it, but for some reason. I can't break out with control-alt-escape.

Quote from realta_taisteal


Could be a consequence of
POL_Wine_X11Drv "DXGrab" "Y"
POL_Wine_X11Drv "GrabFullScreen" "Y"

I had some crashes with the game when it loses focus, so I grabbed the mouse inside the game window. You can remove those statements and experiment. (Edit: looks like you did already)

(several clues about how to fix mouse problems)

Quote from realta_taisteal

Yes, in POL there's even some Wine versions with dinput patch applied.
Good luck with finding the combinaison that works!
I recently struggled with getting the sound working correctly in Beyond Good and Evil, but haven't found a satisfactory solution yet, so I know what it looks like
pinch:

You can move the mouse, but it takes very large movements. Maybe changing wine mouse sensitivity.

Quote from realta_taisteal

By the way,
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME1" "POL_Wine_AutoSetVersionEnv\\nwineserver -k\\nnice -19 wineserver" 

decreases the priority of the wineserver process, which slightly lessen the problem (weird uh ? But worked perfectly with Age of Wonders 3)...

Edited by petch

realta_taisteal Saturday 17 December 2011 at 21:14
realta_taistealAnonymous

One problem at a time, fixing mouse only. I'v tried every possible combination of settings to get the mouse working, nothing works. Disabled mouse warp to no effect.

>Yes, in POL there's even some Wine versions with dinput patch applied.

wine 1.3.34-rawinput right?

Using a startx command
http://bugs.winehq.org/show_bug.cgi?id=13351

wiztool
http://wine-review.blogspot.com/2010_06_01_archive.html

http://wine-wiki.org/index.php/Reading_Debug_Trace_Examples

Tried wine 1.3.35 and 1.3.34-rawinput. No effect.






Edited by realta_taisteal

petch Sunday 18 December 2011 at 2:45
petch

Now I wonder if it's really the same patch...
Are patches used by POL-compiled Wine packages described somewhere?

Also, I found a copy of wisotool that still had Empire Earth entry in it, but it doesn't seem to do anything special (to native libs, no tweaks)
http://web.archive.org/web/20101103164412/http://kegel.com/wine/wisotool

Edited by petch