Index: trunk/doc/conf/sources.html
===================================================================
--- trunk/doc/conf/sources.html (revision 34906)
+++ trunk/doc/conf/sources.html (revision 34907)
@@ -22,7 +22,7 @@
system
| 200
- | /usr/share/pcb-rnd/pcb-conf.lht
+ | /usr/share/pcb-rnd/conf_core.lht
| recommended
| should hold system and installation specific settings, e.g. path to the system-wise installed footprint library
@@ -34,7 +34,7 @@
|
user
| 400
- | ~/.pcb-rnd/pcb-conf.lht
+ | ~/.pcb-rnd/conf_core.lht
| recommended
| store user preferences, user's common footprint lib path, etc; this is the first file the user can modify (even from the GUI)
Index: trunk/doc/conf/src/merging.dot
===================================================================
--- trunk/doc/conf/src/merging.dot (revision 34906)
+++ trunk/doc/conf/src/merging.dot (revision 34907)
@@ -60,10 +60,10 @@
subgraph cluster_files {
label="config files"
bgcolor=grey
- lht_system [label="/usr/share/pcb-rnd/pcb-conf.lht" shape=hexagon]
+ lht_system [label="/usr/share/pcb-rnd/conf_core.lht" shape=hexagon]
pcb_default [label="default board, e.g.\n/usr/share/pcb-rnd/default4.lht" shape=hexagon]
project [label="./project.lht" shape=hexagon]
- lht_user [label="~/.pcb-rnd/pcb-conf.lht" shape=hexagon]
+ lht_user [label="~/.pcb-rnd/conf_core.lht" shape=hexagon]
}
subgraph cluster_exec_env {
Index: trunk/doc/developer/lihata_format/index.html
===================================================================
--- trunk/doc/developer/lihata_format/index.html (revision 34906)
+++ trunk/doc/developer/lihata_format/index.html (revision 34907)
@@ -47,8 +47,8 @@
| Vector font
(struct drawing)
- |
pcb-conf.lht | li:pcb-rnd-conf-v1
- | A configuration subtree: system config (e.g. /usr/share/pcb-rnd/pcb-conf.lht) or user config (~/.pcb-rnd/pcb-conf.lht)
+ |
conf_core.lht | li:pcb-rnd-conf-v1
+ | A configuration subtree: system config (e.g. /usr/share/pcb-rnd/conf_core.lht) or user config (~/.pcb-rnd/conf_core.lht)
(struct drawing)
(sample file)
Index: trunk/doc/developer/packaging/extra.digest
===================================================================
--- trunk/doc/developer/packaging/extra.digest (revision 34906)
+++ trunk/doc/developer/packaging/extra.digest (revision 34907)
@@ -1,5 +1,5 @@
@appendfiles pcb-rnd-core $PREFIX/bin/pcb-rnd $PREFIX/share/man/man1/pcb-rnd.1
-@appendfiles pcb-rnd-core $C/pcb-conf.lht $C/menu-default.lht
+@appendfiles pcb-rnd-core $C/conf_core.lht $C/menu-default.lht
@appendfiles pcb-rnd-core $PREFIX/share/pcb-rnd/default2.lht $PREFIX/share/pcb-rnd/default4.lht $PREFIX/share/pcb-rnd/default_font
@appendfiles pcb-rnd-core $PREFIX/bin/fp2preview $PREFIX/bin/fp2subc $PREFIX/bin/pcb-prj2lht $PREFIX/share/man/man1/fp2preview.1 $PREFIX/share/man/man1/fp2subc.1 $PREFIX/share/man/man1/pcb-prj2lht.1
@appendfiles pcb-rnd-core $PREFIX/share/pcb-rnd/pcblib/*
Index: trunk/doc/developer/packaging/packages.html
===================================================================
--- trunk/doc/developer/packaging/packages.html (revision 34906)
+++ trunk/doc/developer/packaging/packages.html (revision 34907)
@@ -36,7 +36,7 @@
|
pcb-rnd-lib-io | $P/lib_netmap.pup $P/lib_netmap.so | Support library for alien file formats. | Provides generic, low level parsers (such as s-expression parser) for I/O plugins that need to deal with alien file formats.
|
---|
pcb-rnd-io-standard | $P/io_pcb.pup $P/io_pcb.so $P/io_tedax.pup $P/io_tedax.so | Commonly used non-native board and footprint file formats | Plugins for tEDAx footprint format and the gEDA/PCB file formats (footprint and board).
|
---|
pcb-rnd-lib-gui | $P/dialogs.pup $P/dialogs.so $P/draw_fontsel.pup $P/draw_fontsel.so $P/lib_hid_pcbui.pup $P/lib_hid_pcbui.so $C/adialogs.conf | Support library for building the GUI. | Provides pcb-rnd specific dialog boxes (e.g. fontsel) and top window GUI elements.
- |
---|
pcb-rnd-core | $PREFIX/bin/pcb-rnd $PREFIX/share/man/man1/pcb-rnd.1 $C/pcb-conf.lht $C/menu-default.lht $PREFIX/share/pcb-rnd/default2.lht $PREFIX/share/pcb-rnd/default4.lht $PREFIX/share/pcb-rnd/default_font $PREFIX/bin/fp2preview $PREFIX/bin/fp2subc $PREFIX/bin/pcb-prj2lht $PREFIX/share/man/man1/fp2preview.1 $PREFIX/share/man/man1/fp2subc.1 $PREFIX/share/man/man1/pcb-prj2lht.1 $PREFIX/share/pcb-rnd/pcblib/* $C/ch_editpoint.conf $C/drc_query.conf $C/fp_fs.conf $C/show_netnames.conf | pcb-rnd executable with the core functionality | Includes the data model, the most common action commands, the native file format and the CLI (batch HID). Does not contain GUI. Can be used in headless mode or batch/scripted mode for automated processing.
+ |
---|
pcb-rnd-core | $PREFIX/bin/pcb-rnd $PREFIX/share/man/man1/pcb-rnd.1 $C/conf_core.lht $C/menu-default.lht $PREFIX/share/pcb-rnd/default2.lht $PREFIX/share/pcb-rnd/default4.lht $PREFIX/share/pcb-rnd/default_font $PREFIX/bin/fp2preview $PREFIX/bin/fp2subc $PREFIX/bin/pcb-prj2lht $PREFIX/share/man/man1/fp2preview.1 $PREFIX/share/man/man1/fp2subc.1 $PREFIX/share/man/man1/pcb-prj2lht.1 $PREFIX/share/pcb-rnd/pcblib/* $C/ch_editpoint.conf $C/drc_query.conf $C/fp_fs.conf $C/show_netnames.conf | pcb-rnd executable with the core functionality | Includes the data model, the most common action commands, the native file format and the CLI (batch HID). Does not contain GUI. Can be used in headless mode or batch/scripted mode for automated processing.
|
---|
pcb-rnd-io-alien | $P/io_autotrax.pup $P/io_autotrax.so $P/io_bxl.pup $P/io_bxl.so $P/io_dsn.pup $P/io_dsn.so $P/io_eagle.pup $P/io_eagle.so $P/io_hyp.pup $P/io_hyp.so $P/io_kicad.pup $P/io_kicad.so $P/io_kicad_legacy.pup $P/io_kicad_legacy.so $P/io_pads.pup $P/io_pads.so $PREFIX/share/man/man1/txt2bxl.1 $PREFIX/share/man/man1/bxl2txt.1 $PREFIX/bin/txt2bxl $PREFIX/bin/bxl2txt | File format compatibility with other PCB layout designers. | Load and/or save boards in file formats supported by other EDA tools, such as KiCAD, Eagle, protel/autotrax, etc.
|
---|
pcb-rnd-cloud | $P/fp_wget.pup $P/fp_wget.so $C/fp_wget.conf | Networking plugins. | 'Cloud' footprint access plugin that integrates edakrill and gedasymbols.org.
|
---|
pcb-rnd-export-extra | $P/export_fidocadj.pup $P/export_fidocadj.so $P/export_ipcd356.pup $P/export_ipcd356.so $P/export_lpr.pup $P/export_lpr.so $P/export_oldconn.pup $P/export_oldconn.so $P/export_stl.pup $P/export_stl.so | Export formats: special/extra | Less commonly used export formats: fidocadj, ipc-356-d, direct printing with lpr.
Index: trunk/src/Makefile.in
===================================================================
--- trunk/src/Makefile.in (revision 34906)
+++ trunk/src/Makefile.in (revision 34907)
@@ -344,8 +344,8 @@
$(ROOT)/doc/conf/tree/rc.html: conf_core.h
cat conf_core.h | AWK=@/host/fstools/awk@ $(GENCONF) $(ROOT)/doc/conf/tree > /dev/null
-conf_internal.c: pcb-conf.lht $(CQUOTE)
- $(CQUOTE) -n rnd_conf_internal < pcb-conf.lht > conf_internal.c
+conf_internal.c: conf_core.lht $(CQUOTE)
+ $(CQUOTE) -n rnd_conf_internal < conf_core.lht > conf_internal.c
defpcb_internal.c: default4.lht
$(CQUOTE) -n default_pcb_internal < default4.lht > defpcb_internal.c
@@ -370,7 +370,7 @@
install_pcbrnd:
$(SCCBOX) mkdir -p "$(BINDIR)" "$(DATADIR)" "$(LIBDIR)" "$(LIBDIR)/plugins" "$(CONFDIR)"
$(SCCBOX) $(HOW) "pcb-rnd$(EXE)" "$(BINDIR)/pcb-rnd$(EXE)"
- $(SCCBOX) $(HOW) "pcb-conf.lht" "$(CONFDIR)/pcb-conf.lht"
+ $(SCCBOX) $(HOW) "conf_core.lht" "$(CONFDIR)/conf_core.lht"
$(SCCBOX) $(HOW) "menu-default.lht" "$(CONFDIR)/menu-default.lht"
$(SCCBOX) $(HOW) "default2.lht" "$(DATADIR)/default2.lht"
$(SCCBOX) $(HOW) "default4.lht" "$(DATADIR)/default4.lht"
Index: trunk/src/main.c
===================================================================
--- trunk/src/main.c (revision 34906)
+++ trunk/src/main.c (revision 34907)
@@ -41,6 +41,7 @@
#include "brave.h"
#include "data.h"
#include
+#include
#include "plug_io.h"
#include "buffer.h"
#include "crosshair.h"
@@ -92,6 +93,30 @@
#define CONF_USER_DIR "~/" DOT_PCB_RND
+/* try to use new (3.x.x) config file name with a fallback to pre-3.0.0 in
+ case the old exists but the new doesn't */
+static char *conf_fn_compat(const char *dir, const char *old_name, const char *new_name)
+{
+ char *old_path, *new_path;
+
+ /* new exists: use it */
+ new_path = rnd_concat(dir, new_name, NULL);
+ if (rnd_file_readable(new_path))
+ return new_path;
+
+ /* new doesn't exist, old does; use the old and warn the user */
+ old_path = rnd_concat(dir, old_name, NULL);
+ if (rnd_file_readable(old_path)) {
+ rnd_message(RND_MSG_ERROR, "Using old (pre-3.0.0) config file name for compatibility\nPlease quit and rename %s to %s\n", old_path, new_path);
+ free(new_path);
+ return old_path;
+ }
+
+ /* neither files exist; stick with the new path in case we need to create it */
+ free(old_path);
+ return new_path;
+}
+
/* Figure out the canonical name of the executed program
and fix up the defaults for various paths; returns exec prefix that
should be saved in the config */
@@ -202,10 +227,12 @@
menu_file_paths[2] = rnd_concat(PCBCONFDIR, "/", NULL);
menu_file_paths[3] = NULL;
+ rnd_pcbhl_conf_postproc(); /* get ~ (home dir) set */
+
rnd_app.conf_userdir_path = CONF_USER_DIR;
- rnd_app.conf_user_path = rnd_concat(CONF_USER_DIR, "/pcb-conf.lht", NULL);
+ rnd_app.conf_user_path = conf_fn_compat(CONF_USER_DIR, "/pcb-conf.lht", "/conf_core.lht");
rnd_app.conf_sysdir_path = PCBCONFDIR;
- rnd_app.conf_sys_path = rnd_concat(PCBCONFDIR, "/pcb-conf.lht", NULL);
+ rnd_app.conf_sys_path = conf_fn_compat(PCBCONFDIR, "/pcb-conf.lht", "/conf_core.lht");
free(bindir);
return exec_prefix;
Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c
===================================================================
--- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 34906)
+++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 34907)
@@ -393,9 +393,9 @@
rnd_app.revision = PCB_REVISION;
rnd_app.conf_userdir_path = CONF_USER_DIR;
- rnd_app.conf_user_path = rnd_concat(CONF_USER_DIR, "/pcb-conf.lht", NULL);
+ rnd_app.conf_user_path = rnd_concat(CONF_USER_DIR, "/conf_core.lht", NULL);
rnd_app.conf_sysdir_path = PCBCONFDIR;
- rnd_app.conf_sys_path = rnd_concat(PCBCONFDIR, "/pcb-conf.lht", NULL);
+ rnd_app.conf_sys_path = rnd_concat(PCBCONFDIR, "/conf_core.lht", NULL);
rnd_hidlib_init1(gsch2pcb_conf_core_init);
|
---|