Tk Library Source Code
Check-in [8bbf443a2c]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.

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

Overview
Comment:Installer updated with Tcllib changes, use embedded docs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tklib-0-6-rc
Files: files | file ages | folders
SHA1:8bbf443a2c40717ee1032ff7388be45886949809
User & Date: andreask 2013-03-11 20:54:00
Context
2013-03-11
22:55
And the .tap file also check-in: 7ffa535791 user: andreask tags: tklib-0-6-rc
20:54
Installer updated with Tcllib changes, use embedded docs. check-in: 8bbf443a2c user: andreask tags: tklib-0-6-rc
20:47
Full regeneration of the embedded docs, proper nav links, extended toc set. check-in: c310155d8d user: andreask tags: tklib-0-6-rc
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to installer.tcl.

211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
...
242
243
244
245
246
247
248

249

250
251


252
253
254

255
256
257
258
259
260
261
...
587
588
589
590
591
592
593

594



595
596

	log "\nGenerating $adst"
	if {!$config(dry)} {
	    file mkdir [file dirname  $adst]
	    catch {file delete -force $adst}
	    file copy -force $aexe    $adst
	}

	if {[file exists $aexe.man]} {
	    if {$config(doc,nroff)} {
		_manfile $aexe.man nroff n $config(doc,nroff,path)
	    }
	    if {$config(doc,html)} {
		_manfile $aexe.man html html $config(doc,html,path)
	    }
	}
    }
    return
}

proc doinstall {} {
    global config package_version distribution package_name modules excluded

................................................................................
    if {$config(doc,nroff)} {
	set config(man.macros) [string trim [get_input \
		[file join $distribution support installation man.macros]]]
    }
    if {$config(pkg)}       {
	xinstall   pkg $config(pkg,path)
	gen_main_index $config(pkg,path) $package_name $package_version

	if {$config(doc,nroff)} {

	    xinstall doc nroff n    $config(doc,nroff,path)
	}


	if {$config(doc,html)}  {
	    xinstall doc html  html $config(doc,html,path)
	}

    }
    if {$config(exa)}       {xinstall exa $config(exa,path)}
    if {$config(app)}       {ainstall}
    log ""
    return
}

................................................................................
	handlegui
    }
    doinstall
    return
}

# --------------------------------------------------------------

main



exit 0
# --------------------------------------------------------------







<
<
<
<
<
<
<
<
<







 







>
|
>
|

>
>
|
|
<
>







 







>
|
>
>
>


211
212
213
214
215
216
217









218
219
220
221
222
223
224
...
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

249
250
251
252
253
254
255
256
...
582
583
584
585
586
587
588
589
590
591
592
593
594
595

	log "\nGenerating $adst"
	if {!$config(dry)} {
	    file mkdir [file dirname  $adst]
	    catch {file delete -force $adst}
	    file copy -force $aexe    $adst
	}









    }
    return
}

proc doinstall {} {
    global config package_version distribution package_name modules excluded

................................................................................
    if {$config(doc,nroff)} {
	set config(man.macros) [string trim [get_input \
		[file join $distribution support installation man.macros]]]
    }
    if {$config(pkg)}       {
	xinstall   pkg $config(pkg,path)
	gen_main_index $config(pkg,path) $package_name $package_version
    }
    if {$config(doc,nroff)} {
	foreach dir [glob -directory $distribution/embedded/man/files/modules *] {
	    xcopy $dir $config(doc,nroff,path) 1
	}
	xcopy $distribution/embedded/man/files/apps $config(doc,nroff,path) 1
    }
    if {$config(doc,html)}  {
	#xinstall doc html  html $config(doc,html,path)

	xcopy $distribution/embedded/www $config(doc,html,path) 1
    }
    if {$config(exa)}       {xinstall exa $config(exa,path)}
    if {$config(app)}       {ainstall}
    log ""
    return
}

................................................................................
	handlegui
    }
    doinstall
    return
}

# --------------------------------------------------------------
if {[catch {
    main
}]} {
    puts $errorInfo
}
exit 0
# --------------------------------------------------------------

Changes to support/installation/actions.tcl.

105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
    _tcl $module $libdir
    xcopyfile [file join $distribution modules $module tclIndex] \
	    [file join $libdir $module]
    return
}


proc _manfile {f format ext docdir} {
    global distribution argv argc argv0 config

    set out [file join $docdir [file rootname [file tail $f]]].$ext

    log "Generating $out"
    if {$config(dry)} return

    ::doctools::new dt -format $format -file $f

    file mkdir [file dirname $out]

    set data [dt format [get_input $f]]
    switch -exact -- $format {
	nroff {
	    set data [string map \
		    [list \
		    {.so man.macros} \
		    $config(man.macros)] \
		    $data]
	}
	html {}
    }
    write_out $out $data

    set warnings [dt warnings]
    if {[llength $warnings] > 0} {
	log [join $warnings \n]
    }

    dt destroy
    return
}

proc _man {module format ext docdir} {
    global distribution argv argc argv0 config

    # In Tklib we do not have access to a bundled doctools. We have to
    # use whatever is installed. Best we can do is to use whatever is
    # installed and pray that it supports everything needed.

    package require doctools
    ::doctools::new dt -format $format -module $module

    foreach f [glob -nocomplain [file join $distribution modules $module *.man]] {

	set out [file join $docdir [file rootname [file tail $f]]].$ext

	log "Generating $out"
	if {$config(dry)} {continue}

	dt configure -file $f
	file mkdir [file dirname $out]

	set data [dt format [get_input $f]]
	switch -exact -- $format {
	    nroff {
		set data [string map \
			[list \
			{.so man.macros} \
			$config(man.macros)] \
			$data]
	    }
	    html {}
	}
	write_out $out $data

	set warnings [dt warnings]
	if {[llength $warnings] > 0} {
	    log [join $warnings \n]
	}
    }
    dt destroy
    return
}

proc _exa {module exadir} {
    global distribution
    xcopy \
	    [file join $distribution examples $module] \
	    [file join $exadir $module] \
	    1
    return
}







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








105
106
107
108
109
110
111
112

































113

114







































115
116
117
118
119
120
121
122
    _tcl $module $libdir
    xcopyfile [file join $distribution modules $module tclIndex] \
	    [file join $libdir $module]
    return
}


proc _manfile {f format ext docdir} { return }

































proc _man {module format ext docdir} { return }









































proc _exa {module exadir} {
    global distribution
    xcopy \
	    [file join $distribution examples $module] \
	    [file join $exadir $module] \
	    1
    return
}