Difference between revisions of "Fs2 open on Linux/Compiling PCS2"
From FreeSpace Wiki
(4 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
== Ubuntu 12.04 (and derivatives like Linux Mint 13) == | == Ubuntu 12.04 (and derivatives like Linux Mint 13) == | ||
− | Install the following dependencies (you may already have some of these if you've previously compiled FSO / wxLauncher / wxFRED) | + | * Install the following dependencies (you may already have some of these if you've previously compiled FSO / wxLauncher / wxFRED) |
− | $ sudo apt-get install scons git libdevil-dev wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libwxgtk2.8-dbg libboost-regex1.46-dev libboost-system1.46-dev libboost-filesystem1.46 | + | $ sudo apt-get install scons git libdevil-dev wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libwxgtk2.8-dbg libboost-regex1.46-dev libboost-system1.46-dev libboost-filesystem1.46-dev |
− | Checkout a copy of the code & change to the new directory | + | * Checkout a copy of the code & change to the new directory |
$ git clone git://alliance.git.sourceforge.net/gitroot/alliance/PCS2 | $ git clone git://alliance.git.sourceforge.net/gitroot/alliance/PCS2 | ||
$ cd PCS2 | $ cd PCS2 | ||
− | + | * Build PCS2 (note that the debug build is the default build target) | |
+ | $ scons | ||
+ | $ scons pcs2 | ||
+ | |||
+ | * Copy pcs2 to somewhere in your path (optional) | ||
+ | $ sudo cp pcs2 /usr/local/bin | ||
+ | $ sudo cp pcs2d /usr/local/bin | ||
+ | |||
+ | |||
+ | == Ubuntu 14.04 (and derivatives like Linux Mint 17) == | ||
+ | |||
+ | Same as for 12.04 with the following exceptions: | ||
+ | |||
+ | * Install the following dependencies | ||
+ | $ sudo apt-get install scons git libdevil-dev wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libwxgtk2.8-dbg libboost-regex1.55-dev libboost-system1.55-dev libboost-filesystem1.55-dev | ||
+ | |||
+ | * Apply this diff | ||
+ | |||
<pre> | <pre> | ||
diff --git a/SConstruct b/SConstruct | diff --git a/SConstruct b/SConstruct | ||
− | index | + | index eb423ad..19d1184 100644 |
--- a/SConstruct | --- a/SConstruct | ||
+++ b/SConstruct | +++ b/SConstruct | ||
Line 23: | Line 40: | ||
cc_flags = ['-Wall'] | cc_flags = ['-Wall'] | ||
-libs = ['GL', 'GLU', 'boost_system', 'boost_filesystem', 'boost_regex', 'IL', 'ILU', 'ILUT'] | -libs = ['GL', 'GLU', 'boost_system', 'boost_filesystem', 'boost_regex', 'IL', 'ILU', 'ILUT'] | ||
− | +libs = ['GL', 'GLU', 'boost_system', 'boost_filesystem', 'boost_regex', 'IL', 'ILU', 'ILUT', 'SDL' ] | + | +libs = ['GL', 'GLU', 'boost_system', 'boost_filesystem', 'boost_regex', 'IL', 'ILU', 'ILUT', 'SDL'] |
debug_cc_flags = ['-g'] | debug_cc_flags = ['-g'] | ||
release_cc_flags = ['-O2'] | release_cc_flags = ['-O2'] | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 03:41, 2 July 2015
This is a quick guide for compiling PCS2 on Linux
(it's rough so far because I didn't know anything about scons before today...)
Ubuntu 12.04 (and derivatives like Linux Mint 13)
- Install the following dependencies (you may already have some of these if you've previously compiled FSO / wxLauncher / wxFRED)
$ sudo apt-get install scons git libdevil-dev wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libwxgtk2.8-dbg libboost-regex1.46-dev libboost-system1.46-dev libboost-filesystem1.46-dev
- Checkout a copy of the code & change to the new directory
$ git clone git://alliance.git.sourceforge.net/gitroot/alliance/PCS2 $ cd PCS2
- Build PCS2 (note that the debug build is the default build target)
$ scons $ scons pcs2
- Copy pcs2 to somewhere in your path (optional)
$ sudo cp pcs2 /usr/local/bin $ sudo cp pcs2d /usr/local/bin
Ubuntu 14.04 (and derivatives like Linux Mint 17)
Same as for 12.04 with the following exceptions:
- Install the following dependencies
$ sudo apt-get install scons git libdevil-dev wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libwxgtk2.8-dbg libboost-regex1.55-dev libboost-system1.55-dev libboost-filesystem1.55-dev
- Apply this diff
diff --git a/SConstruct b/SConstruct index eb423ad..19d1184 100644 --- a/SConstruct +++ b/SConstruct @@ -4,7 +4,7 @@ import string defines = ['UNIX', 'HAVE_SYS_TYPES_H', 'HAVE_SYS_STAT_H', 'HAVE_UNISTD_H', 'ILUT_USE_OPENGL'] include_path = ['pugixml'] cc_flags = ['-Wall'] -libs = ['GL', 'GLU', 'boost_system', 'boost_filesystem', 'boost_regex', 'IL', 'ILU', 'ILUT'] +libs = ['GL', 'GLU', 'boost_system', 'boost_filesystem', 'boost_regex', 'IL', 'ILU', 'ILUT', 'SDL'] debug_cc_flags = ['-g'] release_cc_flags = ['-O2']