2012-09-05 21:40:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "x$ROS_ARCH" = "x" ]; then
|
2013-07-12 10:13:45 +00:00
|
|
|
echo Could not detect RosBE.
|
|
|
|
exit 1
|
2011-05-16 21:26:08 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
BUILD_ENVIRONMENT=MinGW
|
|
|
|
ARCH=$ROS_ARCH
|
|
|
|
REACTOS_SOURCE_DIR=$(cd `dirname $0` && pwd)
|
|
|
|
REACTOS_OUTPUT_PATH=output-$BUILD_ENVIRONMENT-$ARCH
|
2013-06-09 13:47:01 +00:00
|
|
|
|
|
|
|
usage() {
|
2013-07-12 10:13:45 +00:00
|
|
|
echo Invalid parameter given.
|
|
|
|
exit 1
|
2013-06-09 13:47:01 +00:00
|
|
|
}
|
|
|
|
|
2013-05-31 21:04:28 +00:00
|
|
|
CMAKE_GENERATOR="Ninja"
|
2013-07-12 10:10:23 +00:00
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case $1 in
|
2013-06-09 13:47:01 +00:00
|
|
|
-D)
|
2013-07-12 10:10:23 +00:00
|
|
|
shift
|
|
|
|
if echo "x$1" | grep 'x?*=*' > /dev/null; then
|
2013-08-31 00:05:29 +00:00
|
|
|
ROS_CMAKEOPTS=$ROS_CMAKEOPTS" -D $1"
|
2013-06-09 13:47:01 +00:00
|
|
|
else
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
2013-07-12 10:10:23 +00:00
|
|
|
-D?*=*|-D?*)
|
2013-08-31 00:05:29 +00:00
|
|
|
ROS_CMAKEOPTS=$ROS_CMAKEOPTS" $1"
|
2013-06-09 13:47:01 +00:00
|
|
|
;;
|
|
|
|
makefiles|Makefiles)
|
|
|
|
CMAKE_GENERATOR="Unix Makefiles"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage
|
|
|
|
esac
|
2013-07-12 10:10:23 +00:00
|
|
|
|
|
|
|
shift
|
2013-06-09 13:47:01 +00:00
|
|
|
done
|
2011-05-16 21:26:08 +00:00
|
|
|
|
2012-09-05 21:40:14 +00:00
|
|
|
if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then
|
2013-07-12 10:13:45 +00:00
|
|
|
echo Creating directories in $REACTOS_OUTPUT_PATH
|
|
|
|
mkdir -p "$REACTOS_OUTPUT_PATH"
|
|
|
|
cd "$REACTOS_OUTPUT_PATH"
|
2011-05-16 21:26:08 +00:00
|
|
|
fi
|
|
|
|
|
2012-09-05 21:40:14 +00:00
|
|
|
mkdir -p host-tools reactos
|
2011-05-16 21:26:08 +00:00
|
|
|
|
|
|
|
echo Preparing host tools...
|
|
|
|
cd host-tools
|
2012-09-05 21:40:14 +00:00
|
|
|
rm -f CMakeCache.txt
|
2011-05-16 21:26:08 +00:00
|
|
|
|
|
|
|
REACTOS_BUILD_TOOLS_DIR="$PWD"
|
2013-06-09 13:47:01 +00:00
|
|
|
cmake -G "$CMAKE_GENERATOR" -DARCH=$ARCH $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR"
|
2011-05-16 21:26:08 +00:00
|
|
|
|
2011-06-11 17:03:03 +00:00
|
|
|
echo Preparing reactos...
|
2011-05-16 21:26:08 +00:00
|
|
|
cd ../reactos
|
2012-09-05 21:40:14 +00:00
|
|
|
rm -f CMakeCache.txt
|
2011-06-11 17:03:03 +00:00
|
|
|
|
2013-06-09 13:47:01 +00:00
|
|
|
cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE=0 -DPCH=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR"
|
2011-05-16 21:26:08 +00:00
|
|
|
|
2013-06-22 10:54:11 +00:00
|
|
|
echo Configure script complete! Enter directories and execute appropriate build commands \(ex: ninja, make, makex, etc...\).
|