buckmaster Posted February 13, 2015 Share Posted February 13, 2015 This hasn't been announced extremely publicly, but the issue has been hanging around on GitHub for ages now, with a corresponding discussion at GG. I thought I'd bring it up again since we're nearing the release of at least the preview version of 3.7.The idea, briefly, is to move all the stock template scripts around so that we don't have so much duplication. Two examples are the entire core/ directory, and more egregiously, the tools/ directory, both of which are identical duplicated in Full/ and Empty/, and would have to be duplicated in any other templates you added. This is frustrating and irritating, so we thought we'd do something about it.My proposal is to move common script code into a top-level directory Packages, which looks like this currently. There's, for example, a Core package, and an Editors package. This way, those scripts aren't duplicated. So, before, your folders looked like this: Templates/ Full/ tools/ Empty/ tools/ But now they'll look like this: Templates/ Full/ Empty/ Packages/ Editor/ tools/ This means that when you create a project, instead of just copying the template to the new project, you must also copy the package scripts you want. I've made some changes to the Project Manager to do this automatically, the way it currently copies templates. However, this also required some additional infrastructure: a template.xml file in each template dictating which packages should be copied (since you don't just want all of them).Unfortunately I wasn't able to get this to work with the Project Manager UI, so you can't choose which packages to include at project generation time - if you want additional packages, you either need to edit template.xml, or copy the package manually after project creation.@Azaezel mentioned that this seems like a large change to be introduced, especially without much fanfare. My reasons are that it doesn't actually change the structure of a project, or any code - just moves it around. Projects generated the new way should look identical to projects generated the old way. And it does cut down on a lot of duplicated code that needs to be updated twice every time.Anyway, the point of this post is to raise awareness, but also to make sure I haven't made any fatal miscalculations that mean this is a bad idea. The obvious large downside is that this change will break any pull-requests involving changes to the templates, but I'm happy to weather that and help fix/resubmit them. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.