Post build powershell script

Post Reply
User avatar
IXix
Posts: 1123
Joined: Wed Nov 23, 2011 3:24 pm

Post build powershell script

Post by IXix »

I use this to automatically copy files to the relevant Buzz folder and to a package folder for zipping up and distributing. It saves me quite a lot of time so here it is in case anyone else might find it useful... https://www.dropbox.com/s/79tvbwx0dgm67 ... d.ps1?dl=1

I put it in the solution directory and add something like this to the post-build command field...

Code: Select all

powershell -file "$(SolutionDir)postbuild.ps1" -machinefile "$(TargetPath)" -packageroot "$(SolutionDir)Package" -type "Generator" -platform $(platform)
You can test run it without copying any files by adding the debug switch...

Code: Select all

powershell -file "$(SolutionDir)postbuild.ps1" -debug -machinefile "$(TargetPath)" -packageroot "$(SolutionDir)Package" -type "Generator" -platform $(platform)
It will also copy additional files (eg. demo.bmx, help files etc.) if you provide a file called "postbuild.txt".
Files are specified as: filename [@ destination]

Code: Select all

MyMachine Demo.bmx
.\Docs\MyMachine.html
.\Docs\*.html @ MyMachine\Docs\
.\Docs\*.jpg @ MyMachine\Docs\
.\Docs\*.css @ MyMachine\Docs
Post Reply