Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to run exe on lan
Message
De
25/02/2015 09:08:35
 
 
À
25/02/2015 06:55:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01615808
Message ID:
01615814
Vues:
68
I usually follow the pattern to have 4 directory entry points for an app: read-only data local server-side and write data local and server.
Helps a lot for backup patterns. Local write data often is only things like screen positioning, personal defaults and similar things connected to the device, not so much the user.

How much RO data is kept locally depends on data size and change frequency. IMO your path grows too long - perhaps in some cases only a specific path can be used via building it depending on selection (like skin\selectedtheme). Long paths can kill performance if not built into the exe.

>Hi,
>
>I have developed on an application on my pc for which I used local drive (d:\).
>Now I want to run this app on network drive (p:\) for which I took all necessary steps like to use "set excl off" "Shared" and so on.
>
>I want to run this app on server in a way that only data should be on (p:\) drive where other files should be on their local drive.
>I am using the following start up program to run this app on server but facing some problem.
>
>On Shutdown Do cleanup()
>
>*-------------------------------------------
>*--
>*-- Runtime Mode Application Startup Program
>*--
>*-- Entry point for front-end application
>*--
>*-------------------------------------------
>
>*-- Include
>
>*-- Clear all at first
>
>Clear
>Clear Dlls
>Release All Extended
>Clear All
>
>Public debugmode && TRUE when running within VFP, FALSE for standalone program
>Public gchomepath && Working directory
>Public want_to_exit
>
>Set Path To
>Set Defa To
>=setpath()
>lcdefaultpath = Justpath(Sys(16))
>lcdefaultpath = gchomepath
>*lcdefaultpath = 'p:\vpckg'
>
>lcdatapath = 'r:\data'
>
>Set Default To (lcdefaultpath)
>
>= set_app_paths()
>
>*SET PROCEDURE TO ('procs\Measure')
>Set Exclusive Off
>Set Multilocks On
>Do Locfile("system.app")
>Do Form Locfile('\forms\userid.scx')
>*Do Form Locfile('\forms\salesmast.scx')
>Read Events
>Release All
>Clear All
>Close All
>Clear Dlls
>Release All Extended
>Clear All
>
>Clear Events
>On Error
>On Shutdown
>If _vfp.StartMode = 0
> Return To Master
>Else
> Quit
>Endif
>
>
>
>*--------------------------------------------
>
>Procedure set_app_paths
> Set Path To lcdefaultpath + '\' Additive
> Set Path To lcdatapath + '\data' Additive && Only this directory I want to put on server
> Set Path To lcdefaultpath + '\forms' Additive
> Set Path To lcdefaultpath + '\foxbarcode' Additive
> Set Path To lcdefaultpath + '\foxbarcode\docs' Additive
> Set Path To lcdefaultpath + '\foxbarcode\forms' Additive
> Set Path To lcdefaultpath + '\foxbarcode\images' Additive
> Set Path To lcdefaultpath + '\foxbarcode\qr' Additive
> Set Path To lcdefaultpath + '\foxbarcode\reports' Additive
> Set Path To lcdefaultpath + '\foxbarcode\samples' Additive
> Set Path To lcdefaultpath + '\foxbarcode\source' Additive
> Set Path To lcdefaultpath + '\foxbarcode\temp' Additive
> Set Path To lcdefaultpath + '\foxchart\' Additive
> Set Path To lcdefaultpath + '\foxchart\images' Additive
> Set Path To lcdefaultpath + '\foxchart\samples' Additive
> Set Path To lcdefaultpath + '\foxchart\samples\images' Additive
> Set Path To lcdefaultpath + '\foxchart\samplesbeta' Additive
> Set Path To lcdefaultpath + '\foxchart\source' Additive
> Set Path To lcdefaultpath + '\foxchart\textures' Additive
> Set Path To lcdefaultpath + '\foxchart\textures\berries' Additive
> Set Path To lcdefaultpath + '\foxchart\textures\marble' Additive
> Set Path To lcdefaultpath + '\foxchart\textures\wood' Additive
> Set Path To lcdefaultpath + '\foxyview\' Additive
> Set Path To lcdefaultpath + '\foxyview\deprecatedsamples' Additive
> Set Path To lcdefaultpath + '\foxyview\sampledistribproject' Additive
> Set Path To lcdefaultpath + '\foxyview\sampledistribproject\exe' Additive
> Set Path To lcdefaultpath + '\foxyview\source' Additive
> Set Path To lcdefaultpath + '\foxyview\source\images' Additive
> Set Path To lcdefaultpath + '\foxyview\images' Additive
> Set Path To lcdefaultpath + '\graphics' Additive
> Set Path To lcdefaultpath + '\graphics\heads' Additive
> Set Path To lcdefaultpath + '\graphics\icons' Additive
> Set Path To lcdefaultpath + '\graphics\icons\vistacpl' Additive
> Set Path To lcdefaultpath + '\graphics\logo' Additive
> Set Path To lcdefaultpath + '\graphics\others' Additive
> Set Path To lcdefaultpath + '\graphics\products' Additive
> Set Path To lcdefaultpath + '\graphics\skins' Additive
> Set Path To lcdefaultpath + '\graphics\skins\backgrounds' Additive
> Set Path To lcdefaultpath + '\graphics\skins\bluetheme' Additive
> Set Path To lcdefaultpath + '\graphics\skins\browntheme' Additive
> Set Path To lcdefaultpath + '\graphics\skins\olivetheme' Additive
> Set Path To lcdefaultpath + '\graphics\sound' Additive
> Set Path To lcdefaultpath + '\graphics\staff' Additive
> Set Path To lcdefaultpath + '\graphics\staff\images' Additive
> Set Path To lcdefaultpath + '\help' Additive
> Set Path To lcdefaultpath + '\help\treeview_css' Additive
> Set Path To lcdefaultpath + '\junk' Additive
> Set Path To lcdefaultpath + '\libs' Additive
> Set Path To lcdefaultpath + '\menus' Additive
> Set Path To lcdefaultpath + '\progs' Additive
> Set Path To lcdefaultpath + '\query' Additive
> Set Path To lcdefaultpath + '\reports' Additive
> Set Path To lcdefaultpath + '\ssdemos' Additive
> Set Path To lcdefaultpath + '\ssdemos\classes' Additive
> Set Path To lcdefaultpath + '\ssdemos\images' Additive
> Set Path To lcdefaultpath + '\ssdemos\images\gif' Additive
> Set Path To lcdefaultpath + '\ssdemos\images\ico' Additive
> Set Path To lcdefaultpath + '\ssdemos\images\png' Additive
> Set Path To lcdefaultpath + '\xml' Additive
> Set Path To lcdefaultpath + '\xml\images' Additive
> Set Path To lcdefaultpath + '\xml\images\excelxml' Additive
> Set Path To lcdefaultpath + '\vfpcalendar' Additive
>Endproc
>
>*--------------------------------------------
>*-- Set path to application working directory
>*--------------------------------------------
>Function setpath()
> *-----------------
>
> Local lcpath, lcbuffer
> Local lnstart
>
> lcpath = Sys(16) && Where we were executed...
> lnstart = At("\\", lcpath)
>
> If lnstart = 0
> lnstart = At(":", lcpath) - 1
> Endif
>
> If lnstart > 0
> lcpath = Substr(lcpath, lnstart) && Derive program name
> Endif
>
> gchomepath = Left(lcpath, Rat("\", lcpath)) && ... and path to it
>
> *-- Change current directory to working...
> Cd (gchomepath)
>
> *-- If we are running MAIN.PRG directly, then
> *-- CD up to the parent directory
> If Right(lcpath, 3) = "FXP"
> *-- One level up
> Cd ..
>
> *-- Assume we were run from VFP
> debugmode = .T. &&TRUE
>
> *-- Make out path to INI file
> gchomepath = Left(gchomepath, Rat("\", gchomepath, 2))
>
> *-- Ensure the project manager is closed
> Deactivate Window "Project Manager"
> Endif
>
> *-- Set all pathes
> Set Default To (gchomepath)
>
>Function cleanup
> *If want_to_exit
> Clear Events
> Clear All
> Release All
> On Error
> On Shutdown
> If _vfp.StartMode = 0
> Return To Master
> Else
> Quit
> Endif
> *Endif
>
> *-- End of program
>
>I just to keep the table on server and rest on local machine. What is the ideal start up program for that.
>
>Please guide..
>
>Thanks
>
>Saif
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform