LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.69k stars 152 forks source link

Portable Symbolic Link (alias) #213

Closed jamesb93 closed 2 years ago

jamesb93 commented 2 years ago

Is it possible to have a portable symbolic link made inside the target .dmg? The motivation is to have it so they can drag the contents of the .dmg to a predefined location, somewhere in ~/Library/Application\ Support/REAPER/Scripts.

Can't seem to make it work with...

{ "x": 300, "y": 150, "type": "link", "path": "~/"}
AlexanderOMara commented 2 years ago

A symlink cannot do that in general, ~ is a shell feature.

$ ln -s '~/' HOME
$ cd HOME
cd: no such file or directory: HOME

(Without the quotes, the shell would expand the tilde into your HOME variable before creating the link.)

I don't know if macOS alias's are any different in this regard.

jamesb93 commented 2 years ago

This was the conclusion I arrived at after researching and trying a bunch of things. Thanks for looking into it for me!

LinusU commented 2 years ago

This comment https://github.com/LinusU/node-appdmg/issues/62#issuecomment-263045527 suggests that an alias pointing to /Users/whatever/... should work even when the username changes 🤔

jamesb93 commented 2 years ago

This comment #62 (comment) suggests that an alias pointing to /Users/whatever/... should work even when the username changes 🤔

Huh, that is weird! I'll give it a shot