Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Distributing my App
Message
 
 
À
01/06/2001 11:55:01
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00513868
Message ID:
00513879
Vues:
12
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform