== Summary == Parts of our build and deployment environment are currently beeing changed. The main goal behind this is being able to easily create deployable packages/bundles for OSX. This Page should be a work in progress and its purpose is to document the overall design and the different tasks required to implement it. The idea is that people involved in these tasks discuss all topics related to that and document the decisions here. Once we all have the same idea about the solution we aim for, we can assign the different tasks to different people and complete them more efficiently. A good place for discussions is [http://www.wildfiregames.com/forum/index.php?showtopic=15511 this thread] in the forums. ---- = Overview current design = == update-workspaces.sh / update-workspaces.bat: == The sh-script on Linux/*nix/OSX runs the compilation of some external dependencies and also premake. On Windows the batchfile only executes premake because most of the dependencies are precompiled. == Premake == Premake creates our workspaces (also called solutions or projects) for the different platforms. Currently we support Makefiles, VisualStudio (2005, 2008, 2010), Xcode3, Codeblocks. == Workspaces == The workspaces are used for building the code on different platform and also for development with different programs (IDE's). == Deployment == For (alpha-)releases we make a special deployment for various reasons. The main reason is that we want to make it easier and more convenient for the user. Everything is precompiled and distributed in appropriate containers for the different operating systems and platforms (e.g. .deb files for debian based linux systems and .exe files for windows etc.). ---- = Future design = == Overview == Some basic design decisions * In the first place we stick to Premake. If someone offers a working solution with other tools like CMake, we are open to change that decision. * Sticking to Premake means we can't manually create workspaces * We separate the external libraries from the game's code and data in the repository * The libraries are split into separate directories per operating system and architecture * Developers will have to make a separate checkout to get the right libraries for their system * Updateworkspaces checks if the libraries are present and up to date to avoid problems with outdated libraries * Supported platforms are Linux-source (no precompiled libraries in the repository), Macosx-x64 and Windows-x86. * We don't use special "subversion tricks" like externals definitions and instead keep separate identical copies of libraries if necessary. Storage isn't a problem and we don't update the libraries often. Other arguments brought up by Philip: "... it'll probably confuse Trac and it'll probably make mirroring/migrating to Git harder". == Graphical overview of interaction between different components (future-version) == [[Image(http://trac.wildfiregames.com/attachment/wiki/BuildAndDeploymentEnvironment/future-build-environment-overview.png?format=raw)]] == Overview of the repository structure == {{{ . |-- art |-- audio |-- libraries | `-- trunk | |-- linux-source | | |-- libA | | | |-- include | | | `-- lib | | `-- libB | | |-- build.sh | | |-- include | | |-- lib | | `-- src | |-- macosx-x64 | | |-- libA | | | |-- include | | | `-- lib | | `-- libB | | |-- build.sh | | |-- include | | |-- lib | | `-- src | `-- windows-x86 | |-- libA | | |-- include | | `-- lib | `-- libB | |-- include | `-- lib `-- ps `-- trunk |-- build | |-- premake | `-- workspaces | `-- update-workspaces.sh `-- source }}} == Updateworkspaces == Updateworkspaces must check if the library is present and up to date. If not, it should stop and display an error. This check could work with a manually updated file in the source-tree containing the current revisions for library-directories. ---- = Macosx packaging = == Where to place which files? == ||'''Name'''||'''Readonly'''||'''Description'''||'''Path MAC'''||'''Determined by/Set where?'''|| ||Game data root||Y||Data-Directory for static game data||[Bundle]/Contents/Resources/data||m_rdata in Paths.cpp|| ||User data root||N||Root-Directory for data the user creates with the game (savegames, screenshots etc...)||~/Documents/0ad||m_Data in Paths.cpp|| ||savegame directory||N||Directory where savegames are saved to and loaded from||~/Documents/0ad/saves||As [User data root]/saves in GameSetup.cpp InitVFS|| ||screenshot directory||N||Directory where screnshots are saved by the game||~/Documents/0ad/screenshots||AS [User data root]/screenshots in GameSetup.cpp InitVFS|| ||Default config||Y||Defaullt config-file which is readonly||[Bundle]/Contents/Resources/data/config||As [Game data root]/config in GameSetup.cpp IniVFS|| ||Userconfig root||N||Currently unclear... why is [Logs] here and not in [User data root]?||~/Documents/0ad||As xdgConfig in Paths.cpp|| ||Userconfig||N||Contains user specific configuration settings||~/Documents/0ad/config||m_config = [Userconfig root]/config in Paths.cpp|| ||Logs||N||Contains logs created by the game||~/Documents/0ad/logs||m_logs = [Userconfig root]/logs in Paths.cpp|| ||Cache||N||Cache directory||~/Library/Application Support/0ad/cache||m_cache|| ||Mods||Y||Directory where „modable“ data is places,,, not quite clear yet how this should work||???||???||