Game Development Community

Making executable with XCode.

by Ecliptic · in Torque Game Builder · 01/09/2009 (7:57 pm) · 1 replies

I am trying to do a build of my game so I can install it on a machine that does not have torque so it can be beta tested while I clean up some features. Now I get Xcode load the project file inside of the Torque install folder under compilers and xcode. This opens up all the files needed for torque to become an executable I am assuming.

Now where do I put my scripts and resources so I can get it to compile an executable? I have the target set to TGB Game and placed my whole project folder under TorqueScriptFiles>Games in the Xcode tree. But I am getting an initialize error, I am assuming there is something I need to set up.... What else do I need to do?

The error seems to point to my main.cs. I guess it is missing some information. This is the code of the main.cs which was generated by doing a build inside of TGB.
//---------------------------------------------------------------------------------------------
// Torque Game Builder
// Copyright (C) GarageGames.com, Inc.
//---------------------------------------------------------------------------------------------


/// Player Initialization Procedure
/// 
function onStart()
{   
}

function onExit()
{
}

//---------------------------------------------------------------------------------------------
// Load the paths we need access to
//---------------------------------------------------------------------------------------------
function loadPath( %path )
{
   setModPaths( getModPaths() @ ";" @ %path );
   exec(%path @ "/main.cs");

}

//---------------------------------------------
// Do some bootstrap voodoo to get the game to 
// the initializeProject phase of loading and 
// pass off to the user
//---------------------------------------------

// Output a console log
setLogMode(6);

loadPath( "common" );

loadPath( "game" );

onStart();

// Initialized
echo("\nTorque Game Builder (" @ getT2DVersion() @ ") initialized...");

if( !isFunction( "initializeProject" ) || !isFunction( "_initializeProject" ) )
{
   messageBox( "Game Startup Error", "'initializeProject' function could not be found." @
               "\nThis could indicate a bad or corrupt common directory for your game." @
               "\n\nThe Game will now shutdown because it cannot properly function", "Ok", "MIStop" );
   quit();
}

_initializeProject();

// Startup the project
initializeProject();

Thanks guys,
Dane

#1
01/09/2009 (8:42 pm)
Actually looks like it is working on a PC, but the Mac build is the one getting the error. Is there something I need to change in the path code?

Thanks,
Dane