Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/windows/precompiled_dependencies/mingw64/build_cegui-0-7.sh @ 125

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

added build-scripts for dependencies (mingw64)

File size: 3.1 KB
Line 
1#!/bin/sh
2
3NAME="[cegui-0-7]"
4WORKING_DIR="cegui/CEGUI-0.7.9"
5
6source ./build_common.sh
7
8if [ $DO_CLEAN -eq 1 ]
9then
10        rm -rf "dependencies"
11        check_result $? "remove dependencies"
12        cd projects/premake
13        make clean
14        # the above command may fail if Makefiles were already removed
15        find "." -name "Makefile" -exec rm -rf {} \;
16        check_result $? "remove Makefiles"
17        find "." -name "*.o" -exec rm -rf {} \;
18        check_result $? "remove build output"
19        find "." -name "*.d" -exec rm -rf {} \;
20        check_result $? "remove build output"
21fi
22
23if [ $DO_BUILD -eq 1 ]
24then
25        # copy cegui dependencies
26        cp -aT "${TEMP_DIR}/ceguideps" "dependencies"
27        check_result $? "copy ceguideps dependencies"
28       
29        # merge ogre dependencies into cegui dependencies
30        cp -aT "${TEMP_DIR}/ogredeps/include" "dependencies/include"
31        check_result $? "copy includes"
32        cp -aT "${TEMP_DIR}/ogredeps/bin/Release" "dependencies/lib"
33        check_result $? "copy bins"
34        cp -aT "${TEMP_DIR}/ogredeps/lib/Release" "dependencies/lib"
35        check_result $? "copy libs"
36
37        cd projects/premake
38
39        # prepare config.lua
40        CONFIG_FILE="config.lua"
41        rm -rf $CONFIG_FILE
42        check_result $? "removing old config-file"
43        echo "CEGUI_EXTRA_PATHS = {
44                        { \"${HOME_DIR}/${WORKING_DIR}/dependencies\", \"include\", \"lib\" },
45                        { \"${TARGET_BIN_DIR}\", \"\", \"\" },
46                        { \"${TARGET_INC_DIR}\", \"lua/include\", \"\" },
47                        { \"${TARGET_INC_DIR}\", \"ogre/include\", \"\", \"CEGUIOgreRenderer\" },
48                        { \"${TARGET_INC_DIR}\", \"boost\", \"\", \"CEGUIOgreRenderer\" },
49                }
50                CEGUI_LUA_VER = 51
51                CEGUI_USE_FREETYPE = true
52                CEGUI_USE_PCRE_REGEX = true
53                CEGUI_USE_DEFAULT_LOGGER = true
54                OGRE_RENDERER = true
55                FALAGARD_WR = true
56                DEFAULT_WINDOW_RENDERER = \"falagard\"
57                XERCES_PARSER = true
58                DEFAULT_XML_PARSER = \"xerces\"
59                LUA_SCRIPT_MODULE = true
60        " > $CONFIG_FILE
61        check_result $? "create new config-file"
62       
63        # change library names in several premake scripts
64        sed -i "s/\"lua\"/\"lua51\"/" "ScriptingModules/LuaScriptModule/premake.lua"
65        check_result $? "change lua library name"
66        sed -i "s/\"lua\"/\"lua51\"/" "ScriptingModules/LuaScriptModule/support/tolua++/premake.lua"
67        check_result $? "change lua library name"
68        sed -i "s/\"lua\"/\"lua51\"/" "ScriptingModules/LuaScriptModule/support/tolua++bin/premake.lua"
69        check_result $? "change lua library name"
70        sed -i "s/\"xerces-c_3\"/\"xerces-c\"/" "XMLParserModules/XercesParser/premake.lua"
71        check_result $? "change xerces library name"
72        sed -i "s/library(\"OgreMain\", \"_d\")/library(\"OgreMain\"); library(\"libboost_system-mgw48-mt-1_60\")/" "RendererModules/Ogre/premake.lua"
73        check_result $? "add boost system library"
74
75        # run premake
76        ./premake --file cegui.lua --target gnu
77        check_result $? "premake"
78
79        # compile
80        CC=gcc \
81        make all -j8 CONFIG=Release
82        check_result $? "make"
83
84        # copy libraries
85        find "../../bin" -name "*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
86        check_result $? "copy libraries"
87
88        # copy includes
89        mkdir -p ${TARGET_INC_DIR}/cegui
90        check_result $? "creating include dir"
91        cp -aT "../../cegui/include" ${TARGET_INC_DIR}/cegui/include
92        check_result $? "copying includes"
93
94        echo "${NAME} Finished building ${NAME}"
95fi
Note: See TracBrowser for help on using the repository browser.