반응형

OGRE 설치 & Source 빌드 - window, vs2008 기준, OGRE 1.7.2 Source For Windows

송정헌 2011-02-27 04:21:49 주소복사
조회 1153 스크랩 0

Ogre 설치 가이드

http://www.ogre3d.org/tikiwiki/Prerequisites


1. Visual Studio 2008 (VC9) 버전을 사용할 경우 Microsoft Update 2008 sp1 를 설치 해야한다

다운 목록 :

ATL security fix available from Microsoft Update 2008 sp1

http://www.microsoft.com/downloads/en/details.aspx?familyid=2051a0c1-c9b5-4b0a-a8f5-770a549fd78c&displaylang=en


MinGW 에 대한 설명, 뭐 일단 무료라함

http://blog.naver.com/byuckdan?Redirect=Log&logNo=100123459348

반드시 GCC 4.4.X 를 기반으로 하고 있는 MinGW 를 설치 해야 하며

http://www.ogre3d.org/tikiwiki/Prerequisites 에 기록할 당시 쓰여진 버전은

GCC 4.4.1 을 기반으로 하고 있는 tdm-mingw-1.908.0-4.4.1-2 이다

설치할 적에 Check for updated files on the TDM/MinGW server 체크를 해제 해야

tdm-mingw-1.908.0-4.4.1-2 가 설치 가능하다, 구 버전을 사용하기 위함

tdm-mingw-1.908.0-4.4.1-2.exe

http://code.google.com/p/gcc-offline/downloads/detail?name=tdm-mingw-1.908.0-4.4.1-2.exe&can=2&q=


Direct3D 렌더시스템을 사용하기 위해 DirectX SDK - February 2010 를 설치 한다.

window 정품 유효성 검사를 거친 후 설치 가능함

오래 걸리니 다운 받아 놓으면서 다음을 진행하자, 그전에 SDK 를 다운 받고 DXSDK_DIR 를 등록하는 과정을

기억하고 있어야 함

DirectX SDK - February 2010

동일한 주소:

http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=2c7da5fb-ffbb-4af6-8c66-651cbd28ca15###

dx 설치후 cmd 에서 다음을 등록해야 한다

C:\>set DXSDK_DIR
DXSDK_DIR=C:\Program Files\Microsoft DirectX SDK (February 2010)\

Boost 설치는 필수는 아니고 옵션 사항이다.

대략 Boost 를 설치할 경우 빽그라운드 를 로딩할 경우 좀 더 빠른 시간에 Boost threads 로 로딩할 수 있다 함

Ogre 에서 권하는 버전은 1.44.0 버전임

vs2003~vs2010 유저는 부스트 인스톨러로 설치 할 수 있다, 라고 하는데

오우거 홈페이지에서 링크해놓은 링크가 깨진것 같다

boost URL 이 바뀐듯..

그리하여 다음 주소에서 인스톨러를 받을 수 있다.

http://www.boost-consulting.com/download/

실제 받을 수 있는 URL -> http://www.boost-consulting.com/download/boost_1_44_setup.exe

Boost, 무료

http://sourceforge.net/projects/boost/files/boost/1.44.0/boost_1_44_0.zip/download

설치중 옵션에서 다음을 선택

Select your compiler and "Multithreaded" and "Multithreaded Debug".

http://sourceforge.net/projects/ogre/files/ogre-dependencies-vc%2B%2B/1.7/OgreDependencies_MSVC_20101231.zip/download

MinGW 유저는 아래 boost 설치 가이드를 통하여 빌드 한다.

http://www.boost.org/doc/libs/1_44_0/more/getting_started/windows.html


소스

Visual Studio Dependencies

MinGW 컴파일러

MinGW Dependencies


Dependencies
Visual Studio users need to compile the dependencies themselves: Visual Studio Dependencies
MinGW users can grab the precompiled MinGW Dependencies

Unpack the dependencies into either your Ogre source directory, your Ogre build directory or somewhere else.
The directory should be named Dependencies if put into either the source or the build directory.
If you choose to place it elsewhere, you can name it however you like, as long as you're setting an environment variable OGRE_DEPENDENCIES_DIR pointing to its location.

It's recommended to use the last option - OGRE_DEPENDENCIES_DIR - as it makes it easier to manage several different dependencies (vc9, vc10, mingw) on the same computer, against the same Ogre source directory.

Be sure to build the dependencies if using Visual Studio! Find the solution file in Dependencies/src. And don't forget to build in both configurations: debug and release.


오우거 설치 : http://www.ogre3d.org/download/source

Once you have downloaded, if you are new to using OGRE you can find information in the wiki about building OGRE from source, and a series of tutorials.

필요한 툴 파일들 설치

http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Building+Ogre

http://www.ogre3d.org/tikiwiki/Prerequisites

Make sure that you've sorted out the Prerequisites before attempting to build Ogre with CMake!

  1. Make sure you have downloaded, extracted and built the dependencies package
  2. Download CMake. You want the 'Win32 installer' release in the binary distribution section
  3. Run the CMake installer, install wherever you like
  4. Launch CMake via Start > Program Files > CMake 2.8 > CMake
  5. In the "Where is the source code" box, type or browse to the root directory of your OGRE source (the one that contains the OgreMain folder)
  6. In the "Where to build the binaries" box, type or browse to any folder you like - this will be where the build output will go (libraries, headers, dlls & sample exes). The folder does not have to exist yet. Note that you can run this process more than once with different output folders if you want (but we won't complicate matters now)
  7. Hit the 'Configure' button near the bottom of the screen
  8. Pick your target compiler, e.g. "Visual Studio 8 2005"
  9. Answer 'Ok' when asked if you want to create the build directory
  10. Wait for the configure process to finish
  11. The screen will now have a bunch of configuration options on it, which will be red (this is to indicate this is the first time you've seen them). You can see the potential for customising your build here, but for now just click the 'Configure' button again
  12. The values will turn grey, and the 'Generate' button at the bottom will now be enabled. Click 'Generate'
  13. Build files will now be generated in the location you picked, and CMake will say "Generating done"

오우거 빌드파일 뽑아내기

출처 : http://lancekun.com/tc/149

1.7부터 빌드방식이 바뀌어서 몇분들이 도움을 요청하시길래 간단히 컴파일법을 작성하겠습니다.
프로젝트로인해 오랜만의 포스팅이네요 ㅎ

일단 http://www.ogre3d.org/download/source 에 접속하여서
OGRE 1.7.0 RC1 Source For Windows Microsoft Visual C++ Dependencies Package
이 두개를 받습니다.

압축을 풀고 내용물을 한폴더로 모으면 위와 같이 두개의 폴더가 보이는데요.
Dependencies 폴더를 ogre 폴더속으로 넣어줍시다.
(참고: CMake로 컴파일시 한글경로인식이 않되기때문에 경로설정을해줌 C:\ogre-v1-7-0RC1\ogre )

그뒤에 Dependencies 폴더속 Dependencies\src 에 가보면 OgreDependencies 라는 이름으로
각 솔루션 파일이있는데 각자의 VisualStudio에 맞는 솔루션파일을 실행시켜서 솔루션채로 빌드해줍시다.
(저같은경우 VC9을 사용하니 OgreDependencies.VS2008.sln 실행)

: 이때 VS2008.sln 의 Debug, Release 모드 빌드함

여기까지는 이전 오우거 버젼컴파일하는것과 동일하였습니다.
이전에는 여기까지한뒤에 기본적으로 들어있던 OgreMain.sln을 찾아서 컴파일을 해주었는데요
1.7부터는 CMake를 통해 빌드를해야하더라구요.

그러므로 CMake를 받으러 http://www.cmake.org/cmake/resources/software.html 에 접속해서
Windows ZIP으로 되어있는것을받읍시다.(CMake자주사용하시는분아니면 그때그때받아쓰면됨)

자.. 다운이 다되었으면 \bin\cmake-gui.exe 를 실행시킵시다.

이제 CMake로 컴파일 CMakeList가 있는 폴더와 Output을 받아드릴 폴더를 설정해줍니다.
%주의 오우거폴더의 경로에 한글이 있으면 컴파일에 실패합니다.
%주의 CMake의 경로에 한글이있으면 컴파일되지않습니다.

그뒤에 Configure 버튼을 눌러줍니다.

그러면 위와 같은 창이 뜨는데요 여기서 자신이 사용하는 VisualStudio나 각각의 개발환경을
선택해주고 Finish를 눌러줍니다.


정상적으로설정이 되어있는 상태라면 위와같은 화면이 나타날것입니다.

이상태에서 Configure 버튼을 한번더 눌러준뒤 Generate 버튼을 눌러주면 Output되는 폴더속에
OGRE.sln 라는 이름의 솔루션 파일이 생성된것을 확인할수있습니다.


이후는 이전의 버젼을 사용했던것과 같이 엔진라이브러리를 컴파일한후 쓰시고싶은대로 쓰시면
되는겁니다아

엔진 컴파일후 샘플브라우져를 실행한 화면

반응형

+ Recent posts