juj / emscripten-scummvm

Emscripten fork of the ScummVM engine.
http://clb.demon.fi/html5scummvm/
GNU General Public License v2.0
133 stars 15 forks source link

Compiled but scummvm: Stray argument '' when running scummvm.html #30

Closed gr33k closed 2 years ago

gr33k commented 5 years ago

Hi there,

I had to hackup the configure script to compiled on Ubuntu 18.04 with Emscripten 1.38.27. It was giving an error about GCC version > 2.7 required as I recall. All said and done I finally got it to generate the scummvm.html .data .js and .wasm files. It seems to be working but all I see is this:

scummvm: Stray argument ''
Usage: scummvm [OPTIONS]... [GAME]

Try 'scummvm --help' for more options.

It clearly seems that scummvm is running without any arguments...problem is where are these defined?

i used the pre-load path in the export and I DO see the files being packaged...Am I missing a scummvm.ini or something else to tell it it's "Zak" or "Maniac"? I put a scummvm.ini in the game folder but that doesn't seem to make a difference.

I've compiled dosbox-x emscripten fork and that required me to have an entry in dosbox.conf to mount the packaged game folder and execute a BAT (or EXE) to start the game.

Any hints to complete this (I really want to get Zak FM-Towns working hehe) is greatly appreciated please and thank you for the fork! :)

EDIT: I removed some checks from the configure script I mentioned above - testing again on new source folder - this is the error:

emconfigure ./configure --disable-all-engines --enable-engine-static=scumm --backend=sdl --disable-bink --disable-mt32emu --disable-16bit --disable-scalers --disable-hq-scalers --disable-alsa --disable-vorbis --disable-tremor --disable-mad --disable-flac --disable-zlib --disable-opengl --disable-png --disable-theoradec --disable-faad --disable-fluidsynth --disable-nasm --disable-readline --disable-libunity --disable-sndio --disable-timidity --with-sdl-prefix=/root/emsdk/emscripten/1.38.27/system
Running ScummVM configure...
Looking for C++ compiler... CXX: /root/emsdk/emscripten/1.38.27/em++
In test compiler for /root/emsdk/emscripten/1.38.27/em++
/root/emsdk/emscripten/1.38.27/em++
Checking for compiler version... shared:ERROR: no input files
note that input files without a known suffix are ignored, make sure your input files end with one of: ('.c', '.C', '.i', '.cpp', '.cxx', '.cc', '.c++', '.CPP', '.CXX', '.CC', '.C++', '.ii', '.m', '.mi', '.mm', '.mii', '/dev/null', '.bc', '.o', '.obj', '.lo', '.dylib', '.so', '.a', '.ll', '.h', '.hxx', '.hpp', '.hh', '.H', '.HXX', '.HPP', '.HH')
shared:ERROR: no input files
note that input files without a known suffix are ignored, make sure your input files end with one of: ('.c', '.C', '.i', '.cpp', '.cxx', '.cc', '.c++', '.CPP', '.CXX', '.CC', '.C++', '.ii', '.m', '.mi', '.mm', '.mii', '/dev/null', '.bc', '.o', '.obj', '.lo', '.dylib', '.so', '.a', '.ll', '.h', '.hxx', '.hpp', '.hh', '.H', '.HXX', '.HPP', '.HH')
shared:ERROR: no input files
note that input files without a known suffix are ignored, make sure your input files end with one of: ('.c', '.C', '.i', '.cpp', '.cxx', '.cc', '.c++', '.CPP', '.CXX', '.CC', '.C++', '.ii', '.m', '.mi', '.mm', '.mii', '/dev/null', '.bc', '.o', '.obj', '.lo', '.dylib', '.so', '.a', '.ll', '.h', '.hxx', '.hpp', '.hh', '.H', '.HXX', '.HPP', '.HH')
./configure: 1649: test: Illegal number:
./configure: 1650: test: Illegal number:
1.38.27, bad

The version of your compiler is not supported at this time
Please ensure you are using GCC >= 2.95
shared:ERROR: Configure step failed with non-zero return code: 1.  Command line: ./configure --disable-all-engines --enable-engine-static=scumm --backend=sdl --disable-bink --disable-mt32emu --disable-16bit --disable-scalers --disable-hq-scalers --disable-alsa --disable-vorbis --disable-tremor --disable-mad --disable-flac --disable-zlib --disable-opengl --disable-png --disable-theoradec --disable-faad --disable-fluidsynth --disable-nasm --disable-readline --disable-libunity --disable-sndio --disable-timidity --with-sdl-prefix=/root/emsdk/emscripten/1.38.27/system at /root/test/emscripten-scummvm
gr33k commented 5 years ago

When i try the monkey demo I see:

Default configuration file missing, creating a new one
User picked target 'monkey' (gameid 'monkey')...
  Looking for a plugin supporting this gameid... SCUMM [v0-v6 games]
  Starting 'The Secret of Monkey Island'
SDL_Quit called (and ignored)

Then it just sits there with black screen

Console log (Firefox):

InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
wasm streaming compile failed: TypeError: Response has unsupported MIME type scummvmmonkey:1246:11
falling back to ArrayBuffer instantiation scummvmmonkey:1246:11
WARNING: FSNode::createReadStream: '.scummvmrc' does not exist! scummvmmonkey:1246:11
Default configuration file missing, creating a new one scummvmmonkey:1237:13
WARNING: unknown gfx mode 1! scummvmmonkey:1246:11
WARNING: You are missing a valid 'translations.dat' file. GUI translation will not be available! scummvmmonkey:1246:11
WARNING: Could not find theme 'scummmodern' falling back to builtin! scummvmmonkey:1246:11
User picked target 'monkey' (gameid 'monkey')... scummvmmonkey:1237:13
  Looking for a plugin supporting this gameid... SCUMM [v0-v6 games] scummvmmonkey:1237:13
  Starting 'The Secret of Monkey Island' scummvmmonkey:1237:13
WARNING: Engine_SCUMM_create: No unique game candidate found, using first one! scummvmmonkey:1246:11
Your game version appears to be unknown. If this is *NOT* a fan-modified scummvmmonkey:1246:11
version (in particular, not a fan-made translation), please, report the scummvmmonkey:1246:11
following data to the ScummVM team along with name of the game you tried scummvmmonkey:1246:11
to add and its version/language/etc.: scummvmmonkey:1246:11
  SCUMM gameid 'monkey', file '000.LFL', MD5 '41a228c44d16095b0ba5f7eaaf64a20e' scummvmmonkey:1246:11
scummvmmonkey:1246:11
Bad ID NR found in directory! scummvmmonkey:1246:11
SDL_Quit called (and ignored)
gr33k commented 5 years ago

My Modified Configure script if you have latest Emscripten from emsdk (1.38.27 at the time of post) and running Ubuntu 18.04:

https://paste.thec0de.com/?67438b068c7402ba#jNtAicULLTNHkw4ewQF374RWNEgIVtgbCDk7Cr9AetM=

essentially, I ripped out the GCC checks which were causing the configure error. I ripped out endian check as that was erroring (I set endian to little manually) but allow it to be set else make errors.

I think that was it...ripped out anything that stopped it from completing

gr33k commented 5 years ago

I was able to get maniac mansion working but I can't make zak or monkey work (though monkey demo seems to detect but hang...I downloaded right from your link from the scummvm demos page).

Maniac working but mouse looks funky and won't go full screen or anything: https://thec0de.com/dos/scummvmmaniac/

Monkey does detect but won't work: https://thec0de.com/dos/scummvmmonkey/

Zak McKracken DOS won't work - and the FM-Towns version may be too big... https://thec0de.com/dos/scummvmzak/

I'll keep working on it - any suggestions on how to package this stuff (and modify scummvm.ini) are appreciated please :)

gr33k commented 5 years ago

Since I'm not sure if this project is actively maintained...I Forked the project with my configure script changes and fix to common/forbidden.h here: https://github.com/gr33k/emscripten-scummvm

You should be able to compile this code without any changes if you are on Ubuntu 18.04 with Emscripten 1.38.27 ;)

imneckro commented 2 years ago

@gr33k hello. btw im greek myself. is this buildable today? im trying and get all kind of errors

juj commented 2 years ago

This project was developed around 2013-2014, and has not been updated in a long time. I'll use the GitHub archive project feature now to mark this project as stale. I hear there are some other forks of scummvm that may have a more recent support for Emscripten.

When I archive this project, GitHub apparently puts all issues read-only, so feel free to continue development and conversation on a more recent fork of scummvm!