From 427c868add7e8839dc03b57602461699ffa62f19 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sun, 10 Mar 2013 20:10:39 +0000 Subject: [PATCH] sdl: added option to use system minizip --- SConstruct | 8 +++++++- changelog.txt | 1 + src/file.cpp | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index e541727f..70cab20e 100644 --- a/SConstruct +++ b/SConstruct @@ -20,6 +20,7 @@ opts.AddVariables( BoolVariable('DEBUG', 'Build with debugging symbols', 1), BoolVariable('LUA', 'Enable Lua support', 1), BoolVariable('SYSTEM_LUA','Use system lua instead of static lua provided with fceux', 1), + BoolVariable('SYSTEM_MINIZIP', 'Use system minizip instead of static minizip provided with fceux', 0), BoolVariable('NEWPPU', 'Enable new PPU core', 1), BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 1), BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', 1), @@ -83,7 +84,12 @@ else: conf = Configure(env) if conf.CheckFunc('asprintf'): conf.env.Append(CCFLAGS = "-DHAVE_ASPRINTF") - assert conf.CheckLibWithHeader('z', 'zlib.h', 'c', 'inflate;', 1), "please install: zlib" + if env['SYSTEM_MINIZIP']: + assert conf.CheckLibWithHeader('minizip', 'minizip/unzip.h', 'C', 'unzOpen;', 1), "please install: libminizip" + assert conf.CheckLibWithHeader('z', 'zlib.h', 'c', 'inflate;', 1), "please install: zlib" + env.Append(CPPDEFINES=["_SYSTEM_MINIZIP"]) + else: + assert conf.CheckLibWithHeader('z', 'zlib.h', 'c', 'inflate;', 1), "please install: zlib" if not conf.CheckLib('SDL'): print 'Did not find libSDL or SDL.lib, exiting!' Exit(1) diff --git a/changelog.txt b/changelog.txt index c6685ea7..2954ebfc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +10-Mar-2013 - prg - SDL: added option to use system minizip 10-Mar-2013 - prg - updated to use minizip v1.2.7 28-Feb-2013 - AnS - PPU/PAL/Input type changing is now disabled when a movie is playing 28-Feb-2013 - AnS - Cheats: update the window when ROM is changed diff --git a/src/file.cpp b/src/file.cpp index 30d6438e..dcaeab04 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -36,7 +36,11 @@ #include "utils/endian.h" #include "utils/memory.h" #include "utils/md5.h" +#ifdef _SYSTEM_MINIZIP +#include +#else #include "utils/unzip.h" +#endif #include "driver.h" #include "types.h" #include "fceu.h"