Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Building an exe: how to modify the project in an exe/app?

Status
Not open for further replies.

Diederik

Programmer
Oct 12, 2000
73
NL
I'm trying to build a VFP application into an executable using a "build exe" exe.

However, I run into the following:
For the actual building, I use the following code:
Code:
MODIFY PROJECT <some project> NOWAIT NOSHOW

loProject = APPLICATION.Projects[1]
loProject.VersionNumber = <cProjectnumber>
loProject.CleanUp( .F. )  && PACK the project
loProject.Encrypted = .T. && Encrypt compiled code
llSucces = loProject.Build( <all them options> )

This works great in a development environment, but crashes when executed from an .app or .exe (on the MODIFY PROJECT statement).
Is there a way to get a reference to the project without issuing MODIFY PROJECT ? Diederik Vermeeren
verm1864@exact.nl
 
Diederik,
I believe that the Project object can only be created by VFP when it opens the project (MODI PROJ ...). Since we only recently became able to compile .PRG files in the runtime, it's little wonder that you can't build a full .EXE/.APP without having the full development environment (it really gets into nasty licensing problems anyway).

Rick
 
Try to set the enviroment (tables and etc) exactly as they are in develop time. Have fun !!!
 
Nefra,

One of the big chunks of my tool is setting the environment exactly as they are in dev. time. That's not the problem.

Rick,
It seems you're right.

Using an executable it's just not possible to use MODI PROJ. Tried it with a project hook, but then I need to issue BUILD EXE which, for the same reason, won't work in an exe.
Diederik Vermeeren
verm1864@exact.nl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top