Hi there,
this thread reminded me of a tool that I developed some time ago but got forgotten as other things came along.
I've always found it crazy how hard it is to start a new Orbiter development when a new Visual Studio came along or I had to switch between Orbiter 2016 & Orbiter BETA or even Orbiter 2010...
The tool's called 'slngen' (Orbiter
SOlutio
N GENerator)
It creates (template-)solutions for Orbiter addons, so that you can easily start developing (at least that's what it should do)
I've re-visited that tool and developed it so far that it now can be used not only by myself ? .
Here's the usage (help information):
Code:
Orbiter SOLution GENerator tool v0.9 (c) 2020 Peter Schneider
¯¯¯ ¯¯
slngen [/T <type>][/VS <version>][/N <name>][/O <version>][/S][/C] <name> [/?]
<name> (required) Name of the addon.
Enclosed in double-quotes (") if it contains spaces.
/T <type> AddonType (MFD|Dialog|LaunchpadParam|Vessel).
The Addon type to be created.
/VS <version> VisualStudioVersion (2017|2019|all|auto).
The Visual Studio Version to create the solution for.
/N <name> Name of the addon (if parameter-value pair is preferred).
Same rules for name with spaces applies here.
/O <version> OrbiterVersion (2016|2010|BETA|auto).
The Orbiter Version to create the solution for.
'auto' will automatically detect the version by the current working path.
/S WithSubDirs.
Creates sub-directories in the addon-directory, containing the project-,
resource- and source-files.
/C Compact.
Generate project-file with fewer 'Debug|Release' 'Condition's.
/? Displays this usage information and exits.
It is meant to be located in the
Orbitersdk\utils\
folder (so it's in a known place), but can also be invoked directly from within your newly created "addon folder" in the
Orbitersdk\samples\
(Orbiter 2010 & 2016) rsp.
Orbitersdk\samples\Modules
or
Orbitersdk\samples\Vessel
(Orbiter BETA).
Here's an example of how to use it:
- Go to your
samples
directory and create a new folder to contain your new addon
and change into that new directory:
C:\Wherever\Orbiter\Orbitersdk\samples> mkdir DemoAddon
C:\Wherever\Orbiter\Orbitersdk\samples> cd DemoAddon
- Now issue the slngen command with the appropriate switches. Like for example:
C:\Wherever\Orbiter\Orbitersdk\samples\DemoAddon> ..\..\utils\slngen /T MFD /VS 2017 "Demo Addon MFD"
This will create all the needed solution & project files (MFD - for Visual Studio 2017 in this case) to start developing.
Note, that
not all features have been implemented yet. Hence the 0.9 Version!
Currently missing are:
- 'Vessel' for the AddonType parameter
- 'auto' for the VisualStudioVersion parameter
- 'all' for the VisualStudioVersion parameter
I would like to hear from you whether this works for you and what else is needed (apart from the missing features I've listed above).
The attached ZIP has the tool located in the preferred directory.
Have fun,
Kuddel