Posted October 26, 2015
After several unsuccessful attempts to start Bad Mojo Redux in Linux, I turn to community for possible help.
I have tried running current GOG version labeled 2.0.0.3 using different Wine builds, either directly or from PlayOnLinux, but the error message is always the same:
Troubles? Look at comments in launcher.bat.
Can't recognize 'gencfg.bat C:\GOG Games\Bad Mojo' as an internal or external command, or batch script.
Search for said gencfg.bat confirmed the validity of error notification as it doesn't exist.
Following advice given in the error message I looked for launcher.bat and found one named launcher2.bat in the game dir with the following contents:
@echo off
echo Troubles? Look at comments in launcher.bat.
REM Unsets all compatibility layer options. Without doing so,
REM BADMOJO.EXE crashes during ole32.dll initialization,
REM presumably due to a bad call in WAVEOUT.DLL's DllMain
REM routine.
REM launcher.exe Is a small C program that uses system() to
REM execute this file. Before doing so, it sets the resolution
REM to 640x480 with ChangeDisplaySettingsExW. This is needed
REM because we had to deactivate Windows' 640x480 compat tool
REM due to the above problem. Windows restores the previous
REM screen setup on process exit. Unfortunately, tabbing out
REM of the game does not restore the display mode, sorry :-(.
REM quicktime.qts is a small dll that loads qthook.dll and
REM returns FALSE from DllMain's PROCESS_ATTACH. This causes
REM BADMOJO.EXE to proceed with the next entry in it's QT
REM search logic, which happens to be the path the QuickTime
REM registry entries point to. Refusing the library load
REM causes our quicktime.qts to unload, which is why a second
REM stage library is needed.
REM Finally, qthook.dll hooks kernel32.GetVersionExA on load.
REM The injected GetVersionExA returns Windows XP SP 2. This
REM is needed to activate QuickTime's DirectDraw backend to
REM play the movies at decent speed. QuickTime's d3d9 backend
REM is not used for some reason (though d3d9.dll is loaded),
REM and the GDI backend plays the movies at about 1 fps.
cmd.exe /C gencfg.bat %CD%
set __COMPAT_LAYER=
BADMOJO.EXE
Since it calls for non-existent gencfg.bat before the game executable, origin of the error becomes clear. Somehow I doubt this is Wine-related as I don't see why it wouldn't install all the files (if presumably gencfg.bat existed) when installation process went smoothly on every occasion.
Omitting the launcher and running BADMOJO.EXE manually doesn't yield any error message, but it doesn't start either.
The Wine AppDB entry lists the game with Platinum rating, but there's no mention of using GOG version of the installer.
Any ideas highly appreciated!
I have tried running current GOG version labeled 2.0.0.3 using different Wine builds, either directly or from PlayOnLinux, but the error message is always the same:
Troubles? Look at comments in launcher.bat.
Can't recognize 'gencfg.bat C:\GOG Games\Bad Mojo' as an internal or external command, or batch script.
Following advice given in the error message I looked for launcher.bat and found one named launcher2.bat in the game dir with the following contents:
@echo off
echo Troubles? Look at comments in launcher.bat.
REM Unsets all compatibility layer options. Without doing so,
REM BADMOJO.EXE crashes during ole32.dll initialization,
REM presumably due to a bad call in WAVEOUT.DLL's DllMain
REM routine.
REM launcher.exe Is a small C program that uses system() to
REM execute this file. Before doing so, it sets the resolution
REM to 640x480 with ChangeDisplaySettingsExW. This is needed
REM because we had to deactivate Windows' 640x480 compat tool
REM due to the above problem. Windows restores the previous
REM screen setup on process exit. Unfortunately, tabbing out
REM of the game does not restore the display mode, sorry :-(.
REM quicktime.qts is a small dll that loads qthook.dll and
REM returns FALSE from DllMain's PROCESS_ATTACH. This causes
REM BADMOJO.EXE to proceed with the next entry in it's QT
REM search logic, which happens to be the path the QuickTime
REM registry entries point to. Refusing the library load
REM causes our quicktime.qts to unload, which is why a second
REM stage library is needed.
REM Finally, qthook.dll hooks kernel32.GetVersionExA on load.
REM The injected GetVersionExA returns Windows XP SP 2. This
REM is needed to activate QuickTime's DirectDraw backend to
REM play the movies at decent speed. QuickTime's d3d9 backend
REM is not used for some reason (though d3d9.dll is loaded),
REM and the GDI backend plays the movies at about 1 fps.
cmd.exe /C gencfg.bat %CD%
set __COMPAT_LAYER=
BADMOJO.EXE
Omitting the launcher and running BADMOJO.EXE manually doesn't yield any error message, but it doesn't start either.
The Wine AppDB entry lists the game with Platinum rating, but there's no mention of using GOG version of the installer.
Any ideas highly appreciated!
This question / problem has been solved by vv221