It’s long been a desire of Xojo users to have a single project thay they can open and compile a desktop app, web app, iOS app and console apps from the same project.
This would make it so if you have a suite of related applications that all use common code sharing that common code would be easier since its all in the same project and just by selecting a different target in the build settings you could compile whichever one you selected.
This would be a really handy capability. One that I’ve used in other IDE’s like Metrowerks CodeWarrior. In there you created a new “Target” and then could designate which “files” were part of the target. Since XOjo isn’t file oriented in that way it would make sense to have some other way to designate which targets a class/module/layout was part of.
In a way this already exists.
If you wrote a module and set its “compatibility” flags either on the whole module you can designate whether that module is compatible with Desktop, Web, iOS, or Console apps. You could create it, save it and then drop it into any one of those kinds of projects and based on those compatibility flag settings it would or would not compile for whatever kind of project you were creating.
Right now the only things that can be selected as compatibility settings are Desktop, Web, iOS, and Console. Either 32 or 64 bits. And when you put a check mark next to one of those items in the Build Settings boolean flags are set (TargetMacOS, TargetWeb, TargetiOS, TargetConsole and either Target32bit or Target64bit)
What if you could add your own targets ? Instead of just desktop, web, ios and console we could create new “Targets”.
When you select “Target” this creates a new spot in the IDE under macOS, Windows, Linux where we could add build steps like we do for macOS, Windows, Linux, Web. And it can be checked or not checked like the other build targets. Then like the others, when checked, a boolean “Target<whatevername we gave it>” should also be crated like happens for macOS, Windows, Linux and others. Then in code we could write
#if TargetUserDefined
#endif
exactly the same as we do with #If TargetMacOS etc.
The other thing we would need is for the compatibility flags editor to have extra rows in it, one for each of the targets we define. That way we could set the proper compatibility settings right in the IDE.
There are still a couple issues that would have to be sorted out in the IDE but this would be one step to making the “Universal Project” that has so long been desired.
If you have interest in this sign on to this case