HMG 3.0.44 compiles and works under Wine 1.5 and REACTOS
Posted: Sat Oct 27, 2012 9:06 pm
Code: Select all
SET HMGPATH=
SET PATH=
set runafterbuild=.t.
set gtdrivers=-gtgui -gtwin
SET HMGPATH=c:\hmg.3.0.44
rem =%~dp0
SET PATH=c:\hmg.3.0.44\harbour\bin;c:\hmg.3.0.44\mingw\bin;%PATH%
rem echo #define HMGRPATH c:\hmg.3.0.44\resources > _hmg_resconfig.h
rem COPY /b c:\hmg.3.0.44\resources\hmg.rc + %~n1.rc + c:\hmg.3.0.44\resources\filler _temp.rc >NUL
rem ---
c:\hmg.3.0.44\mycopy %~n1.rc
rem ---
windres -i _temp.rc -o _temp.o
HBMK2 -mt -o%~n1.exe c:\hmg.3.0.44\hmg.hbc %gtdrivers% %1
if "%runafterbuild%"==".t." if exist %~1.exe %~1.exe
// with wine 1.5 and reactos version ( based on wine 1.3.x ) bootcd-56234-dbgwin.iso
// I hope this is noteworthy for some of HMGiants.
Code: Select all
#include "minigui.ch" // 2.9.5
func main
para myfile
local buffer:=space(300)
local xx:=1
fin=fopen("c:\hmg.3.0.44\resources\hmg.rc")
fout=fcreate("_temp.rc",3)
do while (xx> 0)
xx:=fread(fin,@buffer,256)
fwrite(fout,@buffer,xx)
enddo
fclose(fin)
//------------
fin=fcreate("_hmg_resconfig.h",3)
fwrite(fin,"#define HMGRPATH c:\hmg.3.0.44\resources ",42)
fclose(fin)
//--------------
xx:=1
if file(myfile)
if filesize( myfile )> 10
fin=fopen(myfile)
do while (xx> 0)
xx:=fread(fin,@buffer,256)
fwrite(fout,@buffer,xx)
enddo
fclose(fin)
endif
endif
fwrite(fout,chr(13)+chr(10),2)
fclose(fout)
return nil
so if you substitute c:\hmg.3.0.44\build.bat with the above and comple the little mycopy.exe
you can compile from CmdLine with c:\hmg.3.0.44\build.bat
The IDE works but I can't compile yet.
Happy HMGing

KlausKugel