libui-node
libui-node copied to clipboard
macOS app bundle example should use relative paths
moved from discussion #66
/Users/parroit/.nvm/versions/node/v9.5.0/bin/node /Users/parroit/repos/libui-node/examples/control-gallery.js&
can be replaced by
/Users/parroit/.nvm/versions/node/v9.5.0/bin/node "$(dirname $0)/../../../control-gallery.js"
But the main problem is that node is usually not in the default PATH (/usr/bin:/bin:/usr/sbin:/sbin)
PATH="/usr/local/bin:$PATH" node "$(dirname $0)/../../../control-gallery.js"
would solve it for me (I installed node with homebrew), but not when using nvm.
It there something like ~/.nvm/current/bin/node or nvm path current?
A reminder for myself while we're at it: This shows "Control Gallery" instead of "node" in the menubar.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>Control Gallery</string>
</dict>
</plist>