]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Only try to chdir(PAKLOCATION) if it's actually set.
authorGuus Sliepen <guus@debian.org>
Sat, 21 Nov 2015 19:42:26 +0000 (20:42 +0100)
committerGuus Sliepen <guus@debian.org>
Sat, 21 Nov 2015 19:42:26 +0000 (20:42 +0100)
Makefile.windows
src/main.cpp

index 245b9518ca3b3b779593c5b6855f0a774bf35f40..d4adc68f947d8f078db937c3b49d70cf805123e9 100755 (executable)
@@ -4,7 +4,7 @@ DOCS = doc/*
 ICONS = icons/
 DATA = data gfx sound music
 
-VERSION = 1.19
+VERSION = 2.00
 RELEASE ?= 1
 USEPAK ?= 1
 
@@ -23,7 +23,7 @@ CXX = i686-w64-mingw32-g++
 CXXFLAGS += -Dmain=SDL_main
 CXXFLAGS += -I/your/mingw/include
 CXXFLAGS += -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DUSEPAK=$(USEPAK)
-CXXFLAGS += -DPAKNAME=\"$(PAKNAME)\" -DPAKLOCATION=\"\" -DGAMEPLAYMANUAL=\"doc/index.html\" -Wall
+CXXFLAGS += -DPAKNAME=\"$(PAKNAME)\" -DPAKLOCATION=\".\" -DGAMEPLAYMANUAL=\"doc/index.html\" -Wall
 CXXFLAGS += -DLOCALEDIR=\"\" $(CFLAGS)  -DMEDAL_SERVER_HOST=\"$(MEDAL_SERVER_HOST)\" -DMEDAL_SERVER_PORT=$(MEDAL_SERVER_PORT) -Werror
 LIBS = -lmingw32 -lz -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lSDL2_net -lSDL2main -lSDL2 -lwinmm -lgdi32
 PAKLIBS = -lmingw32 -lz
index 9282a1e23a764f703ef04405f927274f077d0031..dbab69d0328fd6959e1788950ccdb2b933b9dd37 100644 (file)
@@ -124,12 +124,14 @@ int main(int argc, char *argv[])
        #endif
 
        #if RELEASE
-       if (chdir(PAKLOCATION))
+       #ifdef PAKLOCATION
+       if (PAKLOCATION[0] && chdir(PAKLOCATION))
        {
-               perror("Could not chdir to " PAKLOCATION ":");
+               perror("Could not chdir to '" PAKLOCATION "'");
                return 1;
        }
        #endif
+       #endif
        
        config.engine = &engine;