From 705e6fef3e9e204cda28a50c65578bb2c9f0f6d6 Mon Sep 17 00:00:00 2001 From: Abdur-Raheem Idowu Date: Wed, 15 Jan 2020 12:08:38 +0000 Subject: fixed makefile diff --git a/Makefile b/Makefile index 54ef5ae..64f18b1 100755 --- a/Makefile +++ b/Makefile @@ -21,8 +21,8 @@ MEDAL_SERVER_PORT = 80 CXXFLAGS += `pkg-config --cflags sdl2 SDL2_mixer SDL2_image SDL2_ttf SDL2_net` -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DUSEPAK=$(USEPAK) CXXFLAGS += -DPAKNAME=\"$(PAKNAME)\" -DPAKLOCATION=\"$(DATADIR)\" -DUNIX -DGAMEPLAYMANUAL=\"$(DOCDIR)index.html\" -Wall CXXFLAGS += -DLOCALEDIR=\"$(LOCALEDIR)\" -DMEDAL_SERVER_HOST=\"$(MEDAL_SERVER_HOST)\" -DMEDAL_SERVER_PORT=$(MEDAL_SERVER_PORT) -CXXFLAGS += $(CFLAGS) -Werror -LIBS = `pkg-config --libs sdl2 SDL2_mixer SDL2_image SDL2_ttf SDL2_net` -lz +CXXFLAGS += $(CFLAGS) +LIBS = `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lSDL2_net -lz -lintl PAKLIBS = -lz OBJS += CAudio.o -- 2.19.0 From d31f923295de3bda6f40a4f8dd8c13452c2ae990 Mon Sep 17 00:00:00 2001 From: Abdur-Raheem Idowu Date: Wed, 15 Jan 2020 12:24:24 +0000 Subject: Removed duplicate declarations diff --git a/src/headers.h b/src/headers.h index 389b34b..ae64e8b 100644 --- a/src/headers.h +++ b/src/headers.h @@ -56,7 +56,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamma(float *red, float *green, float *blue); #define textdomain(x) while(false) #endif -#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) +#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) && !defined(__HAIKU__) static inline void strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); } static inline void strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; } #endif -- 2.19.0 From be609d5c68a6509b3507be3ddfc1ac4167678fc3 Mon Sep 17 00:00:00 2001 From: Abdur-Raheem Idowu Date: Wed, 15 Jan 2020 18:21:04 +0000 Subject: Allows launch from Tracker and Deskbar diff --git a/src/main.cpp b/src/main.cpp index dbab69d..5177aba 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,6 +19,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef __HAIKU__ +#include +#include +#endif #include "main.h" @@ -122,6 +126,14 @@ int main(int argc, char *argv[]) #if !USEPAK debug(("Not Using PAK...\n")); #endif + + #ifdef __HAIKU__ + char* binpath = realpath(argv[0], NULL); + if (binpath != NULL) { + chdir(dirname(binpath)); + free(binpath); + } + #endif #if RELEASE #ifdef PAKLOCATION -- 2.19.0