Difference between revisions of "Compiling TPT++ on debian/ubuntu"

From The Powder Toy
Jump to: navigation, search
(Created a tutorial on how to compile TPT++ on linux, not finished yet.)
 
(Add outdated notice)
 
(34 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
'''ATTENTION: This guide is outdated as of 2021. Please use this guide for building any recent version of the game: [[Building TPT with Meson]]'''
 +
 
To compile TPT++ you need to do the following:
 
To compile TPT++ you need to do the following:
  
 
''1)'' Open your Terminal and type:
 
''1)'' Open your Terminal and type:
  
'''sudo apt-get install build-essential libsdl1.2-dev libbz2-dev liblua5.1.0-dev fftw3-dev scons''' (64 bit systems use lib64bz2-dev)
+
<code>sudo apt-get install build-essential libsdl2-dev libbz2-dev zlib1g-dev liblua5.1-0-dev git scons libfftw3-dev libcurl4-openssl-dev</code> Adjust the command / package names for your distro if not on Debian or Ubuntu. You might have some of these packages already installed, so if you see "X is already newest version" just ignore it
'''You MUST have Python installed and working in order for scons to work!'''
 
  
''2)'' Get the TPT++ source code from Simon's github (I will not cover how to use git in this tutorial, refer to the old compiling tutorial for TPT)
+
''2)'' Run <code><nowiki>git clone git://github.com/The-Powder-Toy/The-Powder-Toy.git</nowiki></code>
  
''3)'' Navigate to your folder containing the TPT++ source code and type:
+
''3)'' Navigate to your folder containing the TPT++ source code (The-Powder-Toy) and just type:
  
'''scons --lin --release'''
+
<code>scons</code>
  
''4)'' Once scons has finished compiling (it will say "Done building targets" in the terminal), you will need to navigate to the "build/" folder, you can do this by typing '''cd build/''' in the Terminal.
+
You can also use <code>-j4</code> to compile with 4 cores (or how ever many you have). For other arguments, see the [[Scons_command_line_flags|list of all Sconscript flags you can use]]
  
''5)'' Run TPT++ by typing '''./powder-legacy''' or '''./powder''' in the Terminal (depending on if you used the '''--sse3''' flag during the compiling process or not, just issue the '''ls''' command and find any of these files.)
+
''4)'' Once scons has finished compiling (it will say "Done building targets" in the terminal), you'll find TPT executable in build/ folder, it will be named either powder, powder-legacy, powder64, or powder64-legacy, depending on the options you used.
  
If you need any help just post on the forums, message me (ristovski) or highlight me on our IRC channel with the same nick.
+
[[Category:Development]]
 +
[[Category:Compiling]]

Latest revision as of 08:46, 3 April 2021

ATTENTION: This guide is outdated as of 2021. Please use this guide for building any recent version of the game: Building TPT with Meson

To compile TPT++ you need to do the following:

1) Open your Terminal and type:

sudo apt-get install build-essential libsdl2-dev libbz2-dev zlib1g-dev liblua5.1-0-dev git scons libfftw3-dev libcurl4-openssl-dev Adjust the command / package names for your distro if not on Debian or Ubuntu. You might have some of these packages already installed, so if you see "X is already newest version" just ignore it

2) Run git clone git://github.com/The-Powder-Toy/The-Powder-Toy.git

3) Navigate to your folder containing the TPT++ source code (The-Powder-Toy) and just type:

scons

You can also use -j4 to compile with 4 cores (or how ever many you have). For other arguments, see the list of all Sconscript flags you can use

4) Once scons has finished compiling (it will say "Done building targets" in the terminal), you'll find TPT executable in build/ folder, it will be named either powder, powder-legacy, powder64, or powder64-legacy, depending on the options you used.