Diff
Not logged in

Differences From Artifact [0de98c695f]:

To Artifact [1644fc87ef]:


24
25
26
27
28
29
30
31

32




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
  # NOTE: If there is an "Eagle1.0" sub-directory present right beneath where
  #       this script was evaluated from, add it to the auto-path; otherwise,
  #       we assume that we are running from inside the source tree.  In that
  #       case, modify the auto-path to include the "Eagle1.0" sub-directory
  #       within "externals".  Only native Tcl needs to be able to locate the
  #       packages from the sub-directory being added to the auto-path here
  #       because they were already shipped in the Eagle core script library
  #       (as of Beta 37).

  #




  variable pkgr_path [file normalize [file dirname [info script]]]

  if {[file isdirectory [file join $pkgr_path Eagle1.0]]} then {
    lappend ::auto_path [file join $pkgr_path Eagle1.0]
  } else {
    lappend ::auto_path [file join [file dirname [file dirname \
        $pkgr_path]] externals Eagle lib Eagle1.0]

  }

  #
  # NOTE: This package requires several packages from the Eagle core script
  #       library, even when it is being used by native Tcl.  If necessary,
  #       prior to evaluating this file in native Tcl, its auto-path should
  #       be modified to include an "Eagle1.0" directory (i.e. a directory
  #       containing the Eagle core script library files "auxiliary.eagle",
  #       "file1.eagle", and "platform.eagle").
  #
  package require Eagle.Platform
  package require Eagle.Auxiliary
  package require Eagle.File

  #
  # NOTE: This block is intended to be evaluated successfully by native
  #       Tcl only.
  #

  catch {
    ::Eagle::exportAndImportPackageCommands ::Eagle [list \
        appendArgs getDictionaryValue isEagle isWindows \
        readFile writeFile] false false



  }

  #
  # NOTE: This procedure returns a formatted, possibly version-specific,
  #       package name, for use in logging.
  #
  proc formatPackageName { package version } {







|
>

>
>
>
>
|

|
|
|
|
|
>


















>
|
|
|
|
>
>
>







24
25
26
27
28
29
30
31
32
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
  # NOTE: If there is an "Eagle1.0" sub-directory present right beneath where
  #       this script was evaluated from, add it to the auto-path; otherwise,
  #       we assume that we are running from inside the source tree.  In that
  #       case, modify the auto-path to include the "Eagle1.0" sub-directory
  #       within "externals".  Only native Tcl needs to be able to locate the
  #       packages from the sub-directory being added to the auto-path here
  #       because they were already shipped in the Eagle core script library
  #       (as of Beta 37).  The expression used for Eagle detection here was
  #       stolen from the Eagle core script library [isEagle] procedure.
  #
  variable pkgr_path; # DEFAULT: <unset>

  if {![info exists ::tcl_platform(engine)] || \
      [string compare -nocase eagle $::tcl_platform(engine)] != 0} then {
    set pkgr_path [file normalize [file dirname [info script]]]

    if {[file isdirectory [file join $pkgr_path Eagle1.0]]} then {
      lappend ::auto_path [file join $pkgr_path Eagle1.0]
    } else {
      lappend ::auto_path [file join [file dirname [file dirname \
          $pkgr_path]] externals Eagle lib Eagle1.0]
    }
  }

  #
  # NOTE: This package requires several packages from the Eagle core script
  #       library, even when it is being used by native Tcl.  If necessary,
  #       prior to evaluating this file in native Tcl, its auto-path should
  #       be modified to include an "Eagle1.0" directory (i.e. a directory
  #       containing the Eagle core script library files "auxiliary.eagle",
  #       "file1.eagle", and "platform.eagle").
  #
  package require Eagle.Platform
  package require Eagle.Auxiliary
  package require Eagle.File

  #
  # NOTE: This block is intended to be evaluated successfully by native
  #       Tcl only.
  #
  if {[info exists pkgr_path]} then {
    catch {
      ::Eagle::exportAndImportPackageCommands ::Eagle \
          [list appendArgs getDictionaryValue isEagle \
          isWindows readFile writeFile] false false
    }

    unset -nocomplain pkgr_path
  }

  #
  # NOTE: This procedure returns a formatted, possibly version-specific,
  #       package name, for use in logging.
  #
  proc formatPackageName { package version } {