Revision cc06d380 ide/QtCreator/QtCreatorSetup.sh

View differences:

ide/QtCreator/QtCreatorSetup.sh
476 476
#                 No error or warning occurred.
477 477
#
478 478
function createLightRingProject {
479
  local userdir=$(pwd)
479 480
  local projectdir=""
480 481
  local gccincludedir=""
481 482
  local outvar=""
......
514 515
  # print message
515 516
  printInfo "creating QtCreator project files for the LightRing module...\n"
516 517

  
517
  # read project directory if required
518
  # read absolute project directory if required
518 519
  if [ -z "$projectdir" ]; then
519 520
    getProjectDir projectdir
520 521
  fi
521 522

  
522
  # retrieve gcc-arm-none-eabi include dir
523
  # retrieve absolute GCC include dir
523 524
  if [ -z "$gccincludedir" ]; then
524 525
    retrieveGccIncludeDir gccincludedir
525 526
  fi
526 527

  
528
  # move to project directory
529
  cd $projectdir
530

  
527 531
  # create project files
528 532
  # generate a file that contains all subdirectories as includes (but ignore hidden and documentation directories)
529 533
  find $gccincludedir -type d > ${projectdir}/LightRing.includes
530
  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Source/) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/LightRing.includes
531
  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
534
  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Source) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/LightRing.includes
535
  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
532 536
  # generate a file that specifies all files
533 537
  echo -n "" > ${projectdir}/LightRing.files
534 538
  for path in `cat ${projectdir}/LightRing.includes`; do
......
546 550
    echo -e "" >> ${projectdir}/LightRing.creator
547 551
  fi
548 552

  
553
  # go back to user directory
554
  cd $userdir
555

  
549 556
  # fill the output variables
550 557
  if [ ! -z "$outvar" ]; then
551 558
    eval $outvar="$projectdir"
......
573 580
#                 No error or warning occurred.
574 581
#
575 582
function createPowerManagementProject {
583
  local userdir=$(pwd)
576 584
  local projectdir=""
577 585
  local gccincludedir=""
578 586
  local outvar=""
......
611 619
  # print message
612 620
  printInfo "creating QtCreator project files for the PowerManagement module...\n"
613 621

  
614
  # read project directory if required
622
  # read absolute project directory if required
615 623
  if [ -z "$projectdir" ]; then
616 624
    getProjectDir projectdir
617 625
  fi
618 626

  
619
  # retrieve gcc-arm-none-eabi include dir
627
  # retrieve absolute GCC include dir
620 628
  if [ -z "$gccincludedir" ]; then
621 629
    retrieveGccIncludeDir gccincludedir
622 630
  fi
623 631

  
632
  # move to project directory
633
  cd $projectdir
634

  
624 635
  # create project files
625 636
  # generate a file that contains all subdirectories as includes (but ignore hidden and documentation directories)
626 637
  find $gccincludedir -type d > ${projectdir}/PowerManagement.includes
627
  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Source/) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/PowerManagement.includes
628
  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
638
  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Source) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/PowerManagement.includes
639
  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
629 640
  # generate a file that specifies all files
630 641
  echo -n "" > ${projectdir}/PowerManagement.files
631 642
  for path in `cat ${projectdir}/PowerManagement.includes`; do
......
643 654
    echo -e "" >> ${projectdir}/PowerManagement.creator
644 655
  fi
645 656

  
657
  # go back to user directory
658
  cd $userdir
659

  
660

  
646 661
  # fill the output variables
647 662
  if [ ! -z "$outvar" ]; then
648 663
    eval $outvar="$projectdir"
......
670 685
#                 No error or warning occurred.
671 686
#
672 687
function createDiWheelDriveProject {
688
  local userdir=$(pwd)
673 689
  local projectdir=""
674 690
  local gccincludedir=""
675 691
  local outvar=""
......
708 724
  # print message
709 725
  printInfo "creating QtCreator project files for the DiWheelDrive module...\n"
710 726

  
711
  # read project directory if required
727
  # read absolute project directory if required
712 728
  if [ -z "$projectdir" ]; then
713 729
    getProjectDir projectdir
714 730
  fi
715 731

  
716
  # retrieve gcc-arm-none-eabi include dir
732
  # retrieve absolute GCC include dir
717 733
  if [ -z "$gccincludedir" ]; then
718 734
    retrieveGccIncludeDir gccincludedir
719 735
  fi
720 736

  
737
  # move to project directory
738
  cd $projectdir
739

  
740

  
721 741
  # create project files
722 742
  # generate a file that contains all subdirectories as includes (but ignore hidden and documentation directories)
723 743
  find $gccincludedir -type d > ${projectdir}/DiWheelDrive.includes
724
  find $(realpath $(dirname ${BASH_SOURCE[0]})/../../Target/Source/) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/DiWheelDrive.includes
725
  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
744
  find $(realpath --relative-base=$projectdir $(dirname ${BASH_SOURCE[0]})/../../Target/Source) -type d | grep -v "ARMCM4_STM32" >> ${projectdir}/DiWheelDrive.includes
745
  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
726 746
  # generate a file that specifies all files
727 747
  echo -n "" > ${projectdir}/DiWheelDrive.files
728 748
  for path in `cat ${projectdir}/DiWheelDrive.includes`; do
......
740 760
    echo -e "" >> ${projectdir}/DiWheelDrive.creator
741 761
  fi
742 762

  
763
  # go back to user directory
764
  cd $userdir
765

  
766

  
743 767
  # fill the output variables
744 768
  if [ ! -z "$outvar" ]; then
745 769
    eval $outvar="$projectdir"

Also available in: Unified diff