Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 127 was 127, checked in by landauf, 8 years ago

fixed some target paths for cp -aT
fixed cleaning boost
+ some details

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
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/ -march=i686//" "CMakeLists.txt"
21        check_result $? "remove compiler flag -march=i686"
22        sed -i "s/DxErr/dxerr9/" "CMake/Packages/FindDirectX.cmake"
23        check_result $? "renaming DxErr library in FindDirectX.cmake"
24        sed -i "s/#define __uuidof(Object) IID_##Object//" "OgreMain/include/WIN32/OgreMinGWSupport.h"
25        check_result $? "removing re-definition of __uuidof from OgreMinGWSupport.h"
26        sed -i "s/intptr_t __security_cookie;//" "OgreMain/src/WIN32/OgreMinGWSupport.cpp"
27        check_result $? "removing re-definition of __security_cookie from OgreMinGWSupport.cpp"
28        sed -i "s/(intptr_t/(uintptr_t/g" "OgreMain/src/WIN32/OgreMinGWSupport.cpp"
29        check_result $? "replacing intptr_t with uintptr_t in OgreMinGWSupport.cpp"
30        sed -i "s/(intptr_t/(uintptr_t/g" "RenderSystems/Direct3D9/src/OgreD3D9Plugin.cpp"
31        check_result $? "replacing intptr_t with uintptr_t in OgreD3D9Plugin.cpp"
32        sed -i "s/#include <DxErr.h>/#include <dxerr9.h>\n#define DXGetErrorDescription DXGetErrorDescription9/" "RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h"
33        check_result $? "replacing include and add define in OgreD3D9Prerequisites.h"
34
35        # prepare build directory
36        mkdir -p $BUILD_DIR
37        check_result $? "creating build dir"
38        cd $BUILD_DIR
39
40        # run cmake
41        cmake -DCMAKE_BUILD_TYPE=Release \
42                  -DOGRE_DEPENDENCIES_DIR=${TEMP_DIR}/ogredeps \
43                  -DBOOST_LIBRARYDIR=${TARGET_BIN_DIR} \
44                  -DBOOST_INCLUDEDIR=${TARGET_INC_DIR}/boost \
45                  -DOGRE_BUILD_RENDERSYSTEM_D3D11=OFF \
46                  .. -G "MSYS Makefiles"
47
48        check_result $? "cmake"
49
50        # compile
51        make -j8 install
52        check_result $? "make install"
53
54        # copy libraries into target directory
55        find "sdk/bin/release" -name "Ogre*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
56        check_result $? "copying Ogre-libraries"
57        find "sdk/bin/release" -name "Plugin_*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
58        check_result $? "copying Plugin-libraries"
59        find "sdk/bin/release" -name "RenderSystem_*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
60        check_result $? "copying RenderSystem_-libraries"
61
62        # copy includes
63        mkdir -p ${TARGET_INC_DIR}/ogre
64        check_result $? "creating include dir"
65        cp -aT "sdk/include/OGRE" ${TARGET_INC_DIR}/ogre/include
66        check_result $? "copying includes"
67
68        echo "${NAME} Finished building ${NAME}"
69fi
Note: See TracBrowser for help on using the repository browser.