build: script fixes

* regex removed in hook since it was not working on windows.
* fixed method for getting the script's path for windows. using this in setup and clean script.
* fixed missing include in cmakelists
This commit is contained in:
malte_langkabel
2016-04-15 13:57:46 +02:00
parent e68177b634
commit 3cb15f1754
4 changed files with 36 additions and 16 deletions
+18 -8
View File
@@ -12,17 +12,27 @@ elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
PLATFORM='Windows'
fi
# Enter masterproject directory
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
if [ $PLATFORM == "Windows" ]; then
# Remove symbolic links
cmd //c 'rmdir '.$MY_PATH.'\..\bin\app\Debug\data' &
cmd //c 'rmdir '.$MY_PATH.'\..\bin\app\Debug\user' &
cmd //c 'rmdir '.$MY_PATH.'\..\bin\app\Release\data' &
cmd //c 'rmdir '.$MY_PATH.'\..\bin\app\Release\user' &
ORIGINAL_PATH_TO_SCRIPT="${0}"
CLEANED_PATH_TO_SCRIPT="${ORIGINAL_PATH_TO_SCRIPT//\\//}"
ROOT_DIR=`dirname "$CLEANED_PATH_TO_SCRIPT"`
else
ROOT_DIR="$( cd "$( dirname "$0" )" && pwd )"
fi
ROOT_DIR=$ROOT_DIR/..
# Enter masterproject directory
cd $ROOT_DIR/
if [ $PLATFORM == "Windows" ]; then
BACKSLASHED_ROOT_DIR="${ROOT_DIR//\//\\}"
# Remove symbolic links
cmd //c 'rmdir '$BACKSLASHED_ROOT_DIR'\bin\app\Debug\data' &
cmd //c 'rmdir '$BACKSLASHED_ROOT_DIR'\bin\app\Debug\user' &
cmd //c 'rmdir '$BACKSLASHED_ROOT_DIR'\bin\app\Release\data' &
cmd //c 'rmdir '$BACKSLASHED_ROOT_DIR'\bin\app\Release\user' &
fi
# Remove folders and contents