Recent

Author Topic: Build Release  (Read 3685 times)

ca70du

  • Newbie
  • Posts: 3
Build Release
« on: August 21, 2018, 09:25:44 pm »
Hello!

I'd like to suggest a new menu item: "Build Release" under "Execute". Action: build a release executable, without any or with minimum debug info. I think it's a more intelligent way than the current "build mode". The IDE may always build debug mode, except under "Build Release".

Also, in "Project Options", under "Compiler Options", a new item: "Release", with release-specific options, such as an optional "Release path" to store release builds, and the option to include version number to executable's file name. So the "Build modes" may be excluded.

Att.,
Carlos E. S. M.
Curitiba / ParanĂ¡ / Brazil


lucamar

  • Hero Member
  • *****
  • Posts: 2075
Re: Build Release
« Reply #1 on: August 21, 2018, 10:08:01 pm »
People use "buld modes" for much more than a simple Debug/Release dichotomy: cross compilation, for example, or building various executales with different options/defines, etc.

So you see how your proposal would basically constraint everyone for little, if any, gain: it's so easy to change modes! And you can do almost everything you want through mode-specific options so ... what's the point?

My 2 cents. :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

ASBzone

  • Sr. Member
  • ****
  • Posts: 253
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
Re: Build Release
« Reply #2 on: August 21, 2018, 10:16:04 pm »
I'd like to suggest a new menu item: "Build Release" under "Execute". Action: build a release executable, without any or with minimum debug info. I think it's a more intelligent way than the current "build mode". The IDE may always build debug mode, except under "Build Release".

You seem to be asking for a pre-built "build mode".

It seems to me that you can achieve what you desire by using the Build Modes, in combination with "Run --> Compile many Modes..."

I started using that recently to build x32 and x64 Windows executables in a single selection.    I also used it on a test program to generate 4 executables (main, main-mini, main64, main64-mini) with differing configuration, so that I could quickly validate changes.

If I could set a default for which of the checkboxes in "Compile many Modes..." were selected by default, I would be ecstatic, but an extra click or two hasn't killed me yet...
« Last Edit: August 21, 2018, 11:18:54 pm by ASBzone »
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.5 r62023 / FPC v3.2.0-beta-r43192 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1903 (Build 18362.418)
Other Systems: Windows 10 Pro x64, Version 1903 or greater

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5695
    • wiki
Re: Build Release
« Reply #3 on: August 21, 2018, 10:53:43 pm »
You can set a diff output directory in each build mode. So that is solvable.
You can also set the build modes as defaults for all new projects.

There may be a point, to have those defaults pre-configured in new lazarus installs.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Build Release
« Reply #4 on: August 22, 2018, 04:17:39 pm »
There may be a point, to have those defaults pre-configured in new lazarus installs.
Kinda agree with this one, sometimes we're too advanced that we think everything is as intuitive as it can be for everyone.
Attached is my style, might not fit everyone's standard as I like to make the directory layout somewhat more organized:
Code: [Select]
project.lpi
src
+ here lies your .pas / .pp, may be broken further down into plain unit files, forms, libraries, whatever according to your taste
lib
+ debug
  + <fpctarget>
    + here lies your .ppu / .o / .rst / .res, etc. files using debug options
+ release
  + <fpctarget>
    + here lies your .ppu / .o / .rst / .res, etc. files using release options
bin
+ debug
  + here lies the executable using debug options
+ release
  + here lies the executable using release options

ca70du

  • Newbie
  • Posts: 3
Re: Build Release
« Reply #5 on: August 29, 2018, 11:28:02 pm »
I don't like to redo the same task every time. This is not laziness. I do not think it is intelligent, it is counter-productive. Not only per project, also every time someone do a clean install.

How about include one step during install to ask what modes will be default? Think about the people who are new in Lazarus, that would be easier to begin. More people using it, more interest, more new ideas.

I suggested "Release Build" as a "final product generator", ready for distribution, after debugging and testing. If there is a button to create "debug and release" modes, why not to make them default?

JimD

  • Jr. Member
  • **
  • Posts: 62
Re: Build Release
« Reply #6 on: August 30, 2018, 06:11:19 am »
I don't like to redo the same tasks either.

Until your recommendations are implemented, you may be interested in LazCopyOptions here:
http://forum.lazarus.freepascal.org/index.php/topic,42258.0.html

In summary, you setup your build modes the first time, then you can copy to existing or new projects.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Build Release
« Reply #7 on: September 03, 2018, 11:01:46 am »
In summary, you setup your build modes the first time, then you can copy to existing or new projects.
No need to copy for new projects, just check that box in the attached image after setting up the build modes.