Diff
Not logged in

Differences From Artifact [add89ee63b]:

To Artifact [f28836aeaf]:


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

  #
  # NOTE: This block is intended to be evaluated successfully by native
  #       Tcl only.
  #
  catch {
    ::Eagle::exportAndImportPackageCommands ::Eagle [list \
        appendArgs getDictionaryValue isEagle readFile writeFile] \
        false false
  }

  #
  # NOTE: This procedure returns a formatted, possibly version-specific,
  #       package name, for use in logging.
  #
  proc formatPackageName { package version } {







|
|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

  #
  # 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 } {
1063
1064
1065
1066
1067
1068
1069




1070
1071
1072
1073
1074
1075
1076
1077




1078
1079
1080
1081
1082
1083
1084
1085




1086
1087
1088
1089
1090
1091
1092
  #       Eagle.  It may install the [package unknown] hook.
  #
  proc setupPackageUnknownHandler {} {
    variable autoHook
    variable autoLoadTcl
    variable autoRequireGaruda





    if {$autoRequireGaruda && ![isEagle]} then {
      #
      # TODO: Assume this package is trusted?  How can we verify it
      #       at this point?
      #
      package require Garuda
    }





    if {$autoLoadTcl && [isEagle]} then {
      #
      # NOTE: Load a native Tcl library.  It must be signed with a valid
      #       Authenticode signature.
      #
      tcl load -findflags +TrustedOnly -loadflags +SetDllDirectory
    }





    if {$autoHook && ![isPackageUnknownHandlerHooked]} then {
      #
      # NOTE: Install our [package unknown] handler and save the original
      #       one for our use as well.
      #
      hookPackageUnknownHandler
    }







>
>
>
>
|







>
>
>
>








>
>
>
>







1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
  #       Eagle.  It may install the [package unknown] hook.
  #
  proc setupPackageUnknownHandler {} {
    variable autoHook
    variable autoLoadTcl
    variable autoRequireGaruda

    #
    # NOTE: Should we attempt to automatically load the Garuda package for
    #       native Tcl?
    #
    if {$autoRequireGaruda && ![isEagle] && [isWindows]} then {
      #
      # TODO: Assume this package is trusted?  How can we verify it
      #       at this point?
      #
      package require Garuda
    }

    #
    # NOTE: Should we attempt to automatically load a native Tcl library
    #       for Eagle?
    #
    if {$autoLoadTcl && [isEagle]} then {
      #
      # NOTE: Load a native Tcl library.  It must be signed with a valid
      #       Authenticode signature.
      #
      tcl load -findflags +TrustedOnly -loadflags +SetDllDirectory
    }

    #
    # NOTE: Should we attempt to hook the [package unknown] handler.  This
    #       is done for both native Tcl and Eagle.
    #
    if {$autoHook && ![isPackageUnknownHandlerHooked]} then {
      #
      # NOTE: Install our [package unknown] handler and save the original
      #       one for our use as well.
      #
      hookPackageUnknownHandler
    }
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291





1292



1293
1294
1295
1296
1297
1298
1299
1300
1301





1302



1303
1304
1305
1306
1307
1308
1309
      set autoHook true
    }

    #
    # NOTE: Automatically [tcl load] when this package is loaded from the
    #       Eagle language?
    #
    variable autoLoadTcl; # DEFAULT: true

    if {![info exists autoLoadTcl]} then {





      set autoLoadTcl true



    }

    #
    # NOTE: Automatically [package require Garuda] when this package is
    #       loaded from the Tcl language?
    #
    variable autoRequireGaruda; # DEFAULT: true

    if {![info exists autoRequireGaruda]} then {





      set autoRequireGaruda true



    }

    #
    # NOTE: The command to use when verifying OpenPGP signatures for the
    #       downloaded package scripts.
    #
    variable pgpCommand; # DEFAULT: gpg2 --verify {${fileName}}







|


>
>
>
>
>
|
>
>
>






|


>
>
>
>
>
|
>
>
>







1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
      set autoHook true
    }

    #
    # NOTE: Automatically [tcl load] when this package is loaded from the
    #       Eagle language?
    #
    variable autoLoadTcl; # DEFAULT: <automatic>

    if {![info exists autoLoadTcl]} then {
      #
      # TODO: Better automatic detection of native Tcl installs here?
      #
      if {[isEagle] && \
          [catch {tcl select -architecture}] == 0} then {
        set autoLoadTcl true
      } else {
        set autoLoadTcl false
      }
    }

    #
    # NOTE: Automatically [package require Garuda] when this package is
    #       loaded from the Tcl language?
    #
    variable autoRequireGaruda; # DEFAULT: <automatic>

    if {![info exists autoRequireGaruda]} then {
      #
      # TODO: Better automatic detection of Garuda here?
      #
      if {![isEagle] && \
          [llength [package versions Garuda]] > 0} then {
        set autoRequireGaruda true
      } else {
        set autoRequireGaruda false
      }
    }

    #
    # NOTE: The command to use when verifying OpenPGP signatures for the
    #       downloaded package scripts.
    #
    variable pgpCommand; # DEFAULT: gpg2 --verify {${fileName}}