Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -rupN SeventhSense-1.12.7/Makefile SeventhSense-1.12.7-mod/Makefile
- --- SeventhSense-1.12.7/Makefile 2012-03-14 22:27:58.000000000 +0100
- +++ SeventhSense-1.12.7-mod/Makefile 2012-06-26 11:03:47.763493361 +0200
- @@ -1,4 +1,3 @@
- -
- # Used to build fat versions of the programe
- ifneq (,$(findstring gcc-fat.sh,$(wildcard $(HOME)/projects/*.sh)))
- CC := $(HOME)/projects/gcc-fat.sh
- @@ -7,13 +6,18 @@ ifneq (,$(findstring g++-fat.sh,$(wildca
- CXX := $(HOME)/projects/g++-fat.sh
- endif
- +TARGET := LoneWolf
- +prefix := /usr/local
- +exec_prefix := $(prefix)
- +bindir = $(exec_prefix)/bin
- +datarootdir := $(prefix)/share
- +datadir := $(datarootdir)/seventhsense
- +
- OPTIMIZE := -O2
- -CFLAGS := $(OPTIMIZE) -I/usr/local/include $(shell sdl-config --cflags) -D__EXPORT__=extern
- +CFLAGS := $(OPTIMIZE) -I/usr/local/include $(shell sdl-config --cflags) -D__EXPORT__=extern -DDATADIR='"$(datadir)/"'
- CXXFLAGS := $(CFLAGS)
- LIBS := $(shell sdl-config --libs) -lSDL_image -lSDL_ttf -lphysfs -lcurl
- -TARGET := LoneWolf
- -
- SOURCES := \
- src/action_chart.cpp \
- src/award.cpp \
- @@ -82,6 +86,16 @@ $(TARGET).dmg: $(TARGET).app
- hdiutil create -fs HFS+ -srcfolder tmp -volname "Seventh Sense" $@
- $(RM) -r tmp
- +debug: CXXFLAGS += -D_DEBUG
- +debug: $(TARGET)
- +
- +EDITOR: CXXFLAGS += -DEDITOR
- +EDITOR: $(TARGET)
- +
- +STANDALONE: CXXFLAGS += -DSTANDALONE
- +STANDALONE: $(TARGET)
- + tar -czf $(TARGET).tar.gz $(TARGET) data
- +
- clean:
- $(RM) $(OBJECTS)
- @@ -91,7 +105,20 @@ distclean: clean
- $(RM) data/books/*/covers/*
- $(RM) data/profiles/*.*
- $(RM) settings.txt
- - $(RM) -r LoneWolf.app
- - $(RM) LoneWolf.dmg
- + $(RM) -r $(TARGET).app
- + $(RM) $(TARGET).dmg
- + $(RM) $(TARGET).tar.gz
- dist: distclean
- +
- +install:
- + install -m 0755 $(TARGET) $(bindir)
- + install -d $(datadir)
- + cp -r data $(datadir)
- + find $(datadir) -type d -exec chmod 755 {} \;
- + find $(datadir) -type f -exec chmod 644 {} \;
- +
- +
- +uninstall:
- + rm -rf $(bindir)/$(TARGET)
- + rm -rf $(datadir)
- diff -rupN SeventhSense-1.12.7/src/loader.cpp SeventhSense-1.12.7-mod/src/loader.cpp
- --- SeventhSense-1.12.7/src/loader.cpp 2012-01-20 22:07:48.000000000 +0100
- +++ SeventhSense-1.12.7-mod/src/loader.cpp 2012-06-26 11:05:36.383498674 +0200
- @@ -86,7 +86,16 @@ bool LOADER::start_PHYSFS(GAME * game, c
- basedir = basedir.substr(0, basedir.rfind("MacOS")) + "Resources/";
- } else
- #endif
- +#ifdef __linux__
- + basedir = DATADIR;
- +#else
- basedir = PHYSFS_getBaseDir();
- +#endif
- +
- +#ifdef STANDALONE
- + basedir = PHYSFS_getBaseDir(); //keep it local to install folder!
- +#endif
- +
- if (game->diag)
- printf("Base Directory: %s\n",basedir.c_str());
- @@ -101,7 +110,11 @@ bool LOADER::start_PHYSFS(GAME * game, c
- return false;
- }
- writedir = PHYSFS_getUserDir();
- - writedir += "Documents/Seventh Sense/";
- +#ifdef __linux__
- + writedir += ".seventhsense/";
- +#else
- + writedir += "Documents/Seventh Sense/";
- +#endif
- {
- if (!PHYSFS_addToSearchPath(writedir.c_str(),1))
- printf("Unable to add write folder to PHYSFS search path.\n"
- @@ -114,12 +127,20 @@ bool LOADER::start_PHYSFS(GAME * game, c
- writedir = basedir; //keep it local to install folder!
- #else
- writedir = PHYSFS_getUserDir();
- +#ifdef __linux__
- + writedir += ".seventhsense/";
- +#else
- writedir += "Documents/Seventh Sense/";
- #endif
- +#endif
- if (!PHYSFS_setWriteDir(writedir.c_str()) &&
- (!PHYSFS_setWriteDir(PHYSFS_getUserDir()) ||
- +#ifdef __linux__
- + !PHYSFS_mkdir(".seventhsense/") ||
- +#else
- !PHYSFS_mkdir("Documents/Seventh Sense/") ||
- +#endif
- !PHYSFS_setWriteDir(writedir.c_str())))
- {
- printf("Unable to establish writing privileges for the file system.\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement