Skip to main content
Participant
August 3, 2024
Answered

Launching executable i app bundle via window.cep.process.createProcess

  • August 3, 2024
  • 1 reply
  • 241 views

Hello!

 

I am trying to launch an app bundle via 

window.cep.process.createProcess(path)

My executable used to be located at:

path="/Applications/MyApp.app/Contents/MacOS/MyApp"

Now it has moved to here:

path="/Applications/MyApp.app/Contents/PlugIns/Workflow Extension.appex/Contents/Resources/MyAppHelper.app/Contents/MacOS/MyAppHelper"

The issue is that when I execute "MyAppHelper", it also starts the executable at `MyApp.app/Contets/MacOS/MyApp`. This obviously does not happen if I execute the MyAppHelper binary by simply doing e.g.

 

cd "/Applications/MyApp.app/Contents/PlugIns/Workflow Extension.appex/Contents/Resources/MyAppHelper.app/Contents/MacOS/"

./MyAppHelper

 

 

I tried a workaround like doing the above in a bash script and launching it via:

window.cep.process.createProcess("/bin/bash", csInterface.getSystemPath(SystemPath.EXTENSION) + "/launch-helper.sh")

But this does not start anything at all unfortunately.

 

How can I get the process API to only start "MyAppHelper" in this case, and not the other binary in the containing app bundle in /Applications?

 

Kind regards,

Max

This topic has been closed for replies.
Correct answer Bruce Bullis

No (intentional) changes have been made to that functionality, in years...

Perhaps the spaces in the path aren't properly escaped? 

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
August 5, 2024

No (intentional) changes have been made to that functionality, in years...

Perhaps the spaces in the path aren't properly escaped?