1 # Copyright (c) 1999-2014 OPEN CASCADE SAS
3 # This file is part of Open CASCADE Technology software library.
5 # This library is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License version 2.1 as published
7 # by the Free Software Foundation, with special exception defined in the file
8 # OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 # distribution for complete text of the license and disclaimer of any warranty.
11 # Alternatively, this file may be used under the terms of Open CASCADE
12 # commercial license or contractual agreement.
14 proc BRepSweep_Replace:AdmFileType {} {
18 proc BRepSweep_Replace:OutputDirTypeName {} {
23 proc BRepSweep_Replace:HandleInputFile { ID } {
25 scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
28 BRepSweep_NumLinearRegularSweep.hxx {return 1;}
35 proc BRepSweep_Replace:Execute { unit args } {
37 global tcl_interactive
40 package require Wokutils
42 msgprint -i -c "BRepSweep_Replace:Execute" "Copying of BRepSweep includes"
44 if { [wokparam -e %Station $unit] != "wnt" } {
48 set copycmd "cmd /c copy"
49 set replstr "\\\\\\\\"
53 scan $file "%\[^:\]:%\[^:\]:%\[^:\]" Unit type name
55 regsub ".hxx" $name ".hxx" sourcename
57 set source [woklocate -p BRepSweep:source:$sourcename [wokinfo -N $unit]]
58 set vistarget [woklocate -p BRepSweep:pubinclude:$name [wokinfo -N $unit]]
59 set target [wokinfo -p pubinclude:$name $unit]
61 regsub -all "/" " $source $target" $replstr TheArgs
63 msgprint -i -c "BRepSweep_Replace:Execute" "Copy $source to $target"
64 if { [file exist $target] && [wokparam -e %Station $unit] != "wnt" } {
65 eval exec "chmod u+w $target"
67 eval exec "$copycmd $TheArgs"