Community
SCI Programming => SCI Development Tools => Topic started by: troflip on June 07, 2016, 03:00:13 AM
-
http://scicompanion.com/Downloads/PostBuild.zip
Unzip into SCI Companion's plugin folder (so you have Plugins\PostBuild\PostBuild.exe)
What does it do? If you put a PostBuild.bat file in your game's folder, it executes it. Amazing. I use it to copy some files:
xcopy /D resource.001 Release\
xcopy /D resource.map Release\
... or write your own! Make a new C# console project. Entire source code list below:
class Program
{
static void Main(string[] args)
{
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "PostBuild.bat";
proc.StartInfo.WorkingDirectory = args[0];
proc.Start();
}
}
-
Nice. And hey, at least it's more functional than Hello World :)
-
So, just to create a dated copy after each build?
-
Or whatever you put in postbuild.bat. Mine makes a zip.
-
Don't worry, it's not meant to replace your publisher plugin :-)
I was using it to push resource.map and resource.001 into Unity project's assets folder so I don't have to copy them over manually every time I make a change (unfortunately I can't stick the whole game in Unity's assets folder, because it assumes *everything* in there is a resource that should be packaged with the game, and there's no way to exclude only certain files).
-
Might be nice to have a builtin pre and post build configurable events in Companion like VS has. Though what you were using your plugin for you probably wouldn't want to call it on every build.
-
Might be nice to have a builtin pre and post build configurable events in Companion like VS has. Though what you were using your plugin for you probably wouldn't want to call it on every build.
Yeah, that sounds like a good idea. I guess it could be as simple as plopping a PreBuild.cmd and PostBuild.cmd in the game's folder - and I guess having Companion run them with some well-known environment variables defined (e.g. SRC_FOLDER, etc...).
Any ideas what purposes a pre build event would serve? (easy enough to implement, just can't think of any reason for it at the moment, but I'm sleepy).
-
Perhaps not so much pre build, but I often use post build for debugging purposes in VS projects. I guess pre build could be used for checking external dependencies before building, but off hand the only external dependencies I can think of for SCI games is sciAudio, but that would not affect a build, only game play. Possibly if a list of added audio files were maintained it call a batch file to see if there are references to missing audio files? But again, not required before a build.