Greetings
I'm developing my first ULP that needs to react differently depending on the
operating system.
What is considered the preferred method of determining the Operating System
from within a ULP?
Any advice appreciated.
Thanks
Warren
Greetings
I'm developing my first ULP that needs to react differently depending on the
operating system.
What is considered the preferred method of determining the Operating System
from within a ULP?
Any advice appreciated.
Thanks
Warren
"Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message
news:iudv2t$ucs$1@cheetah.cadsoft.de...
Greetings
I'm developing my first ULP that needs to react differently depending on
the
operating system.
What is considered the preferred method of determining the Operating
System
from within a ULP?
May I ask why you need to detect this? Depending on what you try to do,
there could be alternative solutions..
Morten Leikvoll wrote:
May I ask why you need to detect this? Depending on what you try to
do, there could be alternative solutions..
The need is to provide the correct formatting for the strings passed with
the system() ULP command and the formatting of batch files created by the
ULP and used by the OS script processors.
When the system() command is involved it appears to be most common (easier)
for a ULP to be crafted solely for use with Windows or Linux/Mac. I wish to
make a ULP that will work in both environments hence the formatting needs to
be appropriate for the OS in use.
Warren
"Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message
news:iuhjh9$8o3$1@cheetah.cadsoft.de...
Morten Leikvoll wrote:
>> May I ask why you need to detect this? Depending on what you try to
>> do, there could be alternative solutions..
>
The need is to provide the correct formatting for the strings passed with
the system() ULP command and the formatting of batch files created by the
ULP and used by the OS script processors.
When the system() command is involved it appears to be most common
(easier)
for a ULP to be crafted solely for use with Windows or Linux/Mac. I wish
to
make a ULP that will work in both environments hence the formatting needs
to
be appropriate for the OS in use.
So I guess a platform dependant batch file that takes the same arguments on
all platforms could sort the case?
I guess you can make linux autorun a xxx.bat file (not sure bout mac), and
windows can for sure.
I tried creating a file called test.bat on both (set the x flag on linux),
and I could run them both with "./test.bat" from shell's (I haven't got
linux eagle install, so you may want to try it)
Morten Leikvoll wrote:
"Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message
news:iuhjh9$8o3$1@cheetah.cadsoft.de...
>> Morten Leikvoll wrote:
>>
>>> May I ask why you need to detect this? Depending on what you try to
>>> do, there could be alternative solutions..
>>
>>
>> The need is to provide the correct formatting for the strings passed
>> with the system() ULP command and the formatting of batch files
>> created by the ULP and used by the OS script processors.
>> When the system() command is involved it appears to be most common
>> (easier)
>> for a ULP to be crafted solely for use with Windows or Linux/Mac. I
>> wish to
>> make a ULP that will work in both environments hence the formatting
>> needs to
>> be appropriate for the OS in use.
So I guess a platform dependant batch file that takes the same
arguments on all platforms could sort the case?
I guess you can make linux autorun a xxx.bat file (not sure bout
mac), and windows can for sure.
I tried creating a file called test.bat on both (set the x flag on
linux), and I could run them both with "./test.bat" from shell's (I
haven't got linux eagle install, so you may want to try it)
Thanks for the input Morten:
The thread has moved away from my request for methods to detect the
operating system from within a ULP.
Further ideas from those with expeience with achieving this would be
appreciated.
Warren
Morten Leikvoll wrote:
"Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message
news:iuhjh9$8o3$1@cheetah.cadsoft.de...
>> Morten Leikvoll wrote:
>>
>>> May I ask why you need to detect this? Depending on what you try to
>>> do, there could be alternative solutions..
>>
>>
>> The need is to provide the correct formatting for the strings passed
>> with the system() ULP command and the formatting of batch files
>> created by the ULP and used by the OS script processors.
>> When the system() command is involved it appears to be most common
>> (easier)
>> for a ULP to be crafted solely for use with Windows or Linux/Mac. I
>> wish to
>> make a ULP that will work in both environments hence the formatting
>> needs to
>> be appropriate for the OS in use.
So I guess a platform dependant batch file that takes the same
arguments on all platforms could sort the case?
I guess you can make linux autorun a xxx.bat file (not sure bout
mac), and windows can for sure.
I tried creating a file called test.bat on both (set the x flag on
linux), and I could run them both with "./test.bat" from shell's (I
haven't got linux eagle install, so you may want to try it)
Thanks for the input Morten:
The thread has moved away from my request for methods to detect the
operating system from within a ULP.
Further ideas from those with expeience with achieving this would be
appreciated.
Warren
"Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote:
Morten Leikvoll wrote:
>> "Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message
>> news:iuhjh9$8o3$1@cheetah.cadsoft.de...
>>> Morten Leikvoll wrote:
>>>
>>>> May I ask why you need to detect this? Depending on what you try to
>>>> do, there could be alternative solutions..
>>>
>>>
>>> The need is to provide the correct formatting for the strings passed
>>> with the system() ULP command and the formatting of batch files
>>> created by the ULP and used by the OS script processors.
>>> When the system() command is involved it appears to be most common
>>> (easier)
>>> for a ULP to be crafted solely for use with Windows or Linux/Mac. I
>>> wish to
>>> make a ULP that will work in both environments hence the formatting
>>> needs to
>>> be appropriate for the OS in use.
>>
>> So I guess a platform dependant batch file that takes the same
>> arguments on all platforms could sort the case?
>> I guess you can make linux autorun a xxx.bat file (not sure bout
>> mac), and windows can for sure.
>> I tried creating a file called test.bat on both (set the x flag on
>> linux), and I could run them both with "./test.bat" from shell's (I
>> haven't got linux eagle install, so you may want to try it)
Thanks for the input Morten:
The thread has moved away from my request for methods to detect the
operating system from within a ULP.
Further ideas from those with expeience with achieving this would be
appreciated.
Yea I know I branced off the main topic, but when I thought about it a
couple of times I lean to that the optimal place to do it is outside eagle.
Sounds cleanest to me in any case.