Eskil

Check-in [a5595f52f3]
Login

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

Overview
Comment:Reorder startup
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a5595f52f3ba0d60605405d9b118f8441336fa7606fbaae45c3a9543e721ae5f
User & Date: peter 2024-09-08 21:10:19.245
Context
2024-09-08
21:15
Moved pstools to module check-in: 540590903a user: peter tags: trunk
21:10
Reorder startup check-in: a5595f52f3 user: peter tags: trunk
20:56
Bumped revision on psmenu to 1.1 check-in: a605281ea5 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/startup.tcl.
33
34
35
36
37
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Stop Tk from meddling with the command line by copying it first.
set ::eskil(argv) $::argv
set ::eskil(argc) $::argc
set ::argv {}
set ::argc 0

set ::eskil(debug) 0
# Version string is loaded from version.txt
set ::eskil(diffver) "Version Unknown"
set ::eskil(thisScript) [file join [pwd] [info script]]
set ::eskil(thisDir) [file dirname $::eskil(thisScript)]

namespace import tcl::mathop::+
namespace import tcl::mathop::-
namespace import tcl::mathop::*
namespace import tcl::mathop::/

# Do initalisations for needed packages and globals.
# This is not run until needed to speed up command line error reporting.
proc Init {} {
    if {[info exists ::eskil(initHasRun)]} {
        return
    }
    set ::eskil(initHasRun) 1
    # Follow any link
    set tmplink $::eskil(thisScript)
    while {[file type $tmplink] eq "link"} {
        set tmplink [file readlink $tmplink]
        set tmplink [file normalize [file join $::eskil(thisDir) $tmplink]]
        set ::eskil(thisDir) [file dirname $tmplink]
    }

    set libDir [file join $::eskil(thisDir) .. lib]
    if {![file isdirectory $libDir]} {
        # Try the local file from devel
        set libDir [file join $::eskil(thisDir) .. eskil.vfs lib]
    }
    ::tcl::tm::path add $libDir

    package require Tk 8.6
    catch {package require textSearch}
    package require wcb
    package require snit
    package require tablelist_tile
    package require psmenu

    if {[catch {package require psballoon}]} {
        # Add a dummy if it does not exist.
        proc addBalloon {args} {}
    } else {
        namespace import -force psballoon::addBalloon
    }


    if {[file exists $::eskil(thisDir)/../version.txt]} {
        set ch [open $::eskil(thisDir)/../version.txt]
        set ::eskil(diffver) [string trim [read $ch 100]]
        close $ch
    }








<
<
<
<













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














<







33
34
35
36
37
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
63
64
65
66

67
68
69
70
71
72
73
# Stop Tk from meddling with the command line by copying it first.
set ::eskil(argv) $::argv
set ::eskil(argc) $::argc
set ::argv {}
set ::argc 0

set ::eskil(debug) 0





namespace import tcl::mathop::+
namespace import tcl::mathop::-
namespace import tcl::mathop::*
namespace import tcl::mathop::/

# Do initalisations for needed packages and globals.
# This is not run until needed to speed up command line error reporting.
proc Init {} {
    if {[info exists ::eskil(initHasRun)]} {
        return
    }
    set ::eskil(initHasRun) 1















    package require Tk 8.6
    catch {package require textSearch}
    package require wcb
    package require snit
    package require tablelist_tile
    package require psmenu

    if {[catch {package require psballoon}]} {
        # Add a dummy if it does not exist.
        proc addBalloon {args} {}
    } else {
        namespace import -force psballoon::addBalloon
    }


    if {[file exists $::eskil(thisDir)/../version.txt]} {
        set ch [open $::eskil(thisDir)/../version.txt]
        set ::eskil(diffver) [string trim [read $ch 100]]
        close $ch
    }

1365
1366
1367
1368
1369
1370
1371




















1372
1373
1374
1375
1376
1377
1378
1379
1380
    }
}

# Global code is only run the first time to be able to reread source
if { ! [info exists ::eskil(gurkmeja)]} {
    set ::eskil(gurkmeja) 1
    set ::eskil(plugins) {}





















    package require pstools
    namespace import -force pstools::*
    getOptions
    if { ! [info exists ::eskil_testsuite]} {
        InitSourceEarly
        parseCommandLine
    }
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
    }
}

# Global code is only run the first time to be able to reread source
if { ! [info exists ::eskil(gurkmeja)]} {
    set ::eskil(gurkmeja) 1
    set ::eskil(plugins) {}

    # Version string is loaded from version.txt later
    set ::eskil(diffver) "Version Unknown"
    set ::eskil(thisScript) [file join [pwd] [info script]]
    set ::eskil(thisDir) [file dirname $::eskil(thisScript)]

    # Follow any link
    set tmplink $::eskil(thisScript)
    while {[file type $tmplink] eq "link"} {
        set tmplink [file readlink $tmplink]
        set tmplink [file normalize [file join $::eskil(thisDir) $tmplink]]
        set ::eskil(thisDir) [file dirname $tmplink]
    }

    set libDir [file join $::eskil(thisDir) .. lib]
    if {![file isdirectory $libDir]} {
        # Try the local file from devel
        set libDir [file join $::eskil(thisDir) .. eskil.vfs lib]
    }
    ::tcl::tm::path add $libDir

    package require pstools
    namespace import -force pstools::*
    getOptions
    if { ! [info exists ::eskil_testsuite]} {
        InitSourceEarly
        parseCommandLine
    }
}