2012-09-05 21:40:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "x$ROS_ARCH" = "x" ]; then
|
2011-05-16 21:26:08 +00:00
|
|
|
echo Could not detect RosBE.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
BUILD_ENVIRONMENT=MinGW
|
|
|
|
ARCH=$ROS_ARCH
|
|
|
|
REACTOS_SOURCE_DIR=$(cd `dirname $0` && pwd)
|
|
|
|
REACTOS_OUTPUT_PATH=output-$BUILD_ENVIRONMENT-$ARCH
|
2012-10-25 13:05:30 +00:00
|
|
|
if [ "$1" = "ninja" ]; then
|
|
|
|
CMAKE_GENERATOR="Ninja"
|
|
|
|
else
|
|
|
|
CMAKE_GENERATOR="Unix Makefiles"
|
|
|
|
fi
|
2011-05-16 21:26:08 +00:00
|
|
|
|
2012-09-05 21:40:14 +00:00
|
|
|
if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then
|
2011-05-16 21:26:08 +00:00
|
|
|
echo Creating directories in $REACTOS_OUTPUT_PATH
|
2012-09-05 21:40:14 +00:00
|
|
|
mkdir -p "$REACTOS_OUTPUT_PATH"
|
2011-05-16 21:26:08 +00:00
|
|
|
cd "$REACTOS_OUTPUT_PATH"
|
|
|
|
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"
|
2012-10-25 13:05:30 +00:00
|
|
|
cmake -G "$CMAKE_GENERATOR" -DARCH=$ARCH "$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
|
|
|
|
2012-10-25 13:05:30 +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" "$REACTOS_SOURCE_DIR"
|
2011-05-16 21:26:08 +00:00
|
|
|
|
2011-06-11 17:03:03 +00:00
|
|
|
echo Configure script complete! Enter directories and execute appropriate build commands\(ex: make, makex, etc...\).
|