summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-10-19 22:07:43 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2016-10-19 22:07:43 (GMT)
commit43e91251ad7844961f75c8af0ce7605c6e33f09b (patch)
treef5a3d7a9bb0afca03fbd44608d199b4614d7bf42
parent601d9da66d173152fcc095d271b08b43a02ca905 (diff)
downloadnetsurf-43e91251ad7844961f75c8af0ce7605c6e33f09b.tar.gz
netsurf-43e91251ad7844961f75c8af0ce7605c6e33f09b.tar.bz2
windows frontend netsurf options
-rw-r--r--frontends/windows/Makefile3
-rw-r--r--frontends/windows/options.h33
-rw-r--r--utils/nsoption.c2
-rw-r--r--utils/nsoption.h4
4 files changed, 41 insertions, 1 deletions
diff --git a/frontends/windows/Makefile b/frontends/windows/Makefile
index cfb1712..baaf225 100644
--- a/frontends/windows/Makefile
+++ b/frontends/windows/Makefile
@@ -15,6 +15,7 @@ LDFLAGS += -lgnurx -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -lshlwapi -mwindows
CFLAGS += -U__STRICT_ANSI__ -mwin32
# only windows versions after XP are supported
+# https://msdn.microsoft.com/en-gb/library/windows/desktop/aa383745
CFLAGS += '-DWINVER=0x0501'
CFLAGS += '-D_WIN32_WINNT=0x0501'
CFLAGS += '-D_WIN32_WINDOWS=0x0501'
@@ -23,7 +24,7 @@ CFLAGS += '-D_WIN32_IE=0x0501'
#installed resource path
CFLAGS += '-DNETSURF_WINDOWS_RESPATH="$(NETSURF_WINDOWS_RESPATH)"'
-WSCFLAGS := -std=c99 -DCURL_STATICLIB -DCARES_STATICLIB -g
+WSCFLAGS := -std=c99 -Dnswin32 -DCURL_STATICLIB -DCARES_STATICLIB -g
CFLAGS += $(WSCFLAGS)
LDFLAGS += $(WSCFLAGS)
diff --git a/frontends/windows/options.h b/frontends/windows/options.h
new file mode 100644
index 0000000..50e6e00
--- a/dev/null
+++ b/frontends/windows/options.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2016 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _NETSURF_WIN32_OPTIONS_H_
+#define _NETSURF_WIN32_OPTIONS_H_
+
+/* currently nothing here */
+
+#endif
+
+/* location to download files to */
+NSOPTION_STRING(downloads_directory, NULL)
+
+/* where to store URL database */
+NSOPTION_STRING(url_file, NULL)
+
+/* path to save hotlist file */
+NSOPTION_STRING(hotlist_path, NULL)
diff --git a/utils/nsoption.c b/utils/nsoption.c
index f92debb..9ac4778 100644
--- a/utils/nsoption.c
+++ b/utils/nsoption.c
@@ -77,6 +77,8 @@ static struct nsoption_s defaults[] = {
#include "atari/options.h"
#elif defined(nsmonkey)
#include "monkey/options.h"
+#elif defined(nswin32)
+#include "windows/options.h"
#endif
{ NULL, 0, OPTION_INTEGER, { 0 } }
};
diff --git a/utils/nsoption.h b/utils/nsoption.h
index 75558f4..62c89c4 100644
--- a/utils/nsoption.h
+++ b/utils/nsoption.h
@@ -71,6 +71,8 @@
#include "atari/options.h"
#elif defined(nsmonkey)
#include "monkey/options.h"
+#elif defined(nswin32)
+#include "windows/options.h"
#endif
#undef NSOPTION_BOOL
@@ -142,6 +144,8 @@ enum nsoption_e {
#include "atari/options.h"
#elif defined(nsmonkey)
#include "monkey/options.h"
+#elif defined(nswin32)
+#include "windows/options.h"
#endif
NSOPTION_LISTEND /* end of list */
};