diff --git a/debian/changelog b/debian/changelog index 85acda2..5dc3a15 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +projman (2.1.0-alpha0) stable; urgency=medium + + * Добавил вывод информации о версиях tcl и tk + * Добавил вывод номера версии tcl/tl в О Программе + + -- Sergey Kalinin Mon, 10 Nov 2025 13:13:44 +0300 + projman (2.1.0-alpha0) stable; urgency=medium * Незначительные изменения @@ -401,3 +408,4 @@ projman (2.0.0-alfa0) stable; urgency=medium + diff --git a/lib/config.tcl b/lib/config.tcl index 88753cc..4d8a42b 100644 --- a/lib/config.tcl +++ b/lib/config.tcl @@ -65,6 +65,16 @@ multilineComments=true opened= editedFiles= recentFolder= +\[Executor\] +TCL=tclsh +GO=go +PY=python3 +SH=bash +PL=perl +RB=ruby +HTM=firefox +HTML=firefox +LUA=lua " proc Config::create {dir} { set cfgFile [open [file join $dir projman.ini] "w+"] diff --git a/lib/editor.tcl b/lib/editor.tcl index cfa315c..d8e3630 100644 --- a/lib/editor.tcl +++ b/lib/editor.tcl @@ -1546,6 +1546,8 @@ namespace eval Editor { } set fileType [string toupper [string trimleft [file extension $fileFullPath] "."]] if {$fileType eq ""} {set fileType "Unknown"} + + ExecutorCommandPathSetting $fileType ttk::frame $fr.header set lblName "lbl[string range $itemName [expr [string last "." $itemName] +1] end]" diff --git a/lib/procedure.tcl b/lib/procedure.tcl index ee6ea5e..6833562 100644 --- a/lib/procedure.tcl +++ b/lib/procedure.tcl @@ -873,6 +873,16 @@ proc Execute {filePath w activeEditor} { set pos [$w.frame.text index insert] set lineNum [lindex [split $pos "."] 0] $w.frame.text insert 0.0 "======================================================================================\n" + + # Added executor from config + set fileType [string toupper [string trimleft [file extension $filePath] "."]] + if {[info exists cfgVariables(fileType)] == 0} { + $w.frame.text insert end "$cfgVariables($fileType) " + } + unset fileType + # $w.frame.text insert end [string toupper [string trimleft [file extension $filePath] "."]] + # $w.frame.text insert end cfgVariables($fileType) + $w.frame.text tag add bold $lineNum.0 $lineNum.end Highlight::ExecuteColorized $w.frame.text # focus -force $w.frame.text @@ -979,3 +989,34 @@ proc Settings {} { FileOper::Edit [file join $dir(cfg) projman.ini] # Config::read $dir(cfg) } + +# Определяем пути до программ для запуска исходников +proc ExecutorCommandPathSetting {fileType} { + global cfgVariables tcl_platform + # puts $cfgVariables($fileType) + if {[info exists cfgVariables($fileType)] == 1 && $cfgVariables($fileType) ne ""} { + if {$tcl_platform(platform) eq "windows"} { + set cmd "where $cfgVariables($fileType)" + } else { + set cmd "which $cfgVariables($fileType)" + } + puts "ExecutorCommandPathSetting $fileType" + puts [catch {exec {*}$cmd} executor_path] + puts "executor_path $executor_path" + if {[catch {exec {*}$cmd} executor_path]} { + puts "Программа $cfgVariables($fileType) для выполнения файлов $fileType не найдена в системе" + set cfgVariables($fileType) "" + return + } + set full_path [string trim $executor_path] + set first_path [lindex [split $executor_path "\n"] 0] + + # puts "Git найден: $first_path" + set cfgVariables($fileType) $first_path + puts "first_path $first_path" + } + if {[info exists cfgVariables($fileType)] == 0} { + set cfgVariables($fileType) "" + puts $cfgVariables($fileType) + } +} diff --git a/projman.tcl b/projman.tcl index 4666d95..fe5e888 100755 --- a/projman.tcl +++ b/projman.tcl @@ -10,7 +10,7 @@ exec wish9.0 "$0" -- "$@" ###################################################### # Version: 2.1.0 # Release: alpha0 -# Build: 10112025130218 +# Build: 10112025132121 ###################################################### # определим текущую версию, релиз и т.д.