Game Development Community

Can You Point a Mac Debug Build to a main.cs?

by Charlie Patterson · in Torque Game Builder · 01/31/2012 (12:23 am) · 3 replies

Now that I have successfully compiled the Mac version of TGB 1.6.5 in debug mode, I click the executable and it brings up a file dialog. But I can't pick a file and I have to cancel out.

In the windows version, if there is not a main.cs in the same directory as the executable this is what happens too, and this is my chance to pick a main.cs somewhere else.

However in the Mac version, I can't pick anything.

Any ideas?

#1
01/31/2012 (6:28 am)
@Charlie - For the TGBGame build, you need to change the Xcode project. Open the Xcode project, select the target, then look for Per-Configuration Build Products Path. Set that value to point to where your game's main.cs exists. For example, mine was set to /Users/michaelperry/MyGames/Memory.
#2
01/31/2012 (6:22 pm)
OK. Thanks @michael. That makes sense. I was trying to do something that is probably too awkward to be considered good engineering. :P

Curious though why the Mac won't let me choose a main.cs when it has brought up the file browser already. Hmm.
#3
01/31/2012 (7:34 pm)
Just looked at the code and found a way I could do what I wanted. I've only tested it on Win but it should work for Mac.

Let's suppose you want to build to a standard place, but then run your game with it, even though your game is in another directory. Do the following from a command line (or a batch script or whatever):

TGBGame_Debug /Users/michaelperry/MyGames/Memory/main.cs