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

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

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

vfclists .

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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] How do you configure separate output directories for projects in same directory.

Hans-Peter Diettrich
Frank Church schrieb:

> 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


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] How do you configure separate output directories for projects in same directory.

Mattias Gaertner
In reply to this post by vfclists .
On Mon, 4 Apr 2011 20:59:21 +0100
Frank Church <[hidden email]> 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".

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


Mattias


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] How do you configure separate output directories for projects in same directory.

vfclists .


On 5 April 2011 00:29, Mattias Gaertner <[hidden email]> wrote:
On Mon, 4 Apr 2011 20:59:21 +0100
Frank Church <[hidden email]> 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 ?
 
See
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Paths


Mattias


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
Frank Church

=======================
http://devblog.brahmancreations.com

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] How do you configure separate output directories for projects in same directory.

Graeme Geldenhuys
On 05/04/2011 12:50, Frank Church wrote:
>
> Is there a macro for the Target File Name so that the unit output directory
> can be something like $(TargetFileName)/units ?

Here is a list of all available macros.

http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames


I think the one you want is $(TargetFile)


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] How do you configure separate output directories for projects in same directory.

Mattias Gaertner
In reply to this post by vfclists .

 

 


Frank Church <[hidden email]> 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

 



--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] How do you configure separate output directories for projects in same directory.

vfclists .


2011/4/5 Mattias Gaertner <[hidden email]>

 

 


Frank Church <[hidden email]> 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?
 

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




--
Frank Church

=======================
http://devblog.brahmancreations.com

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus