mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0027056: Configuration, genproj.tcl - fix generation of project files for Products
Script genproj.bat is improved to be usable for building OCC products depending on OCCT. Search of VTK is corrected (broken in master)
This commit is contained in:
parent
ea991a6ef3
commit
e31a8e52bb
@ -770,10 +770,10 @@ proc wokdep:SearchVTK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
|||||||
# We didn't find preferred binary path => search through inc path or among all available VTK directories
|
# We didn't find preferred binary path => search through inc path or among all available VTK directories
|
||||||
if { "$aVtkBinPath" == "" } {
|
if { "$aVtkBinPath" == "" } {
|
||||||
# Try to find in lib path
|
# Try to find in lib path
|
||||||
set aPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aLibPath/bin"]
|
set aPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aVtkLibPath/bin"]
|
||||||
if { "$aPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aLibPath/bin"
|
if { "$aPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aVtkLibPath/bin"
|
||||||
} elseif { [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aLibPath/lib"] != "" } {
|
} elseif { [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aVtkLibPath/lib"] != "" } {
|
||||||
lappend ::CSF_OPT_BIN$anArchIter "$aLibPath/lib"
|
lappend ::CSF_OPT_BIN$anArchIter "$aVtkLibPath/lib"
|
||||||
} else {
|
} else {
|
||||||
lappend anErrBin$anArchIter "Error: 'vtkCommonCore-${aVtkVer}.dll' not found (VTK)"
|
lappend anErrBin$anArchIter "Error: 'vtkCommonCore-${aVtkVer}.dll' not found (VTK)"
|
||||||
set isFound "false"
|
set isFound "false"
|
||||||
|
162
adm/genproj.tcl
162
adm/genproj.tcl
@ -27,7 +27,11 @@
|
|||||||
source [file join [file dirname [info script]] genconfdeps.tcl]
|
source [file join [file dirname [info script]] genconfdeps.tcl]
|
||||||
|
|
||||||
set path ""
|
set path ""
|
||||||
|
set THE_CASROOT ""
|
||||||
set fBranch ""
|
set fBranch ""
|
||||||
|
if { [info exists ::env(CASROOT)] } {
|
||||||
|
set THE_CASROOT "$::env(CASROOT)"
|
||||||
|
}
|
||||||
switch -exact -- "$tcl_platform(platform)" {
|
switch -exact -- "$tcl_platform(platform)" {
|
||||||
"windows" {set targetStation "wnt"}
|
"windows" {set targetStation "wnt"}
|
||||||
"unix" {set targetStation "lin"}
|
"unix" {set targetStation "lin"}
|
||||||
@ -38,10 +42,9 @@ switch -exact -- "$tcl_platform(os)" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc _get_options { platform type branch } {
|
proc _get_options { platform type branch } {
|
||||||
global path
|
|
||||||
set res ""
|
set res ""
|
||||||
if {[file exists "$path/adm/CMPLRS"]} {
|
if {[file exists "$::THE_CASROOT/adm/CMPLRS"]} {
|
||||||
set fd [open "$path/adm/CMPLRS" rb]
|
set fd [open "$::THE_CASROOT/adm/CMPLRS" rb]
|
||||||
set opts [split [read $fd] "\n"]
|
set opts [split [read $fd] "\n"]
|
||||||
close $fd
|
close $fd
|
||||||
foreach line $opts {
|
foreach line $opts {
|
||||||
@ -56,16 +59,22 @@ proc _get_options { platform type branch } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc _get_type { name } {
|
proc _get_type { name } {
|
||||||
global path
|
set UDLIST {}
|
||||||
if {[file exists "$path/adm/UDLIST"]} {
|
if {[file exists "$::path/adm/UDLIST"]} {
|
||||||
set fd [open "$path/adm/UDLIST" rb]
|
set fd [open "$::path/adm/UDLIST" rb]
|
||||||
set UDLIST [split [read $fd] "\n"]
|
set UDLIST [concat $UDLIST [split [read $fd] "\n"]]
|
||||||
close $fd
|
close $fd
|
||||||
foreach uitem $UDLIST {
|
}
|
||||||
set line [split $uitem]
|
if { "$::path/adm/UDLIST" != "$::THE_CASROOT/adm/UDLIST" && [file exists "$::THE_CASROOT/adm/UDLIST"] } {
|
||||||
if {[lindex $line 1] == "$name"} {
|
set fd [open "$::THE_CASROOT/adm/UDLIST" rb]
|
||||||
return [lindex $line 0]
|
set UDLIST [concat $UDLIST [split [read $fd] "\n"]]
|
||||||
}
|
close $fd
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach uitem $UDLIST {
|
||||||
|
set line [split $uitem]
|
||||||
|
if {[lindex $line 1] == "$name"} {
|
||||||
|
return [lindex $line 0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
@ -103,9 +112,17 @@ proc _get_used_files { pk {inc true} {src true} } {
|
|||||||
return $lret
|
return $lret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# return location of the path within src directory
|
||||||
|
proc osutils:findSrcSubPath {theSubPath} {
|
||||||
|
if {[file exists "$::path/src/$theSubPath"]} {
|
||||||
|
return "$::path/src/$theSubPath"
|
||||||
|
}
|
||||||
|
return "$::THE_CASROOT/src/$theSubPath"
|
||||||
|
}
|
||||||
|
|
||||||
# Wrapper-function to generate VS project files
|
# Wrapper-function to generate VS project files
|
||||||
proc genproj { args } {
|
proc genproj { args } {
|
||||||
global path targetStation
|
global path THE_CASROOT targetStation
|
||||||
set aSupportedTargets { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd" }
|
set aSupportedTargets { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd" }
|
||||||
set anArgs $args
|
set anArgs $args
|
||||||
|
|
||||||
@ -200,15 +217,10 @@ proc genproj { args } {
|
|||||||
|
|
||||||
OS:MKPRC "$anAdmPath" "$anTarget" "$aLibType" "$aPlatform"
|
OS:MKPRC "$anAdmPath" "$anTarget" "$aLibType" "$aPlatform"
|
||||||
|
|
||||||
genprojbat "$anAdmPath" "$anTarget"
|
genprojbat "$anTarget"
|
||||||
}
|
}
|
||||||
|
|
||||||
proc genprojbat {thePath theIDE} {
|
proc genprojbat {theIDE} {
|
||||||
global path
|
|
||||||
|
|
||||||
set anOsIncPath "$path/src/OS"
|
|
||||||
set anOsRootPath "$path"
|
|
||||||
|
|
||||||
set aTargetPlatform "lin"
|
set aTargetPlatform "lin"
|
||||||
if { "$::tcl_platform(platform)" == "windows" } {
|
if { "$::tcl_platform(platform)" == "windows" } {
|
||||||
set aTargetPlatform "wnt"
|
set aTargetPlatform "wnt"
|
||||||
@ -225,34 +237,31 @@ proc genprojbat {thePath theIDE} {
|
|||||||
set aTargetPlatformExt bat
|
set aTargetPlatformExt bat
|
||||||
}
|
}
|
||||||
|
|
||||||
set aBox [file normalize "$thePath/.."]
|
|
||||||
|
|
||||||
if {"$theIDE" != "cmake"} {
|
if {"$theIDE" != "cmake"} {
|
||||||
set anEnvTmplFile [open "$path/adm/templates/env.${aTargetPlatformExt}" "r"]
|
set anEnvTmplFile [open "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}" "r"]
|
||||||
set anEnvTmpl [read $anEnvTmplFile]
|
set anEnvTmpl [read $anEnvTmplFile]
|
||||||
close $anEnvTmplFile
|
close $anEnvTmplFile
|
||||||
|
|
||||||
set aCasRoot ""
|
set aCasRoot ""
|
||||||
if { [file normalize "$anOsRootPath"] != "$aBox" } {
|
if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } {
|
||||||
set aCasRoot [relativePath "$aBox" "$anOsRootPath"]
|
set aCasRoot [relativePath "$::path" "$::THE_CASROOT"]
|
||||||
}
|
}
|
||||||
set anOsIncPath [relativePath "$aBox" "$anOsRootPath"]
|
|
||||||
|
|
||||||
regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
|
regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
|
||||||
|
|
||||||
set anEnvFile [open "$aBox/env.${aTargetPlatformExt}" "w"]
|
set anEnvFile [open "$::path/env.${aTargetPlatformExt}" "w"]
|
||||||
puts $anEnvFile $anEnvTmpl
|
puts $anEnvFile $anEnvTmpl
|
||||||
close $anEnvFile
|
close $anEnvFile
|
||||||
|
|
||||||
file copy -force -- "$path/adm/templates/draw.${aTargetPlatformExt}" "$aBox/draw.${aTargetPlatformExt}"
|
file copy -force -- "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
|
if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
|
||||||
file copy -force -- "$path/adm/templates/msvc.bat" "$aBox/msvc.bat"
|
file copy -force -- "$::THE_CASROOT/adm/templates/msvc.bat" "$::path/msvc.bat"
|
||||||
} else {
|
} else {
|
||||||
switch -exact -- "$theIDE" {
|
switch -exact -- "$theIDE" {
|
||||||
"cbp" { file copy -force -- "$path/adm/templates/codeblocks.sh" "$aBox/codeblocks.sh" }
|
"cbp" { file copy -force -- "$::THE_CASROOT/adm/templates/codeblocks.sh" "$::path/codeblocks.sh" }
|
||||||
"xcd" { file copy -force -- "$path/adm/templates/xcode.sh" "$aBox/xcode.sh" }
|
"xcd" { file copy -force -- "$::THE_CASROOT/adm/templates/xcode.sh" "$::path/xcode.sh" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -380,43 +389,39 @@ proc OS:MKVC { theOutDir {theModules {}} {theAllSolution ""} {theVcVer "vc8"} }
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc OS:init {{os {}}} {
|
proc OS:init {{os {}}} {
|
||||||
global path
|
set askplat $os
|
||||||
global env
|
set aModules {}
|
||||||
global tcl_platform
|
if { "$os" == "" } {
|
||||||
|
set os $::tcl_platform(os)
|
||||||
set askplat $os
|
}
|
||||||
if { "$os" == "" } {
|
|
||||||
set os $tcl_platform(os)
|
if [file exists "$::path/src/VAS/Products.tcl"] {
|
||||||
|
source "$::path/src/VAS/Products.tcl"
|
||||||
|
foreach aModuleIter [VAS:Products] {
|
||||||
|
set aFileTcl "$::path/src/VAS/${aModuleIter}.tcl"
|
||||||
|
if [file exists $aFileTcl] {
|
||||||
|
source $aFileTcl
|
||||||
|
lappend aModules $aModuleIter
|
||||||
|
} else {
|
||||||
|
puts stderr "Definition file for module $aModuleIter is not found in unit VAS"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return $aModules
|
||||||
|
}
|
||||||
|
|
||||||
;# Load list of OCCT modules and their definitions
|
# Load list of OCCT modules and their definitions
|
||||||
source "$path/src/OS/Modules.tcl"
|
source "$::path/src/OS/Modules.tcl"
|
||||||
set Modules {}
|
foreach aModuleIter [OS:Modules] {
|
||||||
foreach module [OS:Modules] {
|
set aFileTcl "$::path/src/OS/${aModuleIter}.tcl"
|
||||||
set f "$path/src/OS/${module}.tcl"
|
if [file exists $aFileTcl] {
|
||||||
if [file exists $f] {
|
source $aFileTcl
|
||||||
source $f
|
lappend aModules $aModuleIter
|
||||||
lappend Modules $module
|
} else {
|
||||||
} else {
|
puts stderr "Definition file for module $aModuleIter is not found in unit OS"
|
||||||
puts stderr "Definition file for module $module is not found in unit OS"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Load list of products and their definitions
|
return $aModules
|
||||||
# set Products [woklocate -p VAS:source:Products.tcl]
|
|
||||||
#if { "$Products" != "" } {
|
|
||||||
#source "$Products"
|
|
||||||
#foreach product [VAS:Products] {
|
|
||||||
#set f [woklocate -p VAS:source:${product}.tcl]
|
|
||||||
#if [file exists $f] {
|
|
||||||
#source $f
|
|
||||||
#} else {
|
|
||||||
#puts stderr "Definition file for product $product is not found in unit VAS"
|
|
||||||
#}
|
|
||||||
#}
|
|
||||||
#}
|
|
||||||
|
|
||||||
return $Modules
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# topological sort. returns a list { {a h} {b g} {c f} {c h} {d i} } => { d a b c i g f h }
|
# topological sort. returns a list { {a h} {b g} {c f} {c h} {d i} } => { d a b c i g f h }
|
||||||
@ -560,13 +565,14 @@ proc osutils:tk:close { ltk } {
|
|||||||
set recurse {}
|
set recurse {}
|
||||||
foreach dir $ltk {
|
foreach dir $ltk {
|
||||||
set ids [LibToLink $dir]
|
set ids [LibToLink $dir]
|
||||||
|
# puts "osutils:tk:close($ltk) ids='$ids'"
|
||||||
set eated [osutils:tk:eatpk $ids]
|
set eated [osutils:tk:eatpk $ids]
|
||||||
set result [concat $result $eated]
|
set result [concat $result $eated]
|
||||||
set ids [LibToLink $dir]
|
set ids [LibToLink $dir]
|
||||||
set result [concat $result $ids]
|
set result [concat $result $ids]
|
||||||
|
|
||||||
foreach file $eated {
|
foreach file $eated {
|
||||||
set kds "$path/src/$file/EXTERNLIB"
|
set kds [osutils:findSrcSubPath "$file/EXTERNLIB"]
|
||||||
if { [osutils:tk:eatpk $kds] != {} } {
|
if { [osutils:tk:eatpk $kds] != {} } {
|
||||||
lappend recurse $file
|
lappend recurse $file
|
||||||
}
|
}
|
||||||
@ -598,7 +604,7 @@ proc LibToLink {theTKit} {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
set aToolkits {}
|
set aToolkits {}
|
||||||
set anExtLibList [osutils:tk:eatpk "$path/src/$theTKit/EXTERNLIB"]
|
set anExtLibList [osutils:tk:eatpk [osutils:findSrcSubPath "$theTKit/EXTERNLIB"]]
|
||||||
foreach anExtLib $anExtLibList {
|
foreach anExtLib $anExtLibList {
|
||||||
set aFullPath [LocateRecur $anExtLib]
|
set aFullPath [LocateRecur $anExtLib]
|
||||||
if { "$aFullPath" != "" && [_get_type $anExtLib] == "t" } {
|
if { "$aFullPath" != "" && [_get_type $anExtLib] == "t" } {
|
||||||
@ -610,8 +616,7 @@ proc LibToLink {theTKit} {
|
|||||||
# Search unit recursively
|
# Search unit recursively
|
||||||
|
|
||||||
proc LocateRecur {theName} {
|
proc LocateRecur {theName} {
|
||||||
global path
|
set theNamePath [osutils:findSrcSubPath "$theName"]
|
||||||
set theNamePath "$path/src/$theName"
|
|
||||||
if {[file isdirectory $theNamePath]} {
|
if {[file isdirectory $theNamePath]} {
|
||||||
return $theNamePath
|
return $theNamePath
|
||||||
}
|
}
|
||||||
@ -677,11 +682,11 @@ proc osutils:collectinc {theModules theIncPath theTargetStation} {
|
|||||||
if { [info exists ::env(SHORTCUT_HEADERS)] &&
|
if { [info exists ::env(SHORTCUT_HEADERS)] &&
|
||||||
$::env(SHORTCUT_HEADERS) == "true" } {
|
$::env(SHORTCUT_HEADERS) == "true" } {
|
||||||
# template preparation
|
# template preparation
|
||||||
if { ![file exists $aCasRoot/adm/templates/header.in] } {
|
if { ![file exists $::THE_CASROOT/adm/templates/header.in] } {
|
||||||
puts "template file does not exist: $aCasRoot/adm/templates/header.in"
|
puts "template file does not exist: $::THE_CASROOT/adm/templates/header.in"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
set aHeaderTmpl [wokUtils:FILES:FileToString $aCasRoot/adm/templates/header.in]
|
set aHeaderTmpl [wokUtils:FILES:FileToString $::THE_CASROOT/adm/templates/header.in]
|
||||||
|
|
||||||
# relative anIncPath in connection with aCasRoot/src
|
# relative anIncPath in connection with aCasRoot/src
|
||||||
set aFromBuildIncToSrcPath [relativePath "$anIncPath" "$aCasRoot/src"]
|
set aFromBuildIncToSrcPath [relativePath "$anIncPath" "$aCasRoot/src"]
|
||||||
@ -1023,9 +1028,7 @@ proc osutils:vcproj:readtemplate {theVcVer isexec} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc osutils:readtemplate {ext what} {
|
proc osutils:readtemplate {ext what} {
|
||||||
global env
|
set loc "$::THE_CASROOT/adm/templates/template.$ext"
|
||||||
global path
|
|
||||||
set loc "$path/adm/templates/template.$ext"
|
|
||||||
return [wokUtils:FILES:FileToString $loc]
|
return [wokUtils:FILES:FileToString $loc]
|
||||||
}
|
}
|
||||||
# Read a file in a string as is.
|
# Read a file in a string as is.
|
||||||
@ -1051,7 +1054,6 @@ proc osutils:compilable { } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc osutils:commonUsedTK { theToolKit } {
|
proc osutils:commonUsedTK { theToolKit } {
|
||||||
global path
|
|
||||||
set anUsedToolKits [list]
|
set anUsedToolKits [list]
|
||||||
set aDepToolkits [LibToLink $theToolKit]
|
set aDepToolkits [LibToLink $theToolKit]
|
||||||
foreach tkx $aDepToolkits {
|
foreach tkx $aDepToolkits {
|
||||||
@ -1423,8 +1425,7 @@ proc osutils:vcx1proj:filters { dir proj theFilesMap } {
|
|||||||
|
|
||||||
# Generate RC file content for ToolKit from template
|
# Generate RC file content for ToolKit from template
|
||||||
proc osutils:readtemplate:rc {theOutDir theToolKit} {
|
proc osutils:readtemplate:rc {theOutDir theToolKit} {
|
||||||
global path
|
set aLoc "$::THE_CASROOT/adm/templates/template_dll.rc"
|
||||||
set aLoc "$path/adm/templates/template_dll.rc"
|
|
||||||
set aBody [wokUtils:FILES:FileToString $aLoc]
|
set aBody [wokUtils:FILES:FileToString $aLoc]
|
||||||
regsub -all -- {__TKNAM__} $aBody $theToolKit aBody
|
regsub -all -- {__TKNAM__} $aBody $theToolKit aBody
|
||||||
|
|
||||||
@ -1592,7 +1593,6 @@ proc osutils:tk:loadunit { loc map } {
|
|||||||
# Call unit filter on units name to accept or reject a unit
|
# Call unit filter on units name to accept or reject a unit
|
||||||
# Tfiles lists for each unit the type of file that can be compiled.
|
# Tfiles lists for each unit the type of file that can be compiled.
|
||||||
proc osutils:tk:files { tkloc {l_compilable {} } {justail 1} {unitfilter {}} } {
|
proc osutils:tk:files { tkloc {l_compilable {} } {justail 1} {unitfilter {}} } {
|
||||||
global path
|
|
||||||
set Tfiles(source,nocdlpack) {source pubinclude}
|
set Tfiles(source,nocdlpack) {source pubinclude}
|
||||||
set Tfiles(source,toolkit) {}
|
set Tfiles(source,toolkit) {}
|
||||||
set Tfiles(source,executable) {source pubinclude}
|
set Tfiles(source,executable) {source pubinclude}
|
||||||
@ -1649,7 +1649,6 @@ proc osutils:tk:files { tkloc {l_compilable {} } {justail 1} {unitfilter {}} }
|
|||||||
|
|
||||||
# Generate Visual Studio project file for executable
|
# Generate Visual Studio project file for executable
|
||||||
proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {} } } {
|
proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {} } } {
|
||||||
global path
|
|
||||||
set aVcFiles {}
|
set aVcFiles {}
|
||||||
foreach f [osutils:tk:files $theToolKit osutils:compilable 0] {
|
foreach f [osutils:tk:files $theToolKit osutils:compilable 0] {
|
||||||
if { $theProjTmpl == {} } {
|
if { $theProjTmpl == {} } {
|
||||||
@ -1732,9 +1731,9 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
|
|||||||
if { "$theVcVer" == "vc7" || "$theVcVer" == "vc8" } {
|
if { "$theVcVer" == "vc7" || "$theVcVer" == "vc8" } {
|
||||||
# nothing
|
# nothing
|
||||||
} elseif { "$theVcVer" == "vc9" } {
|
} elseif { "$theVcVer" == "vc9" } {
|
||||||
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$path/adm/templates/vcproj.user.vc9x"]
|
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcproj.user.vc9x"]
|
||||||
} else {
|
} else {
|
||||||
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$path/adm/templates/vcxproj.user.vc10x"]
|
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcxproj.user.vc10x"]
|
||||||
}
|
}
|
||||||
if { "$aCommonSettingsFileTmpl" != "" } {
|
if { "$aCommonSettingsFileTmpl" != "" } {
|
||||||
regsub -all -- {__VCVER__} $aCommonSettingsFileTmpl $theVcVer aCommonSettingsFileTmpl
|
regsub -all -- {__VCVER__} $aCommonSettingsFileTmpl $theVcVer aCommonSettingsFileTmpl
|
||||||
@ -2426,7 +2425,6 @@ proc OS:xcodeproj { theModules theOutDir theGuidsMap theLibType thePlatform} {
|
|||||||
|
|
||||||
# Generates dependencies section for Xcode project files.
|
# Generates dependencies section for Xcode project files.
|
||||||
proc osutils:xcdtk:deps {theToolKit theTargetType theGuidsMap theFileRefSection theDepsGuids theDepsRefGuids theIsStatic} {
|
proc osutils:xcdtk:deps {theToolKit theTargetType theGuidsMap theFileRefSection theDepsGuids theDepsRefGuids theIsStatic} {
|
||||||
global path
|
|
||||||
upvar $theGuidsMap aGuidsMap
|
upvar $theGuidsMap aGuidsMap
|
||||||
upvar $theFileRefSection aFileRefSection
|
upvar $theFileRefSection aFileRefSection
|
||||||
upvar $theDepsGuids aDepsGuids
|
upvar $theDepsGuids aDepsGuids
|
||||||
|
@ -9,11 +9,9 @@ rem vc8 win32 Release
|
|||||||
|
|
||||||
set "SCRIPTROOT=%~dp0"
|
set "SCRIPTROOT=%~dp0"
|
||||||
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||||
set "CASROOT=__CASROOT__"
|
|
||||||
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
|
|
||||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
|
||||||
|
|
||||||
rem ----- Reset values to defaults -----
|
rem ----- Reset values to defaults -----
|
||||||
|
set "CASROOT=__CASROOT__"
|
||||||
set "CASDEB="
|
set "CASDEB="
|
||||||
set "VCVER=vc8"
|
set "VCVER=vc8"
|
||||||
set "ARCH=32"
|
set "ARCH=32"
|
||||||
@ -31,10 +29,16 @@ set "CSF_OPT_BIN32="
|
|||||||
set "CSF_OPT_BIN64="
|
set "CSF_OPT_BIN64="
|
||||||
|
|
||||||
rem ----- Load local settings -----
|
rem ----- Load local settings -----
|
||||||
|
if not ["%CASROOT%"] == [""] if exist "%CASROOT%\custom.bat" (
|
||||||
|
call "%CASROOT%\custom.bat" %1 %2 %3 %4 %5
|
||||||
|
)
|
||||||
if exist "%~dp0custom.bat" (
|
if exist "%~dp0custom.bat" (
|
||||||
call "%~dp0custom.bat" %1 %2 %3 %4 %5
|
call "%~dp0custom.bat" %1 %2 %3 %4 %5
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
|
||||||
|
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||||
|
|
||||||
rem ----- Read script arguments (override local settings) -----
|
rem ----- Read script arguments (override local settings) -----
|
||||||
if not ["%1"] == [""] set "VCVER=%1"
|
if not ["%1"] == [""] set "VCVER=%1"
|
||||||
if not ["%2"] == [""] set "ARCH=%2"
|
if not ["%2"] == [""] set "ARCH=%2"
|
||||||
|
@ -3,16 +3,8 @@
|
|||||||
# go to the script directory
|
# go to the script directory
|
||||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||||
|
|
||||||
export CASROOT="__CASROOT__"
|
|
||||||
|
|
||||||
if [ "${CASROOT}" != "" ] && [ -d "${aScriptPath}/${CASROOT}" ]; then
|
|
||||||
export CASROOT="${aScriptPath}/${CASROOT}"
|
|
||||||
fi
|
|
||||||
if [ "${CASROOT}" == "" ]; then
|
|
||||||
export CASROOT="${aScriptPath}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Reset values
|
# Reset values
|
||||||
|
export CASROOT="__CASROOT__"
|
||||||
export CASDEB=""
|
export CASDEB=""
|
||||||
export TARGET="";
|
export TARGET="";
|
||||||
export HAVE_TBB="false";
|
export HAVE_TBB="false";
|
||||||
@ -28,8 +20,16 @@ export CSF_OPT_BIN32=""
|
|||||||
export CSF_OPT_BIN64=""
|
export CSF_OPT_BIN64=""
|
||||||
|
|
||||||
# ----- Set local settings -----
|
# ----- Set local settings -----
|
||||||
|
if [ "${CASROOT}" != "" ] && [ -e "${CASROOT}/custom.sh" ]; then source "${CASROOT}/custom.sh"; fi
|
||||||
if [ -e "${aScriptPath}/custom.sh" ]; then source "${aScriptPath}/custom.sh"; fi
|
if [ -e "${aScriptPath}/custom.sh" ]; then source "${aScriptPath}/custom.sh"; fi
|
||||||
|
|
||||||
|
if [ "${CASROOT}" != "" ] && [ -d "${aScriptPath}/${CASROOT}" ]; then
|
||||||
|
export CASROOT="${aScriptPath}/${CASROOT}"
|
||||||
|
fi
|
||||||
|
if [ "${CASROOT}" == "" ]; then
|
||||||
|
export CASROOT="${aScriptPath}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Read script arguments
|
# Read script arguments
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
for i in $*
|
for i in $*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user