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

Any way to add nw parameters not meant for chrome executable? #191

Open
codekiln opened this issue Apr 13, 2017 · 4 comments
Open

Any way to add nw parameters not meant for chrome executable? #191

codekiln opened this issue Apr 13, 2017 · 4 comments

Comments

@codekiln
Copy link

codekiln commented Apr 13, 2017

I have a node-webkit app that requires a specific chrome extension. As a result, I must start it with nw --load-extension='path/to/extension' as mentioned in nw.js's documentation. Is there a way for me to add the --load-extension call to the generated script? It is important to note that this is an argument meant for node webkit, not for chromium, so I cannot put it in the chromium args parameter in the manifest.

@jyapayne
Copy link
Collaborator

Which extension are you hoping to load? I don't believe there is a way to do that yet, but you could accomplish what you're looking to do with a simple shortcut file as described here and here.

I don't know of any way to embed the arguments into the exe itself. Doing something like that is usually the job of the installer that you use. Personally, I use NSIS to create my installers, and it has options to install a shortcut on the desktop with arguments like --load-extension.

@codekiln
Copy link
Author

codekiln commented Apr 13, 2017

My end users will need the cisco web communicator in order for the application they interact with to take advantage of Cisco's Jabber SDK. Using a link installed by the installer may be an acceptable workaround. Do you regularly make mac installers as well? I assume that NSIS does not work in that environment. What do you use in that case?

@jyapayne
Copy link
Collaborator

For Mac, I use a packager called Packages. It's free and pretty darn good. I believe for Mac you can simply edit the Info.plist file in YourApp.app/Contents/Info.plist and add a section that specifies the command line arguments.

Something like:

<key>ProgramArguments</key>
    <array>
        <string>nwjs</string>
        <string>--load-extension</string>
        <string>path/to/extension</string>
    </array>

Adding command line arguments to Web2Exe may be possible. I'll look into it and see if I can make it an option :)

@codekiln codekiln changed the title Any way to add nw parameters not meant for chrome to executable? Any way to add nw parameters not meant for chrome executable? Apr 13, 2017
@codekiln
Copy link
Author

Thanks for the tips @jyapayne!

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

No branches or pull requests

2 participants