Open GLS-SSV opened 2 months ago
A while ago I added a build instructions (OrbiterSDK/Doc/BuildingSamples.pdf) and scripts for building some sample programs but not all due to work involved. These selected samples are available to build without accessing Orbiter git repository, all samples can be build along with the Orbiter itself. I don't know about additional "install function", for the selected samples all files should already be in a right places.
Could you check the BuildingSamples.pdf and if there's still a problem with the samples ?
What I meant with "install function", is the copying of the source code to the samples folder.
Anyway, I've been thinking, and I'm probably a bit extreme, but maybe this could all be simplified by having just 2 sample-only "hello world" projects: one for a MFD and another for a vessel. Those projects would be a simple base for the devs to start their own projects. The BuildingSamples.pdf info would be placed somewhere at he start of the Orbiter Developer Manual, as a first step to creating an addon. The Orbiter-included MFDs and vessels would all stay in the Src folder, and as you say they, can be built as part of the Orbiter source, and the code is always available in GitHub, thus there wouldn't be a need for the current sample copying/installing.
Comparing with Orbiter 2016, the following vessels/plugins are missing from the (as installed) samples folder: Dragonfly ExtMFD FlightData Framerate LuaScript Meshdebug mmu Rcontrol ScnEditor ShuttleA ShuttlePB
Other projects (e.g. AscentMFD) are already located in the samples folder (in the repository) , which ends up being a PITA when trying to find something, because the projects are not all in the Src folder.
Disclaimer: I'm not a cmake expert, so please excuse any stupid ideas in the following sentences. At first glance it seems that to have a sample included, entries in several CMakeLists.txt need to be made (more than the usual), and the files are not all on the same folder, which means each project is not really centralized.
In addition to the "build function", the "main" CMakeLists.txt for each vessel/plugin should contain the "install function", which would not only copy the .dll into the modules folder (and apparently also textures and meshes as well), but also copy the sources into the samples folder, along with the "sample" CMakeLists.txt (located in a folder inside the vessel/plugin sources) for the user to build that vessel/plugin sample.
So probably the repository would not even need to have a samples and sample_build folders, as the samples folder would be created during the sample installation, when they are copied into there.
(This subject seems to have been partially covered a while back... sorry I missed it then)