Jump to content
LaunchBox Community Forums

Post-build events are your friend


Recommended Posts

I'm not sure if this would be useful for anyone else but I thought I'd share how I have my post-build event setup in my plug-in project.  I find this makes developing plugins for LaunchBox/BigBox more convenient.  You can add some post-build event commands to have your plug-in automatically copied and ready for release.  My plug-in comes with a: 

  • Theme
  • StartupTheme
  • Plugin
  • Plugin media folder

It was tedious getting this all together every time I wanted to release it and manually copying the files around whenever I wanted to test it.  I included a folder called "LaunchBox" in my solution and I put subfolders for Theme (with files for the theme), StartupTheme (with files for the startup theme), and Plugin (with media files for the plug-in) in there.  Then in the post-build script, I copy that folder to the target folder, copy my DLL into the plug-ins folder where it needs to be, copy additional 3rd party DLLs that my plug-in uses into the plug-ins folder where it needs to be, and finally copy the whole folder to my launchbox folder so it is automatically deployed and ready for testing.  Once you're happy, you can zip up that LaunchBox folder that's in your debug/release folder and it's all set to go with all your supporting files.  In this case, eclipse.dll is my plug-in DLL and  WpfAnimatedGif.dll is a dependency for my plug-in.  

RMDIR "$(TargetDir)LaunchBox\" /Q /S
xcopy "$(SolutionDir)Eclipse\LaunchBox\" "$(TargetDir)LaunchBox\"  /K /D /H /Y /E
xcopy "$(TargetDir)Eclipse.dll" "$(TargetDir)LaunchBox\Plugins" /K /D /H /Y
xcopy "$(TargetDir)WpfAnimatedGif.dll" "$(TargetDir)LaunchBox\Plugins" /K /D /H /Y
xcopy "$(TargetDir)LaunchBox\" "D:\LaunchBox\" /K /D /H /Y /E

Link to comment
Share on other sites

This is very handy indeed!!  One additional line I use in mine during development/testing is (add it after the last 'copy' line)   

"D:\LaunchBox\LaunchBox.exe"

..talk about a save on clicks. lol  :) 

An then if I want to build it without starting LB, I just add "REM " in front of it.

This is only because I don't know how to get it [a plugin] to Debug. 😊 (if it's even [really] possible)

  • Like 1
Link to comment
Share on other sites

You can readily debug. In visual studio open your solution.  Make sure your debug symbols file (.PDB) is in the plug-ins folder with your plugin dll. Click debug > attach to process. Choose LaunchBox or BigBox depending on where your plugin is running. Set a breakpoint in your code.  

  • Thanks 2
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...