oyarzun commented on pull request #2563:
URL: https://github.com/apache/netbeans/pull/2563#issuecomment-765573069


   @neilcsmith-net the macOS native launcher is specific to a macOS Application 
bundle [1] it will not work out of the bin directory. A user could still 
execute the shell script from the bin dir to start NetBeans from the command 
line. Running from the command line inherits the permission of the Terminal app 
so NETBEANS-5004 does not manifest itself. But the average Mac NetBeans user 
will download the installer and run NetBeans from Finder, Dock or Spotlight 
Search.
   
   The swift code uses the Bundle class [2] 
   
   ```swift
   let brandingToken = Bundle.main.object(forInfoDictionaryKey: 
"CFBundleExecutable") as? String
   let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? 
String
   let confFile = Bundle.main.path(forResource: brandingToken, ofType: "conf", 
inDirectory: brandingToken! + "/etc")
   let clustersFile = Bundle.main.path(forResource: brandingToken, ofType: 
"clusters", inDirectory: brandingToken! + "/etc")
   let iconFile = Bundle.main.path(forResource: brandingToken, ofType: "icns")
   let nbexecURL = Bundle.main.url(forResource: "nbexec", withExtension: "", 
subdirectory: brandingToken! + "/platform/lib")
   ```
   
   1. 
[https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html)
   
   2. 
[https://developer.apple.com/documentation/foundation/bundle](https://developer.apple.com/documentation/foundation/bundle)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to