FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Include exe file as a resource (solved)
Posts: 230
Joined: Sat Apr 19, 2008 10:28 PM
Include exe file as a resource (solved)
Posted: Thu Oct 19, 2023 01: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

Posts: 230
Joined: Sat Apr 19, 2008 10:28 PM
Re: Include exe file as a resource (solved)
Posted: Thu Oct 19, 2023 02:51 PM
In the rc file:
Code (fw): Select all Collapse
FILE1 RCDATA "..\\..\\GeoTif\\utils\\pdftopng.exe"
in fwh
Code (fw): Select all Collapse
RCDATATOFILE( GetResources(), "FILE1", "pdftopng.exe" )
Regards

Alvaro
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Include exe file as a resource (solved)
Posted: Thu Oct 19, 2023 03:02 PM

Very good!

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Include exe file as a resource (solved)
Posted: Thu Oct 19, 2023 06: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

Continue the discussion