Re: Need versioning ?



Gordy wrote:
> I have an application that is used for Power users as well as basic
> users. I am just wanting to trim off some features, money reports
> etc., and some confidential fields etc, for the basic users..
> I just dont want to have to maintain 2 apps. Is there an easy way to
> do this? Is there a way to click complile and have 2 versions come
> out?
> Any ideas??

Use {$IFDEF XXX} statements.

In your project options, compiler directives, list BASIC_VERSION or
something. Then in your code, do something like this:

{$IFDEF BASIC_VERSION}
MoneyReportAction.Visible := False;
ConfidentialFieldEdit.Visible := False;
ConfidentialLabel.Visible := False;
{ you may also want to adjust height and/or width of forms or hide panels to
avoid large blank spaces }
{$ENDIF}

To go back and compile the full version, remove BASIC_VERSION from the
compiler directives in your project options. I do this in my code and have
a batch file I run that compiles my project twice, one for one version, one
for the other. So in a sense, I click once and have two come out. However,
you can't click "compile" only once from the IDE and have two versions come
out.

--
David Cornelius
http://CorneliusConcepts.com


.



Relevant Pages