Re: How to set path as a variable
Posted by
Christopher Fuhrman-4 on
Jun 28, 2020; 3:47pm
URL: https://forum.world.st/How-to-set-path-as-a-variable-tp5119096p5119102.html
Then you can add your directory to it (note that I put a semicolon for path separator in Windows):
modifiedPath := 'D:\DEV_FreeCAD\build\bin\;' + path.
My apologies (I have been coding too much JavaScript lately) - this should have been:
modifiedPath := 'D:\DEV_FreeCAD\build\bin\;' , path.
Cheers,
On Sun, 28 Jun 2020 at 11:16, Christopher Fuhrman <
[hidden email]> wrote:
Hello,
You can get PATH by using:
path := OSEnvironment current getEnv: 'PATH'.
Then you can add your directory to it (note that I put a semicolon for path separator in Windows):
modifiedPath :=
'D:\DEV_FreeCAD\build\bin\;' + path.
Then you have to set the variable in the system:
result := OSEnvironment current setEnv: 'PATH' value: modifiedPath.
You should probably get (again) the variable PATH (as above) to make sure the path was set correctly.
Then just do:
result := LibC runCommand: 'makebox.step'.
Let us know if it works for you.
Cheers!
In pharo class side , i am creating class side method like as
/*makebox
LibC system: 'D:\DEV_FreeCAD\build\bin\makebox.step'*/
SO i want to set /D:\DEV_FreeCAD\build\bin\ / as a variable like path than i
can write like as
*LibC system: 'path\makebox.step'*
how to do that, if anyone have idea please share the idea with me.
Thanks for your help
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
--
Christopher Fuhrman, P.Eng., PhD
Professeur au Département de génie logiciel et des technologies de l'information
ÉTS (École de technologie supérieure)
--
Christopher Fuhrman, P.Eng., PhD
Professeur au Département de génie logiciel et des technologies de l'information
ÉTS (École de technologie supérieure)