HB_hbrun()

HB_hbrun()

Postby pgfdz » Mon May 11, 2015 8: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
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: HB_hbrun()

Postby Carlos Mora » 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"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: HB_hbrun()

Postby pgfdz » Mon May 11, 2015 11:18 am

Muchas gracias. ;)
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests