Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Build process for .EXE?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00314005
Message ID:
00314049
Vues:
20
>While building the original project, VFP creates a program file called (program)_app and sets it as main. However, this file does not contain a READ EVENTS command. What does this file do? (It doesn't make a whole lot of sense.) Must it be run first? Should it be called by a separate MAIN program? Or should it contain a line calling the main program?

I'll try my best.
A .app is a program that runs in the VFP environment usually in the VFP _screen and often uses commands that are not available as a stand alone program. An exe is generated for distributed applications that run like any other windows program not requiring the user to own VFP. main is referred to as the starting code of your application which is usually a .prg or a form in VFP6.
Your main program is set by selecting the prg or scx in the project manager and in the project menu select set main. This program launches your application. Don't confuse .app with "application" BTW. Read as much as you can about application objects. Once you have a main then you can build an exe. There is much more to this simple explanation but you can look in the files section and see some free framework examples.

>
>How does a VFP build deal with app directories and paths? If I create the app in a development directory and plan to install it in a different directory, do I need to make provisions for the different locations?

Yes. It is a good idea to set the default startup directory path as a property of your application object when you set your environment. I use a set environment method that is called in the show method of my application object. This property stays alive as long as your application is running so you can use it to issue SET PATH whenever you need to but I normally only do it once at startup by setting my path to all the local directories I might use. ie. ./data ./menus, ./whatever

>
>Does the .EXE contain all the files needed from my app, or do I need to add the forms, tables and/or the entire development directory structure?

The exe contains everything you include in the project except tables, images that are assigned to a control on the fly, compiled help files, and some menus.

>
>One reference I found says to include the .VCX files. This app is so simple that I'm not creating any classes.... which .VCX files and/or .DLL files do I need to include?

Include .vcx files in the project before you compile only if they ar used by some component in your program. But don't worry, VFP will go find them even if you don't. :)
>
>Any other gotchas to the process?

Email me if need more specific help. This is a really general rsponse.

>
>Thanks,
>Neil Preston
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform