Forum > Options

[SOLVED] {$APPTYPE CONSOLE} {$APPTYPE GUI} please where to set?

<< < (4/4)

KodeZwerg:

--- Quote from: PascalDragon on November 24, 2022, 10:05:07 pm ---
--- Quote from: KodeZwerg on November 24, 2022, 05:34:57 pm ---Now my question is, where does Lazarus take the template from when I do press the [OK] button?
--- End quote ---

$lazarusdir/ide/projectdescriptortypes.pas


--- Quote from: KodeZwerg on November 24, 2022, 09:03:51 pm ---
--- Quote from: itblumi on November 24, 2022, 05:42:56 pm ---Do you mean something like this https://wiki.freepascal.org/Project_Templates ?

--- End quote ---
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.
--- End quote ---

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.

--- End quote ---
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.

KodeZwerg:
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  :-[

PascalDragon:
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:

--- Quote from: PascalDragon 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.

--- End quote ---
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:-)

Navigation

[0] Message Index

[*] Previous page

Go to full version