[Orxonox-commit 6457] r125 - in windows/precompiled_dependencies: . mingw64

landauf at orxonox.net landauf at orxonox.net
Sat Feb 13 23:16:25 CET 2016


Author: landauf
Date: 2016-02-13 23:16:25 +0100 (Sat, 13 Feb 2016)
New Revision: 125

Added:
   windows/precompiled_dependencies/mingw64/
   windows/precompiled_dependencies/mingw64/build.sh
   windows/precompiled_dependencies/mingw64/build_boost.sh
   windows/precompiled_dependencies/mingw64/build_cegui-0-7.sh
   windows/precompiled_dependencies/mingw64/build_cegui.sh
   windows/precompiled_dependencies/mingw64/build_common.sh
   windows/precompiled_dependencies/mingw64/build_freealut.sh
   windows/precompiled_dependencies/mingw64/build_lua.sh
   windows/precompiled_dependencies/mingw64/build_ogg.sh
   windows/precompiled_dependencies/mingw64/build_ogre.sh
   windows/precompiled_dependencies/mingw64/build_ogredeps.sh
   windows/precompiled_dependencies/mingw64/build_pcre.sh
   windows/precompiled_dependencies/mingw64/build_tcl.sh
   windows/precompiled_dependencies/mingw64/build_toluapp.sh
   windows/precompiled_dependencies/mingw64/build_vorbis.sh
   windows/precompiled_dependencies/mingw64/build_xerces.sh
   windows/precompiled_dependencies/mingw64/readme.txt
Log:
added build-scripts for dependencies (mingw64)

Added: windows/precompiled_dependencies/mingw64/build.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,192 @@
+#!/bin/sh
+
+NAME="[main]"
+
+if [ $# -eq 1 ] && [ $1 = "list" ]
+then
+	DO_LIST=1
+	DO_CLEAN=0
+	DO_BUILD=0
+
+	echo "${NAME} Listing all build targets..."
+	echo "${NAME}    Special targets:"
+	echo "${NAME}        all"
+	echo "${NAME}"
+	echo "${NAME}    Build targets:"
+elif [ $# -eq 2 ] && [ $1 = "clean" ]
+then
+	DO_LIST=0
+	DO_CLEAN=1
+	DO_BUILD=0
+	TARGET=$2
+
+	if [ $TARGET = "all" ]
+	then
+		echo "${NAME} Cleaning all..."
+		DO_ALL=1
+	else
+		echo "${NAME} Cleaning '${TARGET}'..."
+		DO_ALL=0
+	fi
+elif [ $# -eq 4 ]
+then
+	DO_LIST=0
+	DO_CLEAN=0
+	DO_BUILD=1
+	TARGET=$2
+	ARCHITECTURE=$3 # 32 or 64 (bit)
+	TARGET_DIR=$4 # where to put the resulting headers and binaries?
+
+	if [ $TARGET = "all" ]
+	then
+		echo "${NAME} Build all dependencies into '${TARGET_DIR}'"
+		DO_ALL=1
+	else
+		echo "${NAME} Build '${TARGET}' into '${TARGET_DIR}'"
+		DO_ALL=0
+	fi
+else
+	echo "${NAME} Usage:"
+	echo "${NAME}   List targets: $0 list"
+	echo "${NAME}   Clean targets: $0 clean <TARGET>"
+	echo "${NAME}   Build targets: $0 build <TARGET> <[32|64]> <TARGET_DIR>"
+	exit 1
+fi
+
+check_result() {
+	if [ $1 -ne 0 ]
+	then
+		echo "${NAME} $2 failed: $1"
+		echo "${NAME} Exiting..."
+		exit 1
+	fi
+}
+
+if [ $DO_CLEAN -eq 1 ] || [ $DO_BUILD -eq 1 ]
+then
+	SLEEP=0 # sleep between builds?
+	TEMP_DIR="${TARGET_DIR}/_temp"
+fi
+
+# ---------- Clean ----------
+#if [ $DO_CLEAN -eq 1 ] && [ $DO_ALL -eq 1 ]
+#then
+#	rm -rf $TEMP_DIR
+#	check_result $? "clean temp directory"
+#fi
+
+# ---------- Build target directory ----------
+if [ $DO_BUILD -eq 1 ]
+then
+	if [ $ARCHITECTURE = "32" ]
+	then
+		echo "${NAME} Building for 32bit architecture"
+		TOOLCHAIN_NAME="mingw-x86"
+	elif [ $ARCHITECTURE = "64" ]
+	then
+		echo "${NAME} Building for 64bit architecture"
+		TOOLCHAIN_NAME="mingw-x64"
+	else
+		echo "${NAME} Unsupported architecture $ARCHITECTURE (must be either 32 or 64)"
+		exit 1
+	fi
+
+	echo "${NAME} Preparing target directory..."
+
+	TARGET_BIN_DIR="${TARGET_DIR}/bin/${TOOLCHAIN_NAME}"
+	TARGET_INC_DIR="${TARGET_DIR}/include"
+	TARGET_LIB_DIR="${TARGET_DIR}/lib/${TOOLCHAIN_NAME}"
+
+	mkdir -p $TARGET_BIN_DIR
+	check_result $? "creating target bin directory"
+	mkdir -p $TARGET_INC_DIR
+	check_result $? "creating target include directory"
+	mkdir -p $TARGET_LIB_DIR
+	check_result $? "creating target lib directory"
+
+	if [ $ARCHITECTURE -eq 32 ]
+	then
+		export DXSDK_DIR="/mingw32/i686-w64-mingw32"
+
+		cp -a /mingw32/bin/libgcc_s_dw2-1.dll $TARGET_BIN_DIR
+		check_result $? "copying libgcc"
+		cp -a /mingw32/bin/libstdc++-6.dll $TARGET_BIN_DIR
+		check_result $? "copying libstdc++"
+		cp -a /mingw32/bin/libwinpthread-1.dll $TARGET_BIN_DIR
+		check_result $? "copying libwinpthread"
+	else
+		export DXSDK_DIR="/mingw64/x86_64-w64-mingw32"
+
+		cp -a /mingw64/bin/libgcc_s_seh-1.dll $TARGET_BIN_DIR
+		check_result $? "copying libgcc"
+		cp -a /mingw64/bin/libstdc++-6.dll $TARGET_BIN_DIR
+		check_result $? "copying libstdc++"
+		cp -a /mingw64/bin/libwinpthread-1.dll $TARGET_BIN_DIR
+		check_result $? "copying libwinpthread"
+	fi
+
+	mkdir -p $TEMP_DIR
+	check_result $? "create _temp"
+
+	echo "${NAME} Building libraries..."
+fi
+
+# ---------- Build dependencies ----------
+run_build() {
+	if [ $# -ne 2 ]
+	then
+		exit 1
+	fi
+	
+	BUILD_NUM=$1
+	BUILD_NAME=$2
+	BUILD_LABEL="${NAME} ${BUILD_NUM}/${NUMBER_OF_BUILDS}"
+	
+	if [ $DO_LIST -eq 1 ]
+	then
+		echo "${NAME}        $2"
+	elif [ $DO_CLEAN -eq 1 ]
+	then
+		if [ $DO_ALL -eq 1 ] || [ $TARGET = $BUILD_NAME ]
+		then
+			./build_${BUILD_NAME}.sh "clean"
+			check_result $? "cleaning $BUILD_NAME"
+			echo "${BUILD_LABEL} $BUILD_NAME done"
+		else
+			echo "${BUILD_LABEL} skipping $BUILD_NAME"
+		fi
+	elif [ $DO_BUILD -eq 1 ]
+	then
+		if [ $DO_ALL -eq 1 ] || [ $TARGET = $BUILD_NAME ]
+		then
+			sleep $SLEEP
+			./build_${BUILD_NAME}.sh $TARGET_BIN_DIR $TARGET_INC_DIR $TARGET_LIB_DIR $TEMP_DIR
+			check_result $? "building $BUILD_NAME"
+			echo "${BUILD_LABEL} $BUILD_NAME done"
+		else
+			echo "${BUILD_LABEL} skipping $BUILD_NAME"
+		fi
+	fi
+}
+
+NUMBER_OF_BUILDS=12
+
+# note: enable either cegui+toluapp OR cegui-0-7
+run_build  1 "boost"
+run_build  2 "ogredeps"
+run_build  3 "ogre"
+run_build  4 "xerces"
+run_build  5 "pcre"
+run_build  6 "lua"
+#run_build  7 "toluapp"
+#run_build  8 "cegui"
+run_build  8 "cegui-0-7"
+run_build  9 "ogg"
+run_build 10 "vorbis"
+run_build 11 "freealut"
+run_build 12 "tcl"
+
+if [ $DO_BUILD -eq 1 ] || [ $DO_CLEAN -eq 1 ]
+then
+	echo "${NAME} done."
+fi

Added: windows/precompiled_dependencies/mingw64/build_boost.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_boost.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_boost.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+NAME="[boost]"
+WORKING_DIR="boost/boost_1_60_0"
+
+BUILD_DIR=build
+STAGE_DIR=stage
+TEMP_INC_DIR="stripped_orxonox"
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	rm -rf $BUILD_DIR
+	check_result $? "cleaning build dir"
+	rm -rf $STAGE_DIR
+	check_result $? "cleaning stage dir"
+	rm -rf "dist"
+	check_result $? "cleaning dist dir"
+	rm -rf $TEMP_INC_DIR
+	check_result $? "cleaning temp include dir"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# build bjam
+	./bootstrap.bat
+	check_result $? "bootstrap"
+
+	# compile libraries
+	./b2 --build-dir=$BUILD_DIR --stagedir=$STAGE_DIR toolset=gcc variant=release link=shared threading=multi --build-type=complete stage -j8 \
+			--with-thread --with-filesystem --with-system --with-date_time --with-atomic
+	check_result $? "compiling"
+
+	# copy libraries into target directory
+	find $STAGE_DIR -name "*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copying libraries"
+
+	# build bcp
+	cd tools/bcp
+	../../bjam toolset=gcc -j8
+	check_result $? "building bcp"
+	cd ../..
+
+	# prepare includes
+	mkdir -p ${TEMP_INC_DIR}
+	check_result $? "creating temp include dir"
+
+	./dist/bin/bcp atomic bimap date_time filesystem preprocessor thread ${TEMP_INC_DIR}
+	check_result $? "creating stripped includes"
+
+	# copy includes
+	mkdir -p ${TARGET_INC_DIR}/boost
+	check_result $? "creating include dir"
+	cp -aT ${TEMP_INC_DIR}/boost ${TARGET_INC_DIR}/boost/
+	check_result $? "copying includes"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_cegui-0-7.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_cegui-0-7.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_cegui-0-7.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+NAME="[cegui-0-7]"
+WORKING_DIR="cegui/CEGUI-0.7.9"
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	rm -rf "dependencies"
+	check_result $? "remove dependencies"
+	cd projects/premake
+	make clean
+	# the above command may fail if Makefiles were already removed
+	find "." -name "Makefile" -exec rm -rf {} \;
+	check_result $? "remove Makefiles"
+	find "." -name "*.o" -exec rm -rf {} \;
+	check_result $? "remove build output"
+	find "." -name "*.d" -exec rm -rf {} \;
+	check_result $? "remove build output"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# copy cegui dependencies
+	cp -aT "${TEMP_DIR}/ceguideps" "dependencies"
+	check_result $? "copy ceguideps dependencies"
+	
+	# merge ogre dependencies into cegui dependencies
+	cp -aT "${TEMP_DIR}/ogredeps/include" "dependencies/include"
+	check_result $? "copy includes"
+	cp -aT "${TEMP_DIR}/ogredeps/bin/Release" "dependencies/lib"
+	check_result $? "copy bins"
+	cp -aT "${TEMP_DIR}/ogredeps/lib/Release" "dependencies/lib"
+	check_result $? "copy libs"
+
+	cd projects/premake
+
+	# prepare config.lua
+	CONFIG_FILE="config.lua"
+	rm -rf $CONFIG_FILE
+	check_result $? "removing old config-file"
+	echo "CEGUI_EXTRA_PATHS = {
+			{ \"${HOME_DIR}/${WORKING_DIR}/dependencies\", \"include\", \"lib\" },
+			{ \"${TARGET_BIN_DIR}\", \"\", \"\" },
+			{ \"${TARGET_INC_DIR}\", \"lua/include\", \"\" },
+			{ \"${TARGET_INC_DIR}\", \"ogre/include\", \"\", \"CEGUIOgreRenderer\" },
+			{ \"${TARGET_INC_DIR}\", \"boost\", \"\", \"CEGUIOgreRenderer\" },
+		}
+		CEGUI_LUA_VER = 51
+		CEGUI_USE_FREETYPE = true
+		CEGUI_USE_PCRE_REGEX = true
+		CEGUI_USE_DEFAULT_LOGGER = true
+		OGRE_RENDERER = true
+		FALAGARD_WR = true
+		DEFAULT_WINDOW_RENDERER = \"falagard\"
+		XERCES_PARSER = true
+		DEFAULT_XML_PARSER = \"xerces\"
+		LUA_SCRIPT_MODULE = true
+	" > $CONFIG_FILE
+	check_result $? "create new config-file"
+	
+	# change library names in several premake scripts
+	sed -i "s/\"lua\"/\"lua51\"/" "ScriptingModules/LuaScriptModule/premake.lua"
+	check_result $? "change lua library name"
+	sed -i "s/\"lua\"/\"lua51\"/" "ScriptingModules/LuaScriptModule/support/tolua++/premake.lua"
+	check_result $? "change lua library name"
+	sed -i "s/\"lua\"/\"lua51\"/" "ScriptingModules/LuaScriptModule/support/tolua++bin/premake.lua"
+	check_result $? "change lua library name"
+	sed -i "s/\"xerces-c_3\"/\"xerces-c\"/" "XMLParserModules/XercesParser/premake.lua"
+	check_result $? "change xerces library name"
+	sed -i "s/library(\"OgreMain\", \"_d\")/library(\"OgreMain\"); library(\"libboost_system-mgw48-mt-1_60\")/" "RendererModules/Ogre/premake.lua"
+	check_result $? "add boost system library"
+
+	# run premake
+	./premake --file cegui.lua --target gnu
+	check_result $? "premake"
+
+	# compile
+	CC=gcc \
+	make all -j8 CONFIG=Release
+	check_result $? "make"
+
+	# copy libraries
+	find "../../bin" -name "*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copy libraries"
+
+	# copy includes
+	mkdir -p ${TARGET_INC_DIR}/cegui
+	check_result $? "creating include dir"
+	cp -aT "../../cegui/include" ${TARGET_INC_DIR}/cegui/include
+	check_result $? "copying includes"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_cegui.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_cegui.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_cegui.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+NAME="[cegui]"
+WORKING_DIR="cegui/cegui-0.8.4"
+
+BUILD_DIR=build
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	rm -rf $BUILD_DIR
+	check_result $? "cleaning build dir"
+	rm -rf "dependencies"
+	check_result $? "remove dependencies"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# copy cegui dependencies
+	cp -aT "${TEMP_DIR}/ceguideps" "dependencies"
+	check_result $? "copy ceguideps dependencies"
+	
+	# merge ogre dependencies into cegui dependencies
+	cp -aT "${TEMP_DIR}/ogredeps/include" "dependencies/include"
+	check_result $? "copy includes"
+	cp -aT "${TEMP_DIR}/ogredeps/bin/Release" "dependencies/lib"
+	check_result $? "copy bins"
+	cp -aT "${TEMP_DIR}/ogredeps/lib/Release" "dependencies/lib"
+	check_result $? "copy libs"
+	
+	# prepare build directory
+	mkdir -p $BUILD_DIR
+	check_result $? "creating build dir"
+	cd $BUILD_DIR
+	
+	# run cmake
+	# add flag for FreeImage to be compatible with the ogre-dependencies
+	CXXFLAGS="-DFREEIMAGE_LIB" \
+	cmake .. -G "MSYS Makefiles" \
+			-DOGRE_H_PATH=${TARGET_INC_DIR}/ogre/include \
+			-DOGRE_H_BUILD_SETTINGS_PATH=${TARGET_INC_DIR}/ogre/include \
+			-DOGRE_LIB=${TARGET_BIN_DIR}/OgreMain.dll \
+			-DBOOST_LIBRARYDIR=${TARGET_BIN_DIR} \
+			-DBOOST_INCLUDEDIR=${TARGET_INC_DIR}/boost
+	check_result $? "cmake"
+
+	# compile
+	make -j8
+	check_result $? "make"
+
+	# copy libraries into target directory
+	find "bin" -name "libCEGUI*.dll" -not -name "*Demo*" -not -name "*Minesweeper*" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copying CEGUI-libraries"
+
+	# copy includes
+	mkdir -p ${TARGET_INC_DIR}/cegui
+	check_result $? "creating include dir"
+	cp -aT "../cegui/include/CEGUI" ${TARGET_INC_DIR}/cegui/include
+	check_result $? "copying includes"
+	cp -aT "cegui/include/CEGUI" ${TARGET_INC_DIR}/cegui/include
+	check_result $? "copying generated includes"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_common.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_common.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_common.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+if [ $# -eq 1 ] && [ $1 = "clean" ]
+then
+	DO_CLEAN=1
+	DO_BUILD=0
+elif [ $# -eq 4 ]
+then
+	DO_CLEAN=0
+	DO_BUILD=1
+else
+	echo "${NAME} Usage: $0 <TARGET_BIN_DIR> <TARGET_INC_DIR> <TARGET_LIB_DIR> <TEMP_DIR>"
+	exit 1
+fi
+
+check_result() {
+	if [ $1 -ne 0 ]
+	then
+		echo "${NAME} $2 failed: $1"
+		exit 1
+	fi
+}
+
+if [ $DO_BUILD -eq 1 ]
+then
+	HOME_DIR=$PWD
+	TARGET_BIN_DIR=$HOME_DIR/$1
+	TARGET_INC_DIR=$HOME_DIR/$2
+	TARGET_LIB_DIR=$HOME_DIR/$3
+	TEMP_DIR=$HOME_DIR/$4
+
+	echo "${NAME} Start building ${NAME} in '${WORKING_DIR}'"
+	echo "${NAME} TARGET_BIN_DIR=${TARGET_BIN_DIR}"
+	echo "${NAME} TARGET_INC_DIR=${TARGET_INC_DIR}"
+	echo "${NAME} TARGET_LIB_DIR=${TARGET_LIB_DIR}"
+fi
+
+cd $WORKING_DIR

Added: windows/precompiled_dependencies/mingw64/build_freealut.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_freealut.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_freealut.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+NAME="[freealut]"
+WORKING_DIR="freealut/freealut-freealut_1_1_0"
+AL_SDK_DIR="C:/Program Files (x86)/OpenAL 1.1 SDK"
+
+BUILD_DIR=build
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	rm -rf $BUILD_DIR
+	check_result $? "cleaning build dir"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# prepare OpenAL dependencies
+	AL_INCLUDES="${TARGET_INC_DIR}/openal/include"
+	mkdir -p ${AL_INCLUDES}
+	check_result $? "create OpenAL include dir"
+	cp -aT "${AL_SDK_DIR}/include" "${AL_INCLUDES}/AL"
+	check_result $? "copy OpenAL includes"
+		
+	# prepare build
+	mkdir -p $BUILD_DIR
+	check_result $? "creating build dir"
+	cd $BUILD_DIR
+
+	# run cmake
+	cmake .. -G "MSYS Makefiles" -DOPENAL_INCLUDE_DIR:PATH=${AL_INCLUDES}
+	check_result $? "cmake"
+
+	# compile
+	make -j8
+	check_result $? "make"
+
+	# copy lib
+	cp -a "libalut.dll" ${TARGET_BIN_DIR}
+	check_result $? "copying library"
+	
+	# copy headers
+	HEADER_DIR="${TARGET_INC_DIR}/freealut/include/AL"
+	mkdir -p ${HEADER_DIR}
+	check_result $? "create header dir"
+	find "../include/AL" -name "*.h" -exec cp -a {} ${HEADER_DIR} \;
+	check_result $? "copying headers"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_lua.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_lua.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_lua.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+NAME="[lua]"
+WORKING_DIR="lua/lua-5.1.5"
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	make clean
+	check_result $? "cleaning build"
+#	# only necessary in versions 5.2 and above
+#	rm -rf "install"
+#	check_result $? "delete install directory"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# compile
+	make mingw -j8
+	check_result $? "make"
+	make local
+	check_result $? "make local"
+
+	LIB_DIR=src
+	HEADER_DIR=include # version 5.1
+#	HEADER_DIR=install/include # version 5.2 and above
+	
+	# copy lib
+	find $LIB_DIR -name "*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copying library"
+	
+	# copy headers
+	mkdir -p "${TARGET_INC_DIR}/lua"
+	check_result $? "create include dir"
+	cp -aT $HEADER_DIR "${TARGET_INC_DIR}/lua"
+	check_result $? "copying includes"
+
+	# add to ceguideps
+	mkdir -p "${TEMP_DIR}/ceguideps/lib"
+	check_result $? "create lib dir"
+	mkdir -p "${TEMP_DIR}/ceguideps/include"
+	check_result $? "create include dir"
+	
+	find $LIB_DIR -name "*.dll" -exec cp -a {} "${TEMP_DIR}/ceguideps/lib" \;
+	check_result $? "copy lib"
+	cp -aT $HEADER_DIR "${TEMP_DIR}/ceguideps/include/lua"
+	check_result $? "copy includes"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_ogg.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_ogg.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_ogg.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+NAME="[ogg]"
+WORKING_DIR="ogg/libogg-1.3.2"
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	make clean
+	check_result $? "cleaning build"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# configure
+	./configure
+	check_result $? "configure"
+
+	# compile
+	make -j8
+	check_result $? "make"
+	
+	# copy lib
+	cp -a "src/.libs/libogg-0.dll" ${TARGET_BIN_DIR}
+	check_result $? "copying library"
+	
+	# copy shared lib for vorbis
+	VORBISDEPS_DIR=${TEMP_DIR}/vorbisdeps/lib
+	mkdir -p ${VORBISDEPS_DIR}
+	check_result $? "create vorbisdeps dir"
+	cp -a "src/.libs/libogg.dll.a" ${VORBISDEPS_DIR}
+	check_result $? "copying link-library"
+
+	# copy headers
+	HEADER_DIR="${TARGET_INC_DIR}/libogg/include/ogg"
+	mkdir -p ${HEADER_DIR}
+	check_result $? "create header dir"
+	find "include/ogg" -name "*.h" -exec cp -a {} ${HEADER_DIR} \;
+	check_result $? "copying headers"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_ogre.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_ogre.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_ogre.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+NAME="[ogre]"
+WORKING_DIR="ogre/ogre_src_v1-8-1"
+#WORKING_DIR="ogre/ogre-1-9-0-sinbad-ogre-dd30349ea667"
+
+BUILD_DIR=build
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	rm -rf $BUILD_DIR
+	check_result $? "cleaning build dir"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# modify sources to make it work with mingw64
+	sed -i "s/DxErr/dxerr9/" "CMake/Packages/FindDirectX.cmake"
+	check_result $? "renaming DxErr library in FindDirectX.cmake"
+	sed -i "s/#define __uuidof(Object) IID_##Object//" "OgreMain/include/WIN32/OgreMinGWSupport.h"
+	check_result $? "removing re-definition of __uuidof from OgreMinGWSupport.h"
+	sed -i "s/intptr_t __security_cookie;//" "OgreMain/src/WIN32/OgreMinGWSupport.cpp"
+	check_result $? "removing re-definition of __security_cookie from OgreMinGWSupport.cpp"
+	sed -i "s/(intptr_t/(uintptr_t/g" "OgreMain/src/WIN32/OgreMinGWSupport.cpp"
+	check_result $? "replacing intptr_t with uintptr_t in OgreMinGWSupport.cpp"
+	sed -i "s/(intptr_t/(uintptr_t/g" "RenderSystems/Direct3D9/src/OgreD3D9Plugin.cpp"
+	check_result $? "replacing intptr_t with uintptr_t in OgreD3D9Plugin.cpp"
+	sed -i "s/#include <DxErr.h>/#include <dxerr9.h>\n#define DXGetErrorDescription DXGetErrorDescription9/" "RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h"
+	check_result $? "replacing include and add define in OgreD3D9Prerequisites.h"
+
+	# prepare build directory
+	mkdir -p $BUILD_DIR
+	check_result $? "creating build dir"
+	cd $BUILD_DIR
+
+	# run cmake
+	cmake -DCMAKE_BUILD_TYPE=Release \
+		  -DOGRE_DEPENDENCIES_DIR=${TEMP_DIR}/ogredeps \
+		  -DBOOST_LIBRARYDIR=${TARGET_BIN_DIR} \
+		  -DBOOST_INCLUDEDIR=${TARGET_INC_DIR}/boost \
+		  -DOGRE_BUILD_RENDERSYSTEM_D3D11=OFF \
+		  .. -G "MSYS Makefiles"
+
+	check_result $? "cmake"
+
+	# compile
+	make -j8 install
+	check_result $? "make install"
+
+	# copy libraries into target directory
+	find "sdk/bin/release" -name "Ogre*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copying Ogre-libraries"
+	find "sdk/bin/release" -name "Plugin_*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copying Plugin-libraries"
+	find "sdk/bin/release" -name "RenderSystem_*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copying RenderSystem_-libraries"
+
+	# copy includes
+	mkdir -p ${TARGET_INC_DIR}/ogre
+	check_result $? "creating include dir"
+	cp -aT "sdk/include/OGRE" ${TARGET_INC_DIR}/ogre/include
+	check_result $? "copying includes"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_ogredeps.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_ogredeps.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_ogredeps.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+NAME="[ogredeps]"
+WORKING_DIR="ogre/cabalistic-ogredeps-7168c50f9d04"
+
+BUILD_DIR=build
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	rm -rf $BUILD_DIR
+	check_result $? "cleaning build dir"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# modify build script: make zlib a SHARED library (instead of a STATIC one)
+	CMAKE_FILE="src/zlib/CMakeLists.txt"
+	sed -i "s/zlib STATIC /zlib SHARED /g" $CMAKE_FILE
+	check_result $? "modifying build script"
+
+	# prepare build
+	mkdir -p $BUILD_DIR
+	check_result $? "creating build dir"
+	cd $BUILD_DIR
+
+	# run cmake
+	cmake .. -G "MSYS Makefiles" -DOGREDEPS_BUILD_SDL2=false
+	check_result $? "cmake"
+
+	# compile
+	make -j8
+	check_result $? "make"
+	make -j8 install
+	check_result $? "make install"
+
+	# copy zlib and cg into target directory
+	cp -a "ogredeps/bin/Release/libzlib.dll" ${TARGET_BIN_DIR}
+	check_result $? "copying library"
+	cp -a "ogredeps/bin/Release/cg.dll" ${TARGET_BIN_DIR}
+	check_result $? "copying cg"
+
+	# copy zlib headers into target directory
+	ZLIB_INC_DIR="${TARGET_INC_DIR}/zlib/include"
+	mkdir -p $ZLIB_INC_DIR
+	check_result $? "creating include dir"
+	cp -a "ogredeps/include/zconf.h" ${ZLIB_INC_DIR}
+	check_result $? "copying zconf.h"
+	cp -a "ogredeps/include/zlib.h" ${ZLIB_INC_DIR}
+	check_result $? "copying zlib.h"
+
+	# copy whole dependency folder to TEMP_DIR for future build steps (i.e. ogre)
+	cp -aT "ogredeps" "${TEMP_DIR}"
+	check_result $? "copying dependencies to TEMP_DIR"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_pcre.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_pcre.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_pcre.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+NAME="[pcre]"
+WORKING_DIR="pcre/pcre-8.38"
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	make clean
+	check_result $? "cleaning build"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# configure
+	./configure --enable-utf8
+	check_result $? "configure"
+
+	# compile
+	make -j8
+	check_result $? "make"
+	make -j8 install
+	check_result $? "make install"
+	
+	# copy lib
+	cp -a ".libs/libpcre-1.dll" ${TARGET_BIN_DIR}
+	check_result $? "copying library"
+
+	# add to ceguideps
+	mkdir -p "${TEMP_DIR}/ceguideps/lib"
+	check_result $? "create lib dir"
+	mkdir -p "${TEMP_DIR}/ceguideps/include"
+	check_result $? "create include dir"
+	
+	cp -a ".libs/libpcre.dll.a" "${TEMP_DIR}/ceguideps/lib"
+	check_result $? "copy lib"
+	cp -a "pcre.h" "${TEMP_DIR}/ceguideps/include"
+	check_result $? "copy includes"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_tcl.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_tcl.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_tcl.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+NAME="[tcl]"
+WORKING_DIR="tcl/tcl8.6.4"
+
+source ./build_common.sh
+
+# remove the 'pkgs' directory to avoid building unnecessary packages
+rm -rf "pkgs"
+
+# go to 'win' directory
+cd "win"
+check_result $? "cd win"
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	make clean
+	check_result $? "cleaning build"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# configure
+	./configure
+	check_result $? "configure"
+
+	# compile
+	make -j8
+	if [ $? -ne 0 ]
+	then
+		# sometimes the first make-run fails to build the *.exe target -> we call make again and only check the result of the second call
+		echo "${NAME} trying again to build target..."
+		make
+		check_result $? "make"
+	fi
+
+	# copy lib
+	find "." -name "tcl??.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copy tcl-lib"
+	find "." -name "zlib*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copy zlib-lib"
+
+	# copy headers
+	HEADERS_DIR=${TARGET_INC_DIR}/tcl/include
+	mkdir -p $HEADERS_DIR
+	check_result $? "create headers directory"
+	find "../generic/" -name "*.h" -exec cp -a {} ${HEADERS_DIR} \;
+	check_result $? "copy headers"
+	
+	# copy tcl-script library
+	cp -aT "../library" "${TARGET_LIB_DIR}/tcl"
+	check_result $? "copy script library"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_toluapp.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_toluapp.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_toluapp.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+NAME="[toluapp]"
+WORKING_DIR="tolua++/toluapp-master"
+
+BUILD_DIR=build
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	rm -rf $BUILD_DIR
+	check_result $? "cleaning build dir"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# prepare build
+	mkdir -p $BUILD_DIR
+	check_result $? "creating build dir"
+	cd $BUILD_DIR
+	
+	# export env variable
+	export LUA_DIR="${TEMP_DIR}/ceguideps"
+
+	# run cmake
+	cmake .. -G "MSYS Makefiles"
+	check_result $? "cmake"
+
+	# compile
+	make -j8
+	check_result $? "make"
+
+	# copy lib
+	find "." -name "*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copying library"
+	
+	# add to ceguideps
+	mkdir -p "${TEMP_DIR}/ceguideps/lib"
+	check_result $? "create lib dir"
+	mkdir -p "${TEMP_DIR}/ceguideps/include"
+	check_result $? "create include dir"
+	
+	find "." -name "*.dll" -exec cp -a {} "${TEMP_DIR}/ceguideps/lib" \;
+	check_result $? "copy lib"
+	find "../include" -name "*.h" -exec cp -a {} "${TEMP_DIR}/ceguideps/include" \;
+	check_result $? "copy includes"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_vorbis.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_vorbis.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_vorbis.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+NAME="[vorbis]"
+WORKING_DIR="vorbis/libvorbis-1.3.5"
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	make clean
+	check_result $? "cleaning build"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# configure
+	./configure --with-ogg-libraries=${TEMP_DIR}/vorbisdeps/lib --with-ogg-includes=${TARGET_INC_DIR}/libogg/include
+	check_result $? "configure"
+
+	# compile
+	make -j8
+	check_result $? "make"
+		
+	# copy lib
+	find "lib/.libs" -name "*.dll" -exec cp -a {} ${TARGET_BIN_DIR} \;
+	check_result $? "copying library"
+
+	# copy headers
+	HEADER_DIR="${TARGET_INC_DIR}/libvorbis/include/vorbis"
+	mkdir -p ${HEADER_DIR}
+	check_result $? "create header dir"
+	find "include/vorbis" -name "*.h" -exec cp -a {} ${HEADER_DIR} \;
+	check_result $? "copying headers"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/build_xerces.sh
===================================================================
--- windows/precompiled_dependencies/mingw64/build_xerces.sh	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/build_xerces.sh	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+NAME="[xerces]"
+WORKING_DIR="xerces/xerces-c-3.1.2"
+
+source ./build_common.sh
+
+if [ $DO_CLEAN -eq 1 ]
+then
+	make clean
+	check_result $? "cleaning build"
+fi
+
+if [ $DO_BUILD -eq 1 ]
+then
+	# configure
+	./configure
+	check_result $? "configure"
+
+	# compile
+	make -j8
+	check_result $? "make"
+	
+	# add to ceguideps
+	mkdir -p "${TEMP_DIR}/ceguideps/lib"
+	check_result $? "create lib dir"
+	mkdir -p "${TEMP_DIR}/ceguideps/include"
+	check_result $? "create include dir"
+	
+	cp -a "src/.libs/libxerces-c.a" "${TEMP_DIR}/ceguideps/lib"
+	check_result $? "copy lib"
+	cp -aT "src/xercesc" "${TEMP_DIR}/ceguideps/include"
+	check_result $? "copy includes"
+
+	echo "${NAME} Finished building ${NAME}"
+fi

Added: windows/precompiled_dependencies/mingw64/readme.txt
===================================================================
--- windows/precompiled_dependencies/mingw64/readme.txt	                        (rev 0)
+++ windows/precompiled_dependencies/mingw64/readme.txt	2016-02-13 22:16:25 UTC (rev 125)
@@ -0,0 +1,75 @@
+Dependencies
+
+## SDKs: ##
+DirectX: The DirectX-SDK is not needed anymore - we use the libraries & headers included with mingw64
+cg: The cg-SDK is not needed anymore - it is included in the ogre dependencies
+OpenAL: Download and install SDK: http://www.openal.org/downloads/
+
+
+## Boost: ##
+Download the latest release: http://www.boost.org/users/download/
+Unpack the archive and update the WORKING_DIR variable in build_boost.sh accordingly.
+
+
+## Ogre dependencies: ##
+Download dependencies here: https://bitbucket.org/cabalistic/ogredeps
+Unpack the archive and update the WORKING_DIR variable in build_ogredeps.sh accordingly.
+(Note: the buildscript will modify src/zlib/CMakeLists.txt to make zlib a shared library.)
+
+
+## Ogre: ##
+Download Ogre (chose the right Tag): https://bitbucket.org/sinbad/ogre/downloads
+Unpack the archive and update the WORKING_DIR variable in build_ogre.sh accordingly.
+(Note: the buildscript will modify some files to make it work with mingw64)
+
+
+## pcre: ## (for cegui)
+Download the latest release: http://www.pcre.org/
+Unpack the archive and update the WORKING_DIR variable in build_pcre.sh accordingly.
+
+
+## xerces: ## (for cegui 0.8)
+Download the latest release: http://xerces.apache.org/xerces-c/download.cgi
+Unpack the archive and update the WORKING_DIR variable in build_xerces.sh accordingly.
+
+
+## Lua: ##
+Download the latest release of version 5.1 (tolua++ is not compatible with more recent versions): http://www.lua.org/download.html
+Unpack the archive and update the WORKING_DIR variable in build_lua.sh accordingly.
+
+
+## tolua++: ## (for cegui 0.8)
+5.1 and older: Download the latest version: https://github.com/LuaDist/toluapp
+5.2 and newer: Download the latest version: https://github.com/waltervn/toluapp
+Unpack the archive and update the WORKING_DIR variable in build_toluapp.sh accordingly.
+
+
+## CEGUI: (0.8.x) ##
+Download the latest release of cegui: http://cegui.org.uk/download
+Unpack the archive and update the WORKING_DIR variable in build_cegui.sh accordingly.
+
+## CEGUI: (0.7.x) ##
+Download the latest release of cegui: http://cegui.org.uk/download
+Unpack the archive and update the WORKING_DIR variable in build_cegui.sh accordingly.
+(Note: the buildscript will modify some premake-scripts to make it work)
+
+
+## Ogg: ##
+Download Ogg here: http://xiph.org/downloads/
+Unpack the archive and update the WORKING_DIR variable in build_ogg.sh accordingly.
+
+
+## Vorbis (requires ogg): ##
+Download Vorbis here: http://xiph.org/downloads/
+Unpack the archive and update the WORKING_DIR variable in build_vorbis.sh accordingly.
+
+
+## Freealut: ##
+Download Freealut here: https://github.com/vancegroup/freealut/releases
+Unpack the archive and update the WORKING_DIR variable in build_freealut.sh accordingly.
+Update the AL_SDK_DIR variable with the path to the installed SDK.
+
+
+## Tcl: ##
+Download Tcl here: https://www.tcl.tk/software/tcltk/download.html
+Unpack the archive and update the WORKING_DIR variable in build_tcl.sh accordingly.




More information about the Orxonox-commit mailing list