Mortennn/FiScript

FiScript can only detect itself when in `/Applications/`

wildwestrom opened this issue · 3 comments

I'm not sure if this is true, but it seems like the path to FiScript is hardcoded to /Applications/FiScript.app/Contents/PlugIns/FiScriptHelper.app.
Here's the error message:

Can't communicate with helper application.

Check if Helper applications exists at /Applications/FiScript.app/Contents/PlugIns/FiScriptHelper.app Helper application has been moved or deleted. Please move the helper application back or reinstall FiScript.

This is a problem, because by default I set Homebrew to install everything in ~/Applications/.

Correct, it is hardcoded:

let helperAppURL = URL(fileURLWithPath: "/Applications/FiScript.app/Contents/PlugIns/FiScriptHelper.app")

Ok, how difficult might it be to detect the Application path and add the helper file?
I would like to help but I don't know swift or the apple APIs at all.

Edit:
I tried using Bundle.main.resourceURL in the swift repl, but it returns an error:
$R8: URL? = Failed to get the 'some' field from optional '$R8'
No idea how to begin to debug that.

I'm not sure, I'll have to defer to @Mortennn