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
|
|
|
|
|
2011-06-11 17:03:03 +00:00
|
|
|
echo Preparing 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
|
|
|
|
2018-10-01 11:07:44 +00:00
|
|
|
cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ARCH $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...\).
|