more clever unzip, -Dunix

This commit is contained in:
p.kosyh 2010-06-04 04:59:55 +00:00
parent 029f951efa
commit 915c25d1de
3 changed files with 8 additions and 3 deletions

View file

@ -26,7 +26,7 @@ LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LFLAGS=$(shell sdl-config --libs) -lSDL_ttf -lSDL_mixer -lSDL_image
CFLAGS += -g -Wall -D_HAVE_ICONV -D_USE_UNPACK
CFLAGS += -g -Wall -D_HAVE_ICONV -Dunix -D_USE_UNPACK
INSTALLD=echo "Do not install standalone version!"
INSTALLB=echo "Do not install standalone version!"

View file

@ -27,7 +27,7 @@ LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LFLAGS=$(shell sdl-config --libs) -lSDL_ttf -lSDL_mixer -lSDL_image
CFLAGS += -Wall -D_HAVE_ICONV -D_USE_UNPACK
CFLAGS += -Wall -Dunix -D_HAVE_ICONV -D_USE_UNPACK
INSTALLD=install -d -m 0755
INSTALLB=install -m 0755

View file

@ -2376,7 +2376,12 @@ int game_from_disk(void)
p = game_local_games_path(1);
fprintf(stderr,"Trying to install: %s\n", g);
if (!unpack(g, p) && zip_game_dirname[0]) {
games_replace(p, zip_game_dirname);
if (games_replace(p, zip_game_dirname)) {
p = getpath(p, zip_game_dirname);
remove_dir(p);
free(p);
return -1;
}
p = zip_game_dirname;
#else
if (0) {