Skip to content

Instantly share code, notes, and snippets.

@swt83
Last active October 13, 2015 11:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swt83/4187141 to your computer and use it in GitHub Desktop.
Save swt83/4187141 to your computer and use it in GitHub Desktop.
Setup Dune2 on Mac OSX Lion

Dune2 on Mac OSX Lion

David Wang has developed an awesome version of the original game that is playable on modern computers, called Dune Dynasty. This is my log of attempting to get it functional on Mac OSX Lion.

CURRENT STATUS: Working

This walkthru was for version 1.4. A new version 1.5 has been released which I'm told incorporates all of these OSX tweaks, so it should work out of the box! I will report when I have the time to compile the new version.

Install

Per the instructions, I had to install some dependancies. This was easily accomplished using the package manager Homebrew.

  • Install CMake: Already on my computer.
  • Install Allegro 5: → brew tap homebrew/versions and → brew install allergro5
  • Install FluidSynth: → brew install fluidsynth
  • Install MAD: → brew install mad

Now that I had the dependancies installed, I began my attempts to compile the game.

  • Make working directory: → mkdir build
  • Move into new directory: → cd build
  • Run cmake: → cmake ..

This triggered a bunch of errors having to do w/ OpenGL. I fixed these by opening the file src/video/video_a5.c and replacing the reference to GL/gl.h w/ OpenGL/gl.h. I deleted everything in the build folder and prepared to try again.

  • Run cmake: → cmake ..
  • Run make: → make

This triggered an error having to do w/ main and something about "did you mean SDL_main". I fixed this error by opening the file src/opendune.c and on line 1243 changing int SDL_main(int argc, char **argv) to read int main(int argc, char **argv). I deleted everything in the build folder and prepared to try again.

  • Run cmake: → cmake ..
  • Run make: → make

Everything compiled! At this point I tried to run the game.

  • Run game: → ./dist/dunedynasty

I got a warning about not having any game files. I made a new dist/data/ directory, grabbed a copy of Dune2 EU 1.07, and pasted them in. I prepared to try again.

  • Run game: → ./dist/dunedynasty

I got slammed w/ a stack error. David told me to open the file src/opendune.c and insert into line 14 #include <allegro5/allegro.h>. He also had me open CMakeLists.txt and insert into line 18 pkg_check_modules(ALLEGRO5_MAIN REQUIRED allegro_main-${ALLEGRO_VERSION}) and in line 80 ${ALLEGRO5_MAIN_LDFLAGS}. I deleted everything in the build folder and prepared to try again.

  • Run cmake: → cmake ..
  • Run make: → make
  • Recopy game files.
  • Run game: → ./dist/dunedynasty

It worked! The game loaded successfully.

Issues

  • There was a warning on the compile: warning: no previous prototype for ‘_al_mangled_main’, but it doesn't seem to be a problem.
  • Voices won't work unless you have the EU version of the game.
  • Fullscreen doesn't work bc the version of Allegro used has an issue. In the meantime, you can hit alt-enter to toggle fullscreen yourself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment