Skip to content
Ariya Hidayat edited this page Jan 31, 2015 · 31 revisions

The official build instructions are available on http://phantomjs.org/build.html.

This page contains miscellaneous notes on PhantomJS 2 build setup, primarily useful during its development stage. Please refer to the above page for the up-to-date documentation.

FreeBSD

You will need to edit build.sh:

  • Add OSTYPE=freebsd
  • Change the two make -j$COMPILE_JOBS lines near the end to call gmake instead of make
  • Follow the Linux instructions above

Windows

NOTE: The official build step will use MSVC2013 3rdparty libraries. If you want a different version, edit build.cmd, set 3RD_PARTY_LIBRARIES_REPO_BRANCH to point to the branch of https://github.com/Vitallium/phantomjs-3rdparty-win that you want. If you need other versions, please let Vitallium by creating an issue in that repository.

To generate a Visual Studio project, run qt\qtbase\bin\qmake -tp vc from the src directory (it will generate a .vcxproj). Make sure your project's INCLUDE/LIBRARY points to {PHANTOMJS_ROOT}\src\qt\3rdparty\{LIBRARY} (for all the libraries [icu, libxml, openssl, ...])

If you wish to visualize QtString values without installing the QtExtension, read this blog post.

Other info

We have two development repositories: KDAB and Vitallium's. We're in the process of merge these two repositories into one.

The main goal before we will create a branch for 2 version is make PhantomJS build on all supported platforms: Linux, OS X and Windows. Those repositories can be found at:

Clone this wiki locally