Use MDATA instead of DATA to avoid naming conflict
The header file objidl.h on Windows uses DATA in a different way, so we need to avoid that name.
This commit is contained in:
parent
ee6d2a1f6d
commit
fb316e7873
4 changed files with 16 additions and 11 deletions
|
@ -858,7 +858,7 @@ midori_browser_speed_dial_get_next_free_slot (void)
|
|||
|
||||
if (!g_file_test (body_fname, G_FILE_TEST_EXISTS))
|
||||
{
|
||||
if (g_file_get_contents (DATADIR "/midori/res/speeddial.json",
|
||||
if (g_file_get_contents (MDATADIR "/midori/res/speeddial.json",
|
||||
&speed_dial_body, NULL, NULL))
|
||||
{
|
||||
g_file_set_contents (body_fname, speed_dial_body, -1, NULL);
|
||||
|
|
|
@ -729,7 +729,7 @@ webkit_web_view_load_error_cb (WebKitWebView* web_view,
|
|||
GError* error,
|
||||
MidoriView* view)
|
||||
{
|
||||
const gchar* template_file = DATADIR "/midori/res/error.html";
|
||||
const gchar* template_file = MDATADIR "/midori/res/error.html";
|
||||
gchar* template;
|
||||
|
||||
if (g_file_get_contents (template_file, &template, NULL, NULL))
|
||||
|
@ -786,7 +786,7 @@ webkit_web_frame_load_done_cb (WebKitWebFrame* web_frame,
|
|||
data = g_strdup_printf (
|
||||
"<html><head><title>%s</title></head>"
|
||||
"<body><h1>%s</h1>"
|
||||
"<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
|
||||
"<img src=\"file://" MDATADIR "/midori/logo-shade.png\" "
|
||||
"style=\"position: absolute; right: 15px; bottom: 15px;\">"
|
||||
"<p />The page you were opening doesn't exist."
|
||||
"<p />Try to <a href=\"%s\">load the page again</a>, "
|
||||
|
@ -2059,7 +2059,7 @@ midori_view_set_uri (MidoriView* view,
|
|||
|
||||
katze_assign (view->uri, g_strdup (""));
|
||||
|
||||
g_file_get_contents (DATADIR "/midori/res/speeddial-head.html",
|
||||
g_file_get_contents (MDATADIR "/midori/res/speeddial-head.html",
|
||||
&speed_dial_head, NULL, NULL);
|
||||
|
||||
res_server = sokoke_get_res_server ();
|
||||
|
@ -2071,7 +2071,7 @@ midori_view_set_uri (MidoriView* view,
|
|||
|
||||
if (!g_file_test (body_fname, G_FILE_TEST_EXISTS))
|
||||
{
|
||||
if (g_file_get_contents (DATADIR "/midori/res/speeddial.json",
|
||||
if (g_file_get_contents (MDATADIR "/midori/res/speeddial.json",
|
||||
&speed_dial_body, NULL, NULL))
|
||||
g_file_set_contents (body_fname, speed_dial_body, -1, NULL);
|
||||
else
|
||||
|
@ -2122,7 +2122,7 @@ midori_view_set_uri (MidoriView* view,
|
|||
data = g_strdup_printf (
|
||||
"<html><head><title>%s</title></head>"
|
||||
"<body><h1>%s</h1>"
|
||||
"<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
|
||||
"<img src=\"file://" MDATADIR "/midori/logo-shade.png\" "
|
||||
"style=\"position: absolute; right: 15px; bottom: 15px;\">"
|
||||
"<p />The document %s of type '%s' cannot be displayed."
|
||||
"</body></html>",
|
||||
|
@ -2139,7 +2139,7 @@ midori_view_set_uri (MidoriView* view,
|
|||
data = g_strdup_printf (
|
||||
"<html><head><title>%s</title></head>"
|
||||
"<body><h1>%s</h1>"
|
||||
"<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
|
||||
"<img src=\"file://" MDATADIR "/midori/logo-shade.png\" "
|
||||
"style=\"position: absolute; right: 15px; bottom: 15px;\">"
|
||||
"<p />There is no documentation installed at %s."
|
||||
"You may want to ask your distribution or "
|
||||
|
|
|
@ -958,7 +958,7 @@ res_server_handler_cb (SoupServer* res_server,
|
|||
{
|
||||
if (g_str_has_prefix (path, "/res"))
|
||||
{
|
||||
gchar* filename = g_strconcat (DATADIR "/midori", path, NULL);
|
||||
gchar* filename = g_strconcat (MDATADIR "/midori", path, NULL);
|
||||
gchar* contents;
|
||||
gsize length;
|
||||
|
||||
|
|
11
wscript
11
wscript
|
@ -51,12 +51,14 @@ def configure (conf):
|
|||
Utils.pprint ('RED', desc + ' N/A')
|
||||
sys.exit (1)
|
||||
|
||||
def dirname_default (dirname, default):
|
||||
def dirname_default (dirname, default, defname=None):
|
||||
if getattr (Options.options, dirname) == '':
|
||||
dirvalue = default
|
||||
else:
|
||||
dirvalue = getattr (Options.options, dirname)
|
||||
conf.define (dirname, dirvalue)
|
||||
if not defname:
|
||||
defname = dirname
|
||||
conf.define (defname, dirvalue)
|
||||
return dirvalue
|
||||
|
||||
conf.check_tool ('compiler_cc')
|
||||
|
@ -86,13 +88,16 @@ def configure (conf):
|
|||
nls = 'no '
|
||||
conf.define ('ENABLE_NLS', [0,1][nls == 'yes'])
|
||||
|
||||
dirname_default ('DATADIR', os.path.join (conf.env['PREFIX'], 'share'))
|
||||
dirname_default ('DOCDIR', os.path.join (conf.env['DATADIR'], 'doc'))
|
||||
dirname_default ('LIBDIR', os.path.join (conf.env['PREFIX'], 'lib'))
|
||||
if conf.env['PREFIX'] == '/usr':
|
||||
dirname_default ('SYSCONFDIR', '/etc')
|
||||
else:
|
||||
dirname_default ('SYSCONFDIR', os.path.join (conf.env['PREFIX'], 'etc'))
|
||||
dirname_default ('DATADIR', os.path.join (conf.env['PREFIX'], 'share'),
|
||||
# Use MDATADIR because DATADIR is a constant in objidl.h on Windows
|
||||
'MDATADIR')
|
||||
conf.undefine ('DATADIR')
|
||||
|
||||
if option_enabled ('apidocs'):
|
||||
conf.find_program ('gtkdoc-scan', var='GTKDOC_SCAN')
|
||||
|
|
Loading…
Reference in a new issue