# HG changeset patch
# User Patrik Svestka <patrik.svestka@gmail.com>
# Date 1502882588 -7200
# Wed Aug 16 13:23:08 2017 +0200
# Branch jv
# Node ID f2cc9556e7e545a2233463aac23f5ed6eecd2f99
# Parent 97b3ca922cb1beaeeff4829fc07aa54ca2d68dce
Issue: #172 StX fails to start on Windows when launcher script is run from different directory
Version: 1.5.1
The patch addresses missing configuration path. Only the configuration file (*.cfg) was talken without any path.
Worked as the smalltalk.bat is in the same directory, but if executed outside the directory it stopped working.
diff -r 97b3ca922cb1 -r f2cc9556e7e5 smalltalk.bat
a
|
b
|
|
53 | 53 | :: Versions = |
54 | 54 | :: ========== |
55 | 55 | :: This script |
56 | | SET batch_script_version=1.5.0 |
| 56 | SET batch_script_version=1.5.1 |
57 | 57 | :: Smalltalk/X |
58 | 58 | SET stx_version=6.2.6 |
59 | 59 | |
… |
… |
|
147 | 147 | :: The reason is that it is before the validation process |
148 | 148 | SET "configuration_file_path=%~dp0" |
149 | 149 | SET "configuration_file=smalltalk.cfg" |
150 | | IF NOT EXIST !configuration_file_path!!configuration_file! ( |
| 150 | SET "configuration_file_with_path=!configuration_file_path!!configuration_file!" |
| 151 | IF NOT EXIST !configuration_file_with_path! ( |
151 | 152 | SET "message="Smalltalk configuration file: !configuration_file! not found. Fix it."" |
152 | 153 | SET __numeric.exit_value=1 |
153 | 154 | CALL :exit_sequence !message! |
… |
… |
|
156 | 157 | |
157 | 158 | :: EOL stops comments from being parsed |
158 | 159 | :: otherwise split lines at the = char into two tokens |
159 | | FOR /F "EOL=# delims== tokens=1,*" %%A IN (!configuration_file!) DO ( |
| 160 | FOR /F "EOL=# delims== tokens=1,*" %%A IN (!configuration_file_with_path!) DO ( |
160 | 161 | REM proper lines have both a and b set |
161 | 162 | REM if okay, assign property to some kind of namespace |
162 | 163 | REM so some.property becomes test.some.property in batch-land |