Wanting a mature, object-oriented, cross-platform solution for creating OpenGL applications and complex--yet native--user interfaces, I recently turned to Qt. Its near-total cross-platform nature was appealing to me, as I regularly work in Mac OS X, Windows, and Linux, and maintaining separate project files for each platform is always a pain in the ass. I'm not very familiar with Qt or its toolkit, so I am working on a simple project to introduce me to the workflow with Qt Creator before jumping into the project I want to eventually create using Qt.
In the past, Qt Creator's internal use of qmake has been the obstacle preventing me from making the switch to using Qt Creator as my IDE of choice; a fact I've mentioned before on these forums. Coming from the near-infinite configurability of IDEs like Visual Studio and Xcode, I feel like, in its quest to be cross-platform, it takes the "lowest common denominator" approach too far and as a result is not very flexible and can be rather weak for certain things. However, I am trying to overcome this relatively minor issue to gain access to the vast power that the Qt system as a whole can offer.
I've come to accept the concept of shadow builds, but now I am faced with a troubling problem: a clean and consistent means of accessing common data files between projects at runtime (i.e., not built into the binary with a .qrc script). My project directory is set up as follows,
- Project
- Data
- ... images, fonts, scripts, sounds, zones, etc ...
- Editor
- ... source code for the data editor, which operates directly on the contents of the Data folder ...
- Engine
- ... source code for the static engine library, which contains location-neutral classes for reading and writing formats used in the Data folder ...
- Game
- ... source code for the game itself, which uses the contents of the Data folder ...
- Data
Additionally, once deployed, I want things to look like this on Windows:
- %ProgramFiles%\Project
- Data
- Editor.exe
- Game.exe
- /Applications/Game.app
- Contents
- Resources
- Data
- ... other bundle stuff ...
- Resources
- /Applications/Editor.app
- ... bundle stuff ...
- Contents
I figured doing something like this would be fairly common, but several months of sporadic Googling have revealed next to nothing. Maybe I'm approaching this completely wrong. If so, please share the right way to do it.