TargetOS returns "win32" or "win64". I need alternative option lazarus / 11-Options ---------------------------------------------------------------------- Igor · 2018-09-05 13:11 Hi, TargetOS option gives 2 results on Windows - "win32" or "win64". And "darwin" on macOS (32-bit or 64-bit). Is there any alternative to TargetOS which will give one result on 32-bit and 64-bit version of Windows (for example, "win") and "darwin" for Mac? We develop a cross-platform app and we plan to use just 2 folders with platform units - one folder Windows (32-bit or 64-bit) app and one for Mac. Currently we use TargetOS in Paths in the Project Options: \Sources\$(TargetOS) ---------------------------------------------------------------------- ASerge · 2018-09-05 20:41 Quote from: Igor Kokarev on September 05, 2018, 03:11:58 pmCurrently we use TargetOS in Paths in the Project Options: \Sources\$(TargetOS) \Sources\$(SrcOS) ---------------------------------------------------------------------- Igor · 2018-09-06 11:11 Thanks! It works. ---------------------------------------------------------------------- Igor · 2018-09-06 11:22 On macOS $(SrcOS) returns "unix". How to get "win" and "macOS"? ---------------------------------------------------------------------- Martin_fr · 2018-09-06 17:35 not a direct answer, but have a look at "custom options" (in project options). There is a field conditional, with example in it. You should probably be able to set anything you need in there. ---------------------------------------------------------------------- skalogryz · 2018-09-06 17:55 Quote from: Martin_fr on September 06, 2018, 07:35:06 pmnot a direct answer, but have a look at "custom options" (in project options). There is a field conditional, with example in it. You should probably be able to set anything you need in there. another way is to add build modes to project and create an additional IDE macro for the purpose. ---------------------------------------------------------------------- Leledumbo · 2018-09-07 09:54 These are IDE supported macros, if none of them satisfying, I guess you really have to use custom options. ---------------------------------------------------------------------- ASerge · 2018-09-07 17:58 Quote from: Leledumbo on September 07, 2018, 11:54:33 amhttp://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames ... ---------------------------------------------------------------------- Igor · 2018-09-10 10:56 Thanks! I will check it today.