Freigeben über


Have you noticed I like Batch Files?

I am a big fan of automating where I can.  I am not a big fan of remembering command line arguments.  I prefer to double-click whenever possible. 

In my last post, I went over how I generated an aca using a batch file.  Using the aca means that I can add resources to my project whenever I want without having to modify my playlist or my manifest.  But, now I want to take it one step farther.  I want the batch file to create my aca and I want it to launch my project in the simulator.  And, it turns out that it's a simple addition of one line at the very end:

"C:\Program Files\HD DVD Interactivity Jumpstart\HDDVDSimulator\HDiSim.exe" -nosize -debug -p ../

I'm using a few command line arguments of note here.  "-nosize" tells the simulator that it can ignore the size I enter for the resource in the playlist.  I can't ignore this value forever - before the final version goes to disc, I have to put the correct value in the playlist, but I don't want to bother with this value during development.  "-debug" tells the simulator to give me debug messages in the status bar at the bottom of the window.  I find this very helpful when things are working like I expected them to.  If you're doing a lot of script work, you might consider using "-jit" - more on this at a later time.  "-p " is used to tell the simulator the project that I want to run.  Since I'm adding this to the CREATE_ACA.bat file in ADV_OBJ, I use "../" as the project location so that the simulator loads this project from one level higher (which is considered to be the dvddisc directory).

Okay, now "CREATE_ACA.BAT" isn't really a good name for this updated batch file because it is also opening my project.   "BUILD_PROJECT.BAT" is attached at the end of this post.  I keep a copy of this batch file in all my ADV_OBJ folders.  Whenever I modify a file in my project, I can double click this file to re-generate my acas and launch my project in the simulator.

In my next post, I'll show you how to add a button to your Visual Studio toolbar to run this batch file.

BUILD_PROJECT.BAT