Batch-Compiler for COB

Batch-Compiler for COB

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Batch-Compiler for COB

Post by Argh »

I'd really like a way to recompile dozens or hundreds of BOS scripts via a script or something. If anybody has a solution for this, please let me know.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Batch-Compiler for COB

Post by lurker »

I have a nice macro for it, just a sec to find it.

Why does the forum block unknown extensions? Anyway, this is an AutoHotKey macro, .ahk

It'll make scriptor pop up a lot, so best to either walk away from the computer or run it in a vm like I did.

I know there are better ways, but this was a nice lazy method for me.

Put your .bos in newscripts\ or change that line. You can also see that the first line of it is what bos file to start with; I think it goes alphabetically.
Attachments
compilemacro.zip
(70.44 KiB) Downloaded 18 times
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Batch-Compiler for COB

Post by Argh »

Thanks very much, I'll check it out. I'm tired of having to re-compile everything because of changes to a key include, that should really help.
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Batch-Compiler for COB

Post by thesleepless »

we really need a command line cob compiler >_<

anyone have a copy of the source that isn't corrupted?
i've asked around here and on TAU but no one seems to have one.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: Batch-Compiler for COB

Post by trepan »

Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Re: Batch-Compiler for COB

Post by Gnomre »

I couldn't get it to include custom files last time I tried, only the cavedog stuff (exptype.h etc). And I seem to recall it screwing up either Create() or the various weapon functions but I'm not sure on that.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Batch-Compiler for COB

Post by Argh »

The last time I messed with that (BASM, etc.) was when I was investigating fundamental efficiency stuff early on, 4 years ago. Looks like all work on that stopped well before I looked at it. Which is too bad, because the author was actually on to something major- Scriptor's output COBs are many times less efficient than they should be.

IIRC, I couldn't get it to compile stuff Spring would read correctly, but I'll take another look when I have some time.

For now, having Lurker's method should help, once I get it set up- tonight I recompiled all 200+ scripts for P.U.R.E. and World Builder by hand... which sucks, and makes the maintenance of the codebase more of a pain in the ass than I would like.

I keep having to make changes to base includes, though, to seek better efficiency or to deal with engine changes, and I have one more I'm considering... which would require yet-another recompile, since it's a basic thing used by most of the 200+, but would save a lot of CPU cycles, which is of importance if I'm going to try to get the game's performance requirements a wee bit lower.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Batch-Compiler for COB

Post by Argh »

Ok, got my own fire-and-forget automated compile script completed. It has no real error-handling, but it's really fast, and it's great for compiling a huge number of scripts at once. Just change the context of Scriptor (i.e., open up a script in the folder you're going to run the script in) and run this, and walk away.

It won't deal with stuff that won't compile, but meh, I am doing a lot of stuff now where I'm writing stuff via #includes and one change may effect a hundred scripts or more, which is why I needed a solution for this, pronto.
Attachments
001_compilemacro.zip
(516 Bytes) Downloaded 10 times
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Batch-Compiler for COB

Post by yuritch »

I have my own script for batch-compiling. It's made using Windows Scripting Host (aka vbs). It counts succesful and failed compiles, too, and warns you if not all the scripts were compiled.
You'll need to assotiate .bos files with Spriptor for that to work (easy to do - doubleclick on a bos, when Windows asks to choose program, find Scriptor and select it, check the "Always use this program" checkbox).
Attachments
build.7z
Scriptor batch-compile script
(982 Bytes) Downloaded 10 times
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Batch-Compiler for COB

Post by rattle »

I just wanted to mention Nemo but I think he's got that script off you
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: Batch-Compiler for COB

Post by Nemo »

Yeah, I use yuritch's. I shortened the time between each compile a bit, but otherwise exactly the same.
Post Reply

Return to “Feature Requests”