Now WOK adds necessary directories to search path.
wgenproj command now creates codeblocks.sh and draw.sh scripts in the workbench root directory
@if (%CSF_TCL_HOME != "") then
@string %CSF_TCL_INCLUDE = %CSF_TCL_HOME "/include ";
@string %CSF_TclLibs = "-L" %CSF_TCL_HOME "/lib -ltcl8.5 ";
- @string %CSF_TclTkLibs = "-L" %CSF_TCL_HOME "/lib -ltk8.5 -L" %X11_LIB " -lX11 ";
+ @string %CSF_TclTkLibs = "-L" %X11_LIB " -lX11 -L" %CSF_TCL_HOME "/lib -ltk8.5 ";
@else
@string %CSF_TclLibs = " -ltcl8.5 ";
- @string %CSF_TclTkLibs = " -ltk8.5 -L" %X11_LIB " -lX11 ";
+ @string %CSF_TclTkLibs = "-L" %X11_LIB " -lX11 -ltk8.5 ";
@endif;
-- FTGL (font renderer for OpenGL)
lappend aUsedToolKits "${tkx}"
}
wokparam -l CSF
+
foreach tk [lappend [wokUtils:LIST:Purge [osutils:tk:close [woklocate -u $theToolKit]]] $theToolKit] {
foreach element [osutils:tk:hascsf [woklocate -p ${tk}:source:EXTERNLIB [wokcd]]] {
if {[wokparam -t %$element] == 0} {
puts $aFile "\t\t\t\t<Linker>"
puts $aFile "\t\t\t\t\t<Add directory=\"../../../${aWokStation}/cbp/lib\" />"
+ if { "$aWokStation" == "mac" && [ lsearch $theLibsList X11 ] >= 0} {
+ puts $aFile "\t\t\t\t\t<Add directory=\"/usr/X11/lib\" />"
+ }
puts $aFile "\t\t\t\t\t<Add option=\"\$(CSF_OPT_LNK${aWokArch})\" />"
puts $aFile "\t\t\t\t</Linker>"
puts $aFile "\t\t\t\t<Linker>"
puts $aFile "\t\t\t\t\t<Add directory=\"../../../${aWokStation}/cbp/libd\" />"
+ if { "$aWokStation" == "mac" && [ lsearch $theLibsList X11 ] >= 0} {
+ puts $aFile "\t\t\t\t\t<Add directory=\"/usr/X11/lib\" />"
+ }
puts $aFile "\t\t\t\t\t<Add option=\"\$(CSF_OPT_LNK${aWokArch}D)\" />"
puts $aFile "\t\t\t\t</Linker>"
foreach anIncPath $theIncPaths {
puts $aFile "\t\t\t<Add directory=\"$anIncPath\" />"
}
+ puts $aFile "\t\t\t<Add directory=\"$::env(WOK_LIBRARY)\" />"
puts $aFile "\t\t</Compiler>"
# COMMON linker options
}
}
+ if { "$theIsExe" == "true" } {
+ puts $aFile "\t\t<Extensions>"
+ puts $aFile "\t\t\t<code_completion />"
+ puts $aFile "\t\t\t<envvars />"
+ puts $aFile "\t\t\t<debugger>"
+ puts $aFile "\t\t\t\t<remote_debugging>"
+ puts $aFile "\t\t\t\t\t<options conn_type=\"2\" serial_baud=\"115200\" skip_ld_path=\"1\" />"
+ puts $aFile "\t\t\t\t</remote_debugging>"
+ puts $aFile "\t\t\t\t<remote_debugging target=\"Release\">"
+ puts $aFile "\t\t\t\t\t<options conn_type=\"0\" serial_baud=\"115200\" skip_ld_path=\"1\" />"
+ puts $aFile "\t\t\t\t</remote_debugging>"
+ puts $aFile "\t\t\t\t<remote_debugging target=\"Debug\">"
+ puts $aFile "\t\t\t\t\t<options conn_type=\"0\" serial_baud=\"115200\" skip_ld_path=\"1\" />"
+ puts $aFile "\t\t\t\t</remote_debugging>"
+ puts $aFile "\t\t\t</debugger>"
+ puts $aFile "\t\t\t<lib_finder disable_auto=\"1\" />"
+ puts $aFile "\t\t</Extensions>"
+ }
+
puts $aFile "\t</Project>"
puts $aFile "</CodeBlocks_project_file>"
close $aFile
--- /dev/null
+#!/bin/bash
+
+source ./env.sh "$1"
+
+export CSF_OPT_LIB64="$CSF_OPT_LIB64:/usr/X11/lib"
+export CSF_OPT_LIB64D="$CSF_OPT_LIB64:/usr/X11/lib"
+
+/Applications/CodeBlocks.app/Contents/MacOS/CodeBlocks ./adm/mac/cbp/OCCT.workspace
--- /dev/null
+#!/bin/bash
+
+source ./env.sh "$1"
+
+DRAWEXE
export CASROOT="$aScriptPath"
# Reset values
+export CASDEB=""
export HAVE_TBB="false";
export HAVE_FREEIMAGE="false";
export HAVE_GL2PS="false";
# ----- Set local settings -----
if [ -e "${aScriptPath}/custom.sh" ]; then source "${aScriptPath}/custom.sh"; fi
+# Read script arguments
+shopt -s nocasematch
+if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
+if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
+shopt -u nocasematch
+
export CSF_OPT_INC="${CSF_OPT_INC}:__CSF_OPT_INC__"
export CSF_OPT_LIB32="${CSF_OPT_LIB32}:__CSF_OPT_LIB32__"
export CSF_OPT_LIB64="${CSF_OPT_LIB64}:__CSF_OPT_LIB64__"
export WOKSTATION="lin";
fi
-if [ "${CASDEB}" == "" ]; then export CASDEB=""; fi
export CASBIN="${WOKSTATION}/cbp"
export CSF_OPT_CMPL=""
export PATH="${CASROOT}/${CASBIN}/bin${CASDEB}:${PATH}"
export LD_LIBRARY_PATH="${CASROOT}/${CASBIN}/lib${CASDEB}:${LD_LIBRARY_PATH}"
+if [ "$WOKSTATION" == "mac" ]; then
+ export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
+fi
# Set envoronment variables used by OCCT
export CSF_MDTVFontDirectory="${CASROOT}/src/FontMFT"
if { "$aXmuLibPath" == "" } {
set aXmuLibPath [wokdep:SearchLib "Xmu" "$::ARCH" "/usr/X11/lib"]
if { "$aXmuLibPath" != "" } {
- lappend ::CSF_OPT_LIB$::ARCH "/usr/X11/lib"
+ if { "$::tcl_platform(os)" != "Darwin" } {
+ lappend ::CSF_OPT_LIB$::ARCH "/usr/X11/lib"
+ }
} else {
lappend anErrLib$::ARCH "Error: '${::SYS_LIB_PREFIX}Xmu.${::SYS_LIB_SUFFIX}' not found (X11)"
set isFound "false"
file copy -force -- "$::env(WOKHOME)/lib/templates/draw.bat" "$aBox/draw.bat"
file copy -force -- "$::env(WOKHOME)/lib/templates/msvc.bat" "$aBox/msvc.bat"
} else {
- catch {file copy -- "$::env(WOKHOME)/site/custom.sh" "$aBox/custom.sh"}
+ catch {file copy -- "$::env(WOKHOME)/site/custom.sh" "$aBox/custom.sh"}
+ file copy -force -- "$::env(WOKHOME)/lib/templates/draw.sh" "$aBox/draw.sh"
+ file copy -force -- "$::env(WOKHOME)/lib/templates/codeblocks.sh" "$aBox/codeblocks.sh"
}
}