Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/windows/precompiled_dependencies/mingw64/build_ogre.sh @ 126

Last change on this file since 126 was 126, checked in by landauf, 9 years ago

eol-style native

  • Property svn:eol-style set to native
File size: 2.4 KB
RevLine 
[126]1#!/bin/sh
2
3NAME="[ogre]"
4WORKING_DIR="ogre/ogre_src_v1-8-1"
5#WORKING_DIR="ogre/ogre-1-9-0-sinbad-ogre-dd30349ea667"
6
7BUILD_DIR=build
8
9source ./build_common.sh
10
11if [ $DO_CLEAN -eq 1 ]
12then
13        rm -rf $BUILD_DIR
14        check_result $? "cleaning build dir"
15fi
16
17if [ $DO_BUILD -eq 1 ]
18then
19        # modify sources to make it work with mingw64
20        sed -i "s/DxErr/dxerr9/" "CMake/Packages/FindDirectX.cmake"
21        check_result $? "renaming DxErr library in FindDirectX.cmake"
22        sed -i "s/#define __uuidof(Object) IID_##Object//" "OgreMain/include/WIN32/OgreMinGWSupport.h"
23        check_result $? "removing re-definition of __uuidof from OgreMinGWSupport.h"
24        sed -i "s/intptr_t __security_cookie;//" "OgreMain/src/WIN32/OgreMinGWSupport.cpp"
25        check_result $? "removing re-definition of __security_cookie from OgreMinGWSupport.cpp"
26        sed -i "s/(intptr_t/(uintptr_t/g" "OgreMain/src/WIN32/OgreMinGWSupport.cpp"
27        check_result $? "replacing intptr_t with uintptr_t in OgreMinGWSupport.cpp"
28        sed -i "s/(intptr_t/(uintptr_t/g" "RenderSystems/Direct3D9/src/OgreD3D9Plugin.cpp"
29        check_result $? "replacing intptr_t with uintptr_t in OgreD3D9Plugin.cpp"
30        sed -i "s/#include <DxErr.h>/#include <dxerr9.h>\n#define DXGetErrorDescription DXGetErrorDescription9/" "RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h"
31        check_result $? "replacing include and add define in OgreD3D9Prerequisites.h"
32
33        # prepare build directory
34        mkdir -p $BUILD_DIR
35        check_result $? "creating build dir"
36        cd $BUILD_DIR
37
38        # run cmake
39        cmake -DCMAKE_BUILD_TYPE=Release \
40                  -DOGRE_DEPENDENCIES_DIR=${TEMP_DIR}/ogredeps \
41                  -DBOOST_LIBRARYDIR=${TARGET_BIN_DIR} \
42                  -DBOOST_INCLUDEDIR=${TARGET_INC_DIR}/boost \
43                  -DOGRE_BUILD_RENDERSYSTEM_D3D11=OFF \
44                  .. -G "MSYS Makefiles"
45
46        check_result $? "cmake"
47
48        # compile
49        make -j8 install
50        check_result $? "make install"
51
52        # copy libraries into target directory
53        find "sdk/bin/release" -name "Ogre*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
54        check_result $? "copying Ogre-libraries"
55        find "sdk/bin/release" -name "Plugin_*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
56        check_result $? "copying Plugin-libraries"
57        find "sdk/bin/release" -name "RenderSystem_*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
58        check_result $? "copying RenderSystem_-libraries"
59
60        # copy includes
61        mkdir -p ${TARGET_INC_DIR}/ogre
62        check_result $? "creating include dir"
63        cp -aT "sdk/include/OGRE" ${TARGET_INC_DIR}/ogre/include
64        check_result $? "copying includes"
65
66        echo "${NAME} Finished building ${NAME}"
67fi
Note: See TracBrowser for help on using the repository browser.