From 5eba735be6cfdd28056a7e10028a6e43d520b62d Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 9 Jun 2014 21:44:48 +0200 Subject: Fix include path for 3.1 release. diff --git a/beos/about.cpp b/beos/about.cpp index cd8070e..2483a22 100644 --- a/beos/about.cpp +++ b/beos/about.cpp @@ -23,7 +23,7 @@ extern "C" { #include "desktop/netsurf.h" #include "utils/log.h" -#include "utils/testament.h" +#include "testament.h" #include "utils/useragent.h" #include "curl/curlver.h" } -- 1.8.3.4 From 0ca5cc927067cbbc43fc14c2753bea6a80d7e629 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 20 Jun 2014 13:23:22 +0200 Subject: Use PathFinder to locate resource folder. So it can work wherever NetSurf is installed... diff --git a/beos/gui.cpp b/beos/gui.cpp index 365a356..caa6ef4 100644 --- a/beos/gui.cpp +++ b/beos/gui.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -79,9 +80,6 @@ extern "C" { static void *myrealloc(void *ptr, size_t len, void *pw); -/* Where to search for shared resources. Must have trailing / */ -#define RESPATH "/boot/apps/netsurf/res/" - //TODO: use resources // enable using resources instead of files #define USE_RESOURCES 1 @@ -297,7 +295,13 @@ static char *find_resource(char *buf, const char *filename, const char *def) return buf; } - strcpy(t, RESPATH); + + BPathFinder f((void*)find_resource); + + BPath p; + f.FindPath(B_FIND_PATH_APPS_DIRECTORY, "netsurf/res/", p); + strcpy(t, p.Path()); + strcat(t, filename); realpath(t, buf); if (access(buf, R_OK) == 0) @@ -488,7 +492,10 @@ static bool nslog_stream_configure(FILE *fptr) static BPath get_messages_path() { - BPath p("/boot/apps/netsurf/res"); + BPathFinder f((void*)get_messages_path); + + BPath p; + f.FindPath(B_FIND_PATH_APPS_DIRECTORY, "netsurf/res", p); // TODO: use Haiku's BLocale stuff BString lang(getenv("LC_MESSAGES")); lang.Truncate(2); -- 1.8.3.4 From 10221eb8e3326f1fc7db289a88d3962097ded3fd Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 30 Aug 2014 17:08:21 +0000 Subject: let's find libcss diff --git a/Makefile b/Makefile index 4f9380a..58a3fd6 100644 --- a/Makefile +++ b/Makefile @@ -200,7 +200,7 @@ else CC := gcc CXX := g++ EXEEXT := - PKG_CONFIG := + PKG_CONFIG := pkg-config #endif else ifeq ($(TARGET),windows) diff --git a/beos/Makefile.target b/beos/Makefile.target index ed7532d..26ac998 100644 --- a/beos/Makefile.target +++ b/beos/Makefile.target @@ -79,6 +79,11 @@ else $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF)) $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG )) endif +$(eval $(call pkg_config_find_and_add,libcss,CSS)) +$(eval $(call pkg_config_find_and_add,libdom,DOM)) +$(eval $(call pkg_config_find_and_add,libhubbub,Hubbub)) +$(eval $(call pkg_config_find_and_add,openssl,OpenSSL)) +$(eval $(call pkg_config_find_and_add,libcurl,Curl )) # ---------------------------------------------------------------------------- # Source file setup -- 1.8.3.4 From 62d67afbfcd0a586107b1ce104ba7d40cd79a1c0 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 30 Aug 2014 17:42:55 +0000 Subject: declaration of 'BRect frame' shadows a parameter diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp index 35153b3..0df5365 100644 --- a/beos/scaffolding.cpp +++ b/beos/scaffolding.cpp @@ -186,12 +186,12 @@ private: const BBitmap *fIconBitmap; }; -NSIconTextControl::NSIconTextControl(BRect frame, const char* name, +NSIconTextControl::NSIconTextControl(BRect _frame, const char* name, const char* label, const char* initialText, BMessage* message, uint32 resizeMode, uint32 flags) - : BTextControl(frame, name, label, initialText, message, resizeMode, flags), + : BTextControl(_frame, name, label, initialText, message, resizeMode, flags), fIconOffset(0,0), fIconBitmap(NULL) { -- 1.8.3.4 From 563da3f7cd533d395ac3b6a45d7828ffbd5b45bf Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 30 Aug 2014 17:47:22 +0000 Subject: fix Haiku case diff --git a/Makefile b/Makefile index 58a3fd6..36b8380 100644 --- a/Makefile +++ b/Makefile @@ -61,10 +61,6 @@ else ifeq ($(HOST),BeOS) HOST := beos endif - ifeq ($(HOST),Haiku) - # Haiku implements the BeOS API - HOST := beos - endif ifeq ($(HOST),beos) # Build happening on BeOS platform, default target is BeOS backend ifeq ($(TARGET),) @@ -100,11 +96,18 @@ else TARGET := windows endif endif - + ifeq ($(HOST),Haiku) + # Build happening on Haiku platform, default target is BeOS backend + ifeq ($(TARGET),) + TARGET := beos + endif + endif + # Default target is GTK backend ifeq ($(TARGET),) TARGET := gtk endif + endif endif endif @@ -194,14 +197,11 @@ ifeq ($(TARGET),riscos) else ifeq ($(TARGET),beos) # Building for BeOS/Haiku - #ifeq ($(HOST),beos) - # Build for BeOS on BeOS - GCCSDK_INSTALL_ENV := /boot/develop - CC := gcc - CXX := g++ - EXEEXT := - PKG_CONFIG := pkg-config - #endif + GCCSDK_INSTALL_ENV := /boot/develop + CC := gcc + CXX := g++ + EXEEXT := + PKG_CONFIG := pkg-config else ifeq ($(TARGET),windows) ifneq ($(HOST),windows) diff --git a/beos/Makefile.target b/beos/Makefile.target index 26ac998..2beaa46 100644 --- a/beos/Makefile.target +++ b/beos/Makefile.target @@ -38,12 +38,8 @@ ifeq ($(HOST),beos) ifneq ($(wildcard /boot/develop/lib/*/libzeta.so),) LDFLAGS += -lzeta endif - ifneq ($(wildcard /boot/develop/lib/*/libnetwork.so),) + ifeq ($(HOST),Haiku) # Haiku - CFLAGS += -I/boot/common/include \ - -I/boot/common/include/hubbub \ - -I/boot/common/include/libcss \ - -I/boot/common/include/parserutils NETLDFLAGS := -lnetwork else ifneq ($(wildcard /boot/develop/lib/*/libbind.so),) @@ -72,18 +68,19 @@ ifeq ($(HOST),beos) $(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif))) $(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) )) else + NETLDFLAGS := -lnetwork NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG +endif $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP)) $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF)) $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG )) -endif -$(eval $(call pkg_config_find_and_add,libcss,CSS)) -$(eval $(call pkg_config_find_and_add,libdom,DOM)) -$(eval $(call pkg_config_find_and_add,libhubbub,Hubbub)) -$(eval $(call pkg_config_find_and_add,openssl,OpenSSL)) -$(eval $(call pkg_config_find_and_add,libcurl,Curl )) + $(eval $(call pkg_config_find_and_add,libcss,CSS)) + $(eval $(call pkg_config_find_and_add,libdom,DOM)) + $(eval $(call pkg_config_find_and_add,libhubbub,Hubbub)) + $(eval $(call pkg_config_find_and_add,openssl,OpenSSL)) + $(eval $(call pkg_config_find_and_add,libcurl,Curl )) # ---------------------------------------------------------------------------- # Source file setup -- 1.8.3.4 From 542734b11d256a596eb1735cdac273f90a70d865 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 30 Aug 2014 19:29:14 +0000 Subject: x86_64 fixes diff --git a/beos/filetype.cpp b/beos/filetype.cpp index d5bd3d7..a3bcddb 100644 --- a/beos/filetype.cpp +++ b/beos/filetype.cpp @@ -72,7 +72,7 @@ void beos_fetch_filetype_init(void) continue; } // the mime db doesn't know about it yet - BMessage extensions(0UL); + BMessage extensions((uint32)0UL); if (default_types[i].ext1) extensions.AddString("extensions", default_types[i].ext1); if (default_types[i].ext2) diff --git a/beos/window.cpp b/beos/window.cpp index 8975c18..af736b8 100644 --- a/beos/window.cpp +++ b/beos/window.cpp @@ -1288,7 +1288,7 @@ void gui_get_clipboard(char **buffer, size_t *length) clip = be_clipboard->Data(); if (clip) { const char *text; - int32 textlen; + ssize_t textlen; if (clip->FindData("text/plain", B_MIME_TYPE, (const void **)&text, &textlen) >= B_OK) { *buffer = (char *)malloc(textlen); diff --git a/utils/talloc.c b/utils/talloc.c index 44b65aa..408e94b 100644 --- a/utils/talloc.c +++ b/utils/talloc.c @@ -55,7 +55,7 @@ #include "replace.h" #else #include -#if !defined(__BEOS__) && !defined(__HAIKU__) && __GNUC__ > 2 +#if !defined(__BEOS__) && __GNUC__ > 2 /* Assume we've got va_copy */ #define HAVE_VA_COPY #include -- 1.8.3.4