2012-09-06 05:40:14 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "x$ROS_ARCH" = "x" ]; then
|
2013-07-12 18:13:45 +08:00
|
|
|
echo Could not detect RosBE.
|
|
|
|
exit 1
|
2011-05-17 05:26:08 +08: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 21:47:01 +08:00
|
|
|
|
|
|
|
usage() {
|
2013-07-12 18:13:45 +08:00
|
|
|
echo Invalid parameter given.
|
|
|
|
exit 1
|
2013-06-09 21:47:01 +08:00
|
|
|
}
|
|
|
|
|
2013-06-01 05:04:28 +08:00
|
|
|
CMAKE_GENERATOR="Ninja"
|
2013-07-12 18:10:23 +08:00
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case $1 in
|
2013-06-09 21:47:01 +08:00
|
|
|
-D)
|
2013-07-12 18:10:23 +08:00
|
|
|
shift
|
|
|
|
if echo "x$1" | grep 'x?*=*' > /dev/null; then
|
2013-08-31 08:05:29 +08:00
|
|
|
ROS_CMAKEOPTS=$ROS_CMAKEOPTS" -D $1"
|
2013-06-09 21:47:01 +08:00
|
|
|
else
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
2013-07-12 18:10:23 +08:00
|
|
|
-D?*=*|-D?*)
|
2013-08-31 08:05:29 +08:00
|
|
|
ROS_CMAKEOPTS=$ROS_CMAKEOPTS" $1"
|
2013-06-09 21:47:01 +08:00
|
|
|
;;
|
|
|
|
makefiles|Makefiles)
|
|
|
|
CMAKE_GENERATOR="Unix Makefiles"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage
|
|
|
|
esac
|
2013-07-12 18:10:23 +08:00
|
|
|
|
|
|
|
shift
|
2013-06-09 21:47:01 +08:00
|
|
|
done
|
2011-05-17 05:26:08 +08:00
|
|
|
|
2012-09-06 05:40:14 +08:00
|
|
|
if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then
|
2013-07-12 18:13:45 +08:00
|
|
|
echo Creating directories in $REACTOS_OUTPUT_PATH
|
|
|
|
mkdir -p "$REACTOS_OUTPUT_PATH"
|
|
|
|
cd "$REACTOS_OUTPUT_PATH"
|
2011-05-17 05:26:08 +08:00
|
|
|
fi
|
|
|
|
|
2011-06-12 01:03:03 +08:00
|
|
|
echo Preparing reactos...
|
2016-04-25 06:40:53 +08:00
|
|
|
rm -f CMakeCache.txt host-tools/CMakeCache.txt
|
2011-06-12 01:03:03 +08:00
|
|
|
|
2018-10-01 19:07:44 +08: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-17 05:26:08 +08:00
|
|
|
|
2013-06-22 18:54:11 +08:00
|
|
|
echo Configure script complete! Enter directories and execute appropriate build commands \(ex: ninja, make, makex, etc...\).
|