gpt4 book ai didi

git - 在 Windows 上从源代码构建 PhantomJS-2

转载 作者:太空狗 更新时间:2023-10-29 13:53:17 25 4
gpt4 key购买 nike

我正在尝试基于这些 instructions 在 Windows 8.1 x64 上从源代码构建 PhantomJS 2 的开发版本.

但是我得到以下错误

'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."

我不确定如何解决这个问题,有人可以帮助和/或提供有关如何在 Windows x64 上构建它的步骤吗?

到目前为止我做了什么......

  1. 已安装 Perl、Python、Ruby 和 Git,确保它们都在 PATH 环境变量中
  2. 已安装 qt-opensource-windows exe
  3. 在 Visual Studio 命令提示符中输入以下命令:

尝试构建的最后一步给出了错误。

我还安装了 mingw32-make-3.80.0-3.exe 并将路径 C:\mingw\bin\mingw32-make.exe 添加到 PATH 环境变量,但仍然出现错误。

完整的命令提示符输入/输出如下:

*************************************
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>

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

最佳答案

确保 qmake 和 nmake 的路径在你的 %PATH% 中是正确的对我来说是:

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

'mingw32-make' 可能相同

Phantomjs 的源码我已经仔细检查过了,好像不需要下载安装qt,它已经是源码的一部分了。要构建 PhantomJS 2,您需要:

  1. 设置以下文件 nmake.exe、rc.exe 和 mt.exe 的路径 - C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
  2. 环境变量:
    • 包含:VC 和 Windows SDK 包含文件夹 - C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include
    • LIB:VC 和 Windows SDK Lib 文件夹 - C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\lib

此外,在开始构建之前,您需要使用正确的配置运行 vcvarsall.bat,在我的例子中,我使用了 amd64_x86 参数要运行构建,我执行了以下步骤: - git clone git://github.com/ariya/phantomjs.git - CD phantomjs - 构建

关于git - 在 Windows 上从源代码构建 PhantomJS-2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27769056/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com