Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Changed the default supported Tcl to 8.6.3 Windows platform fixes Added a means to build kits from MSVC |
|---|---|
| Timelines: | family | ancestors | descendants | both | gort |
| Files: | files | file ages | folders |
| SHA1: |
035354bee353e9d348416416c09c7baf |
| User & Date: | hypnotoad 2016-02-23 01:11:48 |
Context
|
2016-02-23
| ||
| 17:52 | Pass the STATIC_BUILD flag to the rc file build by windres to ensure the executable build a standalone set of the resources needed for Tk.dll on Windows Having a problem with GORT at the moment, so for now also download and maintain sherpa. Revert to using sherpa for package management Remove the static build of Tcl, no longer required. (The kit builder does its own now) check-in: 9b2600638a user: hypnotoad tags: gort | |
| 01:11 | Changed the default supported Tcl to 8.6.3 Windows platform fixes Added a means to build kits from MSVC check-in: 035354bee3 user: hypnotoad tags: gort | |
|
2016-02-19
| ||
| 14:54 | Fixed a typo introduced by a global search and replace check-in: 4f2f9e391e user: hypnotoad tags: gort | |
Changes
Changes to build.tcl.
| ︙ | ︙ | |||
54 55 56 57 58 59 60 |
set line [string trim $line]
if {[string length $line]==0} {
set thisline {} ; continue
}
if {[string index $line 0] eq "#"} {
set thisline {} ; continue
}
| > | | > > > | > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
set line [string trim $line]
if {[string length $line]==0} {
set thisline {} ; continue
}
if {[string index $line 0] eq "#"} {
set thisline {} ; continue
}
try {
if {[lindex $line 0] != "package"} {return 1}
if {[lindex $line 1] != "ifneeded"} {return 1}
} on error {} {
puts "GOOF: $pkgidxfile $line"
} finally {
set thisline {}
}
}
return 0
}
proc ::practcl::pkgindex_path base {
set stack {}
set buffer {
|
| ︙ | ︙ | |||
210 211 212 213 214 215 216 |
lappend cmd -c [fileutil::relative $::PWD $cfile] -o $objfile
puts [list [file tail $cfile] -> [file tail $objfile]]
puts $cmd
exec {*}$cmd >&@ stdout
}
proc ::copyDir {d1 d2} {
| | | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
lappend cmd -c [fileutil::relative $::PWD $cfile] -o $objfile
puts [list [file tail $cfile] -> [file tail $objfile]]
puts $cmd
exec {*}$cmd >&@ stdout
}
proc ::copyDir {d1 d2} {
#file delete -force -- $d2
file mkdir $d2
foreach ftail [glob -directory $d1 -nocomplain -tails *] {
set f [file join $d1 $ftail]
if {[file isdirectory $f] && [string compare CVS $ftail]} {
copyDir $f [file join $d2 $ftail]
} elseif {[file isfile $f]} {
|
| ︙ | ︙ | |||
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
set name [lindex $argv 0]
set vfspath [lindex $argv 1]
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
package require zipfile::mkzip
copyDir tclkit.vfs/boot $vfspath/boot
copyDir tclkit.vfs/lib $vfspath/lib
::zipfile::mkzip::mkzip ${name}$::KIT(EXEEXT) -runtime tclkit_bare$::KIT(EXEEXT) -directory $vfspath
}
close $fout
puts "BUILDING ZipVFS KITS"
if {"toadkit" in $argv || ![file exists tclkit_bare$::KIT(EXEEXT)]} {
file mkdir build
file mkdir tclkit.vfs/boot
if {![file exists [file join $PWD tcl]]} {
copyDir $::odie_tcl(src_dir) [file join $PWD tcl]
cd [file join $PWD tcl $::odie(tcl_src_dir)]
catch {domake distclean}
}
set tclConfig.sh [file join $PWD tcl $::odie(tcl_src_dir) tclConfig.sh]
| > > > > > > > > > > > > > > > > | | | | | | | | | | | | | > > > > > > > | | | | | | | | | | < | | | > < | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
set name [lindex $argv 0]
set vfspath [lindex $argv 1]
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
package require zipfile::mkzip
copyDir tclkit.vfs/boot $vfspath/boot
copyDir tclkit.vfs/lib $vfspath/lib
copyDir tclkit.vfs/pkgs $vfspath/pkgs
::zipfile::mkzip::mkzip ${name}$::KIT(EXEEXT) -runtime tclkit_bare$::KIT(EXEEXT) -directory $vfspath
}
close $fout
puts "BUILDING ZipVFS KITS"
if {"toadkit" in $argv || ![file exists tclkit_bare$::KIT(EXEEXT)]} {
file mkdir build
file mkdir tclkit.vfs/boot
###
# Build a starter VFS for both Tcl and wish
###
set VFSROOT [file join $PWD tclkit.vfs]
set PKGROOT [file join $PWD tclkit.pkg]
set USEMSVC [info exists env(VisualStudioVersion)]
puts [list $USEMSVC]
if {![file exists [file join $PWD tcl]]} {
copyDir $::odie_tcl(src_dir) [file join $PWD tcl]
cd [file join $PWD tcl $::odie(tcl_src_dir)]
catch {domake distclean}
}
set tclConfig.sh [file join $PWD tcl $::odie(tcl_src_dir) tclConfig.sh]
if {$USEMSVC} {
puts "BUILD TCL"
cd [file join $PWD tcl $::odie(tcl_src_dir)]
doexec nmake -f makefile.vc INSTALLDIR=$PKGROOT release
doexec nmake -f makefile.vc INSTALLDIR=$PKGROOT install
cd $PWD
} else {
if {![file exists ${tclConfig.sh}]} {
cd [file join $PWD tcl $::odie(tcl_src_dir)]
set opts {}
if {$::odie(host) != $::odie(target)} {
lappend opts --host=$::odie(target)
}
lappend opts {*}$::odie(tcl_config_flags) --prefix=/ --exec_prefix=/ --with-tzdata --enable-shared=no
doexec sh configure {*}$opts
domake binaries
domake packages
cd $PWD
}
}
if {![file exists [file join $PWD tk]]} {
copyDir $::odie_tk(src_dir) [file join $PWD tk]
cd [file join $PWD tk $::odie(tcl_src_dir)]
catch {domake distclean}
}
set tkConfig.sh [file join $PWD tk $::odie(tcl_src_dir) tkConfig.sh]
if {$USEMSVC} {
cd [file join $PWD tk $::odie(tcl_src_dir)]
puts "BUILD TK"
doexec nmake -f makefile.vc TCLDIR=..\\..\\tcl INSTALLDIR=$PKGROOT release
doexec nmake -f makefile.vc TCLDIR=..\\..\\tcl INSTALLDIR=$PKGROOT install
cd $PWD
} else {
if {![file exists ${tkConfig.sh}]} {
set opts {}
cd [file join $PWD tk $::odie(tcl_src_dir)]
if {$::odie(host) != $::odie(target)} {
lappend opts --host=$::odie(target)
}
lappend opts {*}$::odie(tk_config_flags) --with-tcl=[file join $PWD tcl $::odie(tcl_src_dir)] --enable-shared=yes
doexec sh configure {*}$opts
domake binaries
if { $::odie(platform) eq "windows" } {
domake wish.res.o
}
cd $PWD
}
}
set ::KIT(OBJS) {}
set ::KIT(INCLUDES) {}
###
# Read tclConfig.sh and tkConfig.sh
###
foreach {array pre file} [list ::TCL tcl ${tclConfig.sh} ::TK tk ${tkConfig.sh}] {
set l [expr {[string length $pre]+1}]
foreach {field dat} [read_Config.sh $file] {
set field [string tolower $field]
|
| ︙ | ︙ | |||
351 352 353 354 355 356 357 |
lappend ::KIT(INCLUDES) [file join $::HERE generic]
lappend ::KIT(INCLUDES) [file join $::HERE $::odie(tcl_src_dir)]
if { $::odie(platform) eq "windows" } {
set ::KIT(EXEEXT) .exe
set ::KIT(LDFLAGS_CONSOLE) {-mconsole -pipe -static-libgcc}
set ::KIT(LDFLAGS_WINDOW) {-mwindows -pipe -static-libgcc}
| | | > > > > > > > > > < < < | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
lappend ::KIT(INCLUDES) [file join $::HERE generic]
lappend ::KIT(INCLUDES) [file join $::HERE $::odie(tcl_src_dir)]
if { $::odie(platform) eq "windows" } {
set ::KIT(EXEEXT) .exe
set ::KIT(LDFLAGS_CONSOLE) {-mconsole -pipe -static-libgcc}
set ::KIT(LDFLAGS_WINDOW) {-mwindows -pipe -static-libgcc}
set ::KIT(EXTRA_CFLAGS) {-DTCL_TOMMATH -DMP_PREC=4 -DUNICODE -D_UNICODE -DBUILD_tcl -DBUILD_tk -DBUILD_ttk -DSTATIC_BUILD}
#lappend ::KIT(TCLSHELL_OBJS) [file join $PWD tk $::odie(tcl_src_dir) tk.res.o]
#lappend ::KIT(WISHSHELL_OBJS) [file join $PWD tk $::odie(tcl_src_dir) tk.res.o]
if {[file exists [file join $PWD tclkit.rc]]} {
doexec windres -v -o [file join $PWD tclkit.res.o] --include [file join $PWD tcl generic] --include [file join $PWD tk generic] --include [file join $PWD tk $::odie(tcl_src_dir)] --include [file join $PWD tk $::odie(tcl_src_dir) rc] [file join $PWD tclkit.rc]
lappend ::KIT(TCLSHELL_OBJS) [file join $PWD tclkit.res.o]
lappend ::KIT(WISHSHELL_OBJS) [file join $PWD tclkit.res.o]
} else {
lappend ::KIT(TCLSHELL_OBJS) [file join $PWD tk $::odie(tcl_src_dir) wish.res.o]
lappend ::KIT(WISHSHELL_OBJS) [file join $PWD tk $::odie(tcl_src_dir) wish.res.o]
}
lappend ::KIT(INCLUDES) [file join $PWD tk $::odie(tcl_src_dir) rc]
} else {
set ::KIT(EXEEXT) {}
set ::KIT(LDFLAGS_CONSOLE) {}
set ::KIT(LDFLAGS_WINDOW) {}
set ::KIT(EXTRA_CFLAGS) {-DTCL_TOMMATH -DMP_PREC=4 -DBUILD_tk -DBUILD_ttk}
}
set ::KIT(LIBS) {}
set ::KIT(defs) $::TK(defs)
set fout [open toadkit.rc w]
puts $fout "array set ::TCL \{"
foreach {field value} [lsort -stride 2 [array get ::TCL]] {
puts $fout " [list $field $value]"
}
|
| ︙ | ︙ | |||
418 419 420 421 422 423 424 |
if { $::odie(platform) eq "windows" } {
# tkwinico.c tlink32.c
foreach file {
tclsh_packages.c
} {
COMPILE LIBTOADKIT [file join $cdir $file]
}
| < < < | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 |
if { $::odie(platform) eq "windows" } {
# tkwinico.c tlink32.c
foreach file {
tclsh_packages.c
} {
COMPILE LIBTOADKIT [file join $cdir $file]
}
COMPILE TCLSHELL [file join $PWD tcl win tclAppInit.c] [list -DTCL_LOCAL_MAIN_HOOK=Toadkit_MainHook -DTCL_LOCAL_APPINIT=Toadkit_AppInit]
COMPILE WISHSHELL [file join $PWD tk win winMain.c] [list -DTK_LOCAL_MAIN_HOOK=Toadkit_MainHook -DTK_LOCAL_APPINIT=Toadkit_AppInit]
} else {
foreach file {
tclsh_packages.c
} {
COMPILE LIBTOADKIT [file join $cdir $file]
|
| ︙ | ︙ | |||
450 451 452 453 454 455 456 |
set _TclSrcDir [file join tcl $::odie(tcl_src_dir)]
foreach item [glob ${_TclSrcDir}/*.a] {
lappend cmd $item
}
lappend cmd libtoadkit.a {*}$::TCL(libs)
lappend cmd -o tclkit_bare$::KIT(EXEEXT) {*}$::KIT(LDFLAGS_CONSOLE)
doexec {*}$cmd
| | < < < | | < | | | 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 |
set _TclSrcDir [file join tcl $::odie(tcl_src_dir)]
foreach item [glob ${_TclSrcDir}/*.a] {
lappend cmd $item
}
lappend cmd libtoadkit.a {*}$::TCL(libs)
lappend cmd -o tclkit_bare$::KIT(EXEEXT) {*}$::KIT(LDFLAGS_CONSOLE)
doexec {*}$cmd
set pkg_paths [glob [file join $PWD tcl pkgs *]]
lappend pkg_paths [file join $PWD tk $::odie(tcl_src_dir)]
foreach pkgpath $pkg_paths {
if {[string range [file tail $pkgpath] 0 3] eq "itcl"} continue
if {![file isdirectory $pkgpath]} continue
cd $pkgpath
puts "$pkgpath"
if {![file exists $pkgpath/Makefile]} {
if {[file exists $pkgpath/Makefile.in]} {
doexec sh configure --with-tcl=$PWD/tcl/$::odie(tcl_src_dir) --with-tclinclude=$PWD/tcl/generic --with-tzdata --enable-shared --enable-threads
} else {
continue
}
}
puts "INSTALLING to VFS [file tail $pkgpath]"
domake install DESTDIR=$PKGROOT
}
cd $PWD
if {[file exists $VFSROOT]} {
file delete -force $VFSROOT
}
copyDir $PKGROOT/lib $VFSROOT/pkgs
if {[file exists $VFSROOT/pkgs/pkgIndex.tcl]} {
file delete $VFSROOT/pkgs/pkgIndex.tcl
}
set buffer [::practcl::pkgindex_path $VFSROOT/pkgs]
set fout [open $VFSROOT/pkgs/pkgIndex.tcl w]
puts $fout $buffer
close $fout
|
| ︙ | ︙ | |||
514 515 516 517 518 519 520 |
set fout [open [file join $VFSROOT boot tcl tclIndex] a]
puts $fout {#
# MANIFEST OF INCLUDED PACKAGES
#
set VFSROOT $dir
}
| | > | | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 |
set fout [open [file join $VFSROOT boot tcl tclIndex] a]
puts $fout {#
# MANIFEST OF INCLUDED PACKAGES
#
set VFSROOT $dir
}
#pkgLibraryDir tcl/library $fout [file join $VFSROOT boot tcl]
puts $fout [::practcl::pkgindex_path [file join $VFSROOT boot tcl]]
puts $fout {
if {[file exists [file join $VFSROOT pkgs pkgIndex.tcl]]} {
set dir [file join $VFSROOT pkgs]
source [file join $VFSROOT pkgs pkgIndex.tcl]
}
}
close $fout
copyDir tk/library $VFSROOT/boot/tk
|
| ︙ | ︙ | |||
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
puts [list AUTOPATH $::auto_path]
package ifneeded zipfile::mkzip 1.2 [list source [file join $::HERE scripts mkzip.tcl]]
package require zipfile::mkzip
#file copy -force [file join $::HERE default_tclsh.tcl] tclkit.vfs/main.tcl
::zipfile::mkzip::mkzip toadkit$::KIT(EXEEXT) -runtime tclkit_bare$::KIT(EXEEXT) -directory tclkit.vfs
}
if {[lindex $argv 0] eq "wrap"} {
set name [lindex $argv 1]
set vfspath [lindex $argv 2]
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
puts [list AUTOPATH $::auto_path]
package ifneeded zipfile::mkzip 1.2 [list source [file join $::HERE scripts mkzip.tcl]]
package require zipfile::mkzip
| > | | > | 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 |
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
puts [list AUTOPATH $::auto_path]
package ifneeded zipfile::mkzip 1.2 [list source [file join $::HERE scripts mkzip.tcl]]
package require zipfile::mkzip
#file copy -force [file join $::HERE default_tclsh.tcl] tclkit.vfs/main.tcl
::zipfile::mkzip::mkzip toadkit$::KIT(EXEEXT) -runtime tclkit_bare$::KIT(EXEEXT) -directory tclkit.vfs
}
cd $PWD
if {[lindex $argv 0] eq "wrap"} {
set name [lindex $argv 1]
set vfspath [lindex $argv 2]
file copy -force tclkit_bare$::KIT(EXEEXT) toadkit$::KIT(EXEEXT)
puts [list AUTOPATH $::auto_path]
package ifneeded zipfile::mkzip 1.2 [list source [file join $::HERE scripts mkzip.tcl]]
package require zipfile::mkzip
copyDir tclkit.vfs $vfspath
#copyDir tclkit.vfs/lib $vfspath/lib
#copyDir tclkit.vfs/pkgs $vfspath/pkgs
::zipfile::mkzip::mkzip ${name}$::KIT(EXEEXT) -runtime tclkit_bare$::KIT(EXEEXT) -directory $vfspath
}
|
Changes to generic/rc4.c.
| ︙ | ︙ | |||
100 101 102 103 104 105 106 |
return TCL_OK;
}
/*
** Destructor for codec.
*/
static void CodecDestructor(void *pCodec){
| > | > | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
return TCL_OK;
}
/*
** Destructor for codec.
*/
static void CodecDestructor(void *pCodec){
printf("CODE DESTRUCTOR (shell)\n");
Tcl_Free((char *)pCodec);
printf("/CODE DESTRUCTOR (shell)\n");
}
/*
** Usage: rc4 NAME PASSWORD
**
** Create a new rc4 codec called NAME and initialized using PASSWORD.
*/
|
| ︙ | ︙ | |||
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 |
return code;
}
/*
** Initialize the rc4 codec subsystem.
*/
DLLEXPORT int Rc4_Init(Tcl_Interp *interp){
Tcl_CreateObjCommand(interp, "rc4", Rc4ObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "rc4seed", Rc4SeedObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "rc4encrypt", Rc4EncryptObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "rc4decrypt", Rc4DecryptObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "source_encrypt", Rc4EncryptSourceObjCmd, 0, 0);
//Tcl_CreateObjCommand(interp, "source_decrypt", Rc4DecryptSourceObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "eval_decrypt", Rc4DecryptEvalObjCmd, 0, 0);
Tcl_StaticPackage(interp, "rc4", "2.0", 0);
return TCL_OK;
}
| > > > > > | 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
return code;
}
/*
** Initialize the rc4 codec subsystem.
*/
DLLEXPORT int Rc4_Init(Tcl_Interp *interp){
#ifdef USE_TCL_STUBS
if (Tcl_InitStubs(interp, "8.5", 0)==NULL) {
return TCL_ERROR;
}
#endif
Tcl_CreateObjCommand(interp, "rc4", Rc4ObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "rc4seed", Rc4SeedObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "rc4encrypt", Rc4EncryptObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "rc4decrypt", Rc4DecryptObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "source_encrypt", Rc4EncryptSourceObjCmd, 0, 0);
//Tcl_CreateObjCommand(interp, "source_decrypt", Rc4DecryptSourceObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "eval_decrypt", Rc4DecryptEvalObjCmd, 0, 0);
Tcl_StaticPackage(interp, "rc4", "2.0", 0);
return TCL_OK;
}
|
Changes to scripts/make_tcl.sh.
1 2 3 4 | #! /bin/bash source odieConfig.sh | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 |
#! /bin/bash
source odieConfig.sh
TCL_SRCPATH=${SANDBOX}/tcl8.6.3/${ODIE_TCL_PLATFORM_DIR}
TK_SRCPATH=${SANDBOX}/tk8.6.3/${ODIE_TCL_PLATFORM_DIR}
ODIE_SRCPATH=${SANDBOX}/odie
#echo DOWNLOAD $DOWNLOAD
#echo "Cloning Tcl/Tk Sources"
#if [ ! -f "${DOWNLOAD}/tcl.fos" ]; then
# ${FOSSIL} clone ${ODIEMIRRORURL}/tcl ${DOWNLOAD}/tcl.fos
#fi
|
| ︙ | ︙ |