[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: branch: master updated (1.3.0-20071229-29-ge7ba768)
The branch, master has been updated
via e7ba76819d6b77772684a72bba9ecbb1221d4ae0 (commit)
via 400bc2ffa1d6a83725d87caf1c941a1f205b508b (commit)
from dd0d5724b1ed07c12aaf17478ef4fb0500c6cd4f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gattrib/src/x_window.c | 9 ++++++++-
utils/src/gsch2pcb.c | 18 ++++++++++++++----
2 files changed, 22 insertions(+), 5 deletions(-)
=================
Commit Messages
=================
commit e7ba76819d6b77772684a72bba9ecbb1221d4ae0
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sat Jan 5 20:27:21 2008 -0500
Added the use of GEDADATA environment variable to make gattrib relocatable
gattrib was hardcoding the path to gattrib-menus.xml (using GEDADATADIR
which is set at configure time). This patch makes it possible to move
the gattrib binary to a different prefix. If GEDADATA is not set, then
the original behavior of using GEDADATADIR to find gattrib-menus.xml is
used.
:100644 100644 ce4c4b4... 3ead80f... M gattrib/src/x_window.c
commit 400bc2ffa1d6a83725d87caf1c941a1f205b508b
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sat Jan 5 16:40:30 2008 -0500
Added the use of PCBDATA environment variable to make gsch2pcb relocatable
Before this patch, m4_pcbdir was being set from the preprocessor variable
PCBDATADIR which was set at ./configure time. In order to be able to move
gsch2pcb to a different install prefix, this path has to be changable at
run-time. If PCBDATA is not set, then PCBDATADIR is used (previous
behavior).
:100644 100644 de3de1f... 3233485... M utils/src/gsch2pcb.c
=========
Changes
=========
commit e7ba76819d6b77772684a72bba9ecbb1221d4ae0
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sat Jan 5 20:27:21 2008 -0500
Added the use of GEDADATA environment variable to make gattrib relocatable
gattrib was hardcoding the path to gattrib-menus.xml (using GEDADATADIR
which is set at configure time). This patch makes it possible to move
the gattrib binary to a different prefix. If GEDADATA is not set, then
the original behavior of using GEDADATADIR to find gattrib-menus.xml is
used.
diff --git a/gattrib/src/x_window.c b/gattrib/src/x_window.c
index ce4c4b4..3ead80f 100644
--- a/gattrib/src/x_window.c
+++ b/gattrib/src/x_window.c
@@ -241,6 +241,7 @@ x_window_create_menu(GtkWindow *window, GtkWidget **menubar)
GtkUIManager *ui;
GtkActionGroup *action_group;
GError *error = NULL;
+ const char *gedadata_path;
/* Create and fill the action group object */
action_group = gtk_action_group_new("");
@@ -251,7 +252,13 @@ x_window_create_menu(GtkWindow *window, GtkWidget **menubar)
gtk_ui_manager_insert_action_group(ui, action_group, 0);
- menu_file = g_build_filename(GEDADATADIR, "gattrib-menus.xml", NULL);
+ gedadata_path = g_getenv("GEDADATA"); /* do not free returned string */
+ if (gedadata_path != NULL) {
+ menu_file = g_build_filename(gedadata_path, "gattrib-menus.xml", NULL);
+ } else {
+ menu_file = g_build_filename(GEDADATADIR, "gattrib-menus.xml", NULL);
+ }
+
gtk_ui_manager_add_ui_from_file(ui, menu_file, &error);
if(error != NULL) {
/* An error occured, terminate */
commit 400bc2ffa1d6a83725d87caf1c941a1f205b508b
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sat Jan 5 16:40:30 2008 -0500
Added the use of PCBDATA environment variable to make gsch2pcb relocatable
Before this patch, m4_pcbdir was being set from the preprocessor variable
PCBDATADIR which was set at ./configure time. In order to be able to move
gsch2pcb to a different install prefix, this path has to be changable at
run-time. If PCBDATA is not set, then PCBDATADIR is used (previous
behavior).
diff --git a/utils/src/gsch2pcb.c b/utils/src/gsch2pcb.c
index de3de1f..3233485 100644
--- a/utils/src/gsch2pcb.c
+++ b/utils/src/gsch2pcb.c
@@ -1434,14 +1434,24 @@ main(gint argc, gchar **argv)
gboolean initial_pcb = TRUE;
gboolean created_pcb_file = TRUE;
char *path, *p;
+ const char *pcbdata_path;
if (argc < 2)
usage();
- /* Use the default value passed in from the configure script instead
- * of trying to hard code a value which is very likely wrong
- */
- m4_pcbdir = g_strconcat( PCBDATADIR, "/pcb/m4", NULL );
+ pcbdata_path = g_getenv ("PCBDATA"); /* do not free return value */
+ if (pcbdata_path != NULL)
+ {
+ /* If PCBDATA is set, use the value */
+ m4_pcbdir = g_strconcat( pcbdata_path, "/pcb/m4", NULL );
+ } else {
+ /* Use the default value passed in from the configure script
+ * instead of trying to hard code a value which is very
+ * likely wrong
+ */
+ m4_pcbdir = g_strconcat( PCBDATADIR, "/pcb/m4", NULL );
+ }
+
default_m4_pcbdir = g_strdup(m4_pcbdir);
get_args(argc, argv);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs