Project Organization and Deployment

Published December 03, 2009
Advertisement
Wow, its been another month already. I'm been making progress and killing bugs but I haven't finished a journal entry because I always feel like I'm explaining things in a way that isn't understandable or interesting. Anyway, I'll have gameplay-relevant entries soon. This one's about organization and deployment! Fun!

Project Organization

I finally organized my project folder to be much more simple. At the top level are the executable, DLLs, config file, and two folders: the "data" directory where all the game data is stored, and a "project" directory that stores everything related to the project. In the "project" folder I keep the source code/VC++ project, the game design folder where I plan the project and work on art assets and audio, the documentation folder (Doxygen), and the deployment folder.

This setup makes it easy to exclude everything but the relevant files when I deploy the game.

Deployment

I finally have my deployment process streamlined. All I do is run a batch file and it takes care of everything before building the installer with NSIS. So far, it creates an filename list for the uninstaller, moves any screenshots out of the data directory (so the user doesn't install my screenshots, and I don't need to manually move them each time), and builds the installer. The uninstaller list is just a list of all the files in the program hierarchy that the uninstaller uses to cleanup. Any other files are left over after the uninstall, such as the log file and screenshots.

In the NSIS build script, I exclude anything named "project" or any file with a .pdb or .ilk extension. The script automatically runs the VC++ redistributable and the OpenAL redistributable with the no-prompt option. Below, you'll my deployment folder. It has the script itself, the icons, the images used in the installer, the redistributables, the license agreement used in the setup, the filename list for the uninstaller (which is created with the installer in the same script), and the batch file that brings it all together in one command.


This is the batch file:
unList.exe /INSTDIR=C:\My_Stuff\PROJECTS\Aquariusmove /y "C:\My_Stuff\PROJECTS\Aquarius\data\screenshots\*.*" "C:\My_Stuff\PROJECTS\Aquarius\project\design\screenshots\""C:\Program Files\NSIS\makensis.exe" "C:\My_Stuff\PROJECTS\Aquarius\project\deployment\Aquarius.nsi"

I use absolute paths to be clear, and the directory structure won't change anyway. It runs an app (you can find at the NSIS wiki) that makes a list of filenames for the uninstaller, then moves the screenshots into my project/design/screenshots folder, then builds the installer by calling makensis.exe with the script as an argument.

Here's the NSIS script I use. If you want to start using NSIS, you could do worse than to start with this script and customize it to your project.

Documentation

I'm in the process of documenting my code with Doxygen. The config file for doxygen is loaded with comments that make it huge, and just repeat what the documentation says anyway. What I do is use the Doxywizard to create an initial config file (the last tab) and then manually copy+paste the abbreviated version into a text file. Its just much nicer to use the short version to make changes. I don't think the Doxywizard gives all the options it should (the "Advanced" tab is empty?), so this is what I do.

I think documenting the code will help my understanding of what I've written, and make it possible to share the code or point to it as a reference. I plan to release the code for Aquarius once its sufficiently documented. I'm not going to try to make it "impressive", either. A lot of the code is being written to fulfill a single purpose, so I don't waste time writing generic code. It will all be in the docs.
Previous Entry The Life Aquatic
Next Entry Fishy
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement