Recent

Author Topic: [SOLVED] {$APPTYPE CONSOLE} {$APPTYPE GUI} please where to set?  (Read 4741 times)

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: {$APPTYPE CONSOLE} {$APPTYPE GUI} please where to set?
« Reply #15 on: December 17, 2022, 02:00:44 pm »
Now my question is, where does Lazarus take the template from when I do press the [OK] button?

$lazarusdir/ide/projectdescriptortypes.pas

Do you mean something like this https://wiki.freepascal.org/Project_Templates ?
I give up. Even when I show a picture of where I would like to modify something I get answers that not lead in the direction that I need.

The projtemplates package is to add your own templates using simple description files. Some other packages also add additional project templates using code like the core templates do.
Thanks again for your help, everything works like I wanted it to be.
Can you please help me again, this time I searched for the template that is generated when I click on "Application" (a LCL template)
I wanted to insert one line in the class template where it generate "private" and "public" line.
The .lpr file is in file that you mentioned but I do not find where it takes the .pas file for "unit1.pas" template.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: [SOLVED] {$APPTYPE CONSOLE} {$APPTYPE GUI} please where to set?
« Reply #16 on: January 18, 2023, 11:50:53 pm »
Shy pushing this up again in hope to get an answer of my last post, if I was unclear just tell and I describe it further  :-[
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: [SOLVED] {$APPTYPE CONSOLE} {$APPTYPE GUI} please where to set?
« Reply #17 on: January 19, 2023, 09:42:22 pm »
You simply need to follow the necessary functions (I have just done that right now). In the end you'll land in TFileDescPascalUnitWithResource.GetInterfaceSource in unit $lazdir/components/buildintf/projectintf.pas. Please note however that this code is used for all templates involving a form.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: [SOLVED] {$APPTYPE CONSOLE} {$APPTYPE GUI} please where to set?
« Reply #18 on: January 19, 2023, 10:29:50 pm »
You simply need to follow the necessary functions (I have just done that right now). In the end you'll land in TFileDescPascalUnitWithResource.GetInterfaceSource in unit $lazdir/components/buildintf/projectintf.pas. Please note however that this code is used for all templates involving a form.
Now I found it, yes I was too stupid to follow or find out how or where it take the source generation from.
I am mega happy!  :-*  I appreciate your help!!  O:-)
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

 

TinyPortal © 2005-2018