Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add execPath and nodeOptions in service config #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

artmen1516
Copy link

@artmen1516 artmen1516 commented May 16, 2024

This PR is to add a similar functionality as in node-windows for execPath and nodeOptions,
As a developer, I should be able to configure the executable that will launch a Service with Custom Args (not only --harmony)

This is useful in a packaged application since the electron executable by default is all the app itself, for example /Applications/MyApp.app/Contents/MacOS/MyApp, if this executable tries to install the script will run all the application.
So what we are doing is to include the Electron binary or Node Binary, and use it in execPath in node-windows, that works well.
The problem is when we tried to use the same for node-mac.

Reading the contribution guidelines...
Contributions must be cross-platform compatible... node-windows/mac/linux share a common API.

This change will help to close the gap between the available configuration options in windows and mac.

Tested locally in my mac, with this change the plist passes the correct execPath provided in the config.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Title</key>
    <string>myappservice</string>
    <key>Label</key>
    <string>myappservice</string>
    <key>ProgramArguments</key>
    <array>
      <string>/Applications/MyApp.app/Contents/Resources/electron/dist/Electron.app/Contents/MacOS/Electron</string>

@artmen1516 artmen1516 changed the title add execPath in service config add execPath and nodeOptions in service config May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant