Does Wargus run on a Mac?

Asked by SeattleDad on 2012-03-10

I'm trying to figure out if I can run Wargus on a Mac.

Has anybody had any success with this? I tried downloading and installing Stratagus as per the instructions and hit a snag when I hit:

"Could not find library or program tolua++"

I'm not sure if I'm installing the right thing either because on the Stratagus install page, it says

Mac OS X users: Extract the "contrib/macosx.tgz" file to the top-level directory and read "Read Me.rtf".

But I can't find this "contrib/macos.tgz".

Any suggestions would be appreciated.

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Wargus Edit question
Assignee:
No assignee Edit question
Last query:
2012-03-11
Last reply:
2013-02-06
Joris Dauphin (joris-dauphin) said : #1

Note: I don't have Mac

stratagus intallation instruction is a little outdated, sorry.

You have some dependencies :
- SDL (required).
- libpng (required).
- zlib (required).
- Lua(required).
- tolua++ (required)
- libogg/libvorbis (recommended).
- libmikmod (recommended).
- libbzip2 (optional).

you need also CMake.

you have then to run
-- 8< --
cmake
make
-- >8 --

SeattleDad (seattledad) said : #2

Thanks for the message. I was able to get it working by installing Ubuntu Linus on my Mac, so now it's running under Ubuntu. Not as good as running natively, but at least it runs.

The obstacle to getting it to run natively is getting tolua++. I can't get the thing to build under Mac OSX.

Joris Dauphin (joris-dauphin) said : #3

until you succeed to have a tolua++ working(seem possible according to google),
a possible workaround is to use the generated tolua.cpp from Ubuntu under mac
So you should be able to run stratagus natively.

Joris Dauphin (joris-dauphin) said : #4

stratagus instruction has been updated.

Launchpad Janitor (janitor) said : #5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

alanjds (alanjds) said : #6

I got to compile Stratagus right on Mac OSX 10.6.8 :

- Needed to compile a new SDL from the sources and delete Apple one, but its because I am still on Snow Leopard
- Needed to create a custom.py file on the root of tolua folder:

## BEGIN custom.py
CCFLAGS = ['-I/usr/local/include', '-O2', '-ansi']
LIBPATH = ['/usr/local/lib']
LIBS = ['lua', 'dl', 'm']
## END custom.py

- Needed to patch the homebrew formula for lua (version 5.1), otherwize it gives some error when creating tolua.cpp

Homebrew Formula change:
def install
    # Apply patch-level 2
    curl "https://trac.macports.org/export/90538/trunk/dports/lang/lua/files/patch-lua-5.1.4-3", "-O"
    safe_system '/usr/bin/patch', '-d', 'src', '-i', '../patch-lua-5.1.4-3'
    # we could use the patches method if it supported additional arguments (-d in our case)

+ #patch the patch: http://lua-users.org/lists/lua-l/2011-02/msg00655.html
+ inreplace 'src/llex.c' do |s|
+ s.gsub! " luaC_checkGC(L);", " //luaC_checkGC(L); //Homebrew patch."
+ end

    # Use our CC/CFLAGS to compile.

Now, it compiled right. Going for wargus now...

Pali (pali) said : #7

Problem with tolua++ was solved