electron-archive / grunt-electron-installer

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

Installer doesn't launch #90

Closed bitomule closed 8 years ago

bitomule commented 8 years ago

I've created a setup.exe using grunt-electron-installer on osx, copied it to a windows machine and:

I use 2 npm scripts to build both windows versions:

"build:win": "npm run clean:win && electron-packager ./ myapp --out=dist/win --platform=win32 --arch=ia32 --version=0.35.2 --app-version 1.0.3 --app-bundle-id=myapp --helper-bundle-id=myapp --overwrite=true --asar=true --icon=assets/win/icon.ico --prune=true --ignore=dist --ignore=node_modules/\\.bin",
"build:win64": "npm run clean:win64 && electron-packager ./ myapp --out=dist/win64 --platform=win32 --arch=x64 --version=0.35.2 --app-version 1.0.3 --app-bundle-id=myapp --helper-bundle-id=myapp --overwrite=true --asar=true --icon=assets/win/icon.ico --prune=true --ignore=dist --ignore=node_modules/\\.bin"

And one more to call grunt-electron-installer:

"pack:win": "npm run build:win && npm run build:win64 && grunt create-windows-installer",

Here's my gruntfile with options:

module.exports = function(grunt) {

    grunt.loadNpmTasks('grunt-electron-installer');

    // Project configuration.
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        uglify: {
            options: {
                banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
            },
            build: {
                src: 'src/<%= pkg.name %>.js',
                dest: 'build/<%= pkg.name %>.min.js'
            }
        },
        'create-windows-installer': {
            x64: {
                appDirectory: 'dist/win64/myapp-win32-x64',
                outputDirectory: 'dist/win64/',
                authors: 'myapp',
                description:"myapp for desktop",
                iconUrl:"http://myiconurl.ico",
                setupIcon:"assets/win/icon.ico"
            },
            ia32: {
                appDirectory: 'dist/win/myapp-win32-ia32',
                outputDirectory: 'dist/win/',
                authors: 'myapp',
                description:"myapp for desktop",
                iconUrl:"http://myiconurl.ico",
                setupIcon:"assets/win/icon.ico"
            }
        }
    });

};

What's wrong? Setup didn't throw any error, just never launches.

anaisbetts commented 8 years ago

This is bugged at the moment, you'll have to build on Windows. We'll fix this up today

bitomule commented 8 years ago

Thanks @paulcbetts . It requires .Net 4.5 even if I build it on window?

havenchyk commented 8 years ago

Same for installer built from Linux.

nekolab commented 8 years ago

Hi @paulcbetts , do we have any updates for this issue? Seems the issue is caused by mono nuget, is it?

anaisbetts commented 8 years ago

@meowlab This is fixed in master but I need to make a new build, I'll do it today

redeian commented 8 years ago

Thank you, so much!

nekolab commented 8 years ago

Friendly Ping @paulcbetts

bitomule commented 8 years ago

@paulcbetts is build published?

anaisbetts commented 8 years ago

Not yet, folx are on vacation (I don't have permissions to publish new grunt-electron-installer releases), so it'll probably have to wait a week.

nekolab commented 8 years ago

@paulcbetts So you mean the code now in repo is Okay? But I noticed all file under vendor folder changes more than a month ago

anaisbetts commented 8 years ago

@meowlab The code under Squirrel/Squirrel.Windows is Okay, but I need to build it and drop it into this repo, then we need to publish a release. If you want to build Squirrel.Windows yourself and drop it in you can, the command is

msbuild /p:Configuration=Release

Then look for the files in src\[Setup, Update]\bin\Release

nekolab commented 8 years ago

@paulcbetts Thanks!! I will try it

bitomule commented 8 years ago

@meowlab did you try it?

nekolab commented 8 years ago

@bitomule Yeah, it works Just compile it on a Windows computer, find all files under vendor, replace them and then it can works fine

bitomule commented 8 years ago

@meowlab thanks! I don't have windows so I'll have to run a vm. How is the official build going @paulcbetts? Are folks back from holidays?

btw, happy new year!

atoennis commented 8 years ago

I seem to be running into this same issue. @paulcbetts or anyone else have an update? Thanks!

seancolyer commented 8 years ago

I have been running into this. I pushed a branch of my changes to make it work on osx: https://github.com/seancolyer/grunt-electron-installer/tree/fix-osx-build

General steps:

Notes: My fixes would (I think) break compiling on Windows, so they should not be merged in to master as it stands.

This means that if you want to build on OSX you can check out my branch or do similar as needed. I'm not sure if this will help the core project here or not.

atoennis commented 8 years ago

@seancolyer Your changes worked like a charm, thanks!

bitomule commented 8 years ago

@seancolyer Installed master from npm and then replaced from your repo and worked. Thanks!

Zarlex commented 8 years ago

@seancolyer your fix works fine when i build the app the first time. When i try to build a new release without removing the old version an exception is thrown

System.DllNotFoundException: msdelta.dll
at (wrapper managed-to-native) DeltaCompressionDotNet.MsDelta.NativeMethods:CreateDelta (DeltaCompressionDotNet.MsDelta.FileTypeSet,long,long,string,string,string,string,DeltaCompressionDotNet.MsDelta.DeltaInput,intptr,DeltaCompressionDotNet.MsDelta.HashAlgId,string)
...

I'm not sure if this has something to do with your fix or if it is a general issue. Using your fix made it possible to build my app for windows on OSX for the first time

develar commented 8 years ago

@paulcbetts Broken again, please see https://github.com/electron/windows-installer/issues/61, https://github.com/electron-userland/electron-builder/issues/294