Recent

Author Topic: Application Output directory how to.  (Read 4730 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Application Output directory how to.
« on: October 30, 2015, 06:34:04 am »
OK, I seem to have on those of moments that I know I have done it before but can't remember how.

I want to set the output directory of a project not the unit output mind you the executable directory.
I want it to keep using the projects filename as the executable file name but I want to set a dynamic output directory based on various build options ee CPU, Widgetset, debug or release etc. I have done something like this on one of my projects I just will not have access to it until next Monday.

Any hints?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: Application Output directory how to.
« Reply #1 on: October 30, 2015, 09:26:59 am »
I want to set the output directory of a project not the unit output mind you the executable directory.

You can set the whole path for "Target file name (-o)".
Then "Unit output directory (-FU)" affects only .ppu and .o files.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Application Output directory how to.
« Reply #2 on: October 31, 2015, 07:03:07 am »
I want to set the output directory of a project not the unit output mind you the executable directory.

You can set the whole path for "Target file name (-o)".
Then "Unit output directory (-FU)" affects only .ppu and .o files.
Oh I see I have to set the name for my application's executable with all the macros I need. That makes sense and some how I missed it.
Thank you
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Application Output directory how to.
« Reply #3 on: November 01, 2015, 06:04:27 am »
I've run a couple of tests with this settings and here are my results so far
1) I can define a folder as a target file name and as long as I have a \ at the end it will be managed as a folder.
2) I can use the 3 most important macros with out a problem ee $(TargetCPU), $(TargetOS), $(LCLWidgetType) I only tested those 3 I did not see anything that will lead me to believe that the rest of the macros will not work.
3) The $TargetFile() macro returns only what ever I typed in the edit box with the macros properly expanded but fails to add the exe file name.
4) The debugger is unable to find the produced executable.

I guess 3 and 4 are linked ee if the macro returned the complete file name then debugger would be able to load the correct file I'm assuming this because the message from the debugger does not contain the exe name only the path to the file with macros properly expanded.

Its a minor annoyance at the moment I do not tend to rename projects often but you might want to look at it.

Thanks again for your hint.

EDIT:
erm the info : Lazarus 1.4.2 r49524 FPC 2.6.4 i386-win32-win32/win64
« Last Edit: November 01, 2015, 06:10:50 am by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018