Skip to content

Commit ccbd79e

Browse files
changed some cofniguration in properties
1 parent fe403b3 commit ccbd79e

5 files changed

Lines changed: 22 additions & 13 deletions

File tree

kratos.gid/exec/compiled.win.bat

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ REM ErrorFile: "%2\%1.err"
1010
DEL "%2\%1.info"
1111
DEL "%2\%1.err"
1212

13-
set PATH=%run_kratos_exe%;%run_kratos_exe%\\libs;%PATH%
13+
set PATH=%kratos_bin_path%\\libs;%PATH%
14+
set PYTHONPATH=%kratos_bin_path%
1415

1516
REM Run Python using the script MainKratos.py
16-
%run_kratos_exe%\\runkratos .\MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"
17+
python .\MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"

kratos.gid/scripts/Controllers/Preferences.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
<option value='1' label='1'/>
1919
<option value='2' label='2'/>
2020
</combobox>
21-
<entrywithbutton name="debug_folder" label="Debug path" variable="debug_folder" buttonimage="folder.png" variablemanager='Kratos::ManagePreferences' buttonfunction="OpenBrowserForDirectory" help='Path to the kratos debug folder. This is placed in the launch.json file for debugging' />
21+
<entrywithbutton name="debug_folder" label="Debug path" variable="debug_folder" buttonimage="folder.png" variablemanager='Kratos::ManagePreferences' buttonfunction="OpenBrowserForDirectoryDebug" help='Path to the kratos debug folder. This is placed in the launch.json file for debugging' />
2222
<comboboxframe name="launch_configuration" label="Launch configuration" variable="launch_configuration" variablemanager='Kratos::ManagePreferences' help='' >
2323
<option value='Launch via pip on GiDs python' label='Launch via pip on GiDs python'/>
2424
<option value='Launch via pip' label='Launch via pip' setactivate="python_path"/>
25-
<option value='Launch local compiled version' label='Launch local compiled version' setactivate="runkratos_path"/>
25+
<option value='Launch local compiled version' label='Launch local compiled version' setactivate="python_path kratos_bin_path"/>
2626
<option value='Docker' label='Docker' setactivate="docker_image" />
27-
<entrywithbutton name="python_path" variable="python_path" label="Python path (exe)" variablemanager='Kratos::ManagePreferences' help='Path to python.exe' buttonimage="folder.png" buttonfunction="GetPythonPath"/>
28-
<entrywithbutton name="runkratos_path" variable="runkratos_path" label="Kratos path (exe)" variablemanager='Kratos::ManagePreferences' help='Path to runkratos.exe' buttonimage="folder.png" buttonfunction="OpenBrowserForDirectory"/>
27+
<entrywithbutton name="python_path" variable="python_path" label="Python path (exe)" variablemanager='Kratos::ManagePreferences' help='Path to python.exe' buttonimage="folder.png" buttonfunction="OpenBrowserForDirectoryPython"/>
28+
<entrywithbutton name="kratos_bin_path" variable="kratos_bin_path" label="Kratos path (bin)" variablemanager='Kratos::ManagePreferences' help='Path to your compiled kratos folder' buttonimage="folder.png" buttonfunction="OpenBrowserForDirectoryKratos"/>
2929
<entry name="docker_image" variable="docker_image" label="Docker image" variablemanager='Kratos::ManagePreferences' help='Name of the Kratos Docker image'/>
3030
</comboboxframe>
3131
</labelframe>

kratos.gid/scripts/Controllers/PreferencesWindow.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ proc Kratos::ManagePreferences { cmd name {value ""}} {
3939
set ret "fjgarate/kratos-run"
4040
}
4141
"python_path" {
42-
set ret [Kratos::GetDefaultPythonPath]
42+
set ret [Kratos::GetDefaultPythonPath]
4343
}
44-
"runkratos_path" {
44+
"kratos_bin_path" {
4545
set ret [file join $::Kratos::kratos_private(Path) exec kratos runkratos.exe]
4646
}
4747
default {

kratos.gid/scripts/Launch.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ proc Kratos::ExecuteLaunchByMode {launch_mode} {
288288
set docker_image [Kratos::ManagePreferences GetValue docker_image]
289289
set ::env(kratos_docker_image) $docker_image
290290
} elseif {[dict get $mode name] eq {Launch local compiled version}} {
291-
set runkratos_path [Kratos::ManagePreferences GetValue runkratos_path]
292-
set ::env(runkratos_path) $runkratos_path
291+
set kratos_bin_path [Kratos::ManagePreferences GetValue kratos_bin_path]
292+
set ::env(kratos_bin_path) $kratos_bin_path
293293
} else {
294294
set python_exe_path [Kratos::ManagePreferences GetValue python_path]
295295
set ::env(kratos_python_exe) $python_exe_path

kratos.gid/scripts/Utils.tcl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ proc Kratos::RegisterEnvironment { } {
152152
#do not save preferences starting with flag gid.exe -c (that specify read only an alternative file)
153153
if { [GiD_Set SaveGidDefaults] } {
154154
variable kratos_private
155-
set vars_to_save [list DevMode echo_level mdpa_format debug_folder allow_logs launch_configuration python_path runkratos_path docker_image]
155+
set vars_to_save [list DevMode echo_level mdpa_format debug_folder allow_logs launch_configuration python_path kratos_bin_path docker_image]
156156
set preferences [dict create]
157157
foreach v $vars_to_save {
158158
if {[info exists kratos_private($v)]} {
@@ -310,8 +310,16 @@ proc Kratos::OpenCaseIn {program} {
310310
}
311311

312312
if { ![GidUtils::IsTkDisabled] } {
313-
proc xmlprograms::OpenBrowserForDirectory { baseframe variable} {
314-
set $variable [MessageBoxGetFilename directory write [_ "Select kratos debug compiled folder (kratos / bin / debug"]]
313+
proc xmlprograms::OpenBrowserForDirectoryDebug { baseframe variable} {
314+
set $variable [MessageBoxGetFilename directory write [_ "Select kratos debug compiled folder (kratos / bin / debug)"]]
315+
return variable
316+
}
317+
proc xmlprograms::OpenBrowserForDirectoryPython { baseframe variable} {
318+
set $variable [MessageBoxGetFilename directory write [_ "Select python installation folder (python path, where python3.exe is)"]]
319+
return variable
320+
}
321+
proc xmlprograms::OpenBrowserForDirectoryKratos { baseframe variable} {
322+
set $variable [MessageBoxGetFilename directory write [_ "Select kratos compiled folder (kratos / bin / (release | debug))"]]
315323
return variable
316324
}
317325
}

0 commit comments

Comments
 (0)