Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-12

Version Info as statement in the *.lpr source file

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Eric Kom

Good day,

Please am use to pass version info in the project options and would like to know if it is possible to pass it directly from the *.lpr source file as literal string.

Kind Regards Eric Kom System Administrator & Programmer - Metropolitan College _________________________________________ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 | www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5

Reply by email

Mark Morgan Lloyd
to Eric Kom
Eric Kom wrote 5 lines
Good day, Please am use to pass version info in the project options and would like to know if it is possible to pass it directly from the *.lpr source file as literal string.

Are you talking about the version of the compiler (and/or IDE and/or LCL) or of your program? And on which operating system? And what do you want to do with it: use it for conditional compilation or refer to it while the program's running?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Eric Kom
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 12 lines
Eric Kom wrote: > Good day, > > Please am use to pass version info in the project options and would > like to know if it is possible to pass it directly from the *.lpr > source file as literal string. Are you talking about the version of the compiler (and/or IDE and/or LCL) or of your program? And on which operating system? And what do you want to do with it: use it for conditional compilation or refer to it while the program's running?

The version of my program.

Kind Regards Eric Kom System Administrator & Programmer - Metropolitan College _________________________________________ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 | www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5

Reply by email

Mark Morgan Lloyd
to Eric Kom
Eric Kom wrote 14 lines
On 20/12/2012 11:05, Mark Morgan Lloyd wrote: > Eric Kom wrote: >> Good day, >> >> Please am use to pass version info in the project options and would >> like to know if it is possible to pass it directly from the *.lpr >> source file as literal string. > > Are you talking about the version of the compiler (and/or IDE and/or > LCL) or of your program? And on which operating system? And what do > you want to do with it: use it for conditional compilation or refer to > it while the program's running? > The version of my program.

If you mean that you want to put something into the .lpr (i.e. the main unit of the program) and then use that elsewhere in the program, I've been told in the past to do this:

program HeavyWethers;
CONST   projectName= {$I %FILE% } ;
begin
   Application.Initialize;
   GlobalProjectName := projectName;
   Application.CreateForm(...

where GlobalProjectName is a public global in some other unit.

Alternatively note Project Options -> Version Info, see http://lists.lazarus.freepascal.org/pipermail/lazarus/2010-July/054335.html together with its attachment and/or related messages.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email