Changeset 0f71b65 in tol


Ignore:
Timestamp:
Nov 25, 2016, 9:34:48 AM (10 years ago)
Author:
Pedro Gea <pgea@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
0bf09a4
Parents:
f738c05
Message:

Refs #1933
Se revisa el archivo init_toltk.tcl y se soluciona el arranque de tolbase desde otro directorio cambiando el 'current directory'.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@7357 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tolbase/lib/toltk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tolbase/lib/toltk/editor.tcl

    rf738c05 r0f71b65  
    578578  $me add command -label [mc "Select all"] -accelerator CTRL+E \
    579579                  -command [list ::Editor::CmdSelectAll $this]
    580  
    581   #CVS Utilities
    582   #$m add separator
    583   #set mc [menu $f.m.cvs -tearoff 0]
    584   #$m add cascade -label [mc "CVS Utilities"] -menu $mc
    585   #$mc add command -label [mc "TkCVS"] \
    586   #                -command [list ::Editor::CmdTkcvs $this 0]
    587   #$mc add command -label [mc "TkDiff"] \
    588   #                -command [list ::Editor::CmdTkcvs $this  1]
    589  
    590580
    591581  bind $data(txt,ctext) <Button-3>  "tk_popup $m %X %Y"
    … …  
    12691259
    12701260#/////////////////////////////////////////////////////////////////////////////
    1271   proc ::Editor::CmdTkcvs { this mode} {
    1272 #
    1273 # PURPOSE: Execute CVS utilities
    1274 #
    1275 # PARAMETERS:
    1276 #   this -> Instance of editor
    1277 #   mode -> type of execution (0 -> tkCvs, 1 -> tkdiff)
    1278 #
    1279 #/////////////////////////////////////////////////////////////////////////////
    1280   global toltk_bin
    1281   global tkcvs_library
    1282  
    1283   variable options
    1284   upvar \#0 ${this}::data data
    1285  
    1286   if {$mode == 0} {
    1287     set cmd "[file join $toltk_bin wish84.exe] [file join $tkcvs_library tkcvs.tcl]"
    1288     #exec c:/TclTk/bin/wish84.exe c:/TclTk/bin/tkcvs.tcl -dir $options(lastDir) &
    1289     exec $cmd -dir $options(lastDir) &
    1290   } else {
    1291     set cmd "[file join $toltk_bin wish84.exe] [file join $tkcvs_library tkdiff.tcl]"
    1292     #exec c:/TclTk/bin/wish84.exe c:/TclTk/bin/tkdiff.tcl $data(nameFile) &
    1293     exec $cmd $data(nameFile) &
    1294   }
    1295 
    1296  
    1297 }
    1298 
    1299 #/////////////////////////////////////////////////////////////////////////////
    13001261# Comandos de edición (deshacer, cortar, copiar, pegar, buscar, remplazar,...)
    13011262#/////////////////////////////////////////////////////////////////////////////
  • tolbase/lib/toltk/init_toltk.tcl

    rf738c05 r0f71b65  
    1111package require Tk
    1212
     13# trace: muestra (o no) la ventana de trazas de TOL
    1314set trace 0
    14 #/////////////////////////////////////////////////////////////////////////////
    15   proc Tolcon_Trace { msg {tags ""} {args ""} } {
     15
     16#/////////////////////////////////////////////////////////////////////////////
     17proc Tolcon_Trace { msg {tags ""} {args ""} } {
    1618#
    1719# PURPOSE: Writes a trace message in a toplevel window. It's used for
    … …  
    5456}
    5557
     58#/////////////////////////////////////////////////////////////////////////////
    5659proc TraceMainGeometry { msg } {
     60#/////////////////////////////////////////////////////////////////////////////
    5761  puts "== $msg == wm geometry . == [wm geometry .]"
    5862  puts "== $msg == winfo geometry . == [winfo geometry .]"
    … …  
    6064
    6165#/////////////////////////////////////////////////////////////////////////////
    62   proc LoadPackages {} {
     66proc LoadPackages {} {
    6367#
    6468# PURPOSE: Load packages
    … …  
    8387
    8488#/////////////////////////////////////////////////////////////////////////////
    85  proc OpenAssocFile {file {run 0} {inc 0}} {
     89proc OpenAssocFile {file {run 0} {inc 0}} {
    8690#/////////////////////////////////////////////////////////////////////////////
    8791  switch [string toupper [file extension $file]] {
    … …  
    127131}
    128132
    129 
    130 #/////////////////////////////////////////////////////////////////////////////
    131   proc loadInfoProjects { prjini } {
     133#/////////////////////////////////////////////////////////////////////////////
     134proc loadInfoProjects { prjini } {
    132135#
    133136# PURPOSE: Loads in a list the name and paths of each project to load
    … …  
    228231}
    229232
     233#/////////////////////////////////////////////////////////////////////////////
     234# Main
     235# Secuencia de instrucciones para la carga de tolbase
     236#
     237
    230238if {[info exist ::env(DEBUG_TOLTCL)] && $::env(DEBUG_TOLTCL) eq "yes"} {
    231239  set tt_debug "d" 
    … …  
    233241  set tt_debug "" 
    234242}
    235 
    236243
    237244set info_script [info script]
    … …  
    255262}
    256263
     264if { [string equal $tcl_platform(platform) "windows"] } {
     265  #@ Cambia el 'current directory' al bin de tol para evitar problemas en la carga
     266  set tolBin [file normalize [file join [file dir [info script]] .. .. .. bin]]
     267  cd $tolBin
     268}
     269
    257270if { ![info exists toltk_library] } {
    258271  set toltk_library [file normalize [file join $toltk_script_path ..]]
    259272}
    260 
    261 if { ![info exists toltk_bin] } {
    262   set toltk_bin [file normalize [file join $toltk_library ../bin]]
    263 }
    264 
    265273if {[lsearch $auto_path $toltk_library] == -1} {
    266274  set auto_path [linsert $auto_path 0 $toltk_library]
    267275}
    268276
    269 if { ![info exists rbc_libPath] } {
    270   set rbc_libPath [file join $toltk_library rbc]
    271 }
    272 
    273 if { ![info exists env(RBC_LIBRARY)] } {
    274   set env(RBC_LIBRARY) [file join $toltk_library rbc]
    275 }
    276 
    277 if { ![info exists tkTable_libPath] } {
    278   set tkTable_libPath [file join $toltk_library Tktable]
    279   set env(TK_TABLE_LIBRARY) [file join $toltk_library Tktable]
    280 }
    281 
    282 if { ![info exists byswidget_library] } {
    283   set byswidget_library [file normalize [file join $toltk_script_path byswidget]]
    284 }
    285 # NOTE: necessary for TkCVS
    286 if { ![info exists tkcvs_library] } {
    287   set tkcvs_library [file normalize [file join $toltk_script_path tkcvs]]
    288 }
    289 
    290 if {[lsearch $auto_path $toltk_library] == -1} {
    291   set auto_path [linsert $auto_path end $byswidget_library]
    292 }
    293277
    294278# Load project
    … …  
    434418
    435419#::TolConsole::ODBCShow
     420
     421#/////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.