This really needs to go in a branch. It needs heavy testing and can't coincide with...
[reactos.git] / configure.sh
1 #!/bin/bash
2 if [ "x$ROS_ARCH" == "x" ]
3 then
4 echo Could not detect RosBE.
5 exit 1
6 fi
7
8 BUILD_ENVIRONMENT=MinGW
9 ARCH=$ROS_ARCH
10 REACTOS_SOURCE_DIR=$(cd `dirname $0` && pwd)
11 REACTOS_OUTPUT_PATH=output-$BUILD_ENVIRONMENT-$ARCH
12
13 echo ARCH $ARCH ROS $ROS_ARCH
14 if [ "$REACTOS_SOURCE_DIR" == "$PWD" ]
15 then
16 echo Creating directories in $REACTOS_OUTPUT_PATH
17 mkdir -p $REACTOS_OUTPUT_PATH
18 cd "$REACTOS_OUTPUT_PATH"
19 fi
20
21 mkdir -p host-tools
22 mkdir -p reactos
23
24 echo Preparing host tools...
25 cd host-tools
26 if [ -f CMakeCache.txt ]
27 then
28 rm -f CMakeCache.txt
29 fi
30
31 REACTOS_BUILD_TOOLS_DIR="$PWD"
32 cmake -G "Unix Makefiles" -DARCH=$ARCH "$REACTOS_SOURCE_DIR"
33
34 cd ../reactos
35 cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR"
36
37 echo Configure script complete! Enter directories and execute appropriate build commands(ex: make, makex, etc...).
38