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
|
2015-10-18 15:47:20 +00:00
|
|
|
USE_NEW_STYLE=1
|
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"
|
|
|
|
;;
|
2015-10-18 15:47:20 +00:00
|
|
|
with-host-tools)
|
|
|
|
USE_NEW_STYLE=0
|
|
|
|
;;
|
2013-06-09 13:47:01 +00:00
|
|
|
*)
|
|
|
|
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
|
|
|
|
|
2015-10-18 15:47:20 +00:00
|
|
|
mkdir -p reactos
|
2011-05-16 21:26:08 +00:00
|
|
|
|
2016-04-24 22:40:53 +00:00
|
|
|
#EXTRA_ARGS=""
|
2015-10-18 15:47:20 +00:00
|
|
|
if [ $USE_NEW_STYLE -eq 0 ]; then
|
|
|
|
mkdir -p host-tools
|
|
|
|
echo Preparing host tools...
|
|
|
|
cd host-tools
|
|
|
|
rm -f CMakeCache.txt
|
|
|
|
|
|
|
|
REACTOS_BUILD_TOOLS_DIR="$PWD"
|
|
|
|
cmake -G "$CMAKE_GENERATOR" -DARCH:STRING=$ARCH $ROS_CMAKEOPTS -DNEW_STYLE_BUILD:BOOL=0 "$REACTOS_SOURCE_DIR"
|
2011-05-16 21:26:08 +00:00
|
|
|
|
2016-04-24 22:40:53 +00:00
|
|
|
EXTRA_ARGS="$EXTRA_ARGS -DREACTOS_BUILD_TOOLS_DIR:PATH=$REACTOS_BUILD_TOOLS_DIR"
|
2015-10-18 15:47:20 +00:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
fi
|
2011-05-16 21:26:08 +00:00
|
|
|
|
2011-06-11 17:03:03 +00:00
|
|
|
echo Preparing reactos...
|
2015-10-18 15:47:20 +00:00
|
|
|
cd reactos
|
2016-04-24 22:40:53 +00:00
|
|
|
rm -f CMakeCache.txt host-tools/CMakeCache.txt
|
2011-06-11 17:03:03 +00:00
|
|
|
|
2015-10-18 15:47:20 +00:00
|
|
|
cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ARCH -DNEW_STYLE_BUILD:BOOL=$USE_NEW_STYLE $EXTRA_ARGS $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...\).
|