Check-in [e050506a1c]
Overview
Comment:Fixed bootstrapping to work
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:e050506a1cdb216e9aa4bd5690d76b1717fa6a26
User & Date: rkeene on 2010-09-26 04:37:33
Other Links: manifest | tags
Context
2010-09-26
04:37
Moved kitcreator to its own project check-in: a1e041469d user: rkeene tags: trunk
04:37
Fixed bootstrapping to work check-in: e050506a1c user: rkeene tags: trunk
04:37
Updated to give warnings when required packages failed to build

Updated to copy built Tclkit to current directory check-in: e062ee58fc user: rkeene tags: trunk

Changes

Modified kitsh/build.sh from [5e562476b7] to [bdca019302].

    47     47   	# Intall VFS onto kit
    48     48   	if echo 'exit 0' | tclkit >/dev/null 2>/dev/null; then
    49     49   		## Install using existing Tclkit
    50     50   		### Call installer
    51     51   		tclkit installvfs.tcl kit starpack.vfs
    52     52   	else
    53     53   		## Bootstrap (cannot cross-compile)
    54         -		### Copy installed data for packages
    55         -		mkdir "installed-pkgs"
    56         -		cp -r "${OTHERPKGSDIR}"/*/inst/* 'installed-pkgs/'
    57         -
    58     54   		### Call installer
    59         -		${TCLCONFIGDIR}/tclsh installvfs.tcl kit starpack.vfs
           55  +		cp kit runkit
           56  +		echo 'set argv [list kit starpack.vfs]' > setup.tcl
           57  +		echo 'source installvfs.tcl' >> setup.tcl
           58  +		echo | ./runkit
    60     59   	fi
    61     60   
    62     61   ) || exit 1
    63     62   
    64     63   exit 0

Modified kitsh/buildsrc/kitsh-0.0/installvfs.tcl from [52a8d482f1] to [9c5d7ceaab].

     1      1   #! /usr/bin/env tclsh
     2      2   
     3         -lappend auto_path [file join installed-pkgs lib]
     4         -package require vfs::mk4
     5         -
     6      3   if {[llength $argv] != 2} {
     7      4   	puts stderr "Usage: installvfs.tcl <kitfile> <vfsdir>"
     8      5   
     9      6   	exit 1
    10      7   }
            8  +
            9  +set kitfile [lindex $argv 0]
           10  +set vfsdir [lindex $argv 1]
           11  +
           12  +if {[catch {
           13  +	package require vfs::mk4
           14  +}]} {
           15  +	catch {
           16  +		load "" vfs
           17  +		load "" Mk4tcl
           18  +
           19  +		source [file join $vfsdir lib/vfs/vfsUtils.tcl]
           20  +		source [file join $vfsdir lib/vfs/vfslib.tcl]
           21  +		source [file join $vfsdir lib/vfs/mk4vfs.tcl]
           22  +	}
           23  +}
    11     24   
    12     25   proc copy_file {srcfile destfile} {
    13     26   	switch -glob -- $srcfile {
    14         -		"*.tcl" {
           27  +		"*.tcl" - "*.txt" {
    15     28   			set ifd [open $srcfile r]
    16     29   			set ofd [open $destfile w]
    17     30   
    18         -			fcopy $ifd $ofd
           31  +			set ret [fcopy $ifd $ofd]
    19     32   
    20     33   			close $ofd
    21     34   			close $ifd
    22     35   		}
    23     36   		default {
    24     37   			file copy -- $srcfile $destfile
    25     38   		}
    26     39   	}
    27         -
    28         -	puts "Copied $srcfile to $destfile"
    29     40   }
    30     41   
    31     42   proc recursive_copy {srcdir destdir} {
    32     43   	foreach file [glob -nocomplain -directory $srcdir *] {
    33     44   		set filetail [file tail $file]
    34     45   		set destfile [file join $destdir $filetail]
    35     46   
................................................................................
    45     56   			copy_file $file $destfile
    46     57   		} err]} {
    47     58   			puts stderr "Failed to copy: $file: $err"
    48     59   		}
    49     60   	}
    50     61   }
    51     62   
    52         -set kitfile [lindex $argv 0]
    53         -set vfsdir [lindex $argv 1]
    54         -
    55         -set handle [vfs::mk4::Mount $kitfile /kit]
           63  +set handle [vfs::mk4::Mount $kitfile /kit -nocommit]
    56     64   
    57     65   recursive_copy $vfsdir /kit
    58     66   
    59         -vfs::mk4::Unmount $handle /kit
           67  +vfs::unmount /kit