[Gambas-user] External library location

Gianluigi bagonergi at gmail.com
Wed Sep 5 12:47:41 CEST 2018


Il giorno mer 5 set 2018 alle ore 11:49 Hans Lehmann <hans at gambas-buch.de>
ha scritto:

> Hello,
>
> that's exactly how it is. For example, if you want to run a bash script
> after starting the runscript.gambas executable, you will get an error
> because all files in the project archive are read-only.
>
>
>
> That would be a proven way out:
>
> ' Gambas class file
>
> Public sScriptPath As String
> Public sTempScriptPath As String
>
> Public Sub Form_Open()
>
>   sScriptPath = "./data/test_script.sh"
>   sTempScriptPath = Temp(File.BaseName(sScriptPath))
>
>   Copy sScriptPath To sTempScriptPath
>   Chmod sTempScriptPath To "r-xr-xr-x"
>
> End
>
> Public Sub btnRunScript_Click()
>
>   Dim sStore As String
>
>   txaResult.Clear()
>   Shell sTempScriptPath To sStore
>   txaResult.Text = sStore
>
> End
>
> This way might also be the right one for a library.
>
> Regards,
>
> Hans
> www.gambas-book.net
>
>
>

Hi Hans,
the attached code, it works well for me.

Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180905/24e9d8b5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rs.png
Type: image/png
Size: 24481 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180905/24e9d8b5/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rs.png
Type: image/png
Size: 24481 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180905/24e9d8b5/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LibC-Test-1-0.0.1.tar.gz
Type: application/gzip
Size: 13377 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180905/24e9d8b5/attachment-0001.gz>


More information about the User mailing list