[brlcad-commits] SF.net SVN: brlcad:[39917] brlcad/trunk/misc/win32-msvc8/tclsh/library/ installTre
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2010-07-27 17:09:05
|
Revision: 39917 http://brlcad.svn.sourceforge.net/brlcad/?rev=39917&view=rev Author: brlcad Date: 2010-07-27 17:08:59 +0000 (Tue, 27 Jul 2010) Log Message: ----------- refactor the copying and printing lines into a couple simple procs that are easier to maintain. Modified Paths: -------------- brlcad/trunk/misc/win32-msvc8/tclsh/library/installTree.tcl Modified: brlcad/trunk/misc/win32-msvc8/tclsh/library/installTree.tcl =================================================================== --- brlcad/trunk/misc/win32-msvc8/tclsh/library/installTree.tcl 2010-07-27 17:07:26 UTC (rev 39916) +++ brlcad/trunk/misc/win32-msvc8/tclsh/library/installTree.tcl 2010-07-27 17:08:59 UTC (rev 39917) @@ -126,13 +126,25 @@ set shareDir [file join $installDir share brlcad $cadVersion] # End BRL-CAD's version setup +proc copy_stuff {from_arg to_arg} { + global verbose + if {$verbose} {puts "file copy -force $from_arg $to_arg"} + file copy -force $from_arg $to_arg + if {![file exists $to_arg]} { puts "ERROR: copying $from_arg failed"} +} +proc stub_dir {dir_arg} { + global verbose + if {$verbose} { puts "Creating $dir_arg" } + file mkdir $dir_arg +} + puts "\[01 of 14] SETTING UP AUTO_PATH FOR TCLSH" catch { lappend auto_path [file join $rootDir src other tcl library] lappend auto_path [file join $rootDir misc win32-msvc8 tclsh library] - file copy -force [file join $rootDir src other incrTcl itcl library itcl.tcl] [file join $rootDir misc win32-msvc8 tclsh library] - file copy -force [file join $rootDir src other incrTcl itcl library pkgIndex.tcl] [file join $rootDir misc win32-msvc8 tclsh library] + copy_stuff [file join $rootDir src other incrTcl itcl library itcl.tcl] [file join $rootDir misc win32-msvc8 tclsh library] + copy_stuff [file join $rootDir src other incrTcl itcl library pkgIndex.tcl] [file join $rootDir misc win32-msvc8 tclsh library] set argv "" source "[file join $rootDir src tclscripts ami.tcl]" package require Itcl @@ -141,154 +153,94 @@ puts "\[02 of 14] CREATING INSTALL DIRECTORIES" catch { - if {$verbose} { puts "Creating [file join $installDir]" } - file mkdir [file join $installDir] - if {$verbose} { puts "Creating [file join $installDir bin]" } - file mkdir [file join $installDir bin] - if {$verbose} { puts "Creating [file join $installDir bin Tkhtml3.0]" } - file mkdir [file join $installDir bin Tkhtml3.0] - if {$verbose} { puts "Creating [file join $installDir lib]" } - file mkdir [file join $installDir lib] - if {$verbose} { puts "Creating [file join $installDir lib iwidgets$iwidgetsVersion]" } - file mkdir [file join $installDir lib iwidgets$iwidgetsVersion] - if {$verbose} { puts "Creating [file join $installDir share]" } - file mkdir [file join $installDir share] - if {$verbose} { puts "Creating [file join $installDir share brlcad]" } - file mkdir [file join $installDir share brlcad] - if {$verbose} { puts "Creating [file join $shareDir]" } - file mkdir [file join $shareDir] - if {$verbose} { puts "Creating [file join $shareDir plugins]" } - file mkdir [file join $shareDir plugins] - if {$verbose} { puts "Creating [file join $shareDir plugins archer]" } - file mkdir [file join $shareDir plugins archer] - if {$verbose} { puts "Creating [file join $shareDir plugins archer Utility]" } - file mkdir [file join $shareDir plugins archer Utility] - if {$verbose} { puts "Creating [file join $shareDir plugins archer Utility attrGroupsDisplayUtilityP]" } - file mkdir [file join $shareDir plugins archer Utility attrGroupsDisplayUtilityP] - if {$verbose} { puts "Creating [file join $shareDir plugins archer Wizards]" } - file mkdir [file join $shareDir plugins archer Wizards] - if {$verbose} { puts "Creating [file join $shareDir plugins archer Wizards tankwizard]" } - file mkdir [file join $shareDir plugins archer Wizards tankwizard] - if {$verbose} { puts "Creating [file join $shareDir plugins archer Wizards tirewizard]" } - file mkdir [file join $shareDir plugins archer Wizards tirewizard] - if {$verbose} { puts "Creating [file join $shareDir db]" } - file mkdir [file join $shareDir db] - if {$verbose} { puts "Creating [file join $shareDir doc]" } - file mkdir [file join $shareDir doc] - #if {$verbose} { puts "Creating [file join $shareDir pix]" } - #file mkdir [file join $shareDir pix] - if {$verbose} { puts "Creating [file join $shareDir sample_applications]" } - file mkdir [file join $shareDir sample_applications] + # stub_dir [file join $shareDir pix] + stub_dir [file join $installDir bin Tkhtml3.0] + stub_dir [file join $installDir bin] + stub_dir [file join $installDir lib iwidgets$iwidgetsVersion] + stub_dir [file join $installDir lib] + stub_dir [file join $installDir share brlcad] + stub_dir [file join $installDir share] + stub_dir [file join $installDir] + stub_dir [file join $shareDir db] + stub_dir [file join $shareDir doc] + stub_dir [file join $shareDir nirt] + stub_dir [file join $shareDir plugins archer Utility attrGroupsDisplayUtilityP] + stub_dir [file join $shareDir plugins archer Utility] + stub_dir [file join $shareDir plugins archer Wizards tankwizard] + stub_dir [file join $shareDir plugins archer Wizards tirewizard] + stub_dir [file join $shareDir plugins archer Wizards] + stub_dir [file join $shareDir plugins archer] + stub_dir [file join $shareDir plugins] + stub_dir [file join $shareDir sample_applications] + stub_dir [file join $shareDir] } puts "\[03 of 14] COPYING ICONS TO INSTALL DIRECTORY" catch { - if {$verbose} { puts "copy -force [file join $rootDir doc html manuals archer archer.ico] [file join $installDir]" } - file copy -force [file join $rootDir doc html manuals archer archer.ico] [file join $installDir] - if {$verbose} { puts "copy -force [file join $rootDir misc nsis brlcad.ico] [file join $installDir]" } - file copy -force [file join $rootDir misc nsis brlcad.ico] [file join $installDir] + copy_stuff [file join $rootDir doc html manuals archer archer.ico] [file join $installDir] + copy_stuff [file join $rootDir misc nsis brlcad.ico] [file join $installDir] } puts "\[04 of 14] COPYING APPS TO BIN DIRECTORY" catch { - if {$verbose} { puts "copy -force [file join $rootDir src archer archer] [file join $installDir bin]" } - file copy -force [file join $rootDir src archer archer] [file join $installDir bin] - if {$verbose} { puts "copy -force [file join $rootDir src archer archer.bat] [file join $installDir bin]" } - file copy -force [file join $rootDir src archer archer.bat] [file join $installDir bin] - if {$verbose} { puts "copy -force [file join $rootDir src mged mged.bat] [file join $installDir bin]" } - file copy -force [file join $rootDir src mged mged.bat] [file join $installDir bin] - if {$verbose} { puts "copy -force [file join $rootDir src tclscripts rtwizard rtwizard.bat] [file join $installDir bin]" } - file copy -force [file join $rootDir src tclscripts rtwizard rtwizard.bat] [file join $installDir bin] + copy_stuff [file join $rootDir src archer archer.bat] [file join $installDir bin] + copy_stuff [file join $rootDir src archer archer] [file join $installDir bin] + copy_stuff [file join $rootDir src mged mged.bat] [file join $installDir bin] + copy_stuff [file join $rootDir src tclscripts rtwizard rtwizard.bat] [file join $installDir bin] } puts "\[05 of 14] COPYING HEADER FILES TO INCLUDE DIRECTORY" catch { - file copy -force [file join $rootDir include] $installDir + copy_stuff [file join $rootDir include] $installDir } puts "\[06 of 14] COPYING LIBRARIES TO LIB DIRECTORY" catch { - if {$verbose} { puts "copy -force [file join $rootDir src other tcl library] [file join $installDir lib tcl$tclVersion]" } - file copy -force [file join $rootDir src other tcl library] [file join $installDir lib tcl$tclVersion] - if {$verbose} { puts "copy -force [file join $rootDir src other tk library] [file join $installDir lib tk$tclVersion]" } - file copy -force [file join $rootDir src other tk library] [file join $installDir lib tk$tclVersion] - if {$verbose} { puts "copy -force [file join $rootDir src other incrTcl itcl library] [file join $installDir lib itcl$itclVersion]" } - file copy -force [file join $rootDir src other incrTcl itcl library] [file join $installDir lib itcl$itclVersion] - if {$verbose} { puts "copy -force [file join $rootDir src other incrTcl itk library] [file join $installDir lib itk$itclVersion]" } - file copy -force [file join $rootDir src other incrTcl itk library] [file join $installDir lib itk$itclVersion] - if {$verbose} { puts "copy -force [file join $rootDir src other iwidgets generic] [file join $installDir lib iwidgets$iwidgetsVersion]" } - file copy -force [file join $rootDir src other iwidgets generic] [file join $installDir lib iwidgets$iwidgetsVersion scripts] + copy_stuff [file join $rootDir src other incrTcl itcl library] [file join $installDir lib itcl$itclVersion] + copy_stuff [file join $rootDir src other incrTcl itk library] [file join $installDir lib itk$itclVersion] + copy_stuff [file join $rootDir src other iwidgets generic] [file join $installDir lib iwidgets$iwidgetsVersion scripts] + copy_stuff [file join $rootDir src other tcl library] [file join $installDir lib tcl$tclVersion] + copy_stuff [file join $rootDir src other tk library] [file join $installDir lib tk$tclVersion] } puts "\[07 of 14] COPYING DATA TO SHARE DIRECTORY" catch { - if {$verbose} { puts "copy -force [file join $rootDir AUTHORS] [file join $shareDir]" } - file copy -force [file join $rootDir AUTHORS] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir COPYING] [file join $shareDir]" } - file copy -force [file join $rootDir COPYING] [file join $shareDir] - #if {$verbose} { puts "copy -force [file join $rootDir doc] [file join $shareDir]" } - #file copy -force [file join $rootDir doc] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir doc archer_ack.txt] [file join $shareDir doc]" } - file copy -force [file join $rootDir doc archer_ack.txt] [file join $shareDir doc] - if {$verbose} { puts "copy -force [file join $rootDir doc html] [file join $shareDir]" } - file copy -force [file join $rootDir doc html] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir HACKING] [file join $shareDir]" } - file copy -force [file join $rootDir HACKING] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir INSTALL] [file join $shareDir]" } - file copy -force [file join $rootDir INSTALL] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir NEWS] [file join $shareDir]" } - file copy -force [file join $rootDir NEWS] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir README] [file join $shareDir]" } - file copy -force [file join $rootDir README] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir misc fortran_example.f] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir misc fortran_example.f] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src vfont] [file join $shareDir]" } - file copy -force [file join $rootDir src vfont] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir src tclscripts] [file join $shareDir]" } - file copy -force [file join $rootDir src tclscripts] [file join $shareDir] - if {$verbose} { puts "copy -force [file join $rootDir src archer plugins utility.tcl] [file join $shareDir plugins archer]" } - file copy -force [file join $rootDir src archer plugins utility.tcl] [file join $shareDir plugins archer] - if {$verbose} { puts "copy -force [file join $rootDir src archer plugins Utility attrGroupsDisplayUtilityP.tcl] [file join $shareDir plugins archer Utility]" } - file copy -force [file join $rootDir src archer plugins Utility attrGroupsDisplayUtilityP.tcl] [file join $shareDir plugins archer Utility] - if {$verbose} { puts "copy -force [file join $rootDir src archer plugins Utility attrGroupsDisplayUtilityP AttrGroupsDisplayUtilityP.tcl] [file join $shareDir plugins archer Utility attrGroupsDisplayUtilityP]" } - file copy -force [file join $rootDir src archer plugins Utility attrGroupsDisplayUtilityP AttrGroupsDisplayUtilityP.tcl] [file join $shareDir plugins archer Utility attrGroupsDisplayUtilityP] - if {$verbose} { puts "copy -force [file join $rootDir src archer plugins wizards.tcl] [file join $shareDir plugins archer]" } - file copy -force [file join $rootDir src archer plugins wizards.tcl] [file join $shareDir plugins archer] - if {$verbose} { puts "copy -force [file join $rootDir src archer plugins Wizards tankwizard.tcl] [file join $shareDir plugins archer Wizards]" } - file copy -force [file join $rootDir src archer plugins Wizards tankwizard.tcl] [file join $shareDir plugins archer Wizards] - if {$verbose} { puts "copy -force [file join $rootDir src archer plugins Wizards tankwizard TankWizard.tcl] [file join $shareDir plugins archer Wizards tankwizard]" } - file copy -force [file join $rootDir src archer plugins Wizards tankwizard TankWizard.tcl] [file join $shareDir plugins archer Wizards tankwizard] - if {$verbose} { puts "copy -force [file join $rootDir src archer plugins Wizards tirewizard.tcl] [file join $shareDir plugins archer Wizards]" } - file copy -force [file join $rootDir src archer plugins Wizards tirewizard.tcl] [file join $shareDir plugins archer Wizards] - if {$verbose} { puts "copy -force [file join $rootDir src archer plugins Wizards tirewizard TireWizard.tcl] [file join $shareDir plugins archer Wizards tirewizard]" } - file copy -force [file join $rootDir src archer plugins Wizards tirewizard TireWizard.tcl] [file join $shareDir plugins archer Wizards tirewizard] - if {$verbose} { puts "copy -force [file join $rootDir src conv g-xxx.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src conv g-xxx.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src conv g-xxx_facets.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src conv g-xxx_facets.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src gtools g_transfer.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src gtools g_transfer.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src libpkg tpkg.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src libpkg tpkg.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src librt primitives xxx xxx.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src librt primitives xxx xxx.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src librt raydebug.tcl] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src librt raydebug.tcl] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src librt nurb_example.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src librt nurb_example.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src rt rtexample.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src rt rtexample.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src util pl-dm.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src util pl-dm.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src util roots_example.c] [file join $shareDir sample_applications]" } - file copy -force [file join $rootDir src util roots_example.c] [file join $shareDir sample_applications] - if {$verbose} { puts "copy -force [file join $rootDir src nirt sfiles] [file join $shareDir nirt]" } - file copy -force [file join $rootDir src nirt sfiles] [file join $shareDir nirt] + #copy_stuff [file join $rootDir doc] [file join $shareDir] + copy_stuff [file join $rootDir AUTHORS] [file join $shareDir] + copy_stuff [file join $rootDir COPYING] [file join $shareDir] + copy_stuff [file join $rootDir HACKING] [file join $shareDir] + copy_stuff [file join $rootDir INSTALL] [file join $shareDir] + copy_stuff [file join $rootDir NEWS] [file join $shareDir] + copy_stuff [file join $rootDir README] [file join $shareDir] + copy_stuff [file join $rootDir doc archer_ack.txt] [file join $shareDir doc] + copy_stuff [file join $rootDir doc html] [file join $shareDir] + copy_stuff [file join $rootDir misc fortran_example.f] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src archer plugins Utility attrGroupsDisplayUtilityP AttrGroupsDisplayUtilityP.tcl] [file join $shareDir plugins archer Utility attrGroupsDisplayUtilityP] + copy_stuff [file join $rootDir src archer plugins Utility attrGroupsDisplayUtilityP.tcl] [file join $shareDir plugins archer Utility] + copy_stuff [file join $rootDir src archer plugins Wizards tankwizard TankWizard.tcl] [file join $shareDir plugins archer Wizards tankwizard] + copy_stuff [file join $rootDir src archer plugins Wizards tankwizard.tcl] [file join $shareDir plugins archer Wizards] + copy_stuff [file join $rootDir src archer plugins Wizards tirewizard TireWizard.tcl] [file join $shareDir plugins archer Wizards tirewizard] + copy_stuff [file join $rootDir src archer plugins Wizards tirewizard.tcl] [file join $shareDir plugins archer Wizards] + copy_stuff [file join $rootDir src archer plugins utility.tcl] [file join $shareDir plugins archer] + copy_stuff [file join $rootDir src archer plugins wizards.tcl] [file join $shareDir plugins archer] + copy_stuff [file join $rootDir src conv g-xxx.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src conv g-xxx_facets.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src gtools g_transfer.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src libpkg tpkg.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src librt nurb_example.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src librt primitives xxx xxx.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src librt raydebug.tcl] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src nirt sfiles] [file join $shareDir nirt] + copy_stuff [file join $rootDir src rt rtexample.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src tclscripts] [file join $shareDir] + copy_stuff [file join $rootDir src util pl-dm.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src util roots_example.c] [file join $shareDir sample_applications] + copy_stuff [file join $rootDir src vfont] [file join $shareDir] } @@ -349,8 +301,8 @@ puts "\[12 of 14] COPYING REDIST FILES" catch { - file copy -force "C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.CRT" [file join $installDir bin] - file copy -force "C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.MFC" [file join $installDir bin] + copy_stuff "C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.CRT" [file join $installDir bin] + copy_stuff "C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.MFC" [file join $installDir bin] } @@ -369,8 +321,7 @@ puts $fd {package ifneeded Tkhtml 3.0 [list load [file join $dir tkhtml.dll]]} close $fd cd $savepwd - if {$verbose} { puts "copy -force [file join $rootDir src other tkhtml3 src pkgIndex.tcl] [file join $installDir bin Tkhtml3.0]" } - file copy -force [file join $rootDir src other tkhtml3 src pkgIndex.tcl] [file join $installDir bin Tkhtml3.0] + copy_stuff [file join $rootDir src other tkhtml3 src pkgIndex.tcl] [file join $installDir bin Tkhtml3.0] } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |