Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement