Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting Paths
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00365829
Message ID:
00365868
Vues:
13
John

I put all my development apps in C:\APPSVFP\ ie C:\APPSVFP\App1
Then set up all the normal subdirs in each app ie data, forms, libs, progs etc

The user can install the app anywhere as long as the tables are in the \data subdir of the apps directory.

Then use something like the following in the startup program

* Set default directory to locate and save files
lcLastDefault = SYS(2003)
Set DEFAULT TO SYS(2003)+"\data"

* Store Application Data Path if required
gcDataPath = SYS(2003)+"\"

* Setup new Application Path
lcLastSetPath =SET("PATH")
Set PATH TO Forms; Menus; Progs; Reports

*Store name and path of this app
gcExeFile = FULLPATH(SYS(16,0))

* If running APP set testmode flag .T.
If UPPER(SUBSTR(gcExeFile,(LEN(gcExeFile)-2),3)) = "EXE"
gltestmode = .F.
Else
gltestmode = .T.
Endif

#INCLUDE \Include\rating.h
Set PROCEDURE TO "\progs\errors"
Set PROCEDURE TO "\progs\encoders" ADDITIVE

Hope this helps
Chris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform