v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Editing User:Khearn/DfhackLinuxBuild
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== HOWTO build dfhack on linux == | == HOWTO build dfhack on linux == | ||
− | |||
− | |||
This page describes (or attempts to) how to build dfhack from sources on a linux system. I have a Unbuntu 14.04 64-bit system, and this was written while 40.10 was the current DF version. If your linux system is different or you are building for a different DF version, you may find that not everything works exactly as I describe, but hopefully this will at least provide some help. | This page describes (or attempts to) how to build dfhack from sources on a linux system. I have a Unbuntu 14.04 64-bit system, and this was written while 40.10 was the current DF version. If your linux system is different or you are building for a different DF version, you may find that not everything works exactly as I describe, but hopefully this will at least provide some help. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Installing Libraries & other Packages === | === Installing Libraries & other Packages === | ||
Line 53: | Line 35: | ||
If you discover others that I didn't list here, let me know and I'll add them. | If you discover others that I didn't list here, let me know and I'll add them. | ||
+ | |||
+ | === Getting the sources === | ||
+ | |||
+ | The sources are on github.com, and you'll need to set up a github account to get them. So go to github.com and there will be something to tell you how to set up an account. | ||
+ | |||
+ | The sources I used are Quietust's "develop" branch. It can be found at https://github.com/DFHack/dfhack/tree/develop. The command to get that branch is: | ||
+ | |||
+ | git clone -b develop https://github.com/DFHack/dfhack.git | ||
+ | |||
+ | That will copy the main part of the code down to your system, but there are some submodules that need to be downloaded as well. | ||
+ | |||
+ | cd dfhack | ||
+ | git submodule init | ||
+ | git submodule update | ||
=== Building dfhack === | === Building dfhack === | ||
Line 59: | Line 55: | ||
cd build | cd build | ||
− | cmake .. -DCMAKE_BUILD_TYPE:string=Release - | + | cmake .. -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTAL_PREFIX=<path to your DF directory> |
Dfhack needs to know where it will install the files, so you have to tell it where you have DF installed. | Dfhack needs to know where it will install the files, so you have to tell it where you have DF installed. | ||
− | On my system, cmake consistently found the wrong location for the zlib library and tried to use the 64-bit version. So at this point I have to edit build/CMakeCache.txt and change the line with " | + | On my system, cmake consistently found the wrong location for the zlib library and tried to use the 64-bit version. So at this point I have to edit build/CMakeCache.txt and change the line with "ZLIB_LIBRAY:FILEPATH=/usr/lib/x86_64-linux-gnu/libz.so" to be "ZLIB_LIBRAY:FILEPATH=/lib/i386-linux-gnu/libz.so.1". You may or may not have to do this. If your build fails because it can't find "-lz", this may be the issue. |
Now you're ready to try the build. | Now you're ready to try the build. | ||
Line 70: | Line 66: | ||
This will be the acid test to see if you have all the libraries you need. If you've got everything, it should build and install and you'll find a dfhack executable in your DF directory. If there are errors, it's likely to be because you need some packages. | This will be the acid test to see if you have all the libraries you need. If you've got everything, it should build and install and you'll find a dfhack executable in your DF directory. If there are errors, it's likely to be because you need some packages. | ||
− | |||
− |