Hello guys, this is my first post on the forum, I was wondering if someone could explain to me how I recompile the game engine, on operating system X.
Thanks in advance.
Compiling On Mac
Re: Compiling On Mac
I am still looking for help.
Thanks
Thanks
Re: Compiling On Mac
Well please be patient. I'm sure some of the dev members will help you out with that. Unfortunately I'm windows based and I too am looking for a way to compile my server stuff in mac but to no avail.
Good luck!
Good luck!
- delinquent
- Match Winner
- Posts: 761
- Joined: Sat Jul 07, 2012 3:07 am
Re: Compiling On Mac
If you're familiar with automake, the source files can be found here:
https://code.launchpad.net/~dlh/armaget ... rge/152075
As for actually doing it... erm... hmm.
https://code.launchpad.net/~dlh/armaget ... rge/152075
As for actually doing it... erm... hmm.
Re: Compiling On Mac
Hi,
It's not that hard at all.
1. Download the source code
2. extract the tar.gz
3. open terminal
4. cd into the directory where you extracted the source
5. run ./configure
6. run make
7. fix the command that fails on macos by adding -framework OpenGL -framework GLUT to the command that fails. Or you can edit the makefile, actually developers should do this
8. open the src/armagetronad_main file
I compiled this morning, it works for me. If you need help let me know.
It's not that hard at all.
1. Download the source code
2. extract the tar.gz
3. open terminal
4. cd into the directory where you extracted the source
5. run ./configure
6. run make
7. fix the command that fails on macos by adding -framework OpenGL -framework GLUT to the command that fails. Or you can edit the makefile, actually developers should do this
8. open the src/armagetronad_main file
I compiled this morning, it works for me. If you need help let me know.
Re: Compiling On Mac
And to compile the latest source from launchpad you need to change two commands:
g++ -iquote ./tools -iquote ./tools/values -iquote ./resource -iquote ./thirdparty/mathexpr -iquote ./thirdparty/utf8 -iquote ./protobuf -iquote protobuf -iquote ./render -iquote ./ui -iquote ./thirdparty/shttpd -iquote ./thirdparty/scrap -iquote ./network -iquote ./engine -iquote ./engine/sound -iquote ./engine/sound/sdl_mixer -iquote ./thirdparty/particles -iquote ./tron -iquote ./tron/cockpit -iquote ./tron/zone -O2 -std=c++11 -D_THREAD_SAFE -o armagetronad_main tron/armagetronad_main-gFloor.o tron/cockpit/armagetronad_main-cCockpit.o tron/cockpit/armagetronad_main-cMap.o tron/cockpit/armagetronad_main-cCamview.o tron/zone/armagetronad_main-zFortress.o libtron.a libenginecore.a libengine.a libnetwork.a libui.a librender.a libtools.a protobuf/libprotobuf.a thirdparty/mathexpr/libmathexpr.a thirdparty/particles/libparticles.a thirdparty/scrap/libscrap.a -lSDL2_image -lSDL2_mixer -L/usr/local/lib -lSDL2 -lprotobuf -lpthread -lxml2 -lpng16 -L/usr/local/Cellar/ftgl/2.1.3-rc5/lib -lftgl -L/usr/local/opt/freetype/lib -lfreetype -framework OpenGL -framework GLUT -framework CoreFoundation -framework CoreServices
g++ -iquote ./tools -iquote ./tools/values -iquote ./resource -iquote ./thirdparty/mathexpr -iquote ./thirdparty/utf8 -iquote ./protobuf -iquote protobuf -iquote ./render -iquote ./ui -iquote ./thirdparty/shttpd -iquote ./thirdparty/scrap -iquote ./network -iquote ./engine -iquote ./engine/sound -iquote ./engine/sound/sdl_mixer -iquote ./thirdparty/particles -iquote ./tron -iquote ./tron/cockpit -iquote ./tron/zone -O2 -std=c++11 -D_THREAD_SAFE -o armagetronad_main tron/armagetronad_main-gFloor.o tron/cockpit/armagetronad_main-cCockpit.o tron/cockpit/armagetronad_main-cMap.o tron/cockpit/armagetronad_main-cCamview.o tron/zone/armagetronad_main-zFortress.o libtron.a libenginecore.a libengine.a libnetwork.a libui.a librender.a libtools.a protobuf/libprotobuf.a thirdparty/mathexpr/libmathexpr.a thirdparty/particles/libparticles.a thirdparty/scrap/libscrap.a -lSDL2_image -lSDL2_mixer -L/usr/local/lib -lSDL2 -lprotobuf -lpthread -lxml2 -lpng16 -L/usr/local/Cellar/ftgl/2.1.3-rc5/lib -lftgl -L/usr/local/opt/freetype/lib -lfreetype -framework OpenGL -framework GLUT -framework CoreFoundation -framework CoreServices
just run them in the src directory and load the executable armagetronad_main from the directory a level above
g++ -iquote ./tools -iquote ./tools/values -iquote ./resource -iquote ./thirdparty/mathexpr -iquote ./thirdparty/utf8 -iquote ./protobuf -iquote protobuf -iquote ./render -iquote ./ui -iquote ./thirdparty/shttpd -iquote ./thirdparty/scrap -iquote ./network -iquote ./engine -iquote ./engine/sound -iquote ./engine/sound/sdl_mixer -iquote ./thirdparty/particles -iquote ./tron -iquote ./tron/cockpit -iquote ./tron/zone -O2 -std=c++11 -D_THREAD_SAFE -o armagetronad_main tron/armagetronad_main-gFloor.o tron/cockpit/armagetronad_main-cCockpit.o tron/cockpit/armagetronad_main-cMap.o tron/cockpit/armagetronad_main-cCamview.o tron/zone/armagetronad_main-zFortress.o libtron.a libenginecore.a libengine.a libnetwork.a libui.a librender.a libtools.a protobuf/libprotobuf.a thirdparty/mathexpr/libmathexpr.a thirdparty/particles/libparticles.a thirdparty/scrap/libscrap.a -lSDL2_image -lSDL2_mixer -L/usr/local/lib -lSDL2 -lprotobuf -lpthread -lxml2 -lpng16 -L/usr/local/Cellar/ftgl/2.1.3-rc5/lib -lftgl -L/usr/local/opt/freetype/lib -lfreetype -framework OpenGL -framework GLUT -framework CoreFoundation -framework CoreServices
g++ -iquote ./tools -iquote ./tools/values -iquote ./resource -iquote ./thirdparty/mathexpr -iquote ./thirdparty/utf8 -iquote ./protobuf -iquote protobuf -iquote ./render -iquote ./ui -iquote ./thirdparty/shttpd -iquote ./thirdparty/scrap -iquote ./network -iquote ./engine -iquote ./engine/sound -iquote ./engine/sound/sdl_mixer -iquote ./thirdparty/particles -iquote ./tron -iquote ./tron/cockpit -iquote ./tron/zone -O2 -std=c++11 -D_THREAD_SAFE -o armagetronad_main tron/armagetronad_main-gFloor.o tron/cockpit/armagetronad_main-cCockpit.o tron/cockpit/armagetronad_main-cMap.o tron/cockpit/armagetronad_main-cCamview.o tron/zone/armagetronad_main-zFortress.o libtron.a libenginecore.a libengine.a libnetwork.a libui.a librender.a libtools.a protobuf/libprotobuf.a thirdparty/mathexpr/libmathexpr.a thirdparty/particles/libparticles.a thirdparty/scrap/libscrap.a -lSDL2_image -lSDL2_mixer -L/usr/local/lib -lSDL2 -lprotobuf -lpthread -lxml2 -lpng16 -L/usr/local/Cellar/ftgl/2.1.3-rc5/lib -lftgl -L/usr/local/opt/freetype/lib -lfreetype -framework OpenGL -framework GLUT -framework CoreFoundation -framework CoreServices
just run them in the src directory and load the executable armagetronad_main from the directory a level above
Re: Compiling On Mac
Patches/Pull requests welcome. None of us here have a mac any more, and previously, we have been using XCode, not the automake files for official builds.
Re: Compiling On Mac
EEEAAARRRGHAllright. After some nudging on Discord and a new (to me) way to get an macOS virtual machine that works reasonably well, we got the Unix way of building the game working out of the box. The crucial bit was indeed just a -framework addition. And some other changes that simply make the build more robust, which should benefit everyone. The short version of the instructions are:
- get dependencies via macbrew or macports
- follow the Unix instructions
The long version will go to the Wiki sometime, after I'm done experimenting. It'll only be of interest for people who want to do development, because the important bit is that
Christian Mäder is providing a brew tap for convenient single line installation: https://github.com/cimnine/homebrew-armagetronad
All the instructions are there. The downside of this approach is that you don't get any proper macOS integration, you need to run the game from the command line. And the dependencies and build tools take up quite a bit of hard drive space, so now is the time to kick yourself for only getting the model with the tiny SSD (The VM is reporting 21GB used in total, including Catalina, so it's not that bad).
I'll see whether it's possible to bundle apps from there; that depends on whether some bundling tools work and whether the libraries can be bundled. Fingers crossed.
- get dependencies via macbrew or macports
- follow the Unix instructions
The long version will go to the Wiki sometime, after I'm done experimenting. It'll only be of interest for people who want to do development, because the important bit is that
Christian Mäder is providing a brew tap for convenient single line installation: https://github.com/cimnine/homebrew-armagetronad
All the instructions are there. The downside of this approach is that you don't get any proper macOS integration, you need to run the game from the command line. And the dependencies and build tools take up quite a bit of hard drive space, so now is the time to kick yourself for only getting the model with the tiny SSD (The VM is reporting 21GB used in total, including Catalina, so it's not that bad).
I'll see whether it's possible to bundle apps from there; that depends on whether some bundling tools work and whether the libraries can be bundled. Fingers crossed.