在 Windows 7 中配置为使用 firebreath 插件时,我在此特定命令中遇到错误。此配置是在 YT 上观看视频时设置的。

所有其他可用的命令。我捕获了这个特殊的步骤。

C:\firebreath\TutorialTestPlugin\firebreath>prep2010 . build
Using projects in: "C:\firebreath\TutorialTestPlugin\firebreath"
Generating build files in: "C:\firebreath\TutorialTestPlugin\firebreath\build"
NOTE: The build files in "C:\firebreath\TutorialTestPlugin\firebreath\build" sho
uld *NEVER* be modified directly.
When needed, make project changes in cmake files and re-run this script.
  Project-specific cmake files are found in [plugin dir]\CMakeLists.txt and
  [plugin dir]\Win\projectDef.cmake.
Note that parameters for cmake should be enclosed in double quotes, e.g. "-DVERB
OSE=1"
CMAKE parameters:

C:\firebreath\TutorialTestPlugin\firebreath\build>cmake -G "Visual Studio 10" -D
FB_PROJECTS_DIR="C:\firebreath\TutorialTestPlugin\firebreath"  "C:\firebreath\Tu
torialTestPlugin\firebreath"
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10
-- Check for working CXX compiler using: Visual Studio 10 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Visual Studio dir: C:/Program Files/Microsoft Visual Studio 10.0
-- Found ATL include dir: C:/WinDDK/7600.16385.1/inc/atl71
-- Found ATL lib dir: C:/WinDDK/7600.16385.1/lib/ATL/i386
-- Found MFC include dir: C:/WinDDK/7600.16385.1/inc/mfc42
-- Balanced size/speed optimization
project dir: C:/firebreath/TutorialTestPlugin/firebreath
C:/firebreath/TutorialTestPlugin/firebreath/addnewlines/ does not seem to be a F
ireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/BSD.html/ does not seem to be a Fire
Breath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/build/ does not seem to be a FireBre
ath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/cmake/ does not seem to be a FireBre
ath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/CMakeLists.txt/ does not seem to be
a FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/common.cmd/ does not seem to be a Fi
reBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/common.sh/ does not seem to be a Fir
eBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/Doxyfile/ does not seem to be a Fire
Breath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/doxygen/ does not seem to be a FireB
reath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/examples/ does not seem to be a Fire
Breath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/fbgen/ does not seem to be a FireBre
ath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/fbgen.py/ does not seem to be a Fire
Breath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/fixtabs/ does not seem to be a FireB
reath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/gen_templates/ does not seem to be a
 FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/Installer/ does not seem to be a Fir
eBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/LGPL.html/ does not seem to be a Fir
eBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2005.cmd/ does not seem to be a
FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2008.cmd/ does not seem to be a
FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2008x64.cmd/ does not seem to be
 a FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2010.cmd/ does not seem to be a
FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2010x64.cmd/ does not seem to be
 a FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2012.cmd/ does not seem to be a
FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2012x64.cmd/ does not seem to be
 a FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2013.cmd/ does not seem to be a
FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prep2013x64.cmd/ does not seem to be
 a FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prepcodeblocks.sh/ does not seem to
be a FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prepeclipse.sh/ does not seem to be
a FireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prepmac.sh/ does not seem to be a Fi
reBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/prepmake.sh/ does not seem to be a F
ireBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/projects/ does not seem to be a Fire
Breath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/README.md/ does not seem to be a Fir
eBreath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/runctags/ does not seem to be a Fire
Breath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/src/ does not seem to be a FireBreat
h Plugin
C:/firebreath/TutorialTestPlugin/firebreath/tests/ does not seem to be a FireBre
ath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/version/ does not seem to be a FireB
reath Plugin
C:/firebreath/TutorialTestPlugin/firebreath/winprep.cmd/ does not seem to be a F
ireBreath Plugin
No projects found in /.
CMake Error at CMakeLists.txt:170 (MESSAGE):
  To build examples, run 'prep<ver> examples'


-- Configuring incomplete, errors occurred!

最佳答案

这是因为prep2010的第一个参数应该是插件项目所在的路径。如果尚未将它们从projects/目录中移出(应该这样做),则可以执行以下任一操作:

C:\firebreath\TutorialTestPlugin\firebreath>prep2010 projects build

或者,如果您的插件项目名为“MyTestPlugin”,则可以执行以下操作:
C:\firebreath\TutorialTestPlugin\firebreath>prep2010 projects\MyTestPlugin build

基本上,如果您有多个项目并希望将它们一起构建,则第一种方法是理想的选择,因为它会为每个项目使用相同的静态项目构建,这会加快编译时间。这种情况很少见,因此我经常使用第二种语法。

当然,对我而言,您拥有的目录结构没有任何意义。我前段时间wrote a blog post讲述了我觉得插件项目的最佳结构,但是这里有一个示例,说明我可能会在您的情况下处理问题:
  • C:\plugin_projects\firebreath-FireBreath代码库
  • C:\plugin_projects\TutorialTestPlugin-运行fbgen
  • 后从\projects移动
  • C:\plugin_projects\ttp_build-以上项目
  • 的构建目录

    然后,您将像这样运行prep脚本:
    C:\plugin_projects>firebreath\prep2010 TutorialTestPlugin ttp_build
    

    并且您的一次性构建文件将位于ttp_build中,您的项目文件将位于TutorialTestPlugin中,并且您的所有firebreath文件在firebreath目录中都保持不变。

    这只是一个例子。您可以按照自己的意愿做。我经常将firebreath作为git子模块添加,因此我实际上运行firebreath\prep2010 . build,但是您需要找到自己喜欢的东西。

    10-01 19:37