I have a software made with Delphi 2010 and it is required to be used from two different departments both of them share the same data and same UI except for some changes like hide/add buttons, forms and grid columns. Therefore it is required to have two versions of the same application.
It is not possible to prompt the user on application startup to select a department I must use separate EXEs.
What is the best approach (concept) to do that within Delphi 2010 or XE3 (will upgrade later) ? Is it possible to compile with different exe names ?
Sounds like a maintenance nightmare, so please consider other solutions such as suggested in the comments like a login or settings file.
If you do want to make separate exe's then you could use compiler defines and based on the define in/exclude parts of the code:
Add a new configuration:
Add the define to the configuration:
Use the define in your code:
{$IFNDEF ADVANCED}
// Remove Event Handler
Button1.OnClick := nil;
// Hide Button
Button1.Visible := False;
{$ENDIF}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With