make the framebuffer resource path setting better

This commit is contained in:
Vincent Sanders 2012-08-22 16:58:11 +01:00
parent 29356734eb
commit 7604b76161
3 changed files with 14 additions and 15 deletions

View File

@ -288,9 +288,7 @@ ifeq ($(TARGET),framebuffer)
# Valid options: internal, freetype
NETSURF_FB_FONTLIB := internal
# freetype compiled in font locations
NETSURF_FB_FONTPATH := /usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts
# Default freetype font files
NETSURF_FB_FONT_SANS_SERIF := DejaVuSans.ttf
NETSURF_FB_FONT_SANS_SERIF_BOLD := DejaVuSans-Bold.ttf
NETSURF_FB_FONT_SANS_SERIF_ITALIC := DejaVuSans-Oblique.ttf
@ -302,18 +300,19 @@ ifeq ($(TARGET),framebuffer)
NETSURF_FB_FONT_CURSIVE := Comic_Sans_MS.ttf
NETSURF_FB_FONT_FANTASY := Impact.ttf
# Framebuffer frontends may have differing root paths for resources
# As such, these specify the resource path and config path.
NETSURF_FB_RESPATH_linux := $(PREFIX)/share/netsurf/
NETSURF_FB_RESPATH_able := (tftpboot)/
NETSURF_FB_RESPATH_dummy := ./
NETSURF_FB_RESPATH_sdl := $(PREFIX)/share/netsurf/
NETSURF_FB_RESPATH_x := $(PREFIX)/share/netsurf/
NETSURF_FB_RESPATH_vnc := $(PREFIX)/share/netsurf/
NETSURF_FRAMEBUFFER_RESOURCES = $(NETSURF_FB_RESPATH_$(NETSURF_FB_FRONTEND))
# Default binary install path
NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
# Default resource install path
NETSURF_FRAMEBUFFER_RESOURCES := $(PREFIX)/share/netsurf/
# Default framebuffer search path
NETSURF_FB_RESPATH := $${HOME}/.netsurf/:$${NETSURFRES}:$(NETSURF_FRAMEBUFFER_RESOURCES):./framebuffer/res
# freetype compiled in font serch path
NETSURF_FB_FONTPATH := /usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts
endif
# ----------------------------------------------------------------------------

View File

@ -21,7 +21,7 @@ NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
CFLAGS += -Dnsframebuffer
#resource path
CFLAGS += '-DNETSURF_FB_RESPATH="$(NETSURF_FB_RESPATH_$(NETSURF_FB_FRONTEND))"'
CFLAGS += '-DNETSURF_FB_RESPATH="$(NETSURF_FB_RESPATH)"'
# compile time font locations
CFLAGS += '-DNETSURF_FB_FONTPATH="$(NETSURF_FB_FONTPATH)"'

View File

@ -530,7 +530,7 @@ main(int argc, char** argv)
setbuf(stderr, NULL);
respaths = fb_init_resource("${HOME}/.netsurf/:${NETSURFRES}:"NETSURF_FB_RESPATH":./framebuffer/res:"NETSURF_FB_FONTPATH);
respaths = fb_init_resource(NETSURF_FB_RESPATH":"NETSURF_FB_FONTPATH);
options = filepath_find(respaths, "Choices");
messages = filepath_find(respaths, "messages");