Compiling and running doomsday

I've just set up a development system for doomsday following the instructions in the wiki on a 64-bit Snow Leopard Mac, that is I did:

1. Install Qt from http://qt.nokia.com/download
2. Install SDL, SDL_net and SDL_mixer frameworks
3. Install the FMOD Ex Programmer API
4. git clone [url=git://deng.git.sourceforge.net/gitroot/deng/deng]git://deng.git.sourceforge.net/gitroot/deng/deng[/url] doomsday_rep
5. Created a file doomsday_rep/doomsday/config_user.pri containing

CONFIG += deng_snowleopard deng_fmod deng_packres
SDL_FRAMEWORK_DIR = "/Library/Frameworks/"
FMOD_DIR = "/Users/rxw/FMOD Programmers API/"

6. Added a Custom build step with QtCreator which runs the "bundleapp.sh" script
7. Added -wnd -v -v -appdir . -game jDoom.bundle -file ../doomsday.pk3 ../jdoom.pk3 -iwad "/Users/rwx/ultimate doom/doom.wad" to the arguments in the Run configuration.

With this configurations doomsday did compile without any problems, however I cannot get it to run for several reasons. First of all it complains about missing fonts "data/fonts/normal12.dfn". Manually copying the data directory from doomsday_rep/doomsday/engine to $(build_dir)/engine/data resolves that problem. Still it fails to locate "doomsday.pk3" (which exists) and I don't know how to fix that.
Maybe I forgot some important step or the instructions at http://dengine.net/dew/index.php?title=Compilation are incomplete or out of date. What's wrong with my set up?

Comments

  • You don't need to manually copy any files when everything's set up properly. Maybe bundleapp.sh failed to run? I added the arguments it needs to the wiki page: http://dengine.net/dew/index.php?title= ... ific_notes

    After a successful build you should have the following in your build directory:
    (builddir)/engine/Doomsday.app/MacOS/doomsday
    (builddir)/engine/Doomsday.app/Contents/Resources/doomsday.pk3   
    (builddir)/engine/Doomsday.app/Contents/Resources/Data/Fonts/    <-- all the fonts
    

    When starting from within Qt Creator, you should use "(builddir)/engine" as the working directory and "(builddir)/engine/Doomsday.app/MacOS/doomsday" as the binary.
  • bundleapp.sh seemed to execute properly, at least the files

    (builddir)/engine/Doomsday.app/Contents/MacOS/doomsday (!)
    (builddir)/engine/Doomsday.app/Contents/Resources/doomsday.pk3
    (builddir)/engine/Doomsday.app/Contents/Resources/Data/Fonts/

    exist. Doing some breakpoint yoga revealed that the ddBasePath variable wasn't correctly initialized. I appended
    "-basedir ./Doomsday.app/Contents/Resources" to the arguments of doomsday and now it finds the fonts and images. Still it can't find the "doomsday.pk3" resource, even though it exists in (builddir)/engine/Doomsday.app/Contents/Resources and in (builddir) (as referenced by the "-file" argument).
  • Ah yes, the command line options on that wiki page haven't been updated recently. I"ll go and update the page...

    It was missing the -basedir and -vdmap options, and the game is now specified with an identifier instead of the actual bundle name. It will automatically locate the .pk3 files so those don't need to be specified manually.
  • Thanks! The -vdmap option took care of the missing "doomsday.pk3". There was still a problem of doomsday not finding the .wad file, but that was presumably because the ArgsParse routine doesn't like whitespaces in arguments. After moving my .wad file to a directory without whitespaces, everything works perfectly. Thanks again!
  • No problem. :) Args with spaces are easier to deal with when you put the arguments in a response file and just use @/path/to/arguments.rsp when launching. Qt Creator seems to remove one quote level from the arguments.
  • Now that this is obviously handled, I want to describe my experiences setting up the things trying to build doomsday.exe and the libs without snowberry out of the vcproject-files.
    I first tried build 423 and realized that the filelists of the vcprojects are obviously a bit outdated (vs8-folder).
    Then there's something with the linker about libcurl/curllib.
    Adjusting this - and using those project files for build 439 too, I got only one problem left.
    It's in file dd_pinit.c, function DD_errorbox.
    See how I fixed it:
    #ifdef WIN32
        DD_Win32_SuspendMessagePump(true);
        MessageBox(NULL, WIN_STRING(buff),
    #ifdef ORIGINAL
                   TEXT(DOOMSDAY_NICENAME) DOOMSDAY_VERSION_TEXT_WSTR,
    #else
       #ifdef _DEBUG
                   TEXT(DOOMSDAY_NICENAME) DOOMSDAY_VERSION_TEXT_WSTR,
       #else
                   TEXT(DOOMSDAY_NICENAME DOOMSDAY_VERSION_TEXT),
       #endif
    #endif
                   (UINT) (MB_OK | (error ? MB_ICONERROR : MB_ICONWARNING))); 
        DD_Win32_SuspendMessagePump(false);
    #endif
    

    After all I made it compile successfully and it runs fine.
    I'm soo thankful for the -notexnonpow2 parameter, cause that notebook here is really evil!
    Then again, its speed is that critical (1.6 Ghz AMD/ 800*600), that I can say - with all hires textures and models from the extrapack loaded in Heretic - the speed improvement from build 423 to 439 is very fine. While 423 isn't playable anymore when in episode 5 map 1 the imps begin to move, it's likely acceptable in version 439.
    Excellent work!
Sign In or Register to comment.