Include exe file as a resource (solved)

Include exe file as a resource (solved)

Postby alvaro533 » Thu Oct 19, 2023 1:52 pm

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
alvaro533
 
Posts: 206
Joined: Sat Apr 19, 2008 10:28 pm
Location: Madrid, España

Re: Include exe file as a resource (solved)

Postby alvaro533 » Thu Oct 19, 2023 2:51 pm

In the rc file:

Code: Select all  Expand view  RUN
FILE1 RCDATA "..\\..\\GeoTif\\utils\\pdftopng.exe"


in fwh

Code: Select all  Expand view  RUN
RCDATATOFILE( GetResources(), "FILE1", "pdftopng.exe" )


Regards

Alvaro
alvaro533
 
Posts: 206
Joined: Sat Apr 19, 2008 10:28 pm
Location: Madrid, España

Re: Include exe file as a resource (solved)

Postby Antonio Linares » Thu Oct 19, 2023 3:02 pm

Very good!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Include exe file as a resource (solved)

Postby cnavarro » Thu Oct 19, 2023 6:33 pm

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 77 guests