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

2024-05-26

我正在尝试基于这些在 Windows 8.1 x64 上从源代码构建 PhantomJS 2 的开发版本指示 https://github.com/ariya/phantomjs/wiki/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 命令提示符中输入以下命令:

    • git 克隆 git://github.com/ariya/phantomjs.git
    • cd幻影
    • cd src/qt
    • 克隆https://github.com/Vitalium/phantomjs-3rdparty-win https://github.com/Vitallium/phantomjs-3rdparty-win
    • 重命名 phantomjs-3rdparty-win 3rdparty
    • 光盘 ../../
    • 构建命令

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

我还安装了 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 [email protected] /cdn-cgi/l/email-protection

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

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

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

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. ENV Variables:
    • 包括: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 克隆 git://github.com/ariya/phantomjs.git - cd phantomjs - 建造

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 Windows 上从源代码构建 PhantomJS-2 的相关文章

  • 返回到存储库中的特定修订后提交并推送更改?

    我们需要及时返回到某个特定的提交 一些意外的改变是为了掌握 尝试恢复它挖得太深 所以 master 的状态很糟糕 现在我们希望master回到66ada4cc61d62afc 根据git 恢复到某个提交 https stackoverflo
  • QFileSystemModel setRootPath

    我正在尝试创建一个 Qt 应用程序来显示文件夹 Mac OS 中的 Users 文件夹 的内容 这是代码 QFileSystemModel dirModel new QFileSystemModel dirModel gt setRootP
  • TeamCity 将功能分支推送到主分支

    有没有办法将成功构建的功能分支推送到另一个分支 我想要这样的东西 Git 存储库 Gitorious GitHub 等 分支机构 master 当前项目的代码 质量保证 代码等待 QA 的分支 功能分支 许多远程分支 开发人员可以在其中开发
  • 如何在Windows上分离“Git bash”中启动的“git gui”?

    例如 我开始 git bash 我导航到某个目录 I start git gui 我关闭控制台窗口或按 Ctrl C Git gui 的窗口消失了 即使我用过git gui disown 即使当我按 Ctrl C 时它不在前台 如何正确分离
  • 获取最新远程提交的 SHA1 [重复]

    这个问题在这里已经有答案了 可能的重复 git bash 如何检查是否有新的提交可用 https stackoverflow com questions 6006759 git bash how to check if theres a n
  • 如何升级 Windows 中 git svn 使用的 SVN 版本?

    我的公司正在将SVN升级到1 7 检查git svn version显示正在使用的SVN版本是1 4 6 我想获得 git svn 使用的 SVN 版本接近 1 7 但是 我没有看到有关更新 git svn 使用的 SVN 版本 在 Win
  • 是否可以在 git 存储库之外添加和提交文件?

    我们的文本文件分布在系统的各个角落 我们计划将这些文件中所做的所有修改添加到 git 存储库中 每次对这些文件进行修改都是由脚本进行的 因此 我们计划向该脚本添加新命令 以将文件添加到 git 存储库 但是 这些修改是同时进行的 我们可以为
  • gitlab 请求将分支 A 合并到开发中(落后 3 次提交)我应该担心吗?

    在 gitlab 中创建合并请求时 我经常收到一条消息 请求将分支 A 合并到开发中 x 提交落后 gitlab想告诉我什么 我应该担心还是需要修复某些东西 什么 一段时间后合并请求在项目中打开时 由于其他人合并了自己的更改 您尝试合并到的
  • 主游戏循环中的时间计算

    Quake 2 主游戏循环实现中有这样的代码 if initialized let base retain 16 bits of effectively random data base timeGetTime 0xffff0000 ini
  • Git:压缩 master 上提交的最简单方法[重复]

    这个问题在这里已经有答案了 可能的重复 如何使用 git 将最后 X 次提交压缩在一起 https stackoverflow com questions 5189560 how can i squash my last x commits
  • git Blame:合并后正确的作者

    GIT 合并引入了新的提交 这会导致 git Blame 问题 合并的行似乎是由进行合并的开发人员提交的 我可以理解这种情况冲突的变化 因为他解决了冲突 但是有没有办法让非冲突线路不发生这种情况呢 一些 git Blame 的选择 如果没有
  • 未能将一些参考推送至 [email protected]

    当我尝试推送到 Heroku 存储库时收到此错误 我已经设置了autocrlf false在gitconfig中 但这个问题仍然存在 我也尝试过这个解决方案here https stackoverflow com questions 566
  • CMakeLists.txt:30(项目)处的 CMake 错误:找不到 CMAKE_C_COMPILER

    我正在尝试使用 CMake 制作 Visual Studio 解决方案来编译最新版本的 aseprite 并且 CMake 不断向我提供 No CMAKE C COMPILER could be found No CMAKE CXX COM
  • 如何签出仅在“git ls-remote”中列出的分支?

    我遇到了无法切换到仅列出的分支的情况git ls remote 这是详细信息 我分叉了一个 github repoA 作为 repoB 创建了自己的分支并将其推送到 ComputerA 中的 repoB 在 ComputerB 中 我将分叉
  • git 如何查找分支源自的提交哈希

    假设我从主分支分支到主题分支 然后在主题分支上进行了一些提交 是否有命令告诉我主题分支源自的主分支上的提交哈希 理想情况下 我不必知道我做了多少次提交 试图避免 HEAD 5 我已经用谷歌搜索过 但似乎无法找到答案 谢谢 use git m
  • 我可以忽略全局 .gitignore 吗?

    我的全局 gitignore 一般都很棒 但对于这个一次性项目 我不希望应用全局规则 如何删除这个怪异存储库的全局 gitignore 规则 在您的存储库中运行此命令 git config local core excludesfile f
  • 在 CMake 中使用 -isystem 而不是 -I

    在使用 gcc 构建时 CMake 是否有任何方法可以强制通过 include directories 或者可能通过不同的函数 指定的路径使用 isystem 标志而不是 I 标志 See http gcc gnu org onlinedo
  • 自动同步两个 git 存储库

    是否可以保持同步两个 Github 存储库 远程 的特定文件夹 有两个 github 存储库 repoA 和 repoB 这两个存储库都有名为 ABC 的文件夹以及其他独特的文件夹 如果repoA的文件夹ABC中的任何文件有更新 我想自动更
  • git-svn 如何知道要提交到哪个分支?

    我的存储库是 SVN 我使用 git 进行所有开发 我们有一个标准布局 我用以下命令初始化了我的本地存储库git svn init s
  • Jenkins GIT 包含从未构建过的区域

    我正在尝试使用包含区域在 Jenkins 中构建我的工作 但每当选中此选项时 民意调查结果总是说未检测到任何更改 我尝试了许多不同的路径 以及使用工作区进行 不进行强制轮询 结果是轮询从未检测到任何更改 但一旦我删除这些选项 它们就会在下一

随机推荐