我正在寫一個共享庫,並且爲了在我/usr/include
目錄更新的頭文件,我寫了一個Python程序進行比較,並從保持頭文件源目錄最新的/usr/include
目錄中,希望能有頭內自動完成自己在每次構建時,我與我的測試可執行鏈接它們。Qt Creator的拒不執行自定義Python程序作爲構建步驟的命令
的問題是,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的運行一切正常,沒有任何錯誤。有什麼建議麼?
當你改變命令 「的/ usr/bin中/ Python的」 會發生什麼? – stark
同樣的錯誤,但它打印'在/ usr/bin'字符串的一部分。 – zeboidlund