Hi,
The content.mak file has rules for generating pvr and cpp etc, that we all know. The header of the file says “auto-generated”. I’m wondering what tool generates this file, and from what form of source? That’d be cool because adding an asset to content.mak requires some editing.
Thanks,
Harry
Internally, we have a tool that generates content.mak and other project files for the platforms that we support which is why it says that it’s autogenerated. This program takes a configuration file that describes what is in a project and how to generate texture files etc. Using this process requires a very similar amount of editing as just editing the content.mak file directly, I’m afraid. The advantage in using this for us is the extra functionality of generating the projects for the many platforms we support.
Thanks for the info, Gordon. The side effect of cotent.mak being generated is that the format is quite verbose. For example, the jpg=>pvr and pvr=>cpp rules are per-file, which mean adding a file requires adding a few lines, instead of just adding the file name to a list. This is easy to mend in Makefile by adding general rules, but the visual studio project, where we prototype the app, is more tedious to change. So, IMHO your internal Makefile/vcproj/… generator is worth publishing, if that’s a possibility.
Thanks,
Harry
We have considered publishing the generator, but it is not really in a very good state to be released and we don’t really have the resources to commit to it at the moment. I will take note of the request, however and we may do this work in the future.
As I say above, we still have to specify most of the details per file, such as texture format, mip-maps etc. so that there isn’t a great deal to gain vs the content.mak file for a single platform. I agree that altering the VS projects is awkward, however (apparently, it’s easier to do via a text editor than through the project settings in VS, btw).
In the case you mention, (and for any major project) I would suggest kicking off a script/makefile based on content.mak that is run by VS in a prebuild step and strip out the existing methods in VS. That is the approach I’ve used myself in the past and it has the benefit of being cross-platform (XCode can run the same script on the Mac, for instance). It’s possible that we’ll ship the projects with a system more like this in the future.