Building PhantomJS-2 from source on Windows

I am trying to build a development version of PhantomJS 2 from source on Windows 8.1 x64 based on these instructions .

However I am getting the following errors

'mingw32-make' is not recognized as an internal or external command, operable program or batch file.
'nmake' is not recognized as an internal or external command, operable program or batch file.
Error: "qmake.exe is missing Can't proceed."

      

I'm not sure how to fix this, can anyone please help and / or give instructions on how to create it on Windows x64?

What I have done so far ....

  • Perl, Python, Ruby and Git installed ensure they are all in the PATH environment variable
  • Installed qt-opensource-windows exe
  • The following commands have been introduced in Visual Studio Command Prompt:

And the last step trying to build gives errors.

I also installed mingw32-make-3.80.0-3.exe and added the path C: \ mingw \ bin \ mingw32-make.exe to my PATH environment variable which still gives an error.

The complete command line I / O looks like this:

*************************************
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\o\Documents\GitHub>git clone git://github.com/ariya/phantomjs.git
Cloning into 'phantomjs'...
remote: Counting objects: 56882, done.
remote: Total 56882 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (56882/56882), 113.63 MiB | 1.59 MiB/s, done.
Resolving deltas: 100% (29939/29939), done.
Checking connectivity... done.
Checking out files: 100% (25015/25015), done.

C:\Users\o\Documents\GitHub>cd phantomjs

C:\Users\o\Documents\GitHub\phantomjs>cd src/qt

C:\Users\o\Documents\GitHub\phantomjs\src\qt>git clone https://github.com/Vitall
ium/phantomjs-3rdparty-win
Cloning into 'phantomjs-3rdparty-win'...
remote: Counting objects: 1073, done.
remote: Total 1073 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1073/1073), 77.26 MiB | 1.67 MiB/s, done.
Resolving deltas: 100% (376/376), done.
Checking connectivity... done.

C:\Users\o\Documents\GitHub\phantomjs\src\qt>rename phantomjs-3rdparty-win 3rdparty

C:\Users\o\Documents\GitHub\phantomjs\src\qt>

C:\Users\o\Documents\GitHub\phantomjs\src\qt>cd ../../

C:\Users\o\Documents\GitHub\phantomjs>build.cmd

Build type: release

GIT found. Getting 3rd party libraries.
LIB: C:\Users\o\Documents\GitHub\phantomjs\src\qt\3rdparty\openssl\lib;C:\Users\
o\Documents\GitHub\phantomjs\src\qt\3rdparty\libicu\lib;C:\Users\o\Documents\Git
Hub\phantomjs\src\qt\3rdparty\libxml\lib;
INCLUDE: C:\Users\o\Documents\GitHub\phantomjs\src\qt\3rdparty\openssl\include;C
:\Users\o\Documents\GitHub\phantomjs\src\qt\3rdparty\libicu\include;C:\Users\o\D
ocuments\GitHub\phantomjs\src\qt\3rdparty\libxml\include\libxml2;
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
'nmake' is not recognized as an internal or external command,
operable program or batch file.


Error: "qmake.exe is missing Can't proceed."

Contact vitaliy.slobodin@gmail.com

C:\Users\o\Documents\GitHub\phantomjs>

*************************************

      

+3


source to share


2 answers


Make sure the path to qmake and nmake is correct in you% PATH% For me it was:

Path to qmake - C:\Qt\Qt5.3.2\5.3\msvc2013_64\bin 
Path to nmake - C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin

      

Possibly the same for 'mingw32-make'



I double checked Phantomjs source code and it seems that you don't need to download and install qt, this is already part of the source code. To create PhantomJS 2 you need:

  • Set the path to the following files nmake.exe, rc.exe and to mt.exe - C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v7.1A \ Bin; C: \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ VC \ bin
  • ENV variables:
    • INCLUDE: VC and Windows SDK include folder - C: \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ VC \ include; C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v7.1A \ include
    • LIB: VC folder and Windows SDK Lib - C: \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ VC \ lib; C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v7.1A \ lib

Also, before starting the build, you need to run vcvarsall.bat with the correct configuration. In my case I used the amd64_x86 parameter To start the build I did the following steps: - git clone git: //github.com/ariya/phantomjs.git - cd phantomjs - build

+4


source


For those using Cygwin, make sure your windows perl installation is in the PATH before the Cygwin binaries.

I had a problem where all the steps ran fine, but since I was using Cygwin perl, the file paths were in the format / cygdrive / c / .. which is not understood and therefore fails, without useful output in build.cmd.



This was found by running preconfig.cmd inside phantomjs / src / qt

+2


source







All Articles