Recent

Author Topic: [RESOLVED] Separate Debug and Release Folder -> EXE's  (Read 4508 times)

pixelink

  • Hero Member
  • *****
  • Posts: 1260
[RESOLVED] Separate Debug and Release Folder -> EXE's
« on: August 19, 2016, 08:24:03 pm »
In .NET (most IDE's)...
When you compile & run in "debug" mode, it creates the EXE in "bin" folder or root
But, when you compile in "Release or Publish"... it goes to a Release folder.

I checked in the folder and didn't see the settings.

Is it possible in LAZ??

I'm asking because, I know how to switch off the "Debug" data when I want to knock down my EXE size.
But, everytime I want to create a release, I have to remeber to do this.

Where as, if I were able to do one setting for debug and one for releases (to keep size of exe down)

I would want the debug version of EXE to stay in root, but create a Release folder where final, smaller exe is compiled too.

Make sense??
« Last Edit: August 19, 2016, 10:59:47 pm by technipixel »
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Separate Debug and Release Folder -> EXE's
« Reply #1 on: August 19, 2016, 08:37:32 pm »
In .NET (most IDE's)...
When you compile & run in "debug" mode, it creates the EXE in "bin" folder or root
But, when you compile in "Release or Publish"... it goes to a Release folder.

I checked in the folder and didn't see the settings.

Is it possible in LAZ??

I'm asking because, I know how to switch off the "Debug" data when I want to knock down my EXE size.
But, everytime I want to create a release, I have to remeber to do this.

Where as, if I were able to do one setting for debug and one for releases (to keep size of exe down)

I would want the debug version of EXE to stay in root, but create a Release folder where final, smaller exe is compiled too.

Make sense??
Each build mode contains separate settings for nearly everything, including folder location (Project Options->Compiler Options->Paths), so just set up different -o for each build mode.

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Separate Debug and Release Folder -> EXE's
« Reply #2 on: August 19, 2016, 08:40:18 pm »
In Project options -> Compiler Options -> Paths:

Unit output directory: lib\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)-$FPC_FULLVERSION()-$BuildMode()

Target file name : bin\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)-$FPC_FULLVERSION()-$BuildMode()\project1

Then create separate build modes for Debug and Release in the build mode dialog. You can get the build mode dialog by clicking on a button at next of "Build modes" checkbox and combo box.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4467
  • I like bugs.
Re: Separate Debug and Release Folder -> EXE's
« Reply #3 on: August 19, 2016, 08:40:31 pm »
Use build modes.
The wiki page is a little outdated, somebody should update it.
 http://wiki.freepascal.org/IDE_Window:_Compiler_Options
Managing build modes happens in a separate window, opened from a button at top of compiler options pages.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: Separate Debug and Release Folder -> EXE's
« Reply #4 on: August 19, 2016, 09:01:19 pm »
Okay.... great.
I will check it out.
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: Separate Debug and Release Folder -> EXE's
« Reply #5 on: August 19, 2016, 10:59:28 pm »
Okay... successful!!!

THANKS!!
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

 

TinyPortal © 2005-2018