Commit 8a2db1e2 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*updated file locations and made names more consistent across all folders...

*updated file locations and made names more consistent across all folders (everything now uses pd-l2ok instead of pdl2ork). Placed user settings into ~/.pd-l2ork/ folder and renamed to simply settings, placed xapian search database for the browser inside the ~/.pd-l2ork folder.
parent 376ca876
......@@ -131,9 +131,9 @@ deb: $(bindir)
$(DESTDIR)/etc/init.d/
# default prefs file
install -d $(DESTDIR)/etc/pd-l2ork
ln -s -f $(libpddir)/default.pdl2ork \
$(DESTDIR)/etc/pd-l2ork/default.pdl2ork
install -p $(packages_src)/linux_make/default.pdl2ork $(DESTDIR)$(libpddir)
ln -s -f $(libpddir)/default.pd-l2ork \
$(DESTDIR)/etc/pd-l2ork/default.pd-l2ork
install -p $(packages_src)/linux_make/default.pd-l2ork $(DESTDIR)$(libpddir)
# app window icon
install -p $(packages_src)/linux_make/pd-l2ork.gif $(DESTDIR)$(libpddir)
# emacs mode for .pd files
......@@ -177,7 +177,7 @@ installer_readme:
$(INSTALLER_README_FILE)
installer_settings:
install -p $(packages_src)/linux_make/default.pdl2ork $(DESTDIR)$(libpddir)
install -p $(packages_src)/linux_make/default.pd-l2ork $(DESTDIR)$(libpddir)
# app window icon
install -p $(packages_src)/linux_make/pd-l2ork.gif $(DESTDIR)$(libpddir)
# install -d $(DESTDIR)/usr/share/icons/hicolor/128x128/apps
......
standardpath: 1
verbose: 0
defeatrt: 0
loadlib1: libdir
loadlib2: Gem
loadlib3: cyclone
loadlib4: zexy
loadlib5: creb
loadlib6: cxc
loadlib7: iemlib
loadlib8: list-abs
loadlib9: mapping
loadlib10: markex
loadlib11: maxlib
loadlib12: memento
loadlib13: mjlib
loadlib14: motex
loadlib15: oscx
loadlib16: pddp
loadlib17: pdogg
loadlib18: pixeltango
loadlib19: pmpd
loadlib20: rradical
loadlib21: sigpack
loadlib22: smlib
loadlib23: unauthorized
loadlib24: vbap
loadlib25: pan
loadlib26: freeverb~
loadlib27: hcs
loadlib28: jmmmp
loadlib29: ext13
loadlib30: ggee
loadlib31: iem_anything
loadlib32: ekext
loadlib33: hexloader
nloadlib: 33
path1: /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType
path2: ~/pd-l2ork-externals
path3: ~/L2Ork/PD/Abstractions
path4: ~/L2Ork/PD/rjlib
path5: /usr/lib/pd-l2ork/extra/flext
path6: /usr/lib/pd-l2ork/extra/cyclone
path7: /usr/lib/pd-l2ork/extra/zexy
path8: /usr/lib/pd-l2ork/extra/creb
path9: /usr/lib/pd-l2ork/extra/cxc
path10: /usr/lib/pd-l2ork/extra/iemlib
path11: /usr/lib/pd-l2ork/extra/list-abs
path12: /usr/lib/pd-l2ork/extra/mapping
path13: /usr/lib/pd-l2ork/extra/markex
path14: /usr/lib/pd-l2ork/extra/maxlib
path15: /usr/lib/pd-l2ork/extra/memento
path16: /usr/lib/pd-l2ork/extra/mjlib
path17: /usr/lib/pd-l2ork/extra/motex
path18: /usr/lib/pd-l2ork/extra/oscx
path19: /usr/lib/pd-l2ork/extra/pddp
path20: /usr/lib/pd-l2ork/extra/pdogg
path21: /usr/lib/pd-l2ork/extra/pixeltango
path22: /usr/lib/pd-l2ork/extra/pmpd
path23: /usr/lib/pd-l2ork/extra/rradical
path24: /usr/lib/pd-l2ork/extra/sigpack
path25: /usr/lib/pd-l2ork/extra/smlib
path26: /usr/lib/pd-l2ork/extra/unauthorized
path27: /usr/lib/pd-l2ork/extra/pan
path28: /usr/lib/pd-l2ork/extra/hcs
path29: /usr/lib/pd-l2ork/extra/jmmmp
path30: /usr/lib/pd-l2ork/extra/ext13
path31: /usr/lib/pd-l2ork/extra/ggee
path32: /usr/lib/pd-l2ork/extra/ekext
path33: /usr/lib/pd-l2ork/extra/flext
npath: 33
......@@ -282,12 +282,12 @@ install: all tkpath tkdnd
> $(ABOUT_FILE)
rm $(ABOUT_FILE).tmp
rsync -ax --exclude=.git --exclude=.svn ../extra $(DESTDIR)$(libpddir)/
install -d $(DESTDIR)$(includedir)/pdl2ork
install -m644 m_pd.h $(DESTDIR)$(includedir)/pdl2ork/m_pd.h
install -m644 m_imp.h $(DESTDIR)$(includedir)/pdl2ork/m_imp.h
install -m644 g_canvas.h $(DESTDIR)$(includedir)/pdl2ork/g_canvas.h
install -m644 s_stuff.h $(DESTDIR)$(includedir)/pdl2ork/s_stuff.h
install -m644 g_all_guis.h $(DESTDIR)$(includedir)/pdl2ork/g_all_guis.h
install -d $(DESTDIR)$(includedir)/pd-l2ork
install -m644 m_pd.h $(DESTDIR)$(includedir)/pd-l2ork/m_pd.h
install -m644 m_imp.h $(DESTDIR)$(includedir)/pd-l2ork/m_imp.h
install -m644 g_canvas.h $(DESTDIR)$(includedir)/pd-l2ork/g_canvas.h
install -m644 s_stuff.h $(DESTDIR)$(includedir)/pd-l2ork/s_stuff.h
install -m644 g_all_guis.h $(DESTDIR)$(includedir)/pd-l2ork/g_all_guis.h
install -d $(DESTDIR)$(mandir)/man1
gzip < ../man/pd.1 > $(DESTDIR)$(mandir)/man1/@PDEXEC@.1.gz
chmod 644 $(DESTDIR)$(mandir)/man1/@PDEXEC@.1.gz
......@@ -333,7 +333,7 @@ uninstall:
rm -f $(DESTDIR)$(bindir)/@PDEXEC@
rm -f $(DESTDIR)$(bindir)/pdsend
rm -f $(DESTDIR)$(bindir)/pdreceive
rm -f -r $(DESTDIR)$(includedir)/pdl2ork/
rm -f -r $(DESTDIR)$(includedir)/pd-l2ork/
rm -f $(DESTDIR)$(mandir)/man1/pd.1.gz
rm -f $(DESTDIR)$(mandir)/man1/pdsend.1.gz
rm -f $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
......
......@@ -307,6 +307,13 @@ proc bgerror {message} {
# }
#}
# make sure the user folder for settings exists
catch {
if { ! [file exists $::env(HOME)/.pd-l2ork] } {
puts stderr "Creating settings folder: $::env(HOME)/.pd-l2ork"
file mkdir $::env(HOME)/.pd-l2ork
}
}
# namespace for general-purpose functions
proc pdtk_encode { listdata } {
......
......@@ -6,7 +6,7 @@
* this file implements a mechanism for storing and retrieving preferences.
* Should later be renamed "preferences.c" or something.
*
* In unix this is handled by the "~/.pdl2ork" file, in windows by
* In unix this is handled by the "~/.pd-l2ork/settings" file, in windows by
* the registry, and in MacOS by the Preferences system.
*/
......@@ -58,11 +58,11 @@ static void sys_initloadpreferences( void)
char default_prefs_file[FILENAME_MAX];
struct stat statbuf;
snprintf(default_prefs_file, FILENAME_MAX, "%s/default.pdl2ork",
snprintf(default_prefs_file, FILENAME_MAX, "%s/default.pd-l2ork",
sys_libdir->s_name);
if (homedir)
snprintf(user_prefs_file, FILENAME_MAX, "%s/.pdl2ork", homedir);
snprintf(user_prefs_file, FILENAME_MAX, "%s/.pd-l2ork/settings", homedir);
if (stat(user_prefs_file, &statbuf) == 0)
strncpy(filenamebuf, user_prefs_file, FILENAME_MAX);
else if (stat(default_prefs_file, &statbuf) == 0)
......@@ -143,7 +143,7 @@ static void sys_initsavepreferences( void)
if (!homedir)
return;
snprintf(filenamebuf, FILENAME_MAX, "%s/.pdl2ork", homedir);
snprintf(filenamebuf, FILENAME_MAX, "%s/.pd-l2ork/settings", homedir);
filenamebuf[FILENAME_MAX-1] = 0;
if ((sys_prefsavefp = fopen(filenamebuf, "w")) == NULL)
{
......@@ -230,7 +230,7 @@ static void sys_donesavepreferences( void)
#ifdef __APPLE__
// prefs file that is currently the one to save to
static char current_prefs[FILENAME_MAX] = "org.puredata.pdl2ork";
static char current_prefs[FILENAME_MAX] = "org.puredata.pd-l2ork";
static void sys_initloadpreferences( void)
{
......@@ -247,13 +247,13 @@ static int sys_getpreference(const char *key, char *value, int size)
char *homedir = getenv("HOME");
struct stat statbuf;
/* the 'defaults' command expects the filename without .plist at the end */
snprintf(default_prefs, FILENAME_MAX, "%s/../org.puredata.pdl2ork.default",
snprintf(default_prefs, FILENAME_MAX, "%s/../org.puredata.pd-l2ork.default",
sys_libdir->s_name);
snprintf(embedded_prefs, FILENAME_MAX, "%s/../org.puredata.pdl2ork",
snprintf(embedded_prefs, FILENAME_MAX, "%s/../org.puredata.pd-l2ork",
sys_libdir->s_name);
snprintf(embedded_prefs_file, FILENAME_MAX, "%s.plist", embedded_prefs);
snprintf(user_prefs_file, FILENAME_MAX,
"%s/Library/Preferences/org.puredata.pdl2ork.plist", homedir);
"%s/Library/Preferences/org.puredata.pd-l2ork.plist", homedir);
if (stat(embedded_prefs_file, &statbuf) == 0)
{
snprintf(cmdbuf, FILENAME_MAX + 20,
......@@ -263,14 +263,14 @@ static int sys_getpreference(const char *key, char *value, int size)
else if (stat(user_prefs_file, &statbuf) == 0)
{
snprintf(cmdbuf, FILENAME_MAX + 20,
"defaults read org.puredata.pdl2ork %s 2> /dev/null\n", key);
strcpy(current_prefs, "org.puredata.pdl2ork");
"defaults read org.puredata.pd-l2ork %s 2> /dev/null\n", key);
strcpy(current_prefs, "org.puredata.pd-l2ork");
}
else
{
snprintf(cmdbuf, FILENAME_MAX + 20,
"defaults read '%s' %s 2> /dev/null\n", default_prefs, key);
strcpy(current_prefs, "org.puredata.pdl2ork");
strcpy(current_prefs, "org.puredata.pd-l2ork");
}
FILE *fp = popen(cmdbuf, "r");
while (nread < size)
......
......@@ -41,7 +41,7 @@ namespace eval ::dialog_search:: {
variable cancelled
variable database {}
# the dbpath needs to be made more general for OSX and Windows
variable dbpath [file join [file nativename ~] pd-l2ork-externals doc_index]
variable dbpath [file join [file nativename ~] .pd-l2ork doc_index]
variable metakeys { alias XA license XL description XD \
release_date XR author A help_patch_author XHA \
keywords K \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment