Author Topic: Torquescript minifier no work?  (Read 2250 times)

I found this tool lately
http://www.garagegames.com/community/blogs/view/21738
Quote from: ^

TorqueScript Minifier

 by Glenn Smith· 06/12/2012 (6:35 pm) · 8 comments


Hey all, I wrote this neat little program in C++ that minifies torque script. Basically, if you don't know what a minifier, it takes code and shrinks it to the smallest form. This minifier has a bunch of options, including optional removal of newlines, extra spaces, indents, and comments. You can specify to replace locals with minified forms such as %a, %b, etc. Can be compiled into a c++ application and used to minify source. This is mostly useful if you want to write a purely torquescript auto-updater, and want to obfuscate your scripts and guis.

Note: this does not obfuscate object names, function names, global variables, or anything inside quotes.
 
Command line arguments to pass:
 "-n" Set this to disable stripping of newlines
 "-l" Set this to disable renaming of local variables
 "-s" Set this to disable stripping of spaces
 "-c" Set this to disable stripping of comments, also disables stripping of newlines
 "-i" Set this to disable stripping of indents
 "-h" Set this to disable the addition of the header. Header contains specs on the minification, and can be modified if you want
 "-t" Set this to enable trace mode, where virtually everything is logged to the output
 
Download source code
 
Hope you enjoy and use :)

It's supposed to minify torquescripts
But
It doesn't work

If you try debugging it with visul studio it says 'String subscript out of range blah blah blah' and crashes

Plz halp how to fix program

Somebody should write one of these in torquescript.

For torquescript.

Somebody should write one of these in torquescript.

For torquescript.
Gud idea
Why don't you do it

Gud idea
Why don't you do it
because life

i might give it a shot. probably not, don't count on it

this seems like a waste considering blockland torquescript code does not ever take up more than usually 1MB. It only makes it harder for new coders to use your code as a resource.

this seems like a waste considering blockland torquescript code does not ever take up more than usually 1MB. It only makes it harder for new coders to use your code as a resource.
Damn Mac users that have \r for a new line, makes it annoying to read those scripts.




Also
Here is the same exact file just using the Windows File Ending
Download


But how the moon do I use it :v
uh
drag the file onto the compiled file
idk :(

uh
drag the file onto the compiled file
idk :(
Nothing happens
When I launch it with cmd and the file as first arg nothing happens
If i put more args like -c it says 'Unable to read'


Why do we need this?
Idk
To make it harder for idiots who think they should change a and b and then c and then mess up everything and then complain it doesnt work