Skip to content
Joris Dauphin edited this page Nov 6, 2023 · 5 revisions

I could only get this to work using homebrew. I tried with macports versions of stuff, but it had some errors. Also do not install SDL2 from the sdl website, since it leads to conflicts with the homebrew versions.

Install the dependencies:

brew install libpng sdl2 bzip2 ffmpeg [email protected] SDL2_mixer SDL2_image libogg libvorbis theora zlib libmikmod sqlite3 doxygen gcc libomp

I needed gcc in order to compile with OpenMP, since there were some issues getting the apple native compilers to work.

Homebrew does not package tolua++ currently so we have to build from source:

git clone https://github.com/LuaDist/toluapp.git
mkdir build-tolua
cd build-tolua
cmake ../toluapp
make -j$(nproc)
sudo make install

Now clone stratagus and build:

git clone --recurse-submodules [email protected]:Wargus/stratagus.git
mkdir build-stratagus
cd build-stratagus
CXX=$(brew --prefix)/bin/g++-11 CC=$(brew --prefix)/bin/gcc-11 cmake ../stratagus
make -j$(nproc)
sudo make install

Next I had errors using the default file limits on macOS, so I followed the directions here(https://superuser.com/a/838840).

sudo nano /Library/LaunchDaemons/limit.maxfiles.plist

Add the contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>limit.maxfiles</string>
    <key>ProgramArguments</key>
    <array>
      <string>launchctl</string>
      <string>limit</string>
      <string>maxfiles</string>
      <string>524288</string>
      <string>16777216</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceIPC</key>
    <false/>
  </dict>
</plist>
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist

And now it should be able to run if supplied with a data directory generated by wargus:

./stratagus -d ~/.stratagus/data.Wargus

https://www.youtube.com/watch?v=Xd-IyM66hTk

Currently the UI is a bit messed up, and some images are not drawn properly.

Clone this wiki locally