ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
#
-checkbutton .myFrame.myHxxChecks.myScutsCheck -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS
-ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Create short-cuts to headers in inc folder instead of copying"
+ttk::combobox .myFrame.myHxxChecks.myScutsCombo -values { {ShortCut} {Copy} {HardLink} } -textvariable SHORTCUT_HEADERS -state readonly -width 12
+ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling headers folder inc:"
#
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5}
#
grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
-grid .myFrame.myHxxChecks.myScutsCheck -row 0 -column 0
-grid .myFrame.myHxxChecks.myScutsLbl -row 0 -column 1
+grid .myFrame.myHxxChecks.myScutsLbl -row 0 -column 0
+grid .myFrame.myHxxChecks.myScutsCombo -row 0 -column 1
incr aRowIter
#
grid .myFrame.mySrchLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
set VCVARS ""
}
-set SHORTCUT_HEADERS "true"
+set SHORTCUT_HEADERS "ShortCut"
set HAVE_FREEIMAGE "false"
set HAVE_GL2PS "false"
}
if { [info exists ::env(SHORTCUT_HEADERS)] } {
set SHORTCUT_HEADERS "$::env(SHORTCUT_HEADERS)"
+ if { $SHORTCUT_HEADERS == "true" } {
+ set SHORTCUT_HEADERS "ShortCut"
+ }
}
if { [info exists ::env(HAVE_FREEIMAGE)] } {
set HAVE_FREEIMAGE "$::env(HAVE_FREEIMAGE)"
}
}
}
- 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"
+ }
+ }
+
+ 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"
continue
}
}
+ file delete -force "$theIncPath/$aHeaderFileName"
}
set aShortCutHeaderFile [open "$theIncPath/$aHeaderFileName" "w"]
puts $aShortCutHeaderFile $aShortCutHeaderFileContent
close $aShortCutHeaderFile
}
- }
+ }
} else {
set nbcopied 0
foreach anUnit $anUnits {
# 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 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 $aHeaderFile
+ } else {
+ file copy -force $aHeaderFile $anIncPath/$aHeaderFileName
+ }
} elseif { $tcopy != $torig } {
puts "Warning: file $anIncPath/$aHeaderFileName is newer than $aHeaderFile, not changed!"
}
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*.
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
-* Set variable *SHORTCUT_HEADERS* to "true" to have folder *inc* populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
+* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are:
+ * *Copy* - headers will be copied from *src*;
+ * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
+ * "HardLink* - hard links to headers located in *src* will be created.
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
~~~~~
export HAVE_GL2PS=false
* *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution
* <i>HAVE_*</i> -- flags to enable or disable use of optional third-party products
* <i>CSF_OPT_*</i> -- paths to search for includes and binaries of all used third-party products
-* *SHORTCUT_HEADERS* -- if set to "true", folder *inc* will be populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
+* *SHORTCUT_HEADERS* -- defines method for population of folder *inc* by header files. Supported methods are:
+ * *Copy* - headers will be copied from *src*;
+ * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
+ * "HardLink* - hard links to headers located in *src* will be created.
Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively.
That tool will analyze your environment and propose you to choose available options:
* Version of Visual Studio to be used (from the list of installed ones, detected by presence of environment variables like *VS100COMNTOOLS*)
-* Option to use short-cuts to header files in folder *inc* (enabled by default).
+* Method to populate folder *inc* (short-cuts by default).
* Location of third-party libraries (usually downloaded from OCCT web site, see above).
* Path to common directory where third-party libraries are located (optional)
* Paths to headers and binaries of the third-party libraries (found automatically basing on previous options; click button "Reset" to update).
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC* (use colon ":" as path separator).
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
-* Set variable *SHORTCUT_HEADERS* to "true" to have folder *inc* populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
+* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are:
+ * *Copy* - headers will be copied from *src*;
+ * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
+ * "HardLink* - hard links to headers located in *src* will be created.
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
~~~~~
export HAVE_GL2PS=false