Compile .cs files without Interface builder
by Troudki · in Torque Game Builder · 08/01/2008 (4:54 am) · 3 replies
Hi,
How to compile / syntax check the .cs files without having to run up the entire game in the editor.
I want to run TGB in "command line" to build all file in my project directory.
i'm use TGB 1.7.4 in OSX Leopard platform
Thx
How to compile / syntax check the .cs files without having to run up the entire game in the editor.
I want to run TGB in "command line" to build all file in my project directory.
i'm use TGB 1.7.4 in OSX Leopard platform
Thx
#2
it possible with 1.7.4 version ?
www.garagegames.com/mg/forums/result.thread.php?qt=33542
package BuildOnly
{
function onExit()
{
// Override onExit when building, only interested in errors in scripts
}
};
function XG_Build( %path )
{
activatePackage( BuildOnly );
echo( "\n\n------------------------------------------------" );
echo( "Build starting...\n" );
echo( "Build path \"" @ %path @ "\"\n" );
%allTypes = "*.cs *.gui";
for( %word = 0; %word < getWordCount( %allTypes ); %word++ )
{
%type = getWord( %allTypes, %word );
%typePath = %path @ %type;
echo ( "Compiling files of type: " @ %type @ "\n" );
for( %file = findFirstFile( %typePath ); %file !$= ""; %file = findNextFile( %typePath ) )
{
compile( %file );
}
echo( "\n" );
}
echo( "Build complete." );
echo( "------------------------------------------------\n\n" );
}
08/01/2008 (7:54 am)
This thread talk about add some option in main.cs to launch TGB in command lineit possible with 1.7.4 version ?
www.garagegames.com/mg/forums/result.thread.php?qt=33542
package BuildOnly
{
function onExit()
{
// Override onExit when building, only interested in errors in scripts
}
};
function XG_Build( %path )
{
activatePackage( BuildOnly );
echo( "\n\n------------------------------------------------" );
echo( "Build starting...\n" );
echo( "Build path \"" @ %path @ "\"\n" );
%allTypes = "*.cs *.gui";
for( %word = 0; %word < getWordCount( %allTypes ); %word++ )
{
%type = getWord( %allTypes, %word );
%typePath = %path @ %type;
echo ( "Compiling files of type: " @ %type @ "\n" );
for( %file = findFirstFile( %typePath ); %file !$= ""; %file = findNextFile( %typePath ) )
{
compile( %file );
}
echo( "\n" );
}
echo( "Build complete." );
echo( "------------------------------------------------\n\n" );
}
#3
08/01/2008 (8:54 am)
Cool link! It should work. I just ran compile() and it gave me the params, so go for it.
Associate David Montgomery-Blake
David MontgomeryBlake