Recent

Author Topic: Is there a way to preset the project options ?  (Read 3254 times)

440bx

  • Hero Member
  • *****
  • Posts: 3946
Is there a way to preset the project options ?
« on: August 07, 2018, 03:48:51 am »
Hello,

Whenever I create a new project, I have to go into the project options and set the target and cpu (the default isn't what I want.)

I'd like to have my preference of target and cpu be the default whenever I start a new project.  Is there a way to have Lazarus always default to my target and cpu preference ?

Thanks,
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Is there a way to preset the project options ?
« Reply #1 on: August 07, 2018, 04:26:17 am »
Project -> Project Options...
In the Options for Project: xxx dialog go to the Config and Target page and set the target and cpu there.
Check the Set the compiler options as default checkbox (it's at the bottom, just above the Help button) and click OK.

440bx

  • Hero Member
  • *****
  • Posts: 3946
Re: Is there a way to preset the project options ?
« Reply #2 on: August 07, 2018, 04:49:50 am »
Thanks Howard, these little things actually make Lazarus that much more enjoyable to use.

It makes perfect sense for a checkbox to be there just for that. 

If you had not mentioned where it was, I would have most likely missed it again.

(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

FTurtle

  • Sr. Member
  • ****
  • Posts: 292
Re: Is there a way to preset the project options ?
« Reply #3 on: August 07, 2018, 02:25:23 pm »
Keep in mind that single set of default settings save for all types of project. It was mentioned earlier as a bug but I don't remember that it was fixed.

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Is there a way to preset the project options ?
« Reply #4 on: August 07, 2018, 03:40:16 pm »
No it is still there. I see the problem in Windows: When project options are saved as default these options are valid for all project types. Console programs in particular then are compiled with the option "Win32 gui application" checked - which crashes any console program using Writeln, Readln etc instructions. In the normal case (no projections options saved as default) the "Win32 gui appliation" checkbox is checked automatically depending on the project type.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Is there a way to preset the project options ?
« Reply #5 on: August 07, 2018, 03:44:51 pm »
No it is still there. I see the problem in Windows: When project options are saved as default these options are valid for all project types. Console programs in particular then are compiled with the option "Win32 gui application" checked - which crashes any console program using Writeln, Readln etc instructions. In the normal case (no projections options saved as default) the "Win32 gui appliation" checkbox is checked automatically depending on the project type.
FYI, personally I solved that by unchecking the gui application check box on the default project options, this allows a gui and a console application run correctly and you always see the console window on gui applications to remind you to change it if required.
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

ASerge

  • Hero Member
  • *****
  • Posts: 2223
Re: Is there a way to preset the project options ?
« Reply #6 on: August 07, 2018, 06:13:50 pm »
FYI, personally I solved that by unchecking the gui application check box on the default project options, this allows a gui and a console application run correctly and you always see the console window on gui applications to remind you to change it if required.
I prefer the explicit {$APPTYPE CONSOLE} in a console project, which is also Delphi compatible.

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: Is there a way to preset the project options ?
« Reply #7 on: August 08, 2018, 02:54:30 am »
FYI, personally I solved that by unchecking the gui application check box on the default project options, this allows a gui and a console application run correctly and you always see the console window on gui applications to remind you to change it if required.
I prefer the explicit {$APPTYPE CONSOLE} in a console project, which is also Delphi compatible.

I do both.  :)

Of course, I primarily write console apps, so that's my templated default anyway.
-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)

 

TinyPortal © 2005-2018