Author Topic: WinAGI: feature request - batch mode  (Read 5826 times)

0 Members and 1 Guest are viewing this topic.

Offline AGKorson

Re: WinAGI: feature request - batch mode
« Reply #15 on: February 15, 2021, 10:25:50 PM »
Yeah, probably a good idea.

Offline ZvikaZ

Re: WinAGI: feature request - batch mode
« Reply #16 on: February 17, 2021, 03:17:17 AM »
Sorry, but the compile dirty logic files doesn't work for me from command line.
Maybe I'm not using it correctly...

Can you elaborate a little about it's usage?
Should it be simply:
Code: [Select]
"C:\Program Files (x86)\WinAGI GDS\WinAGI.exe" /d ?

Or:
Code: [Select]
"C:\Program Files (x86)\WinAGI GDS\WinAGI.exe" /d "C:\Zvika\Games\Police Quest\AGI\PQ1.wag"?

Should it be run from the game directory, or it doesn't matter?
Does it expect something to be run before it, or after it?
Or any other instructions?

Offline AGKorson

Re: WinAGI: feature request - batch mode
« Reply #17 on: February 17, 2021, 12:11:23 PM »
Sorry - I didn't do a lot of testing, so there are a few 'glitches' you need to be aware of. I probably shouldn't have released this without doing extensive testing first. Oh well...

The second line is correct; you need to invoke WinAGI, then follow it with the switch '/d', and then your game file. It doesn't matter what directory you run it from, as long as the WinAGI executable is reachable (using the included directory information, or by using your DOS PATH environment variable).  If the path to the executable includes spaces, the entire executable command needs to be included in quotes, as in your example.

BUT the game file argument MUST be quote-free. (The function that opens a game expects no quotes, and I forgot to make sure the argument passed from the command line was 'de-quoted' - :P)

Also, you must include the full path to your game file (again, I didn't do a lot of testing, and didn't consider how it would work if a path was not included in the argument value).

So this should work for you:
Code: [Select]
"C:\Program Files (x86)\WinAGI GDS\WinAGI.exe" /d C:\Zvika\Games\AGI\PQ1.wag
Also keep in mind that if you configure WinAGI to use the Splash Screen at start up, you will get the GUI to load even if you use command lines; I didn't want to screw with the program initialization too much to get this to work, so I chose to process the command line AFTER reading the configuration file, which means you will get a splash screen if that setting is active. It's not a big deal though - the GUI automatically closes after the compile is done, or more simply, just disable the splash screen and you should be GUI free. (mostly... ::) )

I also discovered that if you run a command prompt window that uses elevated privileges, WinAGI doesn't read the game configuration file correctly, so you get the splash screen even if you've disabled it. I have no idea what's going on there. Just be aware of it.

I tested these instructions again this morning on a clean install, and it worked for me. So hopefully, once you get the syntax correct, you should be able to successfully run the compiler in whichever mode you want (c/d/r). If it succeeds, then the program will just terminate, with no exit code, and no output at all. If the compile fails, you should get one message box popup that tells you that. But it won't give a lot of detail. You will need to run the GUI to get a detailed explanation of why it can't compile.



Offline AGKorson

Re: WinAGI: feature request - batch mode
« Reply #18 on: February 17, 2021, 12:58:24 PM »
One more bug I noticed, when using the /r or /d options, you don't get an error message if the game file doesn't load. Using the /c option does give you an error message when the game file doesn't load.

So you just have to be a bit more careful with the /r and /d options.

Offline ZvikaZ

Re: WinAGI: feature request - batch mode
« Reply #19 on: February 18, 2021, 04:09:12 AM »
Thanks, now it's working.

If you could print error messages for '/d' and '/r' as well, it'd be nice.
Also, it'd be helpful to have what you wrote here documented in the help file. It will save you questions in the future ;)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.033 seconds with 24 queries.