Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Distributing my App
Message
 
 
To
01/06/2001 11:55:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00513868
Message ID:
00513879
Views:
11
>I have an app I am tring to distribute. I am using Visual Studio Installer to create my distribution. I am having trouble with the app not able to find the data files. Suppose in my main.prg I set the default path to c:\Test and during the install the user sets up the app in c:\Whatever. How do I reconcile this?

You should never hard code a path in your app. I never use SET DEFAULT TO in any PRG I have ever written. It simply is not needed. The only thing you may need is setting a PATH to where all the related files should be. These paths, ideally, should be relative paths to where the app is installed to.

I do have an exception to this however. On a server, I have an app tree like
+ Apps
   + Permits
      + AppUpdts
      + Data
      + Reports
If this is a standalone app, the AppUpdts, Data, and Reports folders are subfolders in the App installation folder.

So in my app, I have a table where the UNC path to the server is kept. Then I can set a path to the DATA and REPORTS folders on the server or the local standalone PC.

The AppUpdts folder is where I place new APP files which get copied to the app installation folder the next time the user launches the app. Many of us use the technique of actually launching a small VFP EXE that looks for new app files, copies them to the app folder, then starts the app with a DO ("MyApp") command. By placing the app name in parens and quotes prevents the project manager from wanting to include the app in the project.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform