1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0026467: Configuration, genproj.tcl - restore generation of Code::Blocks and XCode project files

Restore XCode generator.
Add missing dependencies to EXTERNLIB.
genproj.tcl - remove OS:mkdir() - duplicate of wokUtils:FILES:mkdir().
genproj.tcl - use osutils:usedOsLibs() for Code::Blocks.
src/OS - remove unused :LinksoWith() and :CompileWith().

adm/CMPLRS - remove unused CSF_ entities.
Remove config.h related code.
Add executable flag to codeblocks.sh and draw.sh scripts.
Setup ARCH variable using $tcl_platform(pointerSize).
wokdep:SearchLib() - use $tcl_platform(os) instead of $tcl_platform(platform)
for checking Linux-specific library paths.
wokdep:SearchFreeType() - fix misprint in ft2build.h header file name.
wokdep:SaveCustom() - export SHORTCUT_HEADERS to "custom.sh" as well, not only to "custom.bat".
This commit is contained in:
kgv 2015-07-23 18:59:20 +03:00 committed by bugmaster
parent 55e738d2f3
commit c7d774c557
19 changed files with 975 additions and 620 deletions

View File

@ -10,21 +10,6 @@ wnt cmplrs_c f -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHA
wnt cmplrs_c b -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_c NIS (wnt cmplrs_c b) -DSILGL -DSILGL_VRS=50
win csf CSF_TclLibs tcl86.lib
win csf CSF_TclTkLibs tk86.lib
win csf CSF_gdi32 gdi32.lib
win csf CSF_advapi32 advapi32.lib
win csf CSF_user32 user32.lib
win csf CSF_advapi32 advapi32.lib
win csf CSF_gdi32 gdi32.lib
win csf CSF_user32 user32.lib
win csf CSF_kernel32 kernel32.lib
win csf CSF_OpenGlLibs opengl32.lib glu32.lib
win csf CSF_wsock32 wsock32.lib
win csf CSF_AviLibs ws2_32.lib vfw32.lib
lin cmplrs_cxx f -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
lin cmplrs_cxx b -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL

View File

@ -1,6 +1,6 @@
#!/usr/bin/tclsh
set ARCH "32"
set ARCH "64"
if { "$tcl_platform(platform)" == "unix" } {
set SYS_PATH_SPLITTER ":"
@ -39,6 +39,9 @@ set CSF_OPT_LIB64 [list]
set CSF_OPT_BIN32 [list]
set CSF_OPT_BIN64 [list]
if { "$tcl_platform(pointerSize)" == "4" } {
set ARCH "32"
}
if { [info exists ::env(ARCH)] } {
set ARCH "$::env(ARCH)"
}
@ -139,7 +142,8 @@ proc wokdep:SearchLib {theLib theBitness {theSearchPath ""}} {
}
}
if { "$::tcl_platform(platform)" == "linux" } {
if { "$::tcl_platform(os)" == "Linux" } {
if { "$theBitness" == "64" } {
set aPath "/usr/lib/x86_64-linux-gnu/lib${theLib}.so"
if { [file exists "$aPath"] } {
@ -312,15 +316,10 @@ proc wokdep:SearchFreeType {theErrInc theErrLib32 theErrLib64 theErrBin32 theErr
set isFound "true"
set aFtBuildPath [wokdep:SearchHeader "ft2build.h"]
# new layout of headers in Freetype 2.5.x
if { "$aFtBuildPath" == "" } {
set aFtBuildPath [wokdep:SearchHeader "freetype2/ft2build.h"]
}
if { "$aFtBuildPath" == "" } {
# TODO - use `freetype-config --cflags` instead
set aSysFreeType "/usr/include/freetype2"
if { [file exists "$aSysFreeType/ftbuild.h"] } {
if { [file exists "$aSysFreeType/ft2build.h"] } {
lappend ::CSF_OPT_INC "$aSysFreeType"
} elseif { [file exists "$aSysFreeType/freetype2/ft2build.h"] } {
lappend ::CSF_OPT_INC "$aSysFreeType/freetype2"
@ -955,8 +954,9 @@ proc wokdep:SaveCustom {} {
puts $aFile "#!/bin/bash"
puts $aFile "# This environment file was generated by wok_depsgui.tcl script at [clock format [clock seconds] -format "%Y.%m.%d %H:%M"]"
#puts $aFile ""
#puts $aFile "export ARCH=$::ARCH"
puts $aFile ""
puts $aFile "export ARCH=$::ARCH"
puts $aFile "export SHORTCUT_HEADERS=$::SHORTCUT_HEADERS"
puts $aFile ""
puts $aFile "export PRODUCTS_PATH=\"$::PRODUCTS_PATH\""

File diff suppressed because it is too large Load Diff

0
adm/templates/codeblocks.sh Normal file → Executable file
View File

0
adm/templates/draw.sh Normal file → Executable file
View File

View File

@ -14,6 +14,7 @@ fi
# Reset values
export CASDEB=""
export TARGET="";
export HAVE_TBB="false";
export HAVE_OPENCL="false";
export HAVE_FREEIMAGE="false";
@ -31,14 +32,16 @@ if [ -e "${aScriptPath}/custom.sh" ]; then source "${aScriptPath}/custom.sh"; fi
# Read script arguments
shopt -s nocasematch
export TARGET="";
if [[ "$2" == "cbp" ]]; then
export TARGET="cbp";
elif [[ "$2" == "xcd" ]]; then
export TARGET="xcd";
fi
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
for i in $*
do
if [ "$i" == "d" ] || [ "$i" == "debug" ]; then
export CASDEB="d"
elif [ "$i" == "cbp" ]; then
export TARGET="cbp";
elif [ "$i" == "xcd" ] || [ "$i" == "xcode" ]; then
export TARGET="xcd";
fi
done
shopt -u nocasematch
# ----- Setup Environment Variables -----

7
adm/templates/xcode.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
export TARGET="xcd"
source ./env.sh "$1" "$TARGET"
open -a Xcode ./adm/mac/xcd/OCCT.xcworkspace

0
dox/license.md Normal file → Executable file
View File

40
genproj.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
# Helper script to run generation of CBP/XCode projects on Linux / OS X.
# Running it requires that Tcl should be in the PATH
anOldPath="$PATH"
anOldLd="$LD_LIBRARY_PATH"
anOldDyLd="$DYLD_LIBRARY_PATH"
# go to the script directory
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
aSystem=`uname -s`
aTarget="$1"
anOpt2=$2
anOpt3=$3
anOpt4=$4
anOpt5=$5
if [ "$aTarget" == "" ]; then
aTarget="cbp"
if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
fi
if [ ! -e "${aScriptPath}/custom.sh" ]; then
tclsh "${aScriptPath}/adm/genconf.tcl"
fi
if [ ! -e "${aScriptPath}/custom.sh" ]; then
echo custom.sh is not created. Run the script again and generate custom.sh
exit 1
fi
source "${aScriptPath}/custom.sh"
if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
tclsh "${aScriptPath}/adm/genproj.tcl" -path="${aScriptPath}" -target=${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
export PATH="$anOldPath"
export LD_LIBRARY_PATH="$anOldLd"
export DYLD_LIBRARY_PATH="$anOldDyLd"

View File

@ -53,65 +53,7 @@ proc ApplicationFramework:alias { } {
proc ApplicationFramework:depends { } {
return [list Visualization]
}
;#
;# Pre-requis pour la compilation ( -I ... )
;# Returns a list of directory that should be used in -I directives
;# while compiling c or c++ files.
;#
proc ApplicationFramework:CompileWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]"
}
SunOS {
lappend l "/usr/openwin/include"
lappend l "/usr/dt/include"
lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
}
IRIX {
lappend l "/usr/include/CC"
}
}
return $l
}
;#
;# Pre-requis pour la compilation ( -L ... )
;# Returns a list of directory that should be used in -L directives
;# while creating shareable.
;#
proc ApplicationFramework:LinksoWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l /usr/X11R6/lib
}
SunOS {
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl"
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltk"
}
IRIX {
lappend l /usr/lib32
}
}
return $l
}
;#
;# Returns a list of exported features.
;# source : Source files

View File

@ -53,60 +53,7 @@ proc DataExchange:alias { } {
proc DataExchange:depends { } {
return [list ApplicationFramework]
}
;#
;# Liste des includes utilises qui ne sont pas ceux des Wb.
;#
proc DataExchange:CompileWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]"
}
SunOS {
lappend l "/usr/openwin/include"
lappend l "/usr/dt/include"
lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
}
IRIX {
lappend l "/usr/include/CC"
}
}
return $l
}
;#
;# Pre-requis pour la compilation ( -L ... )
;# Returns a list of directory that should be used in -L directives
;# while creating shareable.
;#
proc DataExchange:LinksoWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
}
SunOS {
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl"
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltk"
}
IRIX {
lappend l "/usr/lib32"
}
}
return $l
}
;#
;# Returns a list of exported features.
;# source : Source files

View File

@ -56,69 +56,6 @@ proc Draw:acdepends { } {
return [list TCLTK]
}
;#
;# Pre-requis pour la compilation ( -I ... )
;# Returns a list of directory that should be used in -I directives
;# while compiling c or c++ files.
;#
proc Draw:CompileWith {} {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]"
}
SunOS {
lappend l "/usr/openwin/include"
lappend l "/usr/dt/include"
lappend l [lindex [wokparam -v %CSF_CXX_INCLUDE] 0]
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
}
IRIX {
lappend l /usr/include/CC
lappend l /usr/tcltk/include/itcl
lappend l /opt/Orbix_2.2/include
}
}
return $l
}
;#
;# Pre-requis pour la compilation ( -L ... )
;# Returns a list of directory that should be used in -L directives
;# while creating shareable.
;#
proc Draw:LinksoWith {} {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l -L/usr/X11R6/lib
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib"
lappend l "-L[wokparam -v %STLPortHome]/lib"
}
SunOS {
lappend l /usr/openwin/lib
lappend l "[wokparam -v %CSF_TCL_HOME]/lib"
lappend l /opt/DEV5_1/SUNWspro/SC4.2/include/CC
}
IRIX {
lappend l /usr/lib32
lappend l /usr/tcltk.64/lib/itcl
}
}
return $l
}
;#
;# Returns a list of exported features.
;# source : Source files

View File

@ -49,58 +49,7 @@ proc FoundationClasses:alias { } {
proc FoundationClasses:depends { } {
return {}
}
;#
;# Liste des includes utilises qui ne sont pas ceux des Wb.
;#
proc FoundationClasses:CompileWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/inclide/linux"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]"
}
SunOS {
lappend l "/usr/openwin/include"
lappend l "/usr/dt/include"
lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/inclide/solaris"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
}
IRIX {
lappend l "/usr/include/CC"
}
}
return $l
}
;#
;# Pre-requis pour la compilation ( -L ... )
;# Returns a list of directory that should be used in -L directives
;# while creating shareable.
;#
proc FoundationClasses:LinksoWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
}
SunOS {
}
IRIX {
lappend l /usr/lib32
}
}
return $l
}
;#
;# Returns a list of exported features.
;# source : Source files

View File

@ -47,63 +47,7 @@ proc ModelingAlgorithms:alias { } {
proc ModelingAlgorithms:depends { } {
return [list ModelingData]
}
;#
;# Pre-requis pour la compilation ( -I ... )
;# Returns a list of directory that should be used in -I directives
;# while compiling c or c++ files.
;#
proc ModelingAlgorithms:CompileWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]"
}
SunOS {
lappend l "/usr/openwin/include"
lappend l "/usr/dt/include"
lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
}
IRIX {
lappend l "/usr/include/CC"
}
}
return $l
}
;#
;# Pre-requis pour la compilation ( -L ... )
;# Returns a list of directory that should be used in -L directives
;# while creating shareable.
;#
proc ModelingAlgorithms:LinksoWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
}
SunOS {
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl"
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltk"
lappend l /usr/openwin/lib
}
IRIX {
lappend l /usr/lib32
}
}
return $l
}
;#
;# Returns a list of exported features.
;# source : Source files

View File

@ -39,62 +39,7 @@ proc ModelingData:alias { } {
proc ModelingData:depends { } {
return [list FoundationClasses]
}
;#
;# Pre-requis pour la compilation ( -I ... )
;# Returns a list of directory that should be used in -I directives
;# while compiling c or c++ files.
;#
proc ModelingData:CompileWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]"
}
SunOS {
lappend l "/usr/openwin/include"
lappend l "/usr/dt/include"
lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
}
IRIX {
lappend l "/usr/include/CC"
}
}
return $l
}
;#
;# Pre-requis pour la compilation ( -L ... )
;# Returns a list of directory that should be used in -L directives
;# while creating shareable.
;#
proc ModelingData:LinksoWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
}
SunOS {
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl"
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl"
}
IRIX {
lappend l /usr/lib32
}
}
return $l
}
;#
;# Returns a list of exported features.
;# source : Source files

View File

@ -67,65 +67,6 @@ proc Visualization:acdepends { } {
return $aList
}
;#
;# Pre-requis pour la compilation ( -I ... )
;# Returns a list of directory that should be used in -I directives
;# while compiling c or c++ files.
;#
proc Visualization:CompileWith {} {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]"
}
SunOS {
lappend l "\$OPENWINHOME/include"
lappend l "/usr/openwin/include/X11"
lappend l "/usr/dt/include"
lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
}
IRIX {
lappend l /usr/include/CC
}
}
return $l
}
;#
;# Pre-requis pour la compilation ( -L ... )
;# Returns a list of directory that should be used in -L directives
;# while creating shareable.
;#
proc Visualization:LinksoWith { } {
set l {}
switch -- [OS:os] {
HP-UX {
}
Linux {
lappend l /usr/X11R6/lib
}
SunOS {
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl"
lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltk"
lappend l /usr/openwin/lib
}
IRIX {
lappend l /usr/lib32
}
}
return $l
}
;#
;# Returns a list of exported features.
;# source : Source files

View File

@ -27,6 +27,7 @@ TKXSBase
TKMesh
TKXCAF
TKSTEP
TKSTEPBase
TKXDESTEP
TKXSDRAW
TKSTL

View File

@ -5,5 +5,6 @@ TKXSBase
TKCDF
TKLCAF
TKG2d
TKG3d
TKXCAF
TKIGES

View File

@ -2,4 +2,5 @@ TKBRep
TKMath
TKernel
TKG2d
TKG3d
TKMesh