Can the target file name be conditional on a DEFINE? (SOLVED) lazarus / 11-Options ---------------------------------------------------------------------- minesadorada · 2014-07-26 14:37 The title asks the question. Environment: Lazarus 1.2.4/fpc 2.6.2 I have a project where I can add and enable/disable  $DEFINEs in Project Options/Compiler Options/Other which is a great feature. I would like a fully 'generalised' project file where the Target filename (-o not the directory) depends on which DEFINEs I have enabled. In that way, I can have one 'master' project file, and compile it to different executables depending on the DEFINEs I tick or untick in Project/Options (which already affects the code of course)  That would be very handy. Is this possible using Macros or some other technique? ---------------------------------------------------------------------- Bart · 2014-07-26 15:12 Not exactly what you want, but you could do so with build modes. Bart ---------------------------------------------------------------------- minesadorada · 2014-07-26 15:40 Quote from: Bart on July 26, 2014, 05:12:29 pmNot exactly what you want, but you could do so with build modes. Bart Good thinking!  I'll give it a try. =edit- Marked the topic SOLVED.  Thanks Bart  Lazarus is so flexible!  With a combination of $DEFINEs and build modes, the same codebase and project file can now now compile to 6 different executables with a couple of clicks - amazing It certainly makes publishing an maintenance a lot easier. ---------------------------------------------------------------------- JuhaManninen · 2014-07-26 18:01 Quote from: minesadorada on July 26, 2014, 05:40:07 pmLazarus is so flexible!  With a combination of $DEFINEs and build modes, the same codebase and project file can now now compile to 6 different executables with a couple of clicks - amazing Please try trunk, the development version. It allows you to build many modes at one go and it has other cool features, too. Wow-effect guaranteed. QuoteI have a project where I can add and enable/disable  $DEFINEs in Project Options/Compiler Options/Other which is a great feature. Good to get positive feedback about this one. I was already wondering if anybody uses the feature. Thanks. ---------------------------------------------------------------------- minesadorada · 2014-07-26 18:36 Quote from: JuhaManninen on July 26, 2014, 08:01:59 pmPlease try trunk, the development version. It allows you to build many modes at one go and it has other cool features, too. Wow-effect guaranteed. I checked it out via Tortoise SVN, but I have no idea how to build the Executables in my Windows 32-bit environment. Quote from: JuhaManninen on July 26, 2014, 08:01:59 pmGood to get positive feedback about this one. I was already wondering if anybody uses the feature. Thanks. I have a simple question (I couldn't find the answer in the Wiki) In the Build Modes dialog, why are there two rows of checkboxes - 'Active' and 'In Session' ?  I don't understand what the 'In Session' is about. Can anyone explain, please? ---------------------------------------------------------------------- JuhaManninen · 2014-07-26 20:42 Quote from: minesadorada on July 26, 2014, 08:36:20 pmI checked it out via Tortoise SVN, but I have no idea how to build the Executables in my Windows 32-bit environment. On cmd line do "make bigide" or "make all" and then run the lazarus executable. QuoteI have a simple question (I couldn't find the answer in the Wiki) In the Build Modes dialog, why are there two rows of checkboxes - 'Active' and 'In Session' ?  I don't understand what the 'In Session' is about. Compiler options for those modes are stored in the session .lps file instead of project .lpi file. It means you can add local modes for a project that is otherwise shared by many people.