From: ibs Date: Thu, 10 Oct 2013 10:12:56 +0000 (+0400) Subject: 0024214: wgenproj command started on Linux platform with -target=amk option generate... X-Git-Tag: V6_7_1~29 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=f45e084b8f17ce99d922e2c3b9efdd9f76c179cd;p=occt-wok.git 0024214: wgenproj command started on Linux platform with -target=amk option generate env.sh file for MacOS only env.sh processes amk case --- diff --git a/src/WOKTclLib/templates/codeblocks.sh b/src/WOKTclLib/templates/codeblocks.sh index 8e87c86..12eb8d2 100755 --- a/src/WOKTclLib/templates/codeblocks.sh +++ b/src/WOKTclLib/templates/codeblocks.sh @@ -2,7 +2,7 @@ export TARGET="cbp" -source ./env.sh "$TARGET" "$1" +source ./env.sh "$1" "$TARGET" if [ -e "/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks" ]; then /Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/$WOKSTATION/cbp/OCCT.workspace diff --git a/src/WOKTclLib/templates/env.sh b/src/WOKTclLib/templates/env.sh index 96525ed..ec74e68 100755 --- a/src/WOKTclLib/templates/env.sh +++ b/src/WOKTclLib/templates/env.sh @@ -29,16 +29,14 @@ if [ -e "${aScriptPath}/custom.sh" ]; then source "${aScriptPath}/custom.sh"; fi # Read script arguments shopt -s nocasematch -if [[ "$1" == "cbp" ]]; then +export TARGET=""; +if [[ "$2" == "cbp" ]]; then export TARGET="cbp"; -elif [[ "$1" == "xcd" ]]; then +elif [[ "$2" == "xcd" ]]; then export TARGET="xcd"; -else - echo "Error: wrong target identifier. Should be \"cbp\" (Code::Blocks) or \"xcd\" (Xcode)" - exit fi -if [[ "$2" == "debug" ]]; then export CASDEB="d"; fi -if [[ "$2" == "d" ]]; then export CASDEB="d"; fi +if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi +if [[ "$1" == "d" ]]; then export CASDEB="d"; fi shopt -u nocasematch # ----- Setup Environment Variables ----- @@ -141,12 +139,9 @@ else fi -BIN_PATH="" -LIBS_PATH="" -if [ "${TARGET}" == "cbp" ]; then - BIN_PATH="${CASBIN}/bin${CASDEB}" - LIBS_PATH="${CASBIN}/lib${CASDEB}" -elif [ "${TARGET}" == "xcd" ]; then +BIN_PATH="${CASBIN}bin${CASDEB}" +LIBS_PATH="${CASBIN}lib${CASDEB}" +if [ "${TARGET}" == "xcd" ]; then [[ "${CASDEB}" == "d" ]] && BIN_PATH="${CASBIN}/Debug" || BIN_PATH="${CASBIN}/Release" LIBS_PATH="$BIN_PATH" fi diff --git a/src/WOKTclLib/templates/xcode.sh b/src/WOKTclLib/templates/xcode.sh index 4bf1079..ddc0620 100755 --- a/src/WOKTclLib/templates/xcode.sh +++ b/src/WOKTclLib/templates/xcode.sh @@ -2,6 +2,6 @@ export TARGET="xcd" -source ./env.sh "$TARGET" "$1" +source ./env.sh "$1" "$TARGET" open -a Xcode ./adm/mac/xcd/OCCT.xcworkspace