# =======================================================================
# This script defines Tcl command genproj generating project files for
-# different IDEs:
-# "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd"
-#
-# Example:
-# genproj -path=D:/occt -target=vc10
-# genproj -target=xcd -ios -static
+# different IDEs and platforms. Run it with -help to get synopsis.
# =======================================================================
source [file join [file dirname [info script]] genconfdeps.tcl]
-set path ""
+# the script is assumed to be run from CASROOT (or dependent Products root)
+set path [file normalize .]
set THE_CASROOT ""
set fBranch ""
if { [info exists ::env(CASROOT)] } {
set THE_CASROOT "$::env(CASROOT)"
}
-switch -exact -- "$tcl_platform(platform)" {
- "windows" {set targetStation "wnt"}
- "unix" {set targetStation "lin"}
-}
-
-switch -exact -- "$tcl_platform(os)" {
- "Darwin" {set targetStation "mac"}
-}
proc _get_options { platform type branch } {
set res ""
return "$::THE_CASROOT/src/$theSubPath"
}
-# Wrapper-function to generate VS project files
-proc genproj { args } {
- global path THE_CASROOT targetStation
- set aSupportedTargets { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd" }
- set anArgs $args
-
- # Setting default IDE.
- set anTarget ""
- set aCmpl "gcc"
- switch -exact -- "$targetStation" {
- "wnt" {set anTarget "$::env(VCVER)"}
- "lin" {set anTarget "cbp"}
- "mac" {set anTarget "xcd"}
+# Auxiliary tool comparing content of two files line-by-line.
+proc osutils:isEqualContent { theContent1 theContent2 } {
+ set aLen1 [llength $theContent1]
+ set aLen2 [llength $theContent2]
+ if { $aLen1 != $aLen2 } {
+ return false
}
- set isTargetDefault true
- if { [set anIndex [lsearch -nocase $anArgs -target=*]] != -1 } {
- regsub -nocase "\\-target=" [lindex $anArgs $anIndex] "" anTarget
- set anArgs [removeAllOccurrencesOf -target=* $anArgs]
- set isTargetDefault false
+ for {set aLineIter 0} {$aLineIter < $aLen1} {incr aLineIter} {
+ set aLine1 [lindex $theContent1 $aLineIter]
+ set aLine2 [lindex $theContent2 $aLineIter]
+ if { $aLine1 != $aLine2 } {
+ return false
+ }
}
+ return true
+}
+
+# Auxiliary function for writing new file content only if it has been actually changed
+# (e.g. to preserve file timestamp on no change).
+# Useful for automatically (re)generated files.
+proc osutils:writeTextFile { theFile theContent {theEol lf} } {
+ if {[file exists "${theFile}"]} {
+ set aFileOld [open "${theFile}" rb]
+ fconfigure $aFileOld -translation crlf
+ set aLineListOld [split [read $aFileOld] "\n"]
+ close $aFileOld
+
+ # append empty line for proper comparison (which will be implicitly added by last puts below)
+ set aContent $theContent
+ lappend aContent ""
+ if { [osutils:isEqualContent $aLineListOld $aContent] == true } {
+ return false
+ }
- if { [set anIndex [lsearch -nocase $anArgs -path=*]] != -1} {
- regsub -nocase "\\-path=" [lindex $anArgs $anIndex] "" path
- set anArgs [removeAllOccurrencesOf -path=* $anArgs]
- puts "Starting work with \"$path\""
+ file delete -force "${theFile}"
}
- if { [llength $anArgs] == 0 && $isTargetDefault == true } {
- puts "the default \'$anTarget\' target has been applied"
+ set anOutFile [open "$theFile" "w"]
+ fconfigure $anOutFile -translation $theEol
+ foreach aLine ${theContent} {
+ puts $anOutFile "${aLine}"
}
+ close $anOutFile
+ return true
+}
- set isHelpRequire false
- if { [lsearch -nocase $anArgs -h] != -1} {
- set anArgs [removeAllOccurrencesOf -h $anArgs]
- set isHelpRequire true
+# Function re-generating header files for specified text resource
+proc genResources { theResource } {
+ global path
+
+ set aResFileList {}
+ set aResourceAbsPath [file normalize "${path}/src/${theResource}"]
+ set aResourceDirectory ""
+ set isResDirectory false
+
+ if {[file isdirectory "${aResourceAbsPath}"]} {
+ if {[file exists "${aResourceAbsPath}/FILES"]} {
+ set aFilesFile [open "${aResourceAbsPath}/FILES" rb]
+ set aResFileList [split [read $aFilesFile] "\n"]
+ close $aFilesFile
+ }
+ set aResFileList [lsearch -inline -all -not -exact $aResFileList ""]
+ set aResourceDirectory "${theResource}"
+ set isResDirectory true
+ } else {
+ set aResourceName [file tail "${theResource}"]
+ lappend aResFileList "res:::${aResourceName}"
+ set aResourceDirectory [file dirname "${theResource}"]
}
- if {$path == ""} {
- set isHelpRequire true
+ foreach aResFileIter ${aResFileList} {
+ if {![regexp {^[^:]+:::(.+)} "${aResFileIter}" dump aResFileIter]} {
+ continue
+ }
+
+ set aResFileName [file tail "${aResFileIter}"]
+ regsub -all {\.} "${aResFileName}" {_} aResFileName
+ set aHeaderFileName "${aResourceDirectory}_${aResFileName}.pxx"
+ if { $isResDirectory == true && [lsearch $aResFileList $aHeaderFileName] == -1 } {
+ continue
+ }
+
+ # generate
+ set aContent {}
+ lappend aContent "// This file has been automatically generated from resource file src/${aResourceDirectory}/${aResFileIter}"
+ lappend aContent ""
+
+ # generate necessary structures
+ set aLineList {}
+ if {[file exists "${path}/src/${aResourceDirectory}/${aResFileIter}"]} {
+ set anInputFile [open "${path}/src/${aResourceDirectory}/${aResFileIter}" rb]
+ fconfigure $anInputFile -translation crlf
+ set aLineList [split [read $anInputFile] "\n"]
+ close $anInputFile
+ }
+
+ # drop empty trailing line
+ set anEndOfFile ""
+ if { [lindex $aLineList end] == "" } {
+ set aLineList [lreplace $aLineList end end]
+ set anEndOfFile "\\n"
+ }
+
+ lappend aContent "static const char ${aResourceDirectory}_${aResFileName}\[\] ="
+ set aNbLines [llength $aLineList]
+ set aLastLine [expr $aNbLines - 1]
+ for {set aLineIter 0} {$aLineIter < $aNbLines} {incr aLineIter} {
+ set aLine [lindex $aLineList $aLineIter]
+ regsub -all {\"} "${aLine}" {\\"} aLine
+ if { $aLineIter == $aLastLine } {
+ lappend aContent " \"${aLine}${anEndOfFile}\";"
+ } else {
+ lappend aContent " \"${aLine}\\n\""
+ }
+ }
+
+ # Save generated content to header file
+ set aHeaderFilePath "${path}/src/${aResourceDirectory}/${aHeaderFileName}"
+ if { [osutils:writeTextFile $aHeaderFilePath $aContent] == true } {
+ puts "Generating header file from resource file: ${path}/src/${aResourceDirectory}/${aResFileIter}"
+ } else {
+ #puts "Header file from resource ${path}/src/${aResourceDirectory}/${aResFileIter} is up-to-date"
+ }
}
+}
- set aLibType "dynamic"
- if { [lsearch -nocase $anArgs "-static"] != -1} {
- set anArgs [removeAllOccurrencesOf "-static" $anArgs]
- set aLibType "static"
- puts "static build has been selected"
- } elseif { [lsearch -nocase $anArgs "-dynamic"] != -1} {
- set anArgs [removeAllOccurrencesOf "-dynamic" $anArgs]
- set aLibType "dynamic"
- puts "dynamic build has been selected"
+# Function re-generating header files for all text resources
+proc genAllResources {} {
+ global path
+ set aCasRoot [file normalize $path]
+ if {![file exists "$aCasRoot/adm/RESOURCES"]} {
+ puts "OCCT directory is not defined correctly: $aCasRoot"
+ return
}
- set aPlatform ""
- if { [lsearch -nocase $anArgs "-ios"] != -1} {
- set anArgs [removeAllOccurrencesOf "-ios" $anArgs]
- set aPlatform "ios"
+ set aFileResources [open "$aCasRoot/adm/RESOURCES" rb]
+ set anAdmResources [split [read $aFileResources] "\r\n"]
+ close $aFileResources
+ set anAdmResources [lsearch -inline -all -not -exact $anAdmResources ""]
+
+ foreach line $anAdmResources {
+ genResources "${line}"
}
+}
+
+# Wrapper-function to generate VS project files
+proc genproj {theIDE args} {
+ set aSupportedIDEs { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc14-uwp" "cbp" "xcd"}
+ set aSupportedPlatforms { "wnt" "lin" "mac" "ios" "qnx" }
+ set isHelpRequire false
- if { [lsearch -nocase $aSupportedTargets $anTarget] == -1} {
- puts "the \'$anTarget\' is wrong TARGET"
+ # check IDE argument
+ if { $theIDE == "-h" || $theIDE == "-help" || $theIDE == "--help" } {
+ set isHelpRequire true
+ } elseif { [lsearch -exact $aSupportedIDEs $theIDE] < 0 } {
+ puts "Error: genproj: unrecognized IDE \"$theIDE\""
set isHelpRequire true
}
- if {[llength $anArgs] > 0} {
- set isHelpRequire true
+ # choice of compiler for Code::Blocks, currently hard-coded
+ set aCmpl "gcc"
- foreach anArg $anArgs {
- puts "genproj: unrecognized option \'$anArg\'"
+ # Determine default platform: wnt for vc*, mac for xcd, current for cbp
+ if { [regexp "^vc" $theIDE] } {
+ set aPlatform "wnt"
+ } elseif { $theIDE == "xcd" || $::tcl_platform(os) == "Darwin" } {
+ set aPlatform "mac"
+ } elseif { $::tcl_platform(platform) == "windows" } {
+ set aPlatform "wnt"
+ } elseif { $::tcl_platform(platform) == "unix" } {
+ set aPlatform "lin"
+ }
+
+ # Check optional arguments
+ set aLibType "dynamic"
+ foreach arg $args {
+ if { $arg == "-h" || $arg == "-help" || $arg == "--help" } {
+ set isHelpRequire true
+ } elseif { [lsearch -exact $aSupportedPlatforms $arg] >= 0 } {
+ set aPlatform $arg
+ } elseif { $arg == "-static" } {
+ set aLibType "static"
+ puts "Static build has been selected"
+ } elseif { $arg == "-dynamic" } {
+ set aLibType "dynamic"
+ puts "Dynamic build has been selected"
+ } else {
+ puts "Error: genproj: unrecognized option \"$arg\""
+ set isHelpRequire true
}
}
if { $isHelpRequire == true } {
- puts "usage: genproj \[ -target=<TARGET> \] \[ -path=<PATH> \]
-
- PATH:
- path to the project
-
- TARGET:
- vc8 - Visual Studio 2005
- vc9 - Visual Studio 2008
- vc10 - Visual Studio 2010
- vc11 - Visual Studio 2012
- vc12 - Visual Studio 2013
- vc14 - Visual Studio 2015
- cbp - CodeBlocks
- xcd - XCode"
- return
+ puts "usage: genproj IDE \[Platform\] \[-static\] \[-h|-help|--help\]
+
+ IDE must be one of:
+ vc8 - Visual Studio 2005
+ vc9 - Visual Studio 2008
+ vc10 - Visual Studio 2010
+ vc11 - Visual Studio 2012
+ vc12 - Visual Studio 2013
+ vc14 - Visual Studio 2015
+ vc14-uwp - Visual Studio 2015 for Universal Windows Platform project
+ cbp - CodeBlocks
+ xcd - XCode
+
+ Platform (optional, only for CodeBlocks and XCode):
+ wnt - Windows
+ lin - Linux
+ mac - OS X
+ ios - iOS
+ qnx - QNX
+
+ Option -static can be used with XCode to build static libraries
+ "
+ return
}
- if {!$isTargetDefault} {
- puts "the \'$anTarget\' target has been applied"
+ if { ! [info exists aPlatform] } {
+ puts "Error: genproj: Cannon identify default platform, please specify!"
+ return
}
- set anAdmPath "$path/adm"
+ puts "Preparing to generate $theIDE projects for $aPlatform platform..."
- OS:MKPRC "$anAdmPath" "$anTarget" "$aLibType" "$aPlatform" "$aCmpl"
+ # path to where to generate projects, hardcoded from current dir
+ set anAdmPath [file normalize "${::path}/adm"]
- genprojbat "$anTarget"
-}
+ OS:MKPRC "$anAdmPath" "$theIDE" "$aLibType" "$aPlatform" "$aCmpl"
-proc genprojbat {theIDE} {
- set aTargetPlatform "lin"
- if { "$::tcl_platform(platform)" == "windows" } {
- set aTargetPlatform "wnt"
- }
-
- if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
- set aTargetPlatform wnt
- } elseif {"$theIDE" == "xcd"} {
- set aTargetPlatform mac
- }
+ genprojbat "$theIDE" $aPlatform
+ genAllResources
+}
+proc genprojbat {theIDE thePlatform} {
set aTargetPlatformExt sh
- if { "$aTargetPlatform" == "wnt" } {
+ if { $thePlatform == "wnt" } {
set aTargetPlatformExt bat
}
if {"$theIDE" != "cmake"} {
- set anEnvTmplFile [open "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}" "r"]
- set anEnvTmpl [read $anEnvTmplFile]
- close $anEnvTmplFile
-
- set aCasRoot ""
- if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } {
- set aCasRoot [relativePath "$::path" "$::THE_CASROOT"]
- }
+ # copy env.bat/sh only if not yet present
+ if { ! [file exists "$::path/env.${aTargetPlatformExt}"] } {
+ set anEnvTmplFile [open "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}" "r"]
+ set anEnvTmpl [read $anEnvTmplFile]
+ close $anEnvTmplFile
+
+ set aCasRoot ""
+ if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } {
+ set aCasRoot [relativePath "$::path" "$::THE_CASROOT"]
+ }
- regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
+ regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
- set anEnvFile [open "$::path/env.${aTargetPlatformExt}" "w"]
- puts $anEnvFile $anEnvTmpl
- close $anEnvFile
+ set anEnvFile [open "$::path/env.${aTargetPlatformExt}" "w"]
+ puts $anEnvFile $anEnvTmpl
+ close $anEnvFile
+ }
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 || [regexp {(vc)[0-9]*-uwp$} $theIDE] == 1} {
file copy -force -- "$::THE_CASROOT/adm/templates/msvc.bat" "$::path/msvc.bat"
} else {
switch -exact -- "$theIDE" {
"cbp" {
file copy -force -- "$::THE_CASROOT/adm/templates/codeblocks.sh" "$::path/codeblocks.sh"
file copy -force -- "$::THE_CASROOT/adm/templates/codeblocks.bat" "$::path/codeblocks.bat"
+ # Code::Blocks 16.01 does not create directory for import libs, help him
+ file mkdir "$::path/$thePlatform/cbp/lib"
+ file mkdir "$::path/$thePlatform/cbp/libd"
}
"xcd" { file copy -force -- "$::THE_CASROOT/adm/templates/xcode.sh" "$::path/xcode.sh" }
}
# @param thePlatform Optional target platform for cross-compiling, e.g. ios for iOS
# @param theCmpl Compiler option (msvc or gcc)
proc OS:MKPRC { theOutDir theIDE theLibType thePlatform theCmpl } {
- global path targetStation
- set aSupportedIDE { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd" }
-
- if { [lsearch $aSupportedIDE $theIDE] < 0 } {
- puts stderr "WOK does not support generation of project files for the selected IDE: $theIDE\nSupported IDEs: [join ${aSupportedIDE} " "]"
- return
- }
-
+ global path
set anOutRoot $theOutDir
if { $anOutRoot == "" } {
error "Error : \"theOutDir\" is not initialized"
}
# Create output directory
- set aWokStation "$targetStation"
-
- if { [lsearch -exact {vc7 vc8 vc9 vc10 vc11 vc12 vc14} $theIDE] != -1 } {
+ set aWokStation "$thePlatform"
+ if { [lsearch -exact {vc7 vc8 vc9 vc10 vc11 vc12 vc14 vc14-uwp} $theIDE] != -1 } {
set aWokStation "msvc"
}
set aModules [osutils:juststation $goaway $aModules]
}
+ # Draw module is turned off due to it is not supported on UWP
+ if { [regexp {(vc)[0-9]*-uwp$} $theIDE] == 1 } {
+ set aDrawIndex [lsearch -exact ${aModules} "Draw"]
+ if { ${aDrawIndex} != -1 } {
+ set aModules [lreplace ${aModules} ${aDrawIndex} ${aDrawIndex}]
+ }
+ }
+
# generate one solution for all projects if complete OS or VAS is processed
set anAllSolution "OCCT"
# collect all required header files
puts "Collecting required header files into $path/inc ..."
- osutils:collectinc $aModules $path/inc $targetStation
+ osutils:collectinc $aModules $path/inc
# Generating project files for the selected IDE
switch -exact -- "$theIDE" {
"vc7" -
"vc8" -
"vc9" -
- "vc10" -
- "vc11" -
- "vc12" -
- "vc14" { OS:MKVC $anOutDir $aModules $anAllSolution $theIDE }
- "cbp" { OS:MKCBP $anOutDir $aModules $anAllSolution $theCmpl }
- "xcd" {
+ "vc10" -
+ "vc11" -
+ "vc12" -
+ "vc14" -
+ "vc14-uwp" { OS:MKVC $anOutDir $aModules $anAllSolution $theIDE }
+ "cbp" { OS:MKCBP $anOutDir $aModules $anAllSolution $thePlatform $theCmpl }
+ "xcd" {
set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000"
OS:MKXCD $anOutDir $aModules $anAllSolution $theLibType $thePlatform
}
# Define libraries to link using only EXTERNLIB file
proc LibToLink {theTKit} {
- global path
regexp {^.*:([^:]+)$} $theTKit dummy theTKit
set type [_get_type $theTKit]
if {$type != "t" && $type != "x"} {
}
# collect all include file that required for theModules in theOutDir
-proc osutils:collectinc {theModules theIncPath theTargetStation} {
+proc osutils:collectinc {theModules theIncPath} {
global path
-
set aCasRoot [file normalize $path]
set anIncPath [file normalize $theIncPath]
}
}
}
- lsort -unique $anUsedToolKits
+ set anUsedToolKits [lsort -unique $anUsedToolKits]
set anUnits {}
foreach anUsedToolKit $anUsedToolKits {
set anUnits [concat $anUnits [osutils:tk:units $anUsedToolKit]]
}
- lsort -unique $anUnits
+ set anUnits [lsort -unique $anUnits]
- if { [info exists ::env(SHORTCUT_HEADERS)] &&
- $::env(SHORTCUT_HEADERS) == "true" } {
+ # define copying style
+ set aCopyType "copy"
+ if { [info exists ::env(SHORTCUT_HEADERS)] } {
+ if { [string equal -nocase $::env(SHORTCUT_HEADERS) "hard"]
+ || [string equal -nocase $::env(SHORTCUT_HEADERS) "hardlink"] } {
+ set aCopyType "hardlink"
+ } elseif { [string equal -nocase $::env(SHORTCUT_HEADERS) "true"]
+ || [string equal -nocase $::env(SHORTCUT_HEADERS) "shortcut"] } {
+ set aCopyType "shortcut"
+ }
+ }
+
+ set allHeaderFiles {}
+ if { $aCopyType == "shortcut" } {
# template preparation
if { ![file exists $::THE_CASROOT/adm/templates/header.in] } {
puts "template file does not exist: $::THE_CASROOT/adm/templates/header.in"
# create and copy short-cut header files
foreach anUnit $anUnits {
- set aHFiles [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.h"]
- foreach aHeaderFile [concat [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.\[hgl\]xx"] $aHFiles] {
- set aHeaderFileName [file tail $aHeaderFile]
+ osutils:checksrcfiles ${anUnit}
+
+ set aHFiles [_get_used_files ${anUnit} true false]
+ foreach aHeaderFile ${aHFiles} {
+ set aHeaderFileName [lindex ${aHeaderFile} 1]
+ lappend allHeaderFiles "${aHeaderFileName}"
- regsub -all -- {@OCCT_HEADER_FILE@} $aHeaderTmpl "$aFromBuildIncToSrcPath/$anUnit/$aHeaderFileName" aShortCutHeaderFileContent
+ regsub -all -- {@OCCT_HEADER_FILE_CONTENT@} $aHeaderTmpl "#include \"$aFromBuildIncToSrcPath/$anUnit/$aHeaderFileName\"" aShortCutHeaderFileContent
if {[file exists "$theIncPath/$aHeaderFileName"] && [file readable "$theIncPath/$aHeaderFileName"]} {
set fp [open "$theIncPath/$aHeaderFileName" r]
continue
}
}
+ file delete -force "$theIncPath/$aHeaderFileName"
}
set aShortCutHeaderFile [open "$theIncPath/$aHeaderFileName" "w"]
puts $aShortCutHeaderFile $aShortCutHeaderFileContent
close $aShortCutHeaderFile
}
- }
+ }
} else {
set nbcopied 0
foreach anUnit $anUnits {
- set aHFiles [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.h"]
- foreach aHeaderFile [concat [glob -nocomplain -dir $aCasRoot/src/$anUnit "*.\[hgl\]xx"] $aHFiles] {
- set aHeaderFileName [file tail $aHeaderFile]
+ osutils:checksrcfiles ${anUnit}
+
+ set aHFiles [_get_used_files ${anUnit} true false]
+ foreach aHeaderFile ${aHFiles} {
+ set aHeaderFileName [lindex ${aHeaderFile} 1]
+ lappend allHeaderFiles "${aHeaderFileName}"
# copy file only if target does not exist or is older than original
- set torig [file mtime $aHeaderFile]
- if { ! [file isfile $anIncPath/$aHeaderFileName] } {
- set tcopy 0
- } else {
+ set torig [file mtime $aCasRoot/src/$anUnit/$aHeaderFileName]
+ set tcopy 0
+ if { [file isfile $anIncPath/$aHeaderFileName] } {
set tcopy [file mtime $anIncPath/$aHeaderFileName]
}
if { $tcopy < $torig } {
incr nbcopied
- file copy -force $aHeaderFile $anIncPath/$aHeaderFileName
+ if { $aCopyType == "hardlink" } {
+ if { $tcopy != 0 } {
+ file delete -force "$theIncPath/$aHeaderFileName"
+ }
+ file link -hard $anIncPath/$aHeaderFileName $aCasRoot/src/$anUnit/$aHeaderFileName
+ } else {
+ file copy -force $aCasRoot/src/$anUnit/$aHeaderFileName $anIncPath/$aHeaderFileName
+ }
} elseif { $tcopy != $torig } {
- puts "Warning: file $anIncPath/$aHeaderFileName is newer than $aHeaderFile, not changed!"
+ puts "Warning: file $anIncPath/$aHeaderFileName is newer than $aCasRoot/src/$anUnit/$aHeaderFileName, not changed!"
}
}
}
puts "Info: $nbcopied files updated"
}
+
+ # remove header files not listed in FILES
+ set anIncFiles [glob -tails -nocomplain -dir ${anIncPath} "*"]
+ foreach anIncFile ${anIncFiles} {
+ if { [lsearch -exact ${allHeaderFiles} ${anIncFile}] == -1 } {
+ puts "Warning: file ${anIncPath}/${anIncFile} is not presented in the sources and will be removed from ${theIncPath}!"
+ file delete -force "${theIncPath}/${anIncFile}"
+ }
+ }
}
# Generate header for VS solution file
append var \
"Microsoft Visual Studio Solution File, Format Version 13.00\n" \
"# Visual Studio 2013\n"
- } elseif { "$vcversion" == "vc14" } {
+ } elseif { "$vcversion" == "vc14" || "$vcversion" == "vc14-uwp"} {
append var \
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
"# Visual Studio 14\n"
set aVerExt "v${aVerExt}0"
set aCmpl32 ""
set aCmpl64 ""
+ set aCharSet "Unicode"
if { $isexec } {
set anExt "${anExt}x"
set what "$what executable"
}
if { "$theVcVer" == "vc10" } {
# SSE2 is enabled by default in vc11+, but not in vc10 for 32-bit target
- set aCmpl32 "\n <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>"
+ set aCmpl32 "<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>"
}
set aTmpl [osutils:readtemplate $anExt "MS VC++ project ($what)"]
- regsub -all -- {__VCVER__} $aTmpl $theVcVer aTmpl
- regsub -all -- {__VCVEREXT__} $aTmpl $aVerExt aTmpl
- regsub -all -- {__VCMPL32__} $aTmpl $aCmpl32 aTmpl
- regsub -all -- {__VCMPL64__} $aTmpl $aCmpl64 aTmpl
+
+ if { $theVcVer == "vc14-uwp" } {
+ set aVerExt "v140"
+ set UwpWinRt "<CompileAsWinRT>false</CompileAsWinRT>"
+ foreach bitness {32 64} {
+ set indent ""
+ if {"[set aCmpl${bitness}]" != ""} {
+ set indent "\n "
+ }
+ set aCmpl${bitness} "[set aCmpl${bitness}]${indent}${UwpWinRt}"
+ }
+ }
+
+ set format_template "\[\\r\\n\\s\]*"
+ foreach bitness {32 64} {
+ set format_templateloc ""
+ if {"[set aCmpl${bitness}]" == ""} {
+ set format_templateloc "$format_template"
+ }
+ regsub -all -- "${format_templateloc}__VCMPL${bitness}__" $aTmpl "[set aCmpl${bitness}]" aTmpl
+ }
+
+ set aDebugInfo "no"
+ set aReleaseLnk ""
+ if { "$::HAVE_RelWithDebInfo" == "true" } {
+ set aDebugInfo "true"
+ set aReleaseLnk "\n <OptimizeReferences>true</OptimizeReferences>\n <EnableCOMDATFolding>true</EnableCOMDATFolding>"
+ }
+
+ regsub -all -- {__VCVER__} $aTmpl $theVcVer aTmpl
+ regsub -all -- {__VCVEREXT__} $aTmpl $aVerExt aTmpl
+ regsub -all -- {__VCCHARSET__} $aTmpl $aCharSet aTmpl
+ regsub -all -- {__VCReleasePDB__} $aTmpl $aDebugInfo aTmpl
+ regsub -all -- "${format_template}__VCLNKREL__" $aTmpl "${aReleaseLnk}" aTmpl
+
return $aTmpl
}
return {}
}
}
-# List extensions of compilable files in OCCT
-proc osutils:compilable { } {
- global targetStation
- set aWokStation "$targetStation"
- if { "$aWokStation" == "mac" } {
+# List extensions of compilable files in OCCT
+proc osutils:compilable {thePlatform} {
+ if { "$thePlatform" == "mac" || "$thePlatform" == "ios" } {
return [list .c .cxx .cpp .mm]
}
return [list .c .cxx .cpp]
set aLibsMap(CSF_TclTkLibs) "tk8.6"
if { "$::HAVE_FREEIMAGE" == "true" } {
if { "$theOS" == "wnt" } {
- set aLibsMap(CSF_FreeImagePlus) "FreeImage FreeImagePlus"
+ set aLibsMap(CSF_FreeImagePlus) "FreeImage"
} else {
set aLibsMap(CSF_FreeImagePlus) "freeimage"
}
}
+ if { "$::HAVE_FFMPEG" == "true" } {
+ set aLibsMap(CSF_FFmpeg) "avcodec avformat swscale avutil"
+ }
if { "$::HAVE_GL2PS" == "true" } {
set aLibsMap(CSF_GL2PS) "gl2ps"
}
set aLibsMap(CSF_VTK) [osutils:vtkCsf "unix"]
}
}
+ if { "$::HAVE_ZLIB" == "true" } {
+ set aLibsMap(CSF_ZLIB) "zlib"
+ }
+ if { "$::HAVE_LIBLZMA" == "true" } {
+ set aLibsMap(CSF_LIBLZMA) "liblzma"
+ }
if { "$theOS" == "wnt" } {
# WinAPI libraries
set aLibsMap(CSF_opengl32) "opengl32"
set aLibsMap(CSF_wsock32) "wsock32"
set aLibsMap(CSF_netapi32) "netapi32"
- set aLibsMap(CSF_AviLibs) "ws2_32 vfw32"
set aLibsMap(CSF_OpenGlLibs) "opengl32"
- set aLibsMap(CSF_winspool) "Winspool"
+ if { "$::HAVE_GLES2" == "true" } {
+ set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
+ }
set aLibsMap(CSF_psapi) "Psapi"
set aLibsMap(CSF_d3d9) "d3d9"
set aLibsMap(CSF_XwLibs) "X11 Xext Xmu Xi"
set aLibsMap(CSF_MotifLibs) "X11"
}
+
+ if { "$::HAVE_GLES2" == "true" } {
+ set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
+ }
}
}
}
proc osutils:vcproj { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {} } } {
if { $theProjTmpl == {} } {set theProjTmpl [osutils:vcproj:readtemplate $theVcVer 0]}
- set l_compilable [osutils:compilable]
+ set l_compilable [osutils:compilable wnt]
regsub -all -- {__TKNAM__} $theProjTmpl $theToolKit theProjTmpl
upvar $theGuidsMap aGuidsMap
}
regsub -all -- {__PROJECT_GUID__} $theProjTmpl $aGuidsMap($theToolKit) theProjTmpl
+ set theProjTmpl [osutils:uwp:proj ${theVcVer} ${theProjTmpl}]
+
set aUsedLibs [list]
+
+ if { "$theVcVer" == "vc14-uwp" } {
+ lappend aUsedLibs "WindowsApp.lib"
+ }
+
foreach tkx [osutils:commonUsedTK $theToolKit] {
lappend aUsedLibs "${tkx}.lib"
}
set fxloparam ""
foreach fxlo $resultloc {
set xlo $fxlo
- set aSrcFiles [osutils:tk:files $xlo osutils:compilable 0]
+ set aSrcFiles [osutils:tk:files $xlo wnt]
set fxlo_cmplrs_options_cxx [_get_options wnt cmplrs_cxx $fxlo]
if {$fxlo_cmplrs_options_cxx == ""} {
set fxlo_cmplrs_options_cxx [_get_options wnt cmplrs_cxx b]
}
# Returns the list of all compilable files name in a toolkit, or devunit of any type
-# 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.
-proc osutils:tk:files { tkloc {l_compilable {} } {justail 1} {unitfilter {}} } {
+proc osutils:tk:files { tkloc thePlatform } {
set Tfiles(source,nocdlpack) {source pubinclude}
set Tfiles(source,toolkit) {}
set Tfiles(source,executable) {source pubinclude}
set listloc [concat [osutils:tk:units $tkloc] $tkloc]
#puts " listloc = $listloc"
- if { $l_compilable == {} } {
- set l_comp [list .c .cxx .cpp]
- } else {
- set l_comp [$l_compilable]
- }
- if { $unitfilter == {} } {
- set resultloc $listloc
- } else {
- set resultloc [$unitfilter $listloc]
- }
+
+ set l_comp [osutils:compilable $thePlatform]
+ set resultloc $listloc
set lret {}
foreach loc $resultloc {
set utyp [_get_type $loc]
foreach f $map($type) {
#puts $f
if { [lsearch $l_comp [file extension $f]] != -1 } {
- if { $justail == 1 } {
- if {$type == "source"} {
- if {[lsearch $lret "@top_srcdir@/src/$loc/[file tail $f]"] == -1} {
- lappend lret @top_srcdir@/src/$loc/[file tail $f]
- }
- }
- } else {
- lappend lret $f
- }
+ lappend lret $f
}
}
}
# Generate Visual Studio project file for executable
proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {} } } {
set aVcFiles {}
- foreach f [osutils:tk:files $theToolKit osutils:compilable 0] {
+ foreach f [osutils:tk:files $theToolKit wnt] {
if { $theProjTmpl == {} } {
set aProjTmpl [osutils:vcproj:readtemplate $theVcVer 1]
} else {
set aProjTmpl $theProjTmpl
}
set aProjName [file rootname [file tail $f]]
- set l_compilable [osutils:compilable]
+ set l_compilable [osutils:compilable wnt]
regsub -all -- {__XQTNAM__} $aProjTmpl $aProjName aProjTmpl
upvar $theGuidsMap aGuidsMap
####### CODEBLOCK ###################################################################
# Function to generate Code Blocks workspace and project files
-proc OS:MKCBP { theOutDir theModules theAllSolution theCmpl } {
+proc OS:MKCBP { theOutDir theModules theAllSolution thePlatform theCmpl } {
puts stderr "Generating project files for Code Blocks"
# Generate projects for toolkits and separate workspace for each module
foreach aModule $theModules {
OS:cworkspace $aModule $aModule $theOutDir
- OS:cbp $theCmpl $aModule $theOutDir
+ OS:cbp $theCmpl $aModule $theOutDir $thePlatform
}
# Generate single workspace "OCCT" containing projects from all modules
}
# Generate Code Blocks projects
-proc OS:cbp { theCmpl theModules theOutDir } {
+proc OS:cbp { theCmpl theModules theOutDir thePlatform } {
set aProjectFiles {}
foreach aModule $theModules {
foreach aToolKit [${aModule}:toolkits] {
- lappend aProjectFiles [osutils:cbptk $theCmpl $theOutDir $aToolKit ]
+ lappend aProjectFiles [osutils:cbptk $theCmpl $theOutDir $aToolKit $thePlatform]
}
foreach anExecutable [OS:executable ${aModule}] {
- lappend aProjectFiles [osutils:cbpx $theCmpl $theOutDir $anExecutable]
+ lappend aProjectFiles [osutils:cbpx $theCmpl $theOutDir $anExecutable $thePlatform]
}
}
return $aProjectFiles
}
# Generate Code::Blocks project file for ToolKit
-proc osutils:cbptk { theCmpl theOutDir theToolKit } {
+proc osutils:cbptk { theCmpl theOutDir theToolKit thePlatform} {
set aUsedLibs [list]
set aFrameworks [list]
set anIncPaths [list]
set aTKDefines [list]
set aTKSrcFiles [list]
- global path targetStation
- set aWokStation "$targetStation"
-
# collect list of referred libraries to link with
- osutils:usedOsLibs $theToolKit "$aWokStation" aUsedLibs aFrameworks
+ osutils:usedOsLibs $theToolKit $thePlatform aUsedLibs aFrameworks
set aDepToolkits [wokUtils:LIST:Purge [osutils:tk:close $theToolKit]]
foreach tkx $aDepToolkits {
lappend aUsedLibs "${tkx}"
set listloc $theToolKit
}
- if { "$aWokStation" == "wnt" } {
+ if { $thePlatform == "wnt" } {
set resultloc [osutils:justwnt $listloc]
} else {
set resultloc [osutils:justunix $listloc]
if [array exists written] { unset written }
foreach fxlo $resultloc {
set xlo $fxlo
- set aSrcFiles [osutils:tk:files $xlo osutils:compilable 0]
+ set aSrcFiles [osutils:tk:files $xlo $thePlatform]
foreach aSrcFile [lsort $aSrcFiles] {
if { ![info exists written([file tail $aSrcFile])] } {
set written([file tail $aSrcFile]) 1
}
# macros for correct DLL exports
- if { "$aWokStation" == "wnt" } {
+ if { $thePlatform == "wnt" } {
lappend aTKDefines "__${xlo}_DLL"
}
}
- return [osutils:cbp $theCmpl $theOutDir $theToolKit $aTKSrcFiles $aUsedLibs $aFrameworks $anIncPaths $aTKDefines]
+ return [osutils:cbp $theCmpl $theOutDir $theToolKit $thePlatform $aTKSrcFiles $aUsedLibs $aFrameworks $anIncPaths $aTKDefines]
}
# Generates Code Blocks workspace.
}
# Generate Code::Blocks project file for Executable
-proc osutils:cbpx { theCmpl theOutDir theToolKit } {
- global path targetStation
- set aWokStation "$targetStation"
+proc osutils:cbpx { theCmpl theOutDir theToolKit thePlatform } {
+ global path
set aWokArch "$::env(ARCH)"
set aCbpFiles {}
- foreach aSrcFile [osutils:tk:files $theToolKit osutils:compilable 0] {
+ foreach aSrcFile [osutils:tk:files $theToolKit $thePlatform] {
# collect list of referred libraries to link with
set aUsedLibs [list]
set aFrameworks [list]
set aTKSrcFiles [list]
set aProjName [file rootname [file tail $aSrcFile]]
- osutils:usedOsLibs $theToolKit "$aWokStation" aUsedLibs aFrameworks
+ osutils:usedOsLibs $theToolKit $thePlatform aUsedLibs aFrameworks
set aDepToolkits [LibToLinkX $theToolKit $aProjName]
foreach tkx $aDepToolkits {
}
# macros for correct DLL exports
- if { "$aWokStation" == "wnt" } {
+ if { $thePlatform == "wnt" } {
lappend aTKDefines "__${theToolKit}_DLL"
}
# common include paths
lappend anIncPaths "../../../inc"
- lappend aCbpFiles [osutils:cbp $theCmpl $theOutDir $aProjName $aTKSrcFiles $aUsedLibs $aFrameworks $anIncPaths $aTKDefines $isExecutable]
+ lappend aCbpFiles [osutils:cbp $theCmpl $theOutDir $aProjName $thePlatform $aTKSrcFiles $aUsedLibs $aFrameworks $anIncPaths $aTKDefines $isExecutable]
}
return $aCbpFiles
# @param theIncPaths - header search paths
# @param theDefines - compiler macro definitions
# @param theIsExe - flag to indicate executable / library target
-proc osutils:cbp { theCmpl theOutDir theProjName theSrcFiles theLibsList theFrameworks theIncPaths theDefines {theIsExe "false"} } {
- global targetStation
- set aWokStation "$targetStation"
+proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibsList theFrameworks theIncPaths theDefines {theIsExe "false"} } {
+ set aWokStation $thePlatform
set aWokArch "$::env(ARCH)"
set aCmplCbp "gcc"
}
}
puts $aFile "\t\t\t\t\t<Add option=\"\$(CSF_OPT_LNK${aWokArch})\" />"
+ if { "$aWokStation" == "lin" } {
+ puts $aFile "\t\t\t\t\t<Add option=\"-Wl,-rpath-link=../../../${aWokStation}/cbp/lib\" />"
+ }
puts $aFile "\t\t\t\t</Linker>"
puts $aFile "\t\t\t</Target>"
}
}
puts $aFile "\t\t\t\t\t<Add option=\"\$(CSF_OPT_LNK${aWokArch}D)\" />"
+ if { "$aWokStation" == "lin" } {
+ puts $aFile "\t\t\t\t\t<Add option=\"-Wl,-rpath-link=../../../${aWokStation}/cbp/libd\" />"
+ }
puts $aFile "\t\t\t\t</Linker>"
puts $aFile "\t\t\t</Target>"
set aDepToolkits [lappend [wokUtils:LIST:Purge [osutils:tk:close $theToolKit]] $theToolKit]
if { "$theTargetType" == "executable" } {
- set aFile [osutils:tk:files $theToolKit osutils:compilable 0]
+ set aFile [osutils:tk:files $theToolKit mac]
set aProjName [file rootname [file tail $aFile]]
set aDepToolkits [LibToLinkX $theToolKit $aProjName]
}
set aGuidsMap($aPackage) [OS:genGUID "xcd"]
}
- set aSrcFiles [osutils:tk:files $xlo osutils:compilable 0]
+ set aSrcFiles [osutils:tk:files $xlo mac]
foreach aSrcFile [lsort $aSrcFiles] {
set aFileExt "sourcecode.cpp.cpp"
set anExecPrefix "\t\t\t\tEXECUTABLE_PREFIX = lib;"
set aWrapperExtension "\t\t\t\tWRAPPER_EXTENSION = dylib;"
set aTKDefines [list "OCC_CONVERT_SIGNALS"]
+ if { $theIsStatic == 1 } {
+ lappend aTKDefines "OCCT_NO_PLUGINS"
+ }
if { "$theTargetType" == "executable" } {
set aPBXBuildPhase "CopyFiles"
if { "$thePlatform" == "ios" } {
puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphoneos\*\]\" = \"\$(ARCHS_STANDARD)\";";
puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphonesimulator\*\]\" = \"x86_64\";";
- puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";"
puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_MODULES = YES;"
puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;"
}
puts $aPbxprojFile "\t\t\t\tARCHS = \"\$(ARCHS_STANDARD_64_BIT)\";"
- puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";"
+ puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";"
+ puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++0x\";"
puts $aPbxprojFile "\t\t\t\tCOPY_PHASE_STRIP = NO;"
puts $aPbxprojFile "\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;"
puts $aPbxprojFile "\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;"
if { "$thePlatform" == "ios" } {
puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphoneos\*\]\" = \"\$(ARCHS_STANDARD)\";";
puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphonesimulator\*\]\" = \"x86_64\";";
- puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";"
puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_MODULES = YES;"
puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;"
}
puts $aPbxprojFile "\t\t\t\tARCHS = \"\$(ARCHS_STANDARD_64_BIT)\";"
- puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";"
+ puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";"
+ puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++0x\";"
puts $aPbxprojFile "\t\t\t\tCOPY_PHASE_STRIP = YES;"
puts $aPbxprojFile "\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;"
puts $aPbxprojFile "\t\t\t\tGCC_ENABLE_OBJC_EXCEPTIONS = YES;"
puts $aPlistFile $aPlistTmpl
close $aPlistFile
}
+
+# Returns available Windows SDKs versions
+proc osutils:sdk { theSdkMajorVer {isQuietMode false} {theSdkDirectories {}} } {
+ if { ![llength ${theSdkDirectories}] } {
+ foreach anEnvVar { "ProgramFiles" "ProgramFiles\(x86\)" "ProgramW6432" } {
+ if {[ info exists ::env(${anEnvVar}) ]} {
+ lappend theSdkDirectories "$::env(${anEnvVar})/Windows Kits/${theSdkMajorVer}/Include"
+ }
+ }
+ }
+
+ set sdk_versions {}
+ foreach sdk_dir ${theSdkDirectories} {
+ if { [file isdirectory ${sdk_dir}] } {
+ lappend sdk_versions [glob -tails -directory "${sdk_dir}" -type d *]
+ }
+ }
+
+ if {![llength ${sdk_versions}] && !${isQuietMode}} {
+ error "Error : Could not find Windows SDK ${theSdkMajorVer}"
+ }
+
+ return [join [lsort -unique ${sdk_versions}] " "]
+}
+
+# Generate global properties to Visual Studio project file for UWP solution
+proc osutils:uwp:proj { theVcVer theProjTmpl } {
+
+ set uwp_properties ""
+ set uwp_generate_metadata ""
+ set uwp_app_container ""
+
+ set format_template ""
+
+ if { ${theVcVer} == "vc14-uwp" } {
+ set sdk_versions [osutils:sdk 10]
+ set sdk_max_ver [lindex ${sdk_versions} end]
+
+ set uwp_properties "<DefaultLanguage>en-US</DefaultLanguage>\n \
+<ApplicationType>Windows Store</ApplicationType>\n \
+<ApplicationTypeRevision>10.0</ApplicationTypeRevision>\n \
+<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>\n \
+<AppContainerApplication>true</AppContainerApplication>\n \
+<WindowsTargetPlatformVersion>${sdk_max_ver}</WindowsTargetPlatformVersion>\n \
+<WindowsTargetPlatformMinVersion>${sdk_max_ver}</WindowsTargetPlatformMinVersion>"
+
+ set uwp_generate_metadata "<GenerateWindowsMetadata>false</GenerateWindowsMetadata>"
+
+ regsub -all -- {[\r\n\s]*<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>} ${theProjTmpl} "" theProjTmpl
+ } else {
+ set format_template "\[\\r\\n\\s\]*"
+ }
+
+ regsub -all -- "${format_template}__UWP_PROPERTIES__" ${theProjTmpl} "${uwp_properties}" theProjTmpl
+ regsub -all -- "${format_template}__UWP_GENERATE_METADATA__" ${theProjTmpl} "${uwp_generate_metadata}" theProjTmpl
+
+ return ${theProjTmpl}
+}
+
+# Report all files found in package directory but not listed in FILES
+proc osutils:checksrcfiles { theUnit } {
+ global path
+ set aCasRoot [file normalize ${path}]
+
+ if {![file isdirectory ${aCasRoot}]} {
+ puts "OCCT directory is not defined correctly: ${aCasRoot}"
+ return
+ }
+
+ set anUnitAbsPath [file normalize "${aCasRoot}/src/${theUnit}"]
+
+ if {[file exists "${anUnitAbsPath}/FILES"]} {
+ set aFilesFile [open "${anUnitAbsPath}/FILES" rb]
+ set aFilesFileList [split [read ${aFilesFile}] "\n"]
+ close ${aFilesFile}
+
+ set aFilesFileList [lsearch -inline -all -not -exact ${aFilesFileList} ""]
+
+ # report all files not listed in FILES
+ set anAllFiles [glob -tails -nocomplain -dir ${anUnitAbsPath} "*"]
+ foreach aFile ${anAllFiles} {
+ if { "${aFile}" == "FILES" } {
+ continue
+ }
+ if { [lsearch -exact ${aFilesFileList} ${aFile}] == -1 } {
+ puts "Warning: file ${anUnitAbsPath}/${aFile} is not listed in ${anUnitAbsPath}/FILES!"
+ }
+ }
+ }
+}