FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour HB_hbrun()
Posts: 145
Joined: Wed Nov 03, 2010 09:16 AM
HB_hbrun()
Posted: Mon May 11, 2015 08:50 AM

Hola
Me gustaría saber si hay alguna manera de que cuando ejecutamos un script mediante hb_compilebuffer y hb_hbrun, los includes no tengan que estar en disco, sino que se los pueda, por ejemplo, almacenar en recursos y luego proporcionar se los a la función como cadenas.
Es para que no tenga que tenerlos almacenados en disco en tiempo de ejecución.

Un saludo

Paco García
Posts: 989
Joined: Thu Nov 24, 2005 03:01 PM
Re: HB_hbrun()
Posted: Mon May 11, 2015 10:15 AM

Hi Paco,

IMHO you can coose between 2 solutions, depending on how important is your concern about having include files stored on disk.
1) Store them in resources, and, when you are about to compiling sth just dump them into cYourAppDir\include, and use thet dir. Delete it after use.
2) Before compiling, read the target source into a buffer, replace every "#include 'whatever.ch' " with the corresponding header code taken from your resources, and compile the expanded source buffer.

Best regards

Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Posts: 145
Joined: Wed Nov 03, 2010 09:16 AM
Re: HB_hbrun()
Posted: Mon May 11, 2015 11:18 AM

Muchas gracias. ;)

Paco García

Continue the discussion