Check-in [1ce45b61ee]

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Accepted a number of bugfixes and tweaks by Tobias Schueller. The subset packages now have proper TEApot metadata, for example.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1ce45b61ee4db514ce2ed33c8ee5e0a0ef374a5b
User & Date: andreask 2012-11-07 23:17:45
Context
2016-03-01
06:28
Fix trunk split. Leaf check-in: 5c862db851 user: aku tags: trunk
2012-11-07
23:24
Switched to kettle as build system. Note: New branch, until we make this fully official. check-in: c88de1a550 user: andreask tags: kettled
23:17
Accepted a number of bugfixes and tweaks by Tobias Schueller. The subset packages now have proper TEApot metadata, for example. check-in: 1ce45b61ee user: andreask tags: trunk
23:03
Added a subset package to generate subsets of the icons in package form, by automatic generation through interception of regular package use or manually, through a new tool (icon_selector). check-in: c63cb009c6 user: andreask tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to build.tcl.

201
202
203
204
205
206
207

208
209
210
211
212
213
214
...
250
251
252
253
254
255
256

257
258
259
260
261
262
263
	set bdir [file dirname [info nameofexecutable]]
    } else {
	set bdir [file dirname $ldir]/bin
    }

    # Create directories, might not exist.
    file mkdir $ldir


    foreach item $packages {
	# Package: /name/

	foreach {dir vfile icons} $item break
	set name $dir
	set version  [version [file dirname $::me]/$vfile]
................................................................................
	file delete -force $ldir/$name$version
	file rename        $ldir/${name}-new     $ldir/$name$version
	puts "Installed package:     $ldir/$name$version"
    }

    foreach item $applications {
	file copy -force [file dirname $::me]/$item $bdir/${item}-new

	file rename $bdir/${item}-new     $bdir/$item
	puts "Installed application: $bdir/$item"
    }
    return
}
proc Hgui {} { return "\n\tInstall all packages.\n\tDone from a small GUI." }
proc _gui {} {







>







 







>







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
...
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
	set bdir [file dirname [info nameofexecutable]]
    } else {
	set bdir [file dirname $ldir]/bin
    }

    # Create directories, might not exist.
    file mkdir $ldir
    file mkdir $bdir

    foreach item $packages {
	# Package: /name/

	foreach {dir vfile icons} $item break
	set name $dir
	set version  [version [file dirname $::me]/$vfile]
................................................................................
	file delete -force $ldir/$name$version
	file rename        $ldir/${name}-new     $ldir/$name$version
	puts "Installed package:     $ldir/$name$version"
    }

    foreach item $applications {
	file copy -force [file dirname $::me]/$item $bdir/${item}-new
	file delete -force $bdir/$item
	file rename $bdir/${item}-new     $bdir/$item
	puts "Installed application: $bdir/$item"
    }
    return
}
proc Hgui {} { return "\n\tInstall all packages.\n\tDone from a small GUI." }
proc _gui {} {

Changes to pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
if {![package vsatisfies [package provide Tcl] 8.5]} {
    # PRAGMA: returnok
    return
}
package ifneeded famfamfam        1.1   [list source [file join $dir core.tcl]]
package ifneeded famfamfam::flags 1.0.1 [list source [file join $dir flags.tcl]]
package ifneeded famfamfam::mini  1.0.1 [list source [file join $dir mini.tcl]]
package ifneeded famfamfam::mint  1.0.1 [list source [file join $dir mint.tcl]]
package ifneeded famfamfam::silk  1.0.1 [list source [file join $dir silk.tcl]]
package ifneeded famfamfam::subset 1     [list source [file join $dir subset.tcl]]




|
|
|
|
|

1
2
3
4
5
6
7
8
9
10
if {![package vsatisfies [package provide Tcl] 8.5]} {
    # PRAGMA: returnok
    return
}
package ifneeded famfamfam         1.1   [list source [file join $dir core.tcl]]
package ifneeded famfamfam::flags  1.0.1 [list source [file join $dir flags.tcl]]
package ifneeded famfamfam::mini   1.0.1 [list source [file join $dir mini.tcl]]
package ifneeded famfamfam::mint   1.0.1 [list source [file join $dir mint.tcl]]
package ifneeded famfamfam::silk   1.0.1 [list source [file join $dir silk.tcl]]
package ifneeded famfamfam::subset 1     [list source [file join $dir subset.tcl]]

Changes to subset.tcl.

22
23
24
25
26
27
28

29
30
31
32
33
34
35
..
38
39
40
41
42
43
44

45
46
47
48
49
50
51
52
53
54
55





56
57
58
59
60
61
62
..
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
..
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
...
142
143
144
145
146
147
148
149
















150
151
152
153
154
155
156
## API - Start interception and saving.

proc ::famfamfam::subset::new {name version dst} {
    # Create a package NAME + VERSION with saved icons at the given
    # location.

    variable ptemplate

    variable template
    variable destination

    if {$destination ne {}} {
        return -code error "Assembly in progress, unable to start a second"
    }

................................................................................
    # Create the directory we will collect the images in.
    file mkdir $destination

    lappend map @@name@@    $name
    lappend map @@qname@@   [list $name]
    lappend map @@version@@ $version
    lappend map @@time@@    [clock format [clock seconds]]

    lappend map @@user@@    $::tcl_platform(user)

    # Generate a package index ...
    set    c [open $destination/pkgIndex.tcl w]
    puts  $c [string map $map $ptemplate]
    close $c

    # ... And the package code
    set    c [open $destination/loader.tcl w]
    puts  $c [string map $map $template]
    close $c






    # At last tell the core to report to us which images are loaded so
    # that we can record them into the package we are creating.
    famfamfam intercept ::famfamfam::subset::save
    return
}

................................................................................
    if {$destination eq {}} {
        return -code error "No assembly in progress."
    }

    # Record the image into the package we are assembling.

    file mkdir $destination/icons/$iconset
    file copy $iconpath $destination/icons/$iconset/
    return
}

proc ::famfamfam::subset::done {} {
    # Stop recording.
    variable destination

................................................................................
## Export

namespace eval ::famfamfam::subset {
    # Directory a new package is assembled in.
    variable destination {}

    variable dedent    [list "\n        " "\n"]
    variable ptemplate [string map $dedent {
        package ifneeded @@qname@@ @@version@@ [list source [file join $dir loader.tcl]]
    }]

    variable template [string map $dedent {
        # -*- tcl -*- Generated package @@name@@
        #
        # Generated by package famfamfam::subset
        # at  @@time@@
        # for @@user@@
        #
        # @mdgen OWNER: *
................................................................................
            }
        }} [file dirname [file normalize [info script]]]

        # Ready...
        package  provide @@qname@@ @@version@@
        # Note: Keep the double spacing to hide the above command from build.tcl (version)
        return
    }]

















    namespace export {[a-z]*}
    namespace ensemble create
}

# # ## ### ##### ######## ############# #####################
## Ready







>







 







>











>
>
>
>
>







 







|







 







|

|

|







 







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
..
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
..
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
## API - Start interception and saving.

proc ::famfamfam::subset::new {name version dst} {
    # Create a package NAME + VERSION with saved icons at the given
    # location.

    variable ptemplate
    variable ttemplate
    variable template
    variable destination

    if {$destination ne {}} {
        return -code error "Assembly in progress, unable to start a second"
    }

................................................................................
    # Create the directory we will collect the images in.
    file mkdir $destination

    lappend map @@name@@    $name
    lappend map @@qname@@   [list $name]
    lappend map @@version@@ $version
    lappend map @@time@@    [clock format [clock seconds]]
    lappend map @@qtime@@   [list [clock format [clock seconds]]]
    lappend map @@user@@    $::tcl_platform(user)

    # Generate a package index ...
    set    c [open $destination/pkgIndex.tcl w]
    puts  $c [string map $map $ptemplate]
    close $c

    # ... And the package code
    set    c [open $destination/loader.tcl w]
    puts  $c [string map $map $template]
    close $c

    # Generate a teapot.txt ...
    set    c [open $destination/teapot.txt w]
    puts  $c [string map $map $ttemplate]
    close $c

    # At last tell the core to report to us which images are loaded so
    # that we can record them into the package we are creating.
    famfamfam intercept ::famfamfam::subset::save
    return
}

................................................................................
    if {$destination eq {}} {
        return -code error "No assembly in progress."
    }

    # Record the image into the package we are assembling.

    file mkdir $destination/icons/$iconset
    file copy -force -- $iconpath $destination/icons/$iconset/
    return
}

proc ::famfamfam::subset::done {} {
    # Stop recording.
    variable destination

................................................................................
## Export

namespace eval ::famfamfam::subset {
    # Directory a new package is assembled in.
    variable destination {}

    variable dedent    [list "\n        " "\n"]
    variable ptemplate [string trim [string map $dedent {
        package ifneeded @@qname@@ @@version@@ [list source [file join $dir loader.tcl]]
    }]]

    variable template [string trim [string map $dedent {
        # -*- tcl -*- Generated package @@name@@
        #
        # Generated by package famfamfam::subset
        # at  @@time@@
        # for @@user@@
        #
        # @mdgen OWNER: *
................................................................................
            }
        }} [file dirname [file normalize [info script]]]

        # Ready...
        package  provide @@qname@@ @@version@@
        # Note: Keep the double spacing to hide the above command from build.tcl (version)
        return
    }]]

    variable ttemplate [string trim [string map $dedent {
        Package @@qname@@ @@version@@
        Meta platform tcl
        Meta require famfamfam
        Meta entrykeep .
        Meta included pkgIndex.tcl
        Meta included loader.tcl
        Meta included icons
        Meta build::date @@qtime@@
        Meta author @@user@@
        Meta category icons
        Meta license BSD
        Meta subject icon subset famfamfam 
        Meta description Binding for a subset of the famfamfam icon sets
    }]]

    namespace export {[a-z]*}
    namespace ensemble create
}

# # ## ### ##### ######## ############# #####################
## Ready