diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-12-10 17:50:20 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-12-10 23:12:10 +0000 |
commit | 2f7de349ea4b9f26bf14d0ee5704cfe248462dd7 (patch) | |
tree | afd978cbd6984c0e2b97925d20309a4c9788d073 | |
parent | faf667ada7181b50890bc9fc970b99da0916d02c (diff) | |
download | netsurf-2f7de349ea4b9f26bf14d0ee5704cfe248462dd7.tar.gz netsurf-2f7de349ea4b9f26bf14d0ee5704cfe248462dd7.tar.bz2 |
update resource search path to remove users directory
it is no longer suitable to search the users home directory for
general browser resources as the correct config path is now
derived from the apropriate windows methods.
Additionaly the NETSURFRES environment variable is no longer part
of the fixed path and is instead added from the makefile
configuration option.
-rw-r--r-- | frontends/windows/Makefile.defaults | 4 | ||||
-rw-r--r-- | frontends/windows/main.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/frontends/windows/Makefile.defaults b/frontends/windows/Makefile.defaults index 1d844f112..51e71accb 100644 --- a/frontends/windows/Makefile.defaults +++ b/frontends/windows/Makefile.defaults @@ -3,8 +3,8 @@ # ---------------------------------------------------------------------------- # Where to search for NetSurf's resources after looking in ~/.netsurf and -# $NETSURFRES. It must have a trailing backslash -NETSURF_WINDOWS_RESPATH := +# ${APPDATA}\NetSurf. It must have a trailing backslash +NETSURF_WINDOWS_RESPATH := $${NETSURFRES} # Enable NetSurf's use of librosprite for displaying RISC OS Sprites # Valid options: YES, NO, AUTO diff --git a/frontends/windows/main.c b/frontends/windows/main.c index 54e0249a8..d71bb8756 100644 --- a/frontends/windows/main.c +++ b/frontends/windows/main.c @@ -375,6 +375,9 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd) */ nslog_init(nslog_ensure, &argc, argv); + /* build resource path string vector */ + respaths = nsws_init_resource("${APPDATA}\\NetSurf:${PROGRAMFILES}\\NetSurf\\NetSurf\\:"NETSURF_WINDOWS_RESPATH); + /* Locate the correct user configuration directory path */ ret = get_config_home(&nsw32_config_home); if (ret != NSERROR_OK) { @@ -391,8 +394,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd) return 1; } - respaths = nsws_init_resource("${APPDATA}\\NetSurf:${HOME}\\.netsurf:${NETSURFRES}:${PROGRAMFILES}\\NetSurf\\NetSurf\\:"NETSURF_WINDOWS_RESPATH); - /* Initialise translated messages */ ret = nsw32_messages_init(respaths); if (ret != NSERROR_OK) { |