Find out location of an executable file in Cocoa

前端 未结 5 1779
北恋
北恋 2021-01-05 15:55

The simple question is: how to find out the location of an executable file in a Cocoa application.

Remember that, in many Unix-like OS people use PATH environment t

5条回答
  •  一整个雨季
    2021-01-05 16:28

    How likely is it that your users will have custom versions of the tool you're using (and how likely is it that your app is compatible with arbitrary versions of the tool)? If the answer is "not very", then consider using the path to the system-supplied tool by default, and giving advanced users a way to specify their own path as a preference.

提交回复
热议问题