QtCreator拒绝执行自定义python程序作为构建步骤命令
Qt Creator refuses to execute Custom python program as a build step command
我正在编写一个共享库,为了更新/usr/include
目录中的头文件,我编写了一个python程序来比较并保持/usr/include
目录中源目录的头文件是最新的,希望在每次构建中将它们与测试可执行文件链接时,头文件本身能够自动完成。
问题是Qt Creator无法执行python程序。我的设置如下:
Command : 'python'
Working Directory : '/path/to/python/file'
Args : 'PythonFile.py'
是,选中启用自定义流程步骤框。
我的输出类似于以下内容:
Could not start process "python " PythonFile.py
当然,如果有另一种更简单的方法来解决这个标题问题(包括更新自动完成的能力),我完全洗耳恭听。
编辑
我还应该说,我已经通过CLI执行了该程序,它运行良好。
更新
根据斯拉瓦的建议更新命令,我得到了以下输出:
Program is beginning
Traceback (most recent call last):
File "UpdateHeaders.py", line 59, in <module>
PROJECT_ROOT = environ['ATLAS_PROJ_ROOT']
File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'ATLAS_PROJ_ROOT'
13:08:35: The process "/usr/bin/env" exited with code 1.
然而,如果我通过CLI运行它,我会得到:
Program is beginning
Updating include directory on a UNIX based system, copying files from /home/amsterdam/Programming/atlas/Engine/AtlasEngine/ to /usr/include/atlas/Engine/
Found a source count of 5;
Found a dest count of 0
No headers have been copied to "/usr/include/atlas/Engine/", yet; copying now from "/home/amsterdam/Programming/atlas/Engine/AtlasEngine/"
Iterating through ['AtlasEngine.pro', 'GameObject.hpp', 'AtlasEngine_global.h', 'Type_Config.hpp', 'Rectangle.hpp', 'AtlasEngine.pro.user', 'Engine.hpp', 'Engine.cpp']
Copying "/home/amsterdam/Programming/atlas/Engine/AtlasEngine/GameObject.hpp" to "/usr/include/atlas/Engine/GameObject.hpp"
Copying "/home/amsterdam/Programming/atlas/Engine/AtlasEngine/AtlasEngine_global.h" to "/usr/include/atlas/Engine/AtlasEngine_global.h"
Copying "/home/amsterdam/Programming/atlas/Engine/AtlasEngine/Type_Config.hpp" to "/usr/include/atlas/Engine/Type_Config.hpp"
Copying "/home/amsterdam/Programming/atlas/Engine/AtlasEngine/Rectangle.hpp" to "/usr/include/atlas/Engine/Rectangle.hpp"
Copying "/home/amsterdam/Programming/atlas/Engine/AtlasEngine/Engine.hpp" to "/usr/include/atlas/Engine/Engine.hpp"
如图所示,除非通过Qt Creator运行,否则一切都很好,没有任何错误。有什么建议吗?
Command : '/usr/bin/env'
Working Directory : '/path/to/python/file'
Args : 'python PythonFile.py'
或
Command : '/usr/bin/env'
Args : 'python /path/to/python/file/PythonFile.py'
相关文章:
- 更改命令行 qt5 源代码构建配置的正确/快速方法
- 无法在 geany 上运行代码。无法执行构建命令
- Visual Studio 2019:使用 vcvars64 从命令行构建C++.bat不再工作
- 尝试构建 xerces c++ 解析器。Netbeans 和命令行构建错误未定义对"xercesc_3_2..."的引用
- 如何在 Bazel 构建命令期间传递 FLAG 如 -DVERBOSE?
- 在基于命令行的QT插件构建中包含库
- 电报上的构建命令失败
- exteranl原生构建问题,构建命令失败,android工作室
- C++构建增强 1.57.0 VS2013 x64 本机工具命令提示符
- 无法构建 quazip。MOC 编译器不会运行。命令行未找到相关类
- 在多个目标上 CMake 后期构建自定义命令?
- 如何在构建Qt应用程序时运行git命令
- Bazel 构建命令行将 copt 参数传递给特定的 cc_library/cc_binary?
- 从命令行构建一个.sln / .vcxproj项目,并使用Visual C 的免费版本构建
- "无法确定要运行哪个"make"命令.检查构建配置中的"make"步骤
- Eclipse 强制将 -k 添加到C++构建命令参数中
- 使用相对路径Sublime Text2构建命令
- 我可以使用 NDK 在安卓上构建命令行应用吗?
- 如何使用Qt构建命令窗口
- 如何通过C#程序从vcxproj获得C++构建命令