Page 1 of 1

Include exe file as a resource (solved)

Posted: Thu Oct 19, 2023 1:52 pm
by alvaro533
Good afternoon,

I have created a small program in fwh64, for example, "myapp.exe." The program "myapp.exe" calls a utility, "pdftopng.exe," which is open-source and occupies 1MB, in the background. I would like to distribute my program as a single file, "myapp.exe." Is it possible to include "pdftopng.exe" within "myapp.exe" as a resource or library, or something similar? Then, when the client copies "myapp.exe" to their computer and runs it, it would check if "pdftopng.exe" is in the program's folder, and if it's not, extract it to be used.

Thank you and regards,

Alvaro

Re: Include exe file as a resource (solved)

Posted: Thu Oct 19, 2023 2:51 pm
by alvaro533
In the rc file:

Code: Select all | Expand

FILE1 RCDATA "..\\..\\GeoTif\\utils\\pdftopng.exe"
in fwh

Code: Select all | Expand

RCDATATOFILE( GetResources(), "FILE1", "pdftopng.exe" )
Regards

Alvaro

Re: Include exe file as a resource (solved)

Posted: Thu Oct 19, 2023 3:02 pm
by Antonio Linares
Very good!

Re: Include exe file as a resource (solved)

Posted: Thu Oct 19, 2023 6:33 pm
by cnavarro