Is there a way to recompile all files autmatically
by Mdk_4_ever Na · in Technical Issues · 03/26/2007 (4:32 pm) · 6 replies
When I discover error I have to quit torque go to script modify it then delete all dso files then open torque again is there any easier way to recompile the script files automatically ?
also it it possible to modify the script files and see the changes instantly in torque, or do I have to close the engine then reopen it again ?
thanks
also it it possible to modify the script files and see the changes instantly in torque, or do I have to close the engine then reopen it again ?
thanks
About the author
#2
03/28/2007 (5:37 am)
Ok thanks
#3
04/16/2007 (5:07 pm)
How does Torsion work?
#4
but we added a -compile command line param which finally gets boiled down to the following script:
04/16/2007 (5:16 pm)
I don't know how torsion works,but we added a -compile command line param which finally gets boiled down to the following script:
function compileAndQuit()
{
echo("compiling script files");
%success = compileScripts("*.cs *.gui");
if (%success)
{
echo("all script files compiled successfully");
quit();
}
else
{
echo("there were compile errors, exiting with non-zero status");
exit(1);
}
}
function compileScripts(%extensions)
{
echo("compiling \"" SPC %extensions SPC "\"...");
%tryCount = 0;
%sucCount = 0;
for (%n = 0; %n < getWordCount(%extensions); %n++)
{
%ext = getWord(%extensions, %n);
for (%file = findFirstFile(%ext); %file !$= ""; %file = findNextFile(%ext))
{
%suc = compile(%file);
%tryCount ++;
%sucCount += %suc;
if (!%suc)
{
%fails[%tryCount - %sucCount] = %file;
}
}
}
echo("compiled" SPC %sucCount SPC "out of" SPC %tryCount SPC "files");
for (%n = 1; %n <= %tryCount - %sucCount; %n++)
error("initialization", "compile failed:" SPC %fails[%n]);
if (%tryCount == %sucCount)
return true;
return false;
}
#5
you shouldn't need to delete all the .dso's.
torque only compiles .cs files which are newer than their associated .dso's.
for this i usually exec my own scripts from my own special function,
and then simple call that function when i want to reload the scripts.
makes the devtime to change a script and try it out much, much faster.
- torsion may provide that functionality too; not sure.
04/16/2007 (5:19 pm)
Oh also MDK 4 eva -you shouldn't need to delete all the .dso's.
torque only compiles .cs files which are newer than their associated .dso's.
Quote:
also it it possible to modify the script files and see the changes instantly in torque, or do I have to close the engine then reopen it again ?
for this i usually exec my own scripts from my own special function,
and then simple call that function when i want to reload the scripts.
makes the devtime to change a script and try it out much, much faster.
- torsion may provide that functionality too; not sure.
#6
Get the demo anyway. Man, I had some bizarre spawning and client tracking issues recently and I'm here to tell you it would have been freaking impossible to fix without Torsion allowing me to step through the scripts.
Impossible! I can't imagine anyone doing serious torquescripting work without it. I'm not aware of any other way to debug ts that way.
Edit: One word: breakpoints. Oh, and it's trivial to set up.
05/03/2007 (11:56 pm)
Orion: you were kind enough to help me out yesterday and now I am proud to return the favor. Get Torsion. Just DO it. :-)Get the demo anyway. Man, I had some bizarre spawning and client tracking issues recently and I'm here to tell you it would have been freaking impossible to fix without Torsion allowing me to step through the scripts.
Impossible! I can't imagine anyone doing serious torquescripting work without it. I'm not aware of any other way to debug ts that way.
Edit: One word: breakpoints. Oh, and it's trivial to set up.
Torque Owner Lee Latham
Default Studio Name