electron-archive / grunt-electron-installer

Grunt plugin to build Windows installers for Electron apps
MIT License
402 stars 106 forks source link

Doesn't create shortcuts #24

Closed adamdebono closed 9 years ago

adamdebono commented 9 years ago

The task is creating my installers fine, and the installers work, however the shortcuts are not getting added in the right spots so I can only run the app by going through the AppData and launching it from there.

I'm using windows 8.1

kevinsawicki commented 9 years ago

How are you creating the shortcuts? This library only creates the installer, the shortcut API is completely up to the app itself to call.

adamdebono commented 9 years ago

I'm talking about the shortcuts that should be created on installation, e.g. the ones that appear in the start menu or on the desktop. According to the Squirrel.Windows getting started guide, "Every EXE in your package will automatically get a shortcut"

kevinsawicki commented 9 years ago

Electron apps are configured to handle squirrel events themselves so you will need to follow https://github.com/Squirrel/Squirrel.Windows/blob/master/docs/squirrel-events.md to setup the shortcuts

adamdebono commented 9 years ago

OK. I think it would help to add something in the readme explaining this.

kevinsawicki commented 9 years ago

I think it would help to add something in the readme explaining this.

Great point, I've added it there.

anaisbetts commented 9 years ago

@kevinsawicki Added a few more notes around this as well: https://github.com/atom/grunt-electron-installer/commit/3795ea33a67efb67fecdc27d8ab1cf9a0f2369ca

zh99998 commented 8 years ago

i still don't know how to generate shortcuts, is there any document or example?

is there any shortcut api or i have to use something like https://www.npmjs.com/package/node-win-shortcut manually ?

anaisbetts commented 8 years ago

@zh99998 You can ask Squirrel to create shortcuts for you, by spawn'ing Update.exe with the --createShortcuts parameter and the name of your executable

bisol commented 8 years ago

Hello, I'm running Update.exe --createShortcut app/app.exe>, but instead of creating a shortcut with my app's name, it's created a shortcut called 'Electron' (with the right icon and target).

I think I tryed every option on the Gruntfile.js package.json. Any ideas?

pyro2927 commented 8 years ago

I'm having the same issue as @bisol.

bisol commented 8 years ago

I found out I was misconfiguring electron-packager: you must use the --version-string.ProductName parameter. Or if your are using grunt-electron: 'electron': { win32: { options: { 'version-string': { ProductName: 'Your App'

PS. Sorry for posting on a closed issue ...

pyro2927 commented 8 years ago

Oh awesome, thanks @bisol!

enahum commented 8 years ago

@kevinsawicki can you provide some input here, cause the Updater.exe --createShortcut is not invoke nor the squirrel-events getting fired, I'm using the installer version 1.1.0.

Thanks.

kevinsawicki commented 8 years ago

can you provide some input here, cause the Updater.exe --createShortcut is not invoke nor the squirrel-events getting fired, I'm using the installer version 1.1.0.

@paulcbetts might be better able to do that.

anaisbetts commented 8 years ago

Update.exe --createShortcuts is never automatically invoked, you must do it yourself. Can you paste in the code you're using to handle Squirrel events?

aleasto commented 8 years ago

@bisol I'm using grunt-electron-installer. How to achieve the same result?

bisol commented 8 years ago

@YoDevil , my gruntfile.js ended up like this

'electron': {
    win32: {
        options: {
        name: __appName,
        dir: 'app',
        out: 'build/win32/',
        version: __electronVersion,
        platform: 'win32',
        arch: 'ia32',
        asar: true,
        icon: 'logo.ico',
        'app-version': __appVersion,
        'version-string': {
            CompanyName: 'my company',
            ProductName: 'app name'

// LegalCopyright // FileDescription // OriginalFilename // FileVersion // ProductVersion // InternalName } } },

'create-windows-installer': {
    ia32: {
        appDirectory: 'build/win32/' + __appName + '-win32-ia32',
        outputDirectory: 'releases/win32',
        authors: __author,
        iconUrl: 'https://localohost/logo.ico',
        setupIcon: 'logo.ico',
        exe: __appName + '.exe',
        noMsi: true
    }
}
aleasto commented 8 years ago

@bisol Thanks! That worked :)