[Gambas-user] how to detect run ide in macox or other os? in linux uses proc!

PICCORO McKAY Lenz mckaygerhard at gmail.com
Tue Jun 26 21:29:43 CEST 2018


oh well with a exec works if are at les running from ide.. thanks,

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2018-06-26 15:12 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:

> See "exec".
> http://gambaswiki.org/wiki/lang/.if
>
>
> Jussi
>
> On Tue, Jun 26, 2018 at 10:06 PM, PICCORO McKAY Lenz <
> mckaygerhard at gmail.com> wrote:
>
>> i dont know if are always correct and works for linux as for mac/freebsd
>> ???? >
>>
>>     strProcess = File.Load("/proc" &/ CStr(Application.Id) &/ "comm")
>>     If Left(strProcess, 4) = "gbx3" Then
>>         print "running from ide, using own internal project files"
>>     Else
>>         print "running as standalone app, use files from system"
>>     Endif
>>
>>
>> Lenz McKAY Gerardo (PICCORO)
>> http://qgqlochekone.blogspot.com
>>
>> 2018-06-21 8:39 GMT-04:00 PICCORO McKAY Lenz <mckaygerhard at gmail.com>:
>>
>>> tyhe difference its that when run from ide are running from a user, i
>>> had been made a deamon manager in pieces.. i need to detect if are running
>>> from ide without any setup from developer, like java profiles does!
>>>
>>> Lenz McKAY Gerardo (PICCORO)
>>> http://qgqlochekone.blogspot.com
>>>
>>> 2018-06-20 18:03 GMT-04:00 Benoît Minisini <g4mba5 at gmail.com>:
>>>
>>>> Le 20/06/2018 à 23:42, PICCORO McKAY Lenz a écrit :
>>>>
>>>>> i have this code to detect if gambas runs at ide the current project
>>>>> or the project are compiled and runs by own:
>>>>>
>>>>>      strProcess = File.Load("/proc" &/ CStr(Application.Id) &/ "comm")
>>>>>      If Left(strProcess, 4) = "gbx3" Then
>>>>>          Return -1
>>>>>      Else
>>>>>          Return 0
>>>>>      Endif
>>>>>
>>>>> BUT THIS WILL WORK AT THE MACOSX TOO? how can i detect in any
>>>>> OS/environment if my program runs at ide or not?
>>>>>
>>>>>
>>>>> Lenz McKAY Gerardo (PICCORO)
>>>>> http://qgqlochekone.blogspot.com
>>>>>
>>>>>
>>>>>
>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>> ]----
>>>>>
>>>>>
>>>> You should not need to know if you are running a project from the IDE
>>>> or not.
>>>>
>>>> Even if it is not true, you should not see any difference between
>>>> running from the IDE or not, and any program should not rely on any
>>>> possible difference.
>>>>
>>>> --
>>>> Benoît Minisini
>>>>
>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>> ]----
>>>>
>>>
>>>
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180626/39d7b658/attachment.html>


More information about the User mailing list