Deploying Code to OS X

I am writing a 2D game using C++ in Code::Blocks with Mingw and it is now at a point where I would like to send it to some friends for testing. This is my first major project in C++ so I am a complete novice when it comes to project deployment. I would ultimately like to deploy the project to Windows, Linux, and OS X, but right now I would like to focus on Windows and OS X (the latter of which seems to be much more difficult, but is necessary for me as most of my friends have macs).

I am currently working from a Windows computer, and do not have access to a mac. My questions are as follows:

1. Is it possible for me to create an installer for OS X without access to a mac? If not, I can ask a friend to help, but it will be tricky as they are not in my geographic proximity.

2. What program(s) should I use to create an installer for Windows and OS X, respectively?

3. Are there any good tutorials on said programs for absolute beginners? A very basic tutorial on deployment in general would be good, too. I found one for Visual Studio, but none for Code::Blocks.

Thanks in advance to anyone who is willing to provide assistance!
I made a long post here http://www.cplusplus.com/forum/beginner/195658/#msg940643 about why I dislike recommending MinGW for deployment to beginners. The post also has recommondations for using CMake. If you were to use CMake, you would have access to a cross-platform installer creator. There are screenshots here https://cmake.org/Wiki/CMake:Component_Install_With_CPack that show what the Windows and the OSX installers look like. CMake has a tutorial that covering CMake for beginners and CPack is covered during step 6: https://cmake.org/cmake-tutorial/

Edit: MinGW is supported by CMake and so is Code::Blocks. I just recommend TDM-GCC over regular MinGW.
Last edited on
closed account (48T7M4Gy)
http://bomutils.dyndns.org/
Thanks for the advice! It was very helpful.
@kevinkjt200:

I'm no expert on CPack - am I right in thinking that, on Windows, what it creates is actually just an NSIS script? So the OP will then need to download and run NSIS to actually build the installer.

Not that I'm disagreeing with you; CMake and its associated other utilities is brilliant, and well worth any cross-platform developer taking the time and effort to learn. And I say that as an old man who's averse to learning new languages ;)

@Bjord:

Take a look at:

http://nsis.sourceforge.net/Main_Page

for info on NSIS. It uses a scripting language to build a Windows installer. It looks a bit daunting at first, but I've found it OK to work with.
Last edited on
@MikeyBoy: It runs anywhere; no installation of NSIS required. And I am guessing that CMake ships with some of NSIS, because I do not recall ever installing it.

Edit: Found a gem http://stackoverflow.com/questions/13144181/how-to-create-an-installer-with-cmake-cpack-nsis-on-windows
Last edited on
Ah, OK - thanks for the correction!
Several years ago I was able to take a console C program and cut and paste it into a Mac and with some syntax changes get it to work. So yes it can be done manually but your going to need a Mac to test with or have someone do the code changes.

Your project probably has more lines of code than what I was working with so what took me a couple hours might take you days. I'd probably take a look at Kevin's post since you may plan to make changes to the code and updates.
Topic archived. No new replies allowed.