Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
9498b54f
Commit
9498b54f
authored
Oct 08, 2011
by
Sebastian Ramacher
Browse files
introduce PLUGINDIR in config.mk which is used to determine the default look up path for plugins
parent
b693b873
Changes
2
Show whitespace changes
Inline
Side-by-side
config.mk
View file @
9498b54f
...
...
@@ -7,6 +7,8 @@ VERSION = 0.0.8.1
PREFIX
?=
/usr
MANPREFIX
?=
${PREFIX}
/share/man
DESKTOPPREFIX
?=
${PREFIX}
/share/applications
# list of : seperated values
PLUGINDIR
?=
${PREFIX}
/lib/zathura
# libs
...
...
@@ -26,7 +28,7 @@ INCS = ${GIRARA_INC} ${GTK_INC} $(SQLITE_INC)
LIBS
=
${GIRARA_LIB}
${GTK_LIB}
$(SQLITE_LIB)
$(DL_LIB)
-lpthread
-lm
# flags
CFLAGS
+=
-std
=
c99
-pedantic
-Wall
-Wno-format-zero-length
-Wextra
$(INCS)
CFLAGS
+=
-std
=
c99
-pedantic
-Wall
-Wno-format-zero-length
-Wextra
$(INCS)
-DZATHURA_PLUGINDIR
=
\"
${PLUGINDIR}
\"
# debug
DFLAGS
?=
-g
...
...
zathura.c
View file @
9498b54f
...
...
@@ -52,7 +52,7 @@ zathura_init(int argc, char* argv[])
}
g_option_context_free
(
context
);
zathura_t
*
zathura
=
malloc
(
sizeof
(
zathura_t
));
zathura_t
*
zathura
=
g_
malloc
0
(
sizeof
(
zathura_t
));
if
(
zathura
==
NULL
)
{
return
NULL
;
...
...
@@ -98,9 +98,13 @@ zathura_init(int argc, char* argv[])
}
g_strfreev
(
paths
);
}
else
{
/* XXX: this shouldn't be hard coded! */
girara_list_append
(
zathura
->
plugins
.
path
,
g_strdup
(
"/usr/local/lib/zathura"
));
girara_list_append
(
zathura
->
plugins
.
path
,
g_strdup
(
"/usr/lib/zathura"
));
#ifdef ZATHURA_PLUGINDIR
gchar
**
paths
=
g_strsplit
(
ZATHURA_PLUGINDIR
,
":"
,
0
);
for
(
unsigned
int
i
=
0
;
paths
[
i
]
!=
'\0'
;
++
i
)
{
girara_list_append
(
zathura
->
plugins
.
path
,
g_strdup
(
paths
[
i
]));
}
g_strfreev
(
paths
);
#endif
}
/* UI */
...
...
@@ -134,7 +138,7 @@ zathura_init(int argc, char* argv[])
/* load local configuration files */
char
*
configuration_file
=
g_build_filename
(
zathura
->
config
.
config_dir
,
ZATHURA_RC
,
NULL
);
config_load_file
(
zathura
,
configuration_file
);
free
(
configuration_file
);
g_
free
(
configuration_file
);
/* initialize girara */
zathura
->
ui
.
session
->
gtk
.
embed
=
embed
;
...
...
@@ -232,13 +236,10 @@ error_free:
g_object_unref
(
zathura
->
ui
.
page_view
);
}
girara_session_destroy
(
zathura
->
ui
.
session
);
girara_list_free
(
zathura
->
bookmarks
.
bookmarks
);
zathura_db_free
(
zathura
->
database
);
error_out:
free
(
zathura
);
zathura_
free
(
zathura
);
return
NULL
;
}
...
...
@@ -279,7 +280,7 @@ zathura_free(zathura_t* zathura)
g_free
(
zathura
->
config
.
config_dir
);
g_free
(
zathura
->
config
.
data_dir
);
free
(
zathura
);
g_
free
(
zathura
);
}
gboolean
...
...
@@ -550,3 +551,4 @@ int main(int argc, char* argv[])
return
0
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment