[Lazarus] Determining OS

ik idokan at gmail.com
Sun Jul 31 16:21:58 CEST 2011


2011/7/31 Chris Kelling <kellingc at cox.net>

>  I’m writing a generic installer for a project, and want to set up things
> like the registry or system.d depending on the OS type.  Is there an
> environment string, or a function to report what OS the system being hosted
> on, or do I need to write different versions specifically for the OS?
>

you have the macros of WINDOWS, UNIX, LINUX etc... {$IFDEF WINDOWS} ...

Please note that system.d is Fedora implementation (v15) so for Linux you
need to detect also the Linux distro, and that's a bit more complicated.

/etc/issue Can help, but also /etc/redhat /etc/debian etc.. can also help
you to figure out what distro it is, but that will work only on specific
distro's as well.




> ****
>
> ** **
>
> -Chris
>

Ido


> ****
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110731/3bfd5012/attachment-0003.html>


More information about the Lazarus mailing list