Forum > Operating Systems

Required packages depending on the OS

(1/2) > >>

MaxM74:
I am developing a cross platform Windows/Linux desktop application.

When the application is compiled for Windows it will use some specific packages, when it is compiled for Linux it will use others.

The question is...is there a way to  {$ifdef} required packages depending on the OS ?.

cdbc:
Hi

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$ifdef unix}   unix-dependencies {$else}  windows-dependencies {$endif}Should roughly do it, as Mac belongs under unix...
Regards Benny

PascalDragon:

--- Quote from: cdbc on November 04, 2024, 01:24:17 pm ---Should roughly do it, as Mac belongs under unix...

--- End quote ---

Please note that MaxM74 is talking about packages, not units.

cdbc:
Hi
Ooopsss, sorry - my bad, that escaped me...  :-[
Thanks Sven
Regards Benny

dbannon:

--- Quote from: MaxM74 on November 04, 2024, 12:36:17 pm ---The question is...is there a way to  {$ifdef} required packages depending on the OS ?.

--- End quote ---

If you are cross compiling from one machine, then you will need to have all the required packages installed. Each compile run will (given sensible uses of Benny's instructions) will not even know about the ones it does not need.

If you are compiling on different platforms, obviously you only install packages needed for that install. Again, Benny's answer may well be that answer you are looking for.

Davo

Navigation

[0] Message Index

[#] Next page

Go to full version