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

Windows installer create shortcut - question #489

Closed
3 tasks done
cballantyne opened this issue Apr 18, 2018 · 5 comments
Closed
3 tasks done

Windows installer create shortcut - question #489

cballantyne opened this issue Apr 18, 2018 · 5 comments

Comments

@cballantyne
Copy link

cballantyne commented Apr 18, 2018

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

I am stumped on trying to get the installer created using electron-forge make to create the windows shortcuts. Can I please verify I should just be adding the following to my main.js:

if(require('electron-squirrel-startup')) app.quit();

I have seen another couple of older issues where config for win32metadata was added under electronPackagerConfig in package.json. This doesn't seem to make a difference.

I am getting a javascript error when running the installer. I cannot copy the text from the alert so have attached snippet.
screenshot1

I am sorry if this is not the right place. I can see electron-forge uses windows-installer which in turn uses electron-squirrel-startup. electron-squirrel-startup seems dead. I can close and move this to appropriate place if needed.

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

I don't have console output since this happens when running the installer.

What command line arguments are you passing?

None. I am just running installer created from electron-forge make.

What does your config.forge data in package.json look like?

"config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {
        "packageManager": "npm",
        "dir": "./src",
        "ignore": [
          ".idea",
          ".gitignore"
        ]
      },
      "electronWinstallerConfig": {
        "name": "dymamic_soundboard"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "dymamicsoundboard"
      }
    }
  }

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init is a good starting point, if that is not the
source of your problem.

@MarshallOfSound
Copy link
Member

This isn't an issue with forge you should check out these two issues for info on related problems 👍

electron/electron#4619
electron/electron#8862 (comment)

@GitFlip
Copy link

GitFlip commented May 10, 2018

@cballantyne Did you ever get this issue solved? Looking at this comment: electron/electron#8862 (comment) prompted us to update our code:

if (require('electron-squirrel-startup'))
{ 
    app.quit();
}

And we updated to:

if (require('electron-squirrel-startup'))
{ 
    app.exit();
}

The issue got resolved doing this, but the shortcut is now not created.

@cballantyne
Copy link
Author

@GitFlip - no. I just gave up in the end. Burned too much time on it.

@darthmorf
Copy link

darthmorf commented May 16, 2018

Our mistake, app.exit(); did create the shortcut afterall; so that should work for you if you've not abandoned the project

@joshuapinter
Copy link

I can confirm, changing:

if ( require( "electron-squirrel-startup" ) ) app.quit();

to:

if ( require( "electron-squirrel-startup" ) ) app.exit();

and the issue went away.

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

5 participants