Project inspector - OS specific packages lazarus / 62-General ---------------------------------------------------------------------- TheLastCayen · 2019-11-08 22:41 Hi I am using:  - Lazarus 2.0.6 64bit  - FPC  3.0.4 I wonder if there is a way to set a package to only be Required under Linux. I mean, in the code, I can use something like {$IFDEF UNIX} {$ENDIF}. I wonder if there is an option to do it with my required package? Let say I need to load package_hello_world under linux. Instead, in windows, I am using user32.dll ...  package_hellow_world is not compatible windows... Do I have to remove/add the dependency every time I change OS or can I do something to make it automatic? ---------------------------------------------------------------------- Soner · 2019-11-09 00:19 Once I needed that too, but I did not find any solution for this, so I made work around for this. Modify your package installation unit like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit your_lib;// put the code below in your unit after reserverd word unit....; {$IfNDef UNIX} interface implementation end.// if your os is not  unix all code after "end." will ignored from compiler.  {$IfEnd}  // .. here is the normal code from your lib. ---------------------------------------------------------------------- TheLastCayen · 2019-11-09 03:40 Thank you Soner. If there is no other option I will check for that one. Kind of not a fan since I will have to modify the package every time it's upgrade.Can also become a problem if I open the source of my app:(