Writing Plugins for Launchbox

[insert essentially redundant intro here]

Getting Started

Setting up the Project

    1. Create a new Blank Solution in Visual Studio
    2. Add a new Project > Choose “Class Library”
    3. Name your class MyPlugin.Launchbox.Core > Click Next
    4. Choose .Net Core 3.1 > Click Create
    5. Right Click on the project and select “unload Project” a file ending .csproj should open. Add some Elements to the TargetFramework element to look like the below and then Reload the project:

Setting up the project for .NET Framework

You can also author your plugin in framework. You will just have to import some library like System.Drawing.Common.

Setting up Build and Debugging in Visual Studio

If Setting up in a .NET (Core) project:

  1. Open the project Properties
  2. Select Build>Output and set Base Output Path To a folder inside the launchbox Plugins folder (e.g. “C:\Users\Dave\Launchbox\Plugins\MyPlugin”)
  3. Select Debug>General>Open debug launch profiles UI
  4. Add a New Profile and choose the Executable type as per below:
  5. Rename the selected profile to something like “LB Debug” and in “Path the the executable” navigate to the Launchbox.exe in the Core folder (NB. not the one in the root directory)  – e.g.  C:\Users\Dave\LaunchBox\Core\LaunchBox.exe
  6. Delete the existing Debug profile

If Setting up in a .NET Framework project:

  1. Download and install this extension here (or equivalent for your VS version): Microsoft Child Process Debugging Power Tool 2022
  2. Select Build>Output and set Base Output Path To a folder inside the launchbox Plugins folder (e.g. “C:\Users\Dave\Launchbox\Plugins\MyPlugin”)
  3. Open Project Settings>Debug and set the Start Action to Start External Program and set to “C:\Users\[youruseraccount]\LaunchBox\LaunchBox.exe” (NB: not the one in the Core folder)
  4. Also set “Enable native code debugging” to True
  5. In the Main Menu Click Debug>Other Debug Targets>Child Process Debugging Settings
  6. Set up a new entry as below:

Creating a menu command in the Launchbox Tools menu

  1. Create a folder called “PluginHooks”
  2. Create a new class in this called SystemMenuItem and copy the following code into it:
3. Click LB Debug and there you go. You’re all set up.

 

 

 

 

 

About stigzler 48 Articles
Chief crook and wattle bosher.

Be the first to comment

Leave a Reply

Your email address will not be published.


*