source: wkhtmltox/trunk/fuentes/ @ 51

Last change on this file since 51 was 51, checked in by mabarracus, 4 years ago


File size: 7.3 KB
1Clone this repository by running the following command:
3    git clone --recursive
5If you are on Windows, make sure that you are cloning in a location without
6spaces/special characters in the name. In case you already have a cloned
7repository, update to the latest version by running the following commands:
9    git pull
10    git submodule update
12Please ensure that you have enough disk space in the location you have cloned
13the source code, as it will require approximately 1.2GiB for both the `qt` and
14`wkhtmltopdf` repositories. Each target that is built will require an
15additional 2.5GiB for compiling the source code and producing the final
16installer (for Windows) or packages (for other OSes), which will be generated
17in the `static-build/` folder.
19You can create a debug build by passing the `-debug` flag to the build script.
20It is recommended to always pass the `-clean` flag, which removes the
21existing build folder and performs a clean build. Note that passing `-debug`
22may increase the disk space required for the build and final binaries for
23storing the additional debug information.
28Please ensure that the cloned repository is in the user's home directory
29e.g. `~/wkhtmltopdf`. If you clone it in a different directory, it may
30fail with `E: Failed to change to directory /your/dir: No such file or directory`.
31Please note that [encrypted home directories](
32and [non standard home directories](
33(i.e. not located in `/home`) are not supported -- you are advised to
34use a VM instead to build wkhtmltopdf.
36Building is supported only on 64-bit Debian Jessie (i.e. stable release), and
37the binaries are produced in a self-contained chroot environment for the
38target distribution -- you will need to first setup the build environment
39and then only you can perform the build for a 32-bit or 64-bit binary.
40The following targets are currently supported:
42Target         | Setup of Build Environment                    | Building 32-bit binaries                 |  Building 64-bit binaries
43------         | --------------------------                    | ------------------------                 |  ------------------------
44Generic        | `sudo scripts/ setup-schroot-generic` | `scripts/ linux-generic-i386`    | `scripts/ linux-generic-amd64`
45Debian Wheezy  | `sudo scripts/ setup-schroot-wheezy`  | `scripts/ wheezy-i386`           | `scripts/ wheezy-amd64`
46Debian Jessie  | `sudo scripts/ setup-schroot-jessie`  | `scripts/ jessie-i386`           | `scripts/ jessie-amd64`
47Ubuntu Trusty  | `sudo scripts/ setup-schroot-trusty`  | `scripts/ trusty-i386`           | `scripts/ trusty-amd64`
48Ubuntu Precise | `sudo scripts/ setup-schroot-precise` | `scripts/ precise-i386`          | `scripts/ precise-amd64`
49CentOS 7       | `sudo scripts/ setup-schroot-centos7` | not available                            | `scripts/ centos7-amd64`
50MinGW-w64      | `sudo scripts/ setup-mingw-w64`       | `scripts/ mingw-w64-cross-win32` | `scripts/ mingw-w64-cross-win64`
52The MinGW-w64 toolchain can cross-compile 32/64-bit Windows binaries from
53Linux -- it is useful for targetting Windows XP/Windows 2003, which are not
54supported by default when compiling with MSVC 2013. You may require a
55working internet connection during the build to download and compile
56the dependent libraries (e.g. OpenSSL).
58Each target will require approximately 1.5GiB of disk space to hold both
59the `i386` and `amd64` chroot environments for that target. By default,
60the chroot environments are created under `/var/chroot` -- in case you
61want to create them under another location (e.g. due to insufficient disk
62space), please run the command `export WKHTMLTOX_CHROOT=/some/other/dir`
63**before** the command for setup of the build environment.
65While setting up the build environments, please ensure that you are logged
66in as a regular user who has `sudo` access. It is possible to run the script
67without `sudo` but you will need to have root privileges (e.g. via `su`). In
68that scenario, you may get the error `Unable to determine the login for which schroot access is to be given`
69-- you will have to set `export SUDO_USER=<username>` and try to run it again.
70Other than the setup of build environment, **do not run any other command
71with `root` privileges!** The compilation process can be run as a normal
72user and running it as `root` may lead to errors or complete loss of data.
74After the build environment is setup, you can run the command mentioned above
75to build either the 32-bit or 64-bit binaries, which should generate a
76native package (either DEB or RPM, depending on the distribution) in the
77`static-build/` folder.
82* Install Visual Studio 2013 Update 4 -- [Community Edition](
83  should also work.
84* Do "Windows Update" to ensure that VC/SDK security patches are up-to-date
85* Install the latest [ActivePerl]( release
86* Install the latest [Python 2.7]( release
87* Install [NSIS 2.46](
88* Make sure that you can run "git". If not, add it to the PATH or reinstall
89  with option "Run Git from the Windows Command Prompt".
91Target          | Building 32-bit binaries               |  Building 64-bit binaries
92------          | ------------------------               |  ------------------------
93MSVC 2013       | `scripts\ msvc2013-win32`      | `scripts/ msvc2013-win64`
95During the build, a working internet connection is required to download and
96compile the dependent libraries (e.g. OpenSSL). The output installers should
97be generated in the `static-build` folder.
99Please note that if you want to target Windows XP/Windows 2003 (i.e. NT 5.x)
100you should use the MinGW-w64 builds cross-compiled from Linux as the MSVC builds
101target Windows Vista or later (i.e. NT 6.x) by default.
103OS X
106Building is supported only on OS X 10.7 or newer. You will need to have the
107latest Xcode for your OS X version. Additionally, you will need to run the command
108`sudo gem install fpm --no-ri --no-rdoc` in the terminal to install
109[fpm](, which is used for building the package.
111Target          | Build Command
112------          | -------------
11332-bit Carbon   | `scripts/ osx-carbon-i386`
11464-bit Cocoa    | `scripts/ osx-cocoa-x86-64`
116During the build, a working internet connection is required to download and
117compile the dependent libraries (e.g. libpng and libjpeg). The output package
118should be generated in the `static-build` folder.
123In case you are running on a non-Debian/Ubuntu Linux distribution or want to
124target a Linux distribution not listed above or another Unix-like OS, you
125will need to use the `posix-local` target. It assumes that you already have
126all the build dependencies installed beforehand and will generate a tarball
127with the specification of `local-MACHINENAME` in the `static-build/` folder.
129If you are able to get such a build running, contacting the developers via
130the mailing list or submitting a patch with the build instructions would be
Note: See TracBrowser for help on using the repository browser.