Where do Mac users like their presets and preferences files?
- KVRAF
- Topic Starter
- 3417 posts since 28 Jan, 2006 from Phoenix, AZ
I need to setup a mac installer for Spiral Generator and PrettyScope. Currently they can't coexist very easily as they require the same space for their files for some Mac users.
What kind of structure and what drives / folders should I store this stuff in?
What kind of structure and what drives / folders should I store this stuff in?
-
- KVRAF
- 2675 posts since 14 Jul, 2005 from Australia
My suggestion:
Factory Presets: ~/Library/Application Support/Vendor/Product OR /Library/Audio/Presets
Preferences: ~/Library/Preferences/com.vendor.product.plist (OR under Application Support if you don't use plist files)
User Presets; ~/Music/Vendor/Product OR ~/Library/Audio/Presets
Personally, I dislike when vendors put user presets and such under ~/Documents On Mac ~/Music is where music production stuff should go imho.
Hope this helps
Fotis
Factory Presets: ~/Library/Application Support/Vendor/Product OR /Library/Audio/Presets
Preferences: ~/Library/Preferences/com.vendor.product.plist (OR under Application Support if you don't use plist files)
User Presets; ~/Music/Vendor/Product OR ~/Library/Audio/Presets
Personally, I dislike when vendors put user presets and such under ~/Documents On Mac ~/Music is where music production stuff should go imho.
Hope this helps
Fotis
- KVRAF
- 35295 posts since 14 Sep, 2002 from In teh net
Presets should always be /Library/Audio/Presets for factory and ~/Library/Audio/Presets for user - anywhere else just means people having to hunt around for them or add additional paths to get to them quickly
- KVRAF
- Topic Starter
- 3417 posts since 28 Jan, 2006 from Phoenix, AZ
For factory presets, is this ok?
"/Library/Application Support/Soundemote/Spiral Generator/Presets"
"/Library/Application Support/Soundemote/PrettyScope/Presets"
"/Library/Application Support/Soundemote/Spiral Generator/Presets"
"/Library/Application Support/Soundemote/PrettyScope/Presets"
Last edited by Architeuthis on Thu May 25, 2017 7:38 pm, edited 1 time in total.
- KVRAF
- Topic Starter
- 3417 posts since 28 Jan, 2006 from Phoenix, AZ
As stated above, it seems that Library/Audio/Presets is better for user presets.
I actually don't separate user and factory presets at the moment (the gui is not setup for it) but would like to in the future.
I actually don't separate user and factory presets at the moment (the gui is not setup for it) but would like to in the future.
-
- KVRAF
- 5716 posts since 8 Jun, 2009
Weird. Looking back just through this thread, three people have said /Library/Audio/Presets is OK or preferred for factory.
User presets normally go into the user address space so that different users on the same machine can have their own areas. That's what the tilde symbolises in ~/Library/Audio/Presets.
As you're not separating the factory and user presets anyway, I don't really see why going for AppSupport is such a great idea. I set up symlinks from the Presets folder anyway for synths/effects that don't use that area, but it is generally easier if presets go in more or less the same place.
User presets normally go into the user address space so that different users on the same machine can have their own areas. That's what the tilde symbolises in ~/Library/Audio/Presets.
As you're not separating the factory and user presets anyway, I don't really see why going for AppSupport is such a great idea. I set up symlinks from the Presets folder anyway for synths/effects that don't use that area, but it is generally easier if presets go in more or less the same place.
- KVRAF
- Topic Starter
- 3417 posts since 28 Jan, 2006 from Phoenix, AZ
oops, looks like I didn't read through the thread enough
I would have never known that ~ symbolises user address space, thanks for pointing that out. Didn't even catch there was a difference between ~/ and /
So then, this?
"/Library/Audio/Presets/Soundemote/PrettyScope/example_factory_preset.xml"
"~/Library/Audio/Presets/Soundemote/PrettyScope/example_user_preset.xml"
Wow, it's weird to put /Presets first for me as a Windows users.
I would have never known that ~ symbolises user address space, thanks for pointing that out. Didn't even catch there was a difference between ~/ and /
So then, this?
"/Library/Audio/Presets/Soundemote/PrettyScope/example_factory_preset.xml"
"~/Library/Audio/Presets/Soundemote/PrettyScope/example_user_preset.xml"
Wow, it's weird to put /Presets first for me as a Windows users.
-
- KVRAF
- 5716 posts since 8 Jun, 2009
It would probably be clearer to write [User]/PathtoFoo/ but Mac users tend to use the tilde because that's how you can get to that space in things like Finder or the Terminal – it's not the most obvious convention but it's oh so easy to drop into without realising that the meaning isn't getting across.
-
- KVRAF
- 5716 posts since 8 Jun, 2009
Yup.Architeuthis wrote:So then, this?
"/Library/Audio/Presets/Soundemote/PrettyScope/example_factory_preset.xml"
"~/Library/Audio/Presets/Soundemote/PrettyScope/example_user_preset.xml"
- KVRAF
- Topic Starter
- 3417 posts since 28 Jan, 2006 from Phoenix, AZ
is ~/ an acceptable path if I was to write that in C++?
-
- KVRAF
- 2675 posts since 14 Jul, 2005 from Australia
Likely no, C++ may interpret this literally as Python does. In Python, there's a specific function to "expand tilde" to the user's home directory:Architeuthis wrote:is ~/ an acceptable path if I was to write that in C++?
Code: Select all
In [1]: import os
In [2]: '~/Music'
Out[2]: '~/Music'
In [3]: os.path.expanduser('~/Music')
Out[3]: '/Users/fots/Music'
Code: Select all
fots ~ $ echo $HOME
/Users/fots
fots ~ $
Code: Select all
def expanduser(path):
"""Expand ~ and ~user constructions. If user or $HOME is unknown,
do nothing."""
path = os.fspath(path)
if isinstance(path, bytes):
tilde = b'~'
else:
tilde = '~'
if not path.startswith(tilde):
return path
sep = _get_sep(path)
i = path.find(sep, 1)
if i < 0:
i = len(path)
if i == 1:
if 'HOME' not in os.environ:
import pwd
userhome = pwd.getpwuid(os.getuid()).pw_dir
else:
userhome = os.environ['HOME']
else:
import pwd
name = path[1:i]
if isinstance(name, bytes):
name = str(name, 'ASCII')
try:
pwent = pwd.getpwnam(name)
except KeyError:
return path
userhome = pwent.pw_dir
if isinstance(path, bytes):
userhome = os.fsencode(userhome)
root = b'/'
else:
root = '/'
userhome = userhome.rstrip(root)
return (userhome + path[i:]) or root
- KVRAF
- Topic Starter
- 3417 posts since 28 Jan, 2006 from Phoenix, AZ
ok JUCE has a user directory function: https://www.juce.com/doc/classFile#a3e1 ... 3a6e76313d
- KVRAF
- Topic Starter
- 3417 posts since 28 Jan, 2006 from Phoenix, AZ
what about the manual pdf? what about screenshots? PrettyScope has a screenshot button.