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
Hello, Why not use the PATH environment variable in Windows to do what you want? I deal with setting variables used with LibC in my blog entry at https://fuhrmanator.github.io/2019/03/16/LibC-Pharo-experiments.html 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! On Sun, 28 Jun 2020 at 09:03, shawon58 <shawonhoque58@gmail.com> wrote:
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)* http://profs.etsmtl.ca/cfuhrman +1 514 396 8638 *L'ÃTS est une constituante de l'Université du Québec*
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 < christopher.fuhrman@etsmtl.ca> wrote:
Hello,
Why not use the PATH environment variable in Windows to do what you want? I deal with setting variables used with LibC in my blog entry at https://fuhrmanator.github.io/2019/03/16/LibC-Pharo-experiments.html
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!
On Sun, 28 Jun 2020 at 09:03, shawon58 <shawonhoque58@gmail.com> wrote:
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)*
http://profs.etsmtl.ca/cfuhrman +1 514 396 8638 *L'ÃTS est une constituante de l'Université du Québec*
-- 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)* http://profs.etsmtl.ca/cfuhrman +1 514 396 8638 *L'ÃTS est une constituante de l'Université du Québec*
That is useful to know the PATH variable can be updated for current process. Nice blog writeup. Thanks Chris. cheers -ben On Sun, 28 Jun 2020 at 23:49, Christopher Fuhrman < christopher.fuhrman@etsmtl.ca> wrote:
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 < christopher.fuhrman@etsmtl.ca> wrote:
Hello,
Why not use the PATH environment variable in Windows to do what you want? I deal with setting variables used with LibC in my blog entry at https://fuhrmanator.github.io/2019/03/16/LibC-Pharo-experiments.html
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!
On Sun, 28 Jun 2020 at 09:03, shawon58 <shawonhoque58@gmail.com> wrote:
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)*
http://profs.etsmtl.ca/cfuhrman +1 514 396 8638 *L'ÃTS est une constituante de l'Université du Québec*
-- 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)*
http://profs.etsmtl.ca/cfuhrman +1 514 396 8638 *L'ÃTS est une constituante de l'Université du Québec*
participants (3)
-
Ben Coman -
Christopher Fuhrman -
shawon58