Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-04

How do you configure separate output directories for projects in same directory.

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Frank Church

I am creating 2 projects from the same source files with LCL Widget Type win32/win64 and the other with LCL WidgetType NoGUI.

The win32/win64 version contains both Forms GUI and DataModules for running on Windows, and the NoGUI version contains the DataModules and is targetted mainly at on Linux, although it can run on Windows as well.

All the project and source files are in the same directory. Is there some way to configure the output directories and unit search paths of the projects separately so that the different units created do not overwrite each other, when I switch from one to the other, althouugh with the project and source files in the same directory?

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110404/d71a855a/attachment.html>

Reply by email

Hans-Peter Diettrich
to Frank Church
Show quoted text 5 lines
All the project and source files are in the same directory. Is there some way to configure the output directories and unit search paths of the projects separately so that the different units created do not overwrite each other, when I switch from one to the other, althouugh with the project and source files in the same directory?

See Project - Compiler Options - Paths (-FU for compiled units)

DoDi

Reply by email

Mattias Gaertner
to Frank Church: I am creating 2 projects from the same source files with LCL Widget Type win32/win64 and…
Show quoted text 12 lines
I am creating 2 projects from the same source files with LCL Widget Type win32/win64 and the other with LCL WidgetType NoGUI. The win32/win64 version contains both Forms GUI and DataModules for running on Windows, and the NoGUI version contains the DataModules and is targetted mainly at on Linux, although it can run on Windows as well. All the project and source files are in the same directory. Is there some way to configure the output directories and unit search paths of the projects separately so that the different units created do not overwrite each other, when I switch from one to the other, althouugh with the project and source files in the same directory?

You can use macros.
For example set the "unit output directory" to
"units/$(TargetOS)-$(LCLWidgetType)".
Set the "Target file name" to "YourProjectName".

See
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Paths

Mattias

Reply by email

Frank Church
to Mattias Gaertner
Mattias Gaertner wrote 25 lines
On Mon, 4 Apr 2011 20:59:21 +0100 Frank Church wrote: > I am creating 2 projects from the same source files with LCL Widget Type > win32/win64 and the other with LCL WidgetType NoGUI. > > The win32/win64 version contains both Forms GUI and DataModules for running > on Windows, and the NoGUI version contains the DataModules and is targetted > mainly at on Linux, although it can run on Windows as well. > > All the project and source files are in the same directory. Is there some > way to configure the output directories and unit search paths of the > projects separately so that the different units created do not overwrite > each other, when I switch from one to the other, althouugh with the project > and source files in the same directory? You can use macros. For example set the "unit output directory" to "units/$(TargetOS)-$(LCLWidgetType)". Set the "Target file name" to "YourProjectName".

Thanks to all for your advice.

Is there a macro for the Target File Name so that the unit output directory can be something like $(TargetFileName)/units ?

Show quoted text 13 lines
See http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Paths Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110405/5c3dc07b/attachment.html>

Reply by email

Mattias Gaertner
to Frank Church: Thanks to all for your advice. Is there a macro for the Target File Name so that the unit…

?
?

Frank Church hat am 5. April 2011 um 12:50 geschrieben:

Show quoted text 5 lines
[...] Is there a macro for the Target File Name so that the unit output directory can be something like $(TargetFileName)/units ?

?
I guess you meant something like $(TargetFileName)-units ?
Mattias
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110405/8dfb5f99/attachment.html>

Reply by email

Frank Church
to Mattias Gaertner

2011/4/5 Mattias Gaertner

Show quoted text 23 lines
Frank Church hat am 5. April 2011 um 12:50 geschrieben: [...] Is there a macro for the Target File Name so that the unit output directory can be something like $(TargetFileName)/units ? I guess you meant something like $(TargetFileName)-units Mattias

$(TargetFile)\units works okay, but includes the .exe at then which I don't want.

I tried $(NameOnly($(TargetFile))\units hoping that it would work, but it is not expanded and the whole directory appears, as with $(Name($(TargetFile))\units.

Does that work or I am using an out of date version 0.9.28.3?

Show quoted text 8 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110406/17f3f966/attachment.html>

Reply by email