[Gambas-user] Gambas script gbs Application.Path Args[0]

Benoît Minisini g4mba5 at gmail.com
Mon Nov 2 21:43:30 CET 2020


Le 02/11/2020 à 19:58, Tobias Boege a écrit :
> 
> Maybe this commit is a better solution:
> 
>    https://gitlab.com/gambas/gambas/-/merge_requests/161
> 
> I'm still unsure if I understood what problem is actually intended to be
> solved here. My understanding is that you have a script /a/b/c.gbs3 and
> *besides it* some resource file, /a/b/icon.png or so. Now you want to be
> able to refer to the icon.png from the script? With the above commit,
> you can do that using
> 
>    File.Load(".public/icon.png")
> 
> The commit adds a symlink .public/ to the generated project directory
> which points at the directory where the script file is located (/a/b/
> in the above example). The name was chosen in analogy to the .public
> subdirectory for assets in gb.web.form projects.
> 
> Regards,
> Tobias
> 

This is clever, but I'm not sure it's a good solution, because 
"logically" the project "owns" the what is inside the ".public" 
directory, whereas we can't be sure of the status of all the files that 
are located in the same directory than the script.

Regards,

-- 
Benoît Minisini


More information about the User mailing list