Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch private Excluding Merge-Ins
This is equivalent to a diff from 13145925a7 to 636929c92b
|
2016-03-26
| ||
| 14:49 | Modifications to push much of the mechanics for kit building off to the practcl package. Eliminated the internal "compile" command. (It was a naive implementation that only worked on the mac by sheer luck.) The build script can now operate completely independently from odie, if the project has a practcl.rc file (or equivilent). Pushing values into object defines and out of global arrays, where practical. And hey, the script is now 100 lines shorter! check-in: 71f0385e99 user: hypnotoad tags: trunk | |
| 14:45 | Added the last stage of building the resource blob to the executable compilation method Leaf check-in: 636929c92b user: hypnotoad tags: private (unpublished) | |
|
2016-03-24
| ||
| 12:38 | Elimated many of the global array calls Packages now build using the subproject class in practcl check-in: 1ad7444a46 user: hypnotoad tags: private (unpublished) | |
|
2016-03-21
| ||
| 09:06 | Working on moving the tools to build the core into Practcl check-in: fa06fe1ab0 user: hypnotoad tags: private (unpublished) | |
| 07:07 | Updated the practcl version called for. Starting to replace the requirement for the config checks made by odie's autoconf with equivilent internal logic. check-in: 13145925a7 user: hypnotoad tags: trunk | |
|
2016-03-09
| ||
| 12:08 | Fixes for OSX. Added an empty teapot for non-windows platforms check-in: a5fc81ad1e user: hypnotoad tags: trunk | |
Changes to build.tcl.
| ︙ | ︙ | |||
17 18 19 20 21 22 23 |
#####
# Define procedures
#####
namespace eval ::practcl {}
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#####
# Define procedures
#####
namespace eval ::practcl {}
#########################################
#
# BEGIN THE KITBUILDING PROCESS HERE
#
#########################################
set _search_paths {}
lappend _search_paths [file dirname [file normalize $PWD]]
if {[file exists [file join $PWD project.rc]]} {
###
# For existing PRACTCL projects, we can steal all of the
# information we need from the project.rc file
###
source [file join $PWD project.rc]
|
| ︙ | ︙ | |||
101 102 103 104 105 106 107 |
# Most TEA projects don't substitute TK_PATCH_LEVEL, so
# assume it's the same as Tcl
set ::KIT(TK_PATCH_LEVEL) $::project(TCL_PATCH_LEVEL)
set ::KIT(TCL_BUILD_OPTS) {}
set ::KIT(TK_BUILD_OPTS) {}
switch $::project(TEACUP_OS) {
linux {
| | > | > | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# Most TEA projects don't substitute TK_PATCH_LEVEL, so
# assume it's the same as Tcl
set ::KIT(TK_PATCH_LEVEL) $::project(TCL_PATCH_LEVEL)
set ::KIT(TCL_BUILD_OPTS) {}
set ::KIT(TK_BUILD_OPTS) {}
switch $::project(TEACUP_OS) {
linux {
# Voodoo, bit maintains compatibility with ActiveState binaries
lappend ::KIT(TK_BUILD_OPTS) --enable-xft=no --enable-xss=no
}
macosx {
lappend ::KIT(TCL_BUILD_OPTS) --enable-corefoundation=yes --enable-framework=no
# For pre 10.5 use:
# lappend ::KIT(TCL_BUILD_OPTS) --enable-corefoundation=no --enable-framework=no
lappend ::KIT(TK_BUILD_OPTS) --enable-aqua=yes
# IF doing X11 builds:
#lappend ::KIT(TK_BUILD_OPTS) --enable-aqua=no --x-includes=/opt/X11/include
}
}
if {[info exists ::project(sandbox)] && $::project(sandbox) ne {}} {
lappend _search_paths $::project(sandbox)
}
} else {
if {![file exists [file join $::HERE odieConfig.tcl]]} {
# Build the local toolset
cd $HERE
exec [info nameofexecutable] [file join $HERE autosetup autosetup]
cd $PWD
}
|
| ︙ | ︙ | |||
137 138 139 140 141 142 143 144 145 146 147 |
set ::KIT(TCL_BUILD_OPTS) $::odie_tcl(config_flags)
set ::KIT(TK_BUILD_OPTS) $::odie_tk(config_flags)
set ::KIT(HOST) $::odie(host)
lappend _search_paths $::odie(sandbox)
}
set ::KIT(TEAPOT) {}
if {$::KIT(platform) eq "windows"} {
set ::KIT(TEAPOT) C:/Tcl/lib/teapot/package/win32-ix86/lib
dict set ::KIT(PACKAGES) twapi {version {3.0.32 4.1.27}}
| > > > > > > > > > > > > > > > > > > > | > > > > > > > > < < < < < < < < < < < < | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 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 |
set ::KIT(TCL_BUILD_OPTS) $::odie_tcl(config_flags)
set ::KIT(TK_BUILD_OPTS) $::odie_tk(config_flags)
set ::KIT(HOST) $::odie(host)
lappend _search_paths $::odie(sandbox)
}
###
# Can *almost* get it working, but the broken installer
# leads to chaos under MinGW
###
# tcllibc {version 0.3.14}
set ::KIT(TEAPOT) {}
set ::KIT(PACKAGES) {
thread {tag release}
sqlite {tag release}
udp {tag trunk}
canvas3d {tag trunk tk 1}
tkimg {tag trunk tk 1 broken_destroot 1}
}
if {$::KIT(platform) eq "windows"} {
set ::KIT(TEAPOT) C:/Tcl/lib/teapot/package/win32-ix86/lib
dict set ::KIT(PACKAGES) twapi {version {3.0.32 4.1.27}}
set ::KIT(EXEEXT) .exe
set ::KIT(platform_src_dir) win
set USEMSVC [info exists env(VisualStudioVersion)]
} else {
set ::KIT(EXEEXT) {}
set ::KIT(platform_src_dir) unix
set USEMSVC 0
}
set ::KIT(PKGPREFIX) /zvfs
array set build {
tcl 0
tk 0
packages 0
basekitvfs 0
toadkit.rc 0
toadkit 0
tclkit_bare 0
libtoadkit.a 0
}
###
# Begin processing our arguments
###
set COMMAND [lindex $argv 0]
switch $COMMAND {
barekit {
set build(tclkit_bare) 1
set build(libtoadkit.a) 1
}
localtcl {
}
libtoadkit.a {
set build(libtoadkit.a) 1
}
toadkit {
set build(toadkit) 1
}
basekit {
set build(toadkit) 1
}
packages {
set build(packages) 1
set build(packages) 1
}
wrap {
}
clean {
}
default {
error "Unknown command $COMMAND. Valid: clean tcl toadkit wrap"
}
}
foreach dpath $_search_paths {
set path [file normalize [file join {*}[subst $dpath] toadkit$::KIT(TCL_VERSION)$::KIT(TCL_PATCH_LEVEL)]]
set ::KIT(TCLSRCDIR) [file join $path tcl]
set ::KIT(TKSRCDIR) [file join $path tk]
set ::KIT(PKGROOT) [file join $path pkg]
set ::KIT(BASEVFS) [file join $path vfs]
set ::KIT(SANDBOX) [file join $path jni]
set ::KIT(DOWNLOAD) [file join $path download]
if {[file exists $::KIT(TCLSRCDIR)]} {
break
}
}
###
# Sort out our various build products
###
set _TclSrcDir [file join $::KIT(TCLSRCDIR) $::KIT(platform_src_dir)]
set _TkSrcDir [file join $::KIT(TKSRCDIR) $::KIT(platform_src_dir)]
|
| ︙ | ︙ | |||
279 280 281 282 283 284 285 286 287 |
file delete -force $path
file delete -force build/
foreach file [glob -nocomplain *.a] {
file delete $file
}
exit
}
if {$build(tcl)} {
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | < < < < < < < < < < < < < < < < < < | < < | < | < < | | < | < < < < < < < < < < < < < | < < < < < < > | < < | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 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 |
file delete -force $path
file delete -force build/
foreach file [glob -nocomplain *.a] {
file delete $file
}
exit
}
file mkdir build
file mkdir [file join $::KIT(BASEVFS) boot]
::practcl::tclkit create TOADKIT {
name toadkit
pkg_name toadkit
pkg_version 8.6.5
platform $::KIT(platform)
HOST $::KIT(HOST)
TARGET $::KIT(TARGET)
USEMSVC $USEMSVC
teapot [list $::KIT(TEAPOT)]
download [list $::KIT(DOWNLOAD)]
sandbox [list $::KIT(SANDBOX)]
tclsrdir [list $::KIT(TCLSRCDIR)]
prefix [list $::KIT(PKGPREFIX)]
installdir [list $::KIT(PKGROOT)]
PRACTCL_NAME_LIBRARY $::project(PRACTCL_NAME_LIBRARY)
SHLIB_SUFFIX $::project(SHLIB_SUFFIX)
PRACTCL_STATIC_LIB $::project(PRACTCL_STATIC_LIB)
prefix_broken_destdir $::KIT(SANDBOX)/TEMP.PKG
}
::practcl::subproject.core create TCLCORE TOADKIT {
name tcl
config_opts "$::KIT(TCL_BUILD_OPTS) --with-tzdata"
srcroot "$::KIT(TCLSRCDIR)"
tag release
static 1
}
TCLCORE go
set _TclSrcDir [TCLCORE define get localsrcdir]
TOADKIT define set tclsrcdir $_TclSrcDir
::practcl::subproject.core create TKCORE TOADKIT {
name tk
config_opts "$::KIT(TK_BUILD_OPTS)"
srcroot "$::KIT(TKSRCDIR)"
tag release
static 0
}
TKCORE go
set _TkSrcDir [TKCORE define get localsrcdir]
TOADKIT define set tksrcdir $_TkSrcDir
puts "PLATFORM: $::KIT(platform)"
puts [list TCLSRCDIR: $_TclSrcDir]
puts [list TKSRCDIR: $_TkSrcDir]
if {$build(tcl)} {
TCLCORE compile
}
if {$build(tk)} {
TKCORE compile
}
if {$build(packages)} {
foreach {pkg info} $::KIT(PACKAGES) {
set obj [::practcl::subproject create PKG.$pkg TOADKIT [dict merge [list name $pkg pkg_name $pkg static 0] $info]]
$obj install
}
}
if {$build(toadkit.rc)} {
set ::KIT(OBJS) {}
set ::KIT(INCLUDES) {}
###
|
| ︙ | ︙ | |||
380 381 382 383 384 385 386 |
lappend ::KIT(INCLUDES) [file join $::KIT(TCLSRCDIR) compat zlib]
lappend ::KIT(INCLUDES) [file join $::HERE generic]
lappend ::KIT(INCLUDES) [file join $::HERE $::KIT(platform_src_dir)]
if { $::KIT(platform) eq "windows" } {
set ::KIT(EXEEXT) .exe
| < < < < < < | < < < < < < < < < < < < < < | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
lappend ::KIT(INCLUDES) [file join $::KIT(TCLSRCDIR) compat zlib]
lappend ::KIT(INCLUDES) [file join $::HERE generic]
lappend ::KIT(INCLUDES) [file join $::HERE $::KIT(platform_src_dir)]
if { $::KIT(platform) eq "windows" } {
set ::KIT(EXEEXT) .exe
} else {
set ::KIT(EXEEXT) {}
}
set ::KIT(LIBS) {}
set ::KIT(defs) $::TK(defs)
set fout [open $::TARGET(toadkit.rc) w]
puts $fout "array set ::TCL \{"
|
| ︙ | ︙ | |||
432 433 434 435 436 437 438 |
puts $fout " [list $field $value]"
}
puts $fout "\}"
close $fout
} else {
source $::TARGET(toadkit.rc)
}
| > > > > > | | > > > > > | | | > > > > > > > | | > > > > > > < < < < < | < < < < < < < | < < < < < < < | < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < | < < < < < < < < < | < < | 376 377 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 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 |
puts $fout " [list $field $value]"
}
puts $fout "\}"
close $fout
} else {
source $::TARGET(toadkit.rc)
}
if { $::KIT(platform) eq "windows" } {
if {[file exists [file join $PWD tclkit.rc]]} {
TOADKIT define set kit_resource_file [file join $PWD tclkit.rc]
} else {
TOADKIT define set kit_resource_file [file join $_TkSrcDir rc wish.rc]
}
}
# These values are not known until our static Tcl is built
TOADKIT define set EXEEXT $::KIT(EXEEXT)
TOADKIT define set BASEVFS $::KIT(BASEVFS)
TOADKIT define set tclkit_bare $::TARGET(tclkit_bare)
if {$build(libtoadkit.a) || $build(tclkit_bare)} {
###
# Compile our resident static C library
###
cd $PWD
if {[file exists $::TARGET(tclkit_bare)]} {
file delete $::TARGET(tclkit_bare)
}
TOADKIT define set include_dir $::KIT(INCLUDES)
TOADKIT define add include_dir ../odie/generic
if { $::KIT(platform) eq "windows" } {
TOADKIT define add include_dir ../odie/win
} else {
TOADKIT define add include_dir ../odie/unix
}
###
# Rig ourselves to statically build the bits of
# zlib we need
###
set cdir [file join $::KIT(TCLSRCDIR) compat zlib]
foreach file {
adler32.c compress.c crc32.c
deflate.c infback.c inffast.c
inflate.c inftrees.c trees.c
uncompr.c zutil.c
} {
TOADKIT add [file join $cdir $file]
}
set cdir [file join $::HERE generic]
foreach file {
password.c rc4.c tclkit_init.c zvfs.c zvfsboot.c
} {
TOADKIT add [file join $cdir $file]
}
set cdir [file join $::HERE $::KIT(platform_src_dir)]
foreach file {
tclsh_packages.c
} {
TOADKIT add [file join $cdir $file]
}
if { $::KIT(platform) eq "windows" } {
# tkwinico.c tlink32.c
TOADKIT add class csource filename [file join $_TclSrcDir tclAppInit.c] extra [list -DTCL_LOCAL_MAIN_HOOK=Toadkit_MainHook -DTCL_LOCAL_APPINIT=Toadkit_AppInit]
} else {
TOADKIT add class csource filename [file join $_TclSrcDir tclAppInit.c] extra [list -DTCL_LOCAL_MAIN_HOOK=Toadkit_MainHook -DTCL_LOCAL_APPINIT=Toadkit_AppInit]
}
# Link together our executable
TOADKIT generate-static-tclsh $::TARGET(tclkit_bare) [array get ::TCL] [array get ::KIT]
}
TOADKIT define set EXEEXT $::KIT(EXEEXT)
TOADKIT define set BASEVFS $::KIT(BASEVFS)
TOADKIT define set tclkit_bare $::TARGET(tclkit_bare)
if {$build(basekitvfs)} {
cd $PWD
if {[file exists $::KIT(BASEVFS)]} {
file delete -force $::KIT(BASEVFS)
}
puts "***
|
| ︙ | ︙ | |||
625 626 627 628 629 630 631 |
}
puts $fout [string map $map {
package ifneeded Tk @TKVERSION@ [list load $::tk_library/@TKDLL@ Tk]
}]
close $fout
}
if {$COMMAND eq "toadkit"} {
| | < | | 489 490 491 492 493 494 495 496 497 498 499 500 501 |
}
puts $fout [string map $map {
package ifneeded Tk @TKVERSION@ [list load $::tk_library/@TKDLL@ Tk]
}]
close $fout
}
if {$COMMAND eq "toadkit"} {
TOADKIT wrap $::PWD toadkit toadkit-vfs
}
if {$COMMAND eq "wrap"} {
TOADKIT wrap $::PWD {*}[lrange $argv 1 end]
}
|