birdal46 / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Building on Mingw #494

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Had a few build issues with grafx2-2.3.1781-src.tgz on MinGW 4.6.2 on Windows 
and wanted to share what I did to work-around them in case someone else hits 
the problems.  

First, had problems with it finding libpng.  It's looking for lpng14 and 
libpng14-14.dll in the src/Makefile, but I have 15 installed.  Replaced all 
instances of lpng14 with lpng and libpng14-14.dll with libpng.dll in 
src/Makefile.

Second, downloaded a copy of lua-5.2.1 since grafx2 seemed to want the lua 
library headers when building.  Had trouble with grafx2 not finding lua_open 
during the linking phase.
According to:
http://www.lua.org/manual/5.1/manual.html#7.3
lua_open is no longer supported.

I created the attached patch and it appears to build successfully now when the 
patch is applied.

Original issue reported on code.google.com by lme...@gmail.com on 21 Jun 2012 at 1:18

Attachments:

GoogleCodeExporter commented 8 years ago
The windows version of Grafx2 currently uses libpng 1.4 and Lua 5.1.

In libpng changelist for v1.5, I don't see any useful feature for end-users, so 
I'll keep v1.4 for the time being as it's what I have on my machine. Still, 
it's good to know that when only v1.5 is available, the change is easy. Can't 
automatically detect the version from the makefile on Windows, unfortunately.

About Lua, the change in factory.c is tiny and retro-compatible, so I adopted 
it in r1988. But Lua 5.2 may well break any of the 400Kb of scripts written by 
DawnBringer, so I'd much rather stick with 5.1 until it's certain the scripts 
work on both versions (and that DawnBringer doesn't object with the move).
You made me realize that mazzearos may have some problems with the AROS port, 
where he used Lua 5.2 too.

Original comment by yrizoud on 11 Aug 2012 at 9:28