Ogitor源代码构建

Ogitor-0.4.2源代码构建,不少时间,这里记录一下:

(一)构建QT 

1.环境变量中加入bin路径:PATH--->C:/Qt/4.6.3/bin(我的路径是)

2.环境变量中加入qt的路径:QTDIR--->C:/Qt/4.6.3

3.打开vs2008的命令提示行(如图)



4.进入qt目录:cd C:/Qt/4.6.3

5.执行:configure -platform win32-msvc2008 -nomake demos -nomake examples -no-opengl -no-qt3support。

6.几分钟后完成,再执行:nmake。这个等得比较久,估计2,3个小时吧

qt构建完成

(二)构建OGRE1.7.1,先编译Dependencies,再用CMAKE构建,不详细说了。需要注意的是,一定要编译INSTALL生产sdk。如果用DX,ogre1.7要用DX比较新的版本,我用的是2010Feb10这个版本,开始装的是2006年的版本,导致RenderSystem_Direct3D9编译不过,所以无法编译过INSTALL。

 (三)构建Ogitor工程

1.环境变量中加入刚ogre编好的sdk路径:OGRE_CTHUGHA--->E:/ogresrc/ogre_src_v1-7-1/project/sdk(我的路径是)

2.环境变量中加入刚ogre编好的sdk路径:OGRE_BYATIS--->E:/ogresrc/ogre_src_v1-7-1/project/sdk(我也不知道为什么要加2个一样的路径到两个变量中)。

3.重启,本来可以用命令直接使环境变量生效,命令不记得了,直接重启。

4.CMAKE构建,完成

 

其实主要也就是参照官方做的,只不过刚开始没看得很明白。。。下面是官方原版过程:

 

Qt Toolkit

Lucky Visual Studio 2008 users can grab a precompiled package here:
http://qt.nokia.com/downloads/windows-cpp-vs2008

Other versions of Visual Studio: You need to compile Qt yourself, unfortunately.
Using the MinGW based SDK won't do. Sorry.

You don't need to build the OpenGL parts of Qt, as Ogitor is not using any of it.

Be sure to add bin to your PATH.
And a QTDIR environment variable needs to be set to the Qt root directory:
setx QTDIR

To compile Qt from source:

  1. Open a Visual Studio command prompt and navigate to your Qt source.
  2. Run configure -platform win32-msvc2008 -nomake demos -nomake examples -no-opengl -no-qt3support. (Change platform to whatever compiler you are using).
  3. Run nmake.

 

Ogre

Ogitor stable (v0-4) depends on Ogre 1.7.x (Cthugha).
Ogitor unstable (development) depends on Ogre 1.8.x (Byatis - Ogre unstable)
If you compiled Ogre from source, be sure to build the INSTALL project.

Ogitor v0-4

You need to add an OGRE_CTHUGHA environment variable:
setx OGRE_CTHUGHA <ogre_directory> /sdk

Ogitor development

You need to add an OGRE_BYATIS environment variable:
setx OGRE_BYATIS <ogre_directory> /sdk

Boost:

Ogitor development is using Boost Regex.

Mercurial

Ogre is using Mercurial for source control.
The easiest route is to install TortoiseHg(external link)

Ogitor sources

Get the source from: http://hg.ogitor.org/v0-4(external link) (current stable) or http://hg.ogitor.org/development(external link) (unstable)
If you're using TortoiseHg: right-click somewhere and clone http://hg.ogitor.org/v0-4 / http://hg.ogitor.org/v0-4
Or, using the command-line:
hg clone http://hg.ogitor.org/v0-4 ogitor for stable Ogitor.
hg clone http://hg.ogitor.org/development ogitor for unstable Ogitor.

CMake

Get and install CMake 2.8 from cmake.org(external link), if you haven't got it already due to it being the official build system of Ogre.

Building Ogitor

  1. Run cmake-gui.
    Choose the Ogitor source directory and a build directory.
    The build directory should be different from you source directory.
    Click the 'configure' button.
  2. After choosing your build environment, you'll see red CMake entries.
    Click the configure button one more time, and examine the results.
    If everything look alright, click the generate button.
    Close CMake GUI.
  3. Find your build directory and open the Ogitor solution.
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值