Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Delphi 7 - Is there a .CFG setting for "UserProfiles" for command line comp


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jan 1, 2015 5:53 PM Last Post By: John Mitchell Threads: [ Previous | Next ]
John Mitchell

Posts: 64
Registered: 9/23/02
Delphi 7 - Is there a .CFG setting for "UserProfiles" for command line comp  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 1, 2014 5:25 AM
I have two machines for Delphi 7, one is primary machine, one is a backup which has my project file basically mirrored.

Problem is batch file for command line compiling, where unfortunately one has the user profile as "C:\Users\John" and one is "C:\Users\Mitchell".

I am using the WCL Bluetooth library and it installs into C:\Users\Mitchell on one, John on the other. So the CFG file -U line contains C:\Users\John\Documents\WCL\VCL\d7 on one machine but I'd like a way to replace that with an environment string for UserProfile - for example $(UserProfile)\Documents\WCL\VCL\d7 which would work on both machines.

I know I can keep a separate Project.cfg on each one but it is really handy to have an automated mirror program that keeps the backup machine up to date. I have successfully (I think?) used $(ProgramFiles) in the . CFG file (example $(ProgramFiles)\borland\delphi7\Projects\Bpl) and was wondering why $(UserProfile)" doesn't seem to work in this case.

So while I understand there are alternatives (making a batch file to copy a CFG before building) I was hoping there was a way to have the environment string in the CFG itself so it can be on both machines. Has anyone done this for Delphi 7 ?

Edited by: John Mitchell on Jul 1, 2014 8:25 AM
John Mitchell

Posts: 64
Registered: 9/23/02
Re: Delphi 7 - Is there a .CFG setting for "UserProfiles" for command line comp  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 1, 2015 5:53 PM   in response to: John Mitchell in response to: John Mitchell
I'm bumping this question if that's OK.
I'm facing the same issue with sharing library paths.
Is there a list of abbreviations (like $BDS) somewhere ?


John Mitchell wrote:
I have two machines for Delphi 7, one is primary machine, one is a backup which has my project file basically mirrored.

Problem is batch file for command line compiling, where unfortunately one has the user profile as "C:\Users\John" and one is "C:\Users\Mitchell".

I am using the WCL Bluetooth library and it installs into C:\Users\Mitchell on one, John on the other. So the CFG file -U line contains C:\Users\John\Documents\WCL\VCL\d7 on one machine but I'd like a way to replace that with an environment string for UserProfile - for example $(UserProfile)\Documents\WCL\VCL\d7 which would work on both machines.

I know I can keep a separate Project.cfg on each one but it is really handy to have an automated mirror program that keeps the backup machine up to date. I have successfully (I think?) used $(ProgramFiles) in the . CFG file (example $(ProgramFiles)\borland\delphi7\Projects\Bpl) and was wondering why $(UserProfile)" doesn't seem to work in this case.

So while I understand there are alternatives (making a batch file to copy a CFG before building) I was hoping there was a way to have the environment string in the CFG itself so it can be on both machines. Has anyone done this for Delphi 7 ?

Edited by: John Mitchell on Jul 1, 2014 8:25 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02