Skip to content

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

Open

Description

@codekiln

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.

Activity

  1. jyapayne commented on Apr 13, 2017

    @jyapayne
    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.

  2. codekiln commented on Apr 13, 2017

    @codekiln
    Author

    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?

  3. jyapayne commented on Apr 13, 2017

    @jyapayne
    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 :)

  4. 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?[/+] on Apr 13, 2017
  5. codekiln commented on Apr 13, 2017

    @codekiln
    Author

    Thanks for the tips @jyapayne!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions