electron-archive / grunt-electron-installer

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

grunt task fails with: File not found: 'MyAtomShellApp.exe' #2

Closed camsoupa closed 9 years ago

camsoupa commented 9 years ago

Why is the task not finding the exe file in the appDirectory? The exe DOES exist in the appDirectory ../bin/app/win32/atom-shell/resources/app.

It fails with this message:

$ grunt
...
Running "create-windows-installer" task
>>File not found: 'MyAtomShellApp.exe'.
Warning: Command failed: File not found: 'MyAtomShellApp.exe'.
  ...
Aborted due to warnings

Here are my files:

package.json:

{
  "name": "MyAtomShellApp",
  "version": "1.0.0",
  "description": "...",
  "main": "index.js",
  "author": "...",
  "license": "ISC",
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-atom-shell-app-builder": "0.0.7",
    "grunt-atom-shell-installer": "^0.13.1",
  }

Gruntfile.coffee:

module.exports = (grunt) ->
  grunt.initConfig
    'build-atom-shell-app':
      options:
        cache_dir: '../bin/atom'
        app_dir: './'
        build_dir: '../bin/app'
        platforms: ['linux64', 'win32']
    'create-windows-installer':
      appDirectory: '../bin/app/win32/atom-shell/resources/app'
      outputDirectory: '../bin/installer/'
      authors: '...'

  grunt.loadNpmTasks 'grunt-atom-shell-app-builder'
  grunt.loadNpmTasks 'grunt-atom-shell-installer'

  grunt.registerTask 'default', [
      'build-atom-shell-app',
      'create-windows-installer'
    ]

My app has this folder structure:

bin/
src/
  index.js
  package.json
  Gruntfile.coffee
kevinsawicki commented 9 years ago

Is the app that is failing to build in a public repository?

camsoupa commented 9 years ago

It is in a private repo.

I think the problem is that the task that builds the exe is actually not placing the exe in appDirectory, but in appDirectory/resources/app.

I think the create-windows-installer task is expecting the exe to be in appDirectory proper although I haven't found the code yet.

kevinsawicki commented 9 years ago

Yes, the exe is assumed to be in the app directory.

camsoupa commented 9 years ago

I think that is a better place for it than resources/app. I think the other task (https://www.npmjs.com/package/grunt-atom-shell-app-builder) should follow suit.