commit cc06d38049e4d515d27b9962bb3dc6c41fb03a2e
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Wed Jan 10 13:52:28 2018 +0100

    Fixed path issues in the QtCreator setup script.

diff --git a/ide/QtCreator/QtCreatorSetup.sh b/ide/QtCreator/QtCreatorSetup.sh
index 9eb0d83..7d83171 100755
--- a/ide/QtCreator/QtCreatorSetup.sh
+++ b/ide/QtCreator/QtCreatorSetup.sh
@@ -476,6 +476,7 @@ function deleteProjects {
 #                 No error or warning occurred.
 #
 function createLightRingProject {
+  local userdir=$(pwd)
   local projectdir=""
   local gccincludedir=""
   local outvar=""
@@ -514,21 +515,24 @@ function createLightRingProject {
   # print message
   printInfo "creating QtCreator project files for the LightRing module...\n"
 
-  # read project directory if required
+  # read absolute project directory if required
   if [ -z "$projectdir" ]; then
     getProjectDir projectdir
   fi
 
-  # retrieve gcc-arm-none-eabi include dir
+  # retrieve absolute GCC include dir
   if [ -z "$gccincludedir" ]; then
     retrieveGccIncludeDir gccincludedir
   fi
 
+  # move to project directory
+  cd $projectdir
+
   # create project files
   # generate a file that contains all subdirectories as includes (but ignore hidden and documentation directories)
   find $gccincludedir -type d > ${projectdir}/LightRing.includes
-  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Source/) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/LightRing.includes
-  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Demo/ARMCM3_STM32F103_LightRing_GCC/Boot/) -type d | grep -v "uip\|fatfs\|ethernetlib\|cmd\|ide" >> ${projectdir}/LightRing.includes
+  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Source) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/LightRing.includes
+  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Demo/ARMCM3_STM32F103_LightRing_GCC/Boot) -type d | grep -v "bin\|cmd\|ethernetlib\|fatfs\|uip\|obj" >> ${projectdir}/LightRing.includes
   # generate a file that specifies all files
   echo -n "" > ${projectdir}/LightRing.files
   for path in `cat ${projectdir}/LightRing.includes`; do
@@ -546,6 +550,9 @@ function createLightRingProject {
     echo -e "" >> ${projectdir}/LightRing.creator
   fi
 
+  # go back to user directory
+  cd $userdir
+
   # fill the output variables
   if [ ! -z "$outvar" ]; then
     eval $outvar="$projectdir"
@@ -573,6 +580,7 @@ function createLightRingProject {
 #                 No error or warning occurred.
 #
 function createPowerManagementProject {
+  local userdir=$(pwd)
   local projectdir=""
   local gccincludedir=""
   local outvar=""
@@ -611,21 +619,24 @@ function createPowerManagementProject {
   # print message
   printInfo "creating QtCreator project files for the PowerManagement module...\n"
 
-  # read project directory if required
+  # read absolute project directory if required
   if [ -z "$projectdir" ]; then
     getProjectDir projectdir
   fi
 
-  # retrieve gcc-arm-none-eabi include dir
+  # retrieve absolute GCC include dir
   if [ -z "$gccincludedir" ]; then
     retrieveGccIncludeDir gccincludedir
   fi
 
+  # move to project directory
+  cd $projectdir
+
   # create project files
   # generate a file that contains all subdirectories as includes (but ignore hidden and documentation directories)
   find $gccincludedir -type d > ${projectdir}/PowerManagement.includes
-  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Source/) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/PowerManagement.includes
-  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Demo/ARMCM4_STM32F405_Power_Management_GCC/Boot/) -type d | grep -v "uip\|fatfs\|ethernetlib\|cmd\|ide" >> ${projectdir}/PowerManagement.includes
+  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Source) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/PowerManagement.includes
+  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Demo/ARMCM4_STM32F405_Power_Management_GCC/Boot) -type d | grep -v "bin\|cmd\|ethernetlib\|fatfs\|uip\|obj" >> ${projectdir}/PowerManagement.includes
   # generate a file that specifies all files
   echo -n "" > ${projectdir}/PowerManagement.files
   for path in `cat ${projectdir}/PowerManagement.includes`; do
@@ -643,6 +654,10 @@ function createPowerManagementProject {
     echo -e "" >> ${projectdir}/PowerManagement.creator
   fi
 
+  # go back to user directory
+  cd $userdir
+
+
   # fill the output variables
   if [ ! -z "$outvar" ]; then
     eval $outvar="$projectdir"
@@ -670,6 +685,7 @@ function createPowerManagementProject {
 #                 No error or warning occurred.
 #
 function createDiWheelDriveProject {
+  local userdir=$(pwd)
   local projectdir=""
   local gccincludedir=""
   local outvar=""
@@ -708,21 +724,25 @@ function createDiWheelDriveProject {
   # print message
   printInfo "creating QtCreator project files for the DiWheelDrive module...\n"
 
-  # read project directory if required
+  # read absolute project directory if required
   if [ -z "$projectdir" ]; then
     getProjectDir projectdir
   fi
 
-  # retrieve gcc-arm-none-eabi include dir
+  # retrieve absolute GCC include dir
   if [ -z "$gccincludedir" ]; then
     retrieveGccIncludeDir gccincludedir
   fi
 
+  # move to project directory
+  cd $projectdir
+
+
   # create project files
   # generate a file that contains all subdirectories as includes (but ignore hidden and documentation directories)
   find $gccincludedir -type d > ${projectdir}/DiWheelDrive.includes
-  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Source/) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/DiWheelDrive.includes
-  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Demo/ARMCM3_STM32F103_DiWheelDrive_GCC/Boot/) -type d | grep -v "uip\|fatfs\|ethernetlib\|cmd\|ide" >> ${projectdir}/DiWheelDrive.includes
+  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Source) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/DiWheelDrive.includes
+  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Demo/ARMCM3_STM32F103_DiWheelDrive_GCC/Boot) -type d | grep -v "bin\|cmd\|ethernetlib\|fatfs\|uip\|obj" >> ${projectdir}/DiWheelDrive.includes
   # generate a file that specifies all files
   echo -n "" > ${projectdir}/DiWheelDrive.files
   for path in `cat ${projectdir}/DiWheelDrive.includes`; do
@@ -740,6 +760,10 @@ function createDiWheelDriveProject {
     echo -e "" >> ${projectdir}/DiWheelDrive.creator
   fi
 
+  # go back to user directory
+  cd $userdir
+
+
   # fill the output variables
   if [ ! -z "$outvar" ]; then
     eval $outvar="$projectdir"
