Release Build Process

From FreeSpace Wiki
Revision as of 01:07, 19 April 2013 by Chief1983 (talk | contribs) (Clarify the versioning procedure a bit, it is probably capable of being automated with some sed scripts or something at this point.)
Jump to: navigation, search
1) (One time) Create branch for new release.  This is an entirely remote op and can be done from anywhere, by anyone with write access.

svn copy [-r REV] svn://svn.icculus.org/fs2open/trunk/fs2_open svn://svn.icculus.org/fs2open/branches/fs2_open_<VERSION> -m "Copy trunk r<REV> to <VERSION> branch."
# REV is only needed after copy if not just copying the latest HEAD revision in trunk.

2) (Once per platform) Checkout the branch.

cd <CODE DIRECTORY>
svn co svn://svn.icculus.org/fs2open/branches/fs2_open_<VERSION> fs2_open_<VERSION>_svn

3) (Once per release) Commit a output filename/versioning commit.

https://svn.icculus.org/fs2open?view=rev&revision=9546 should be a complete diff of everything that should be modified.

Since the pilot code, this has been simplified a bit as far as project files are concerned.  Windows project version strings are a bit different (more consistent, fewer).  Most consist of replacing 2_open_<PREV_VERSION> with 2_open_<NEXT_VERSION>.  A search and replace through all the necessary files will cover most of the build output filenames for the Windows project files.  For instance:
s/2_open_3_6_19/2_open_3_7_0_RC1
That will cover all instances of fred2_open_3_6_19[-DEBUG], fs2_open_3_6_19[-DEBUG], and wxfred2_open_3_6_19[-DEBUG].
For enabling text-to-speech and voice recognition in MSVC_2008, open the Fred2.vcproj, Freespace2.vcproj, and code.vcproj.  In all three, you need to:
s/_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;"/_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;FS2_SPEECH;FS2_VOICER;"
There should be 18 replacements total, 6 per file.  In Freespace2.vcproj, you must also:
s/_VC08;/_VC08;FS2_VOICER;
There should be six of those.

4) (Following instructions are once per release per platform) Export at the desired revision from the branch checkout.

cd <CODE DIRECTORY>
svn up fs2_open_<VERSION>_svn
svn export fs2_open_<VERSION>_svn fs2_open_<VERSION>[_RCx]

5) Follow the specific platform's build method.

Windows:  Currently use MSVC 2008.
Open the .sln, and batch build all configs (Release and Debug Standard, SSE, SSE2) for Freespace2 and Fred2.
-or-
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild" /nocolor /nologo /rebuild Freespace2.sln "Release|Win32" && \
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild" /nocolor /nologo /rebuild Freespace2.sln "Debug|Win32" && \
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild" /nocolor /nologo /rebuild Freespace2.sln "Release SSE|Win32" && \
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild" /nocolor /nologo /rebuild Freespace2.sln "Debug SSE|Win32" && \
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild" /nocolor /nologo /rebuild Freespace2.sln "Release SSE2|Win32" && \
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild" /nocolor /nologo /rebuild Freespace2.sln "Debug SSE2|Win32"
Copy the 2 release exes into the respective debug folder, and archive the 4 exes, the 2 map files, and the 2 pdb files using standard zip compression.
You should end up with three files:  fs2_open_<VERSION>[_RCx].zip (SSE2), fs2_open_<VERSION>[_RCx]_SSE.zip, and fs2_open_<VERSION>[_RCx]_NO-SSE.zip.
MD5 the three zip files into fs2_open_<VERSION>[_RCx].md5.
Upload these 4 files to the mirrors under builds/WIN.

OSX:  Currently use Xcode 3.2.6.
cd <CODE DIRECTORY>/fs2_open_<VERSION>[_RCx]/projects/Xcode
tar -xvzf Frameworks.tgz
/<xcodebuild_path>/xcodebuild -configuration Release && /<xcodebuild_path>/xcodebuild -configuration Debug
Copy .apps from build/Debug and build/Release to a folder names FS2_Open <VERSION>[ RCx].
Use hdiutil to create an archive named FS2_Open-<VERSION>[_RCx].dmg.
hdiutil create FS2_Open-<VERSION>[_RCx].dmg -srcfolder FS2_Open-<VERSION>[_RCx]
MD5 the .dmg file into FS2_Open-<VERSION>[_RCx].md5.
Upload these 2 files to the mirrors under builds/OSX.

Linux/FreeBSD:  Use whichever latest GCC is available and working.
cd <CODE DIRECTORY/fs2_open_<VERSION>[_RCx]
./autogen.sh --enable-debug && make && cp code/fs2_open_<VERSION>[_RCx]_DEBUG ../ && make clean && make distclean && ./autogen.sh && make && cp code/fs2_open_<VERSION>[_RCx] ../
Archive the fs2_open_<VERSION>* binary files into one fs2_open_<VERSION>[_RCx].tar.bz2 file.
MD5 the bz2 file into fs2_open_<VERSION>[_RCx].md5.
Upload these 2 files to the mirros under builds/LINUX or builds/FREEBSD, accordingly.