buiding on a mac

Hello, I've been working exclusively on windows but thought I'd try building a game on a mac for kicks. I followed the wiki for setting up the mac and it was very easy...a new test project created with setup.sh works fine there.

So is there a prescribed procedure for taking a game I worked on in visual studio on windows and getting it built on my mac? I quickly tried cloning down the repository to the mac but realized there is no mac build folder in the project. I don't want to do any authoring on the mac, just want to be able to build a finished game that was authored on windows. Any advice for how to best proceed?



  • Hi Funemaker, just to clarify a couple of things now that you've moved onto a mac... The init.sh is the tool that makes a test project for you.

    But the setup.sh tool is the one that should create mac builds of the orx library for you.

    There is one restriction on a mac... environmental variable usage is non-standard between releases of MacOSX, so your newly created game projects will have to live on the same folder level as your orx folder. For example:


    Let me know how you get on.

  • Thanks @sausage ....yes, I ran setup.sh to build the library and made a test project with init.sh and that all works fine. What I'm trying to do is take a game I made on windows and build it now for a mac so mac users can run it. I've now got it compiled using CodeLite on the mac, but for some reason when it runs orx cannot find my main .ini config file so bails out. I'm still looking around to see why it wouldn't be able to load the config file...it appears to be in the correct folder.


  • I did sort out the .ini file problem...everything loads now but looks like is crashing because it can't load a sound file....I'll keep sorting it out, getting close to running at this point.

  • Take a look at the debug window, it might indicate a missing sound file and could be related to your sound resource path in your [Resource] section.

  • edited July 2020

    I know it's a bit late, but in case anyone else stumbles upon this thread with a similar question...

    Once you've created a project with init, we only run premake4 for the current platform. You can compile your project on other desktop OSes by simply running premake4 either natively on those OSes (it can be found in orx's code/build/ folder) or by doing a cross run with premake4 --os=<target_os> <target_buid_system>.


    premake4 --os=macosx gmake

    Running premake4 --help will give you a list of all available options.

    As for your latest issue, as @sausage suggested, have you checked that your resource paths work with your folder hierarchy on OSX? Keep in mind OSX has some reserved folder names, such as Resources, so if you're using that name for the folder containing your data, your orx application won't be able to find your files.

  • Thanks guys. The sound file issue was a red hearing I think. In any case, I'm not sure what exactly is wrong but can't spend much time right now looking at it. Basically on the mac my game runs through its splash screen scene and then crashes hard for some reason with a bunch of asserts (looks like one every frame or something) which fills up the console immediately and makes it hard for me to see the originating error in that list if there is one. (this is a game that runs fine on the windows build). When I tried to debug in CodeLite I got some kind of error message indicating I don't have things setup correctly for debugging (I've never used codelite before so not surprised, and I literally spent about 5 minutes on it, so probably with a bit more time I can get debugging working and figure out what exactly is crashing)

    In any case, I may have screwed things up since I wasn't sure of the process and didn't know about using premake4 as described above. Sounds like what I should do is pull down a fresh clone of my game repo that I made on windows, run premake4 to create the macosx build target and build from there. Is that the suggested process? If so I'll try it whenever I can pry the mac book back from my daughter :smile:

    This isn't real urgent for me to solve right now but thought it'd be nice to know how to deploy on other operating systems.

    Thanks for the help!

  • Yep, that's the suggested process. :)

    As for the errors, they're all written down to disk as well, you should have the regular log in <app_name>.log and the error log (debug only) in <app_name>-debug.log.

    If you're still stumped, I'd be happy to check it on my side if you give me access to your project. :)

  • Thanks, I'll check that log when I get access to the computer and see what I find.

  • The log file made it clear...I was pretty sloppy about case in a lot of my file names for sounds and images...on windows it doesn't matter, but on the mac TitleMusic.wav isn't the same as titleMusic.wav!!

    Thanks for the help...things are mostly working now but I have to straighten out all the careless capitalization.

  • Ah interesting, I thought OSX's file system was case insensitive, that's why I didn't raise that concern. Good to know and glad you found the issue! :)

  • It isn't clear to me after googling that a bit, but it definitely fixes the file load issues with some of my sounds and images. I suppose it would be good form to always keep this straight anyway. Same issue would occur if I try to build on linux I assume.

  • Yep, on Linux, you'll need to have them case sensitive. I was thinking of a way to add a debug-only check for case sensitivity, but it's not that straightforward given that the resource API doesn't support a "list" feature at the moment.

  • Case closed...got the process down and game is running on the mac. The exercise did expose a problem in my code handling a screen with a different aspect ratio but was able to sort that out as well. I do have one more little weird issue that i may have to start another thread for, but not related to mac os.

Sign In or Register to comment.