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
48
49
50
51
52
53
54
55
56
57
58

59



60
61
62
63
64
47
48
49
50
51
52
53




54
55

56
57
58
59
60
61
62
63







-
-
-
-

+
-
+
+
+





	# Intall VFS onto kit
	if echo 'exit 0' | tclkit >/dev/null 2>/dev/null; then
		## Install using existing Tclkit
		### Call installer
		tclkit installvfs.tcl kit starpack.vfs
	else
		## Bootstrap (cannot cross-compile)
		### Copy installed data for packages
		mkdir "installed-pkgs"
		cp -r "${OTHERPKGSDIR}"/*/inst/* 'installed-pkgs/'

		### Call installer
		cp kit runkit
		${TCLCONFIGDIR}/tclsh installvfs.tcl kit starpack.vfs
		echo 'set argv [list kit starpack.vfs]' > setup.tcl
		echo 'source installvfs.tcl' >> setup.tcl
		echo | ./runkit
	fi

) || exit 1

exit 0

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

1
2
3
4
5
6
7
8
9
10
















11
12
13
14

15
16
17
18

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
1
2



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

27
28
29
30

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46


-
-
-





+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



-
+



-
+








-
-







#! /usr/bin/env tclsh

lappend auto_path [file join installed-pkgs lib]
package require vfs::mk4

if {[llength $argv] != 2} {
	puts stderr "Usage: installvfs.tcl <kitfile> <vfsdir>"

	exit 1
}

set kitfile [lindex $argv 0]
set vfsdir [lindex $argv 1]

if {[catch {
	package require vfs::mk4
}]} {
	catch {
		load "" vfs
		load "" Mk4tcl

		source [file join $vfsdir lib/vfs/vfsUtils.tcl]
		source [file join $vfsdir lib/vfs/vfslib.tcl]
		source [file join $vfsdir lib/vfs/mk4vfs.tcl]
	}
}

proc copy_file {srcfile destfile} {
	switch -glob -- $srcfile {
		"*.tcl" {
		"*.tcl" - "*.txt" {
			set ifd [open $srcfile r]
			set ofd [open $destfile w]

			fcopy $ifd $ofd
			set ret [fcopy $ifd $ofd]

			close $ofd
			close $ifd
		}
		default {
			file copy -- $srcfile $destfile
		}
	}

	puts "Copied $srcfile to $destfile"
}

proc recursive_copy {srcdir destdir} {
	foreach file [glob -nocomplain -directory $srcdir *] {
		set filetail [file tail $file]
		set destfile [file join $destdir $filetail]

45
46
47
48
49
50
51
52
53
54
55

56
57
58
59

56
57
58
59
60
61
62




63
64
65
66

67







-
-
-
-
+



-
+
			copy_file $file $destfile
		} err]} {
			puts stderr "Failed to copy: $file: $err"
		}
	}
}

set kitfile [lindex $argv 0]
set vfsdir [lindex $argv 1]

set handle [vfs::mk4::Mount $kitfile /kit]
set handle [vfs::mk4::Mount $kitfile /kit -nocommit]

recursive_copy $vfsdir /kit

vfs::mk4::Unmount $handle /kit
vfs::unmount /kit