Copy link to clipboard
Copied
Hello Adobe Developers community,
I’m encountering an issue with an InDesign extension that my team and I have developed. Our extension relies on a .NET Core application to handle HTTPS calls and IDML parsing. While this setup works smoothly on Windows, we’re facing challenges on macOS.
The problem arises because the script responsible for launching the .NET Core DLL waits for the command to finish, preventing it from running in the background. As a result, our extension on macOS isn’t functioning as intended.
Attempts Made:
Request for Assistance:
We would greatly appreciate any insights, suggestions, or solutions from the community on how to effectively run the .NET Core app in the background on macOS to support our InDesign extension.
Additional Details:
Thank you in advance for your help and expertise!
Thank you again for your continued assistance.
To close this, what I did is to compile my .Net Core DLL for osx-x64, used Platypus to create a .app for macOS with no interface, and set it to run in the background without getting the focus from the app it's calling it.
These are the links that help someone to do that:
https://www.xamboy.com/2020/05/28/net-core-application-macos-packaging-and-notarization
https://www.cnet.com/tech/computing/keep-applications-from-stealing-focus-when-opening-in-os-x
...Copy link to clipboard
Copied
need to update the Operating System:
macOS Monterey version 12.7.3 (running as a guest in VirtualBox, hosted in a Windows PC)
Copy link to clipboard
Copied
In other words, if you could run do shell script without waiting for a response, would that solve the problem?
It might succeed if the following points are taken care of.
ignoring application responses
tell application id "com.adobe.InDesign"
do shell script your_shell_script
end tell
end ignoring
Copy link to clipboard
Copied
I tried this but my JSX script still waits for the dll to finish.
Attaching JSX (as a picture) and a screenshot when I run it.
As you can observe, InDesign is currently unresponsive. If I forcibly terminate the dotnet process responsible for running ja.dll, the script proceeds as expected, and I receive the 'Done' alert.
On Windows, my script initiates the execution of that dll, allowing it to remain active in memory for subsequent use whenever our extension necessitates its functionality.
Copy link to clipboard
Copied
btw thanks a lot for the quick response.
Copy link to clipboard
Copied
You are running from jsx. It seems doScript is waiting for the results.
1. Does it work well to create a single function app that just executes the shell script and then execute it with Folder.execute()?
2. Is it possible to use BridgeTalk to execute doScript in a separate thread?
3. Have you made sure that doScript and shell script work successfully when executed by just that in the first place?
Copy link to clipboard
Copied
Thank you for your continued assistance. I've explored the suggestions provided, but unfortunately, we're still encountering the same issue.
Regarding your suggestions:
1. Tried to execute file but:
.jsx files ask for an app to execute them
.sh files open xCode simple showing the contents of it
.command files run better but the Terminal window is visible so the user can close it and crash the extension
2. I attempted to use BridgeTalk but it happened the same. InDesign waits for the DLL to close and script hangs up
3. Prior to incorporating these methods, I verified that doScript and the shell script functions successfully when executed independently.
Would you have any additional insights or alternative approaches we could explore to effectively run the .NET Core app in the background on macOS?
Thank you for your ongoing support.
Copy link to clipboard
Copied
1.
Is it possible to change the app in charge of processing with "ignoring application responses" or BridgeTalk to another app that is not InDesign? InDesign may be able to proceed at the expense of that app.
2.
> doScript and the shell script functions successfully when executed independently
What exactly would be the result of this? Will the DLL keep running and InDesign accept other operations?
3.
Can the principal-agent relationship between jsx and .NET Core apps be reversed? That is, the main process is .NET Core app, and jsx is executed from there.
Copy link to clipboard
Copied
Thank you again for your continued assistance.
To close this, what I did is to compile my .Net Core DLL for osx-x64, used Platypus to create a .app for macOS with no interface, and set it to run in the background without getting the focus from the app it's calling it.
These are the links that help someone to do that:
https://www.xamboy.com/2020/05/28/net-core-application-macos-packaging-and-notarization
https://www.cnet.com/tech/computing/keep-applications-from-stealing-focus-when-opening-in-os-x
So now that I have an .app I select the file as you proposed and execute it.
Thanks again.