Difference between revisions of "Packaging"

From VDrift
Jump to: navigation, search
m (adding update note)
(Spliting OSs)
Line 1: Line 1:
{{update}}
+
Packaging VDrift is different depending on the operating system on which it is packaged
 
 
One goal is to automate packaging as much as possible so that doing releases is simple. There are different methods for every platform. This document attempts to summarize them.
 
  
 
==Linux==
 
==Linux==
===Binary packages with autopackage===
+
''See [[Packaging on Linux]]''
====Prerequisites====
 
There are some things you need before you can build an autopackage.
 
  
First and most importantly, the autopackage development tools are needed. As of this writing, only the version in autopackage svn will correctly build the VDrift packages. The next release of the autopackage tools should have all the patches needed to build proper packages. BinReloc is used by VDrift but the code has been imported and you do not need to download this to build a package. You do however need apbuild.
+
==FreeBSD==
 
+
''See [[Packaging on FreeBSD]]''
Second, you must have two different compilers installed on your machine. This is to do the double-compiling so the vdrift binary will work on Linux no matter what version of glibc was used to build the distribution. Currently, the VDrift package setup uses g++-3.3 and g++-4.1, with gcc-4.1. Another known working setup is g++-3.3, g++-3.4, and gcc-3.4. The compiler versions are set in the tools/autopackage/vdrift.apspec file in [[Getting the development version|VDrift SVN]].
 
 
 
====Building====
 
The [http://autopackage.org/ autopackage] project is a very promising and useful next-generation packaging tool for Linux. It aims to help developers create packages that will work on any Linux distribution.
 
 
 
VDrift's autopackage creation is integrated into the SCons build system used to build the Linux version of VDrift. To build an autopackage, simply run
 
 
 
scons autopackage
 
 
 
Two options are important when running this command, '''minimal''' and '''release'''. For instance,
 
 
 
scons autopackage minimal=1
 
 
 
will build a package with the minimal data set. This can be combined with the release option to make a release-optimized package with the minimal data set:
 
 
 
scons autopackage minimal=1 release=1
 
 
 
Turning these options to 0 turns them off. This affects the package built as one might expect. The package name reflects how it was built. For example:
 
 
 
VDrift 2007-03-31-dev-minimal.package
 
VDrift 2007-03-23-full.package
 
 
 
Usually the file is renamed to replace the space with a '-' character, so that the URL to the package does not have to contain a "%20".
 
 
 
===Source packages===
 
Source packages are made in a similar way as autopackages using SCons.
 
 
 
scons src-package
 
  
builds a package named similarly. This package is put into the build/ directory. Currently the build system does tar the source package after compiling it in the build/ directory, but it includes the build directory as a parent in the archive itself. Since this function is not used that much, it has been a low priority to fix, and it is also pretty simple to just run tar manually and create the package.
+
==Mac OS X==
 
+
''See [[Packaging on Mac OS X]]''
Before doing this however, it is useful to warn the user that there is no data in the source package and they must download one of the source packages in order to install the game. This can be done by replacing the file data/SConscript in the file with the file in the SVN repository data/SConscript.no_data. This is a minor change made to the build system when source packages are made.
 
 
 
So, to make all this make sense, here are the commands to build a source package correctly:
 
 
 
scons src-package
 
cd build
 
cp ../data/SConscript.no_data data/SConscript
 
tar -jcvf vdrift-2007-03-23-src.tar.bz2 vdrift-2007-03-23-src/
 
 
 
Thus you end up with the file '''vdrift-2007-03-23-src.tar.bz2''' as a finished source package.
 
  
 
==Windows==
 
==Windows==
===Prerequisites===
+
''See [[Packaging on Windows]]''
* Nullsoft installer system: http://nsis.sourceforge.net/
 
* A compiled source of VDrift ([[Compiling#Windows]])
 
===Doing the work===
 
 
 
In the directory tools/win you can find 2 .nsi files. One for the minimal release and one for the full release.
 
If you installed nsis you can right click on the vdrift.nsi or vdrift-minimal.nsi file and select "compile script". The installer will be created now.
 
'''Please do not forget to change the version in the .nsi files (at the top of the files)'''
 
 
 
==FreeBSD==
 
''Coming Soon''
 
==OS X==
 
* Obtain the VDrift source code from the latest source release or directly via svn
 
  (Sometimes the source release is broken on Mac OS X, so you have to use svn in this case)
 
* The VDrift Mac OS X project requires at least XCode version 2.2 with the 10.4 Universal SDK installed<br>
 
* Finally open tools/osx/vdrift.xcodeproj, switch to the "Release-Deployment" Build style using the popup-menu in the toolbar and hit "Build" from XCode's "Build" menu<br>
 
* Deployable Disk-images (full and minimal) will be put into the "Release-Deployment" build folder<br>
 
  
 
[[Category:Development]]
 
[[Category:Development]]
[[Category:Update]]
 
[[Category:Expand]]
 
[[Category:Operating Systems:Linux]]
 
[[Category:Operating Systems:FreeBSD]]
 
[[Category:Operating Systems:Windows]]
 
[[Category:Operating Systems:Mac OS X]]
 

Revision as of 10:14, 2 June 2011

Packaging VDrift is different depending on the operating system on which it is packaged

Linux

See Packaging on Linux

FreeBSD

See Packaging on FreeBSD

Mac OS X

See Packaging on Mac OS X

Windows

See Packaging on Windows