Recent

Author Topic: Build Release  (Read 8428 times)

ca70du

  • Newbie
  • Posts: 4
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: 4219
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/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
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.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • 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: 8744
  • 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: 4
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: 8744
  • 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.

 

TinyPortal © 2005-2018