paulsutherland / Polyonic

An Electron Ionic application shell for creating Web Apps, Progressive Mobile Web Apps, Native Mobile Apps and Desktop Apps.
209 stars 44 forks source link

Update gulp build task to preserve icons for electron-builder #7

Closed vicatcu closed 7 years ago

vicatcu commented 7 years ago

In the tasks/bulid.js file, you can change:

let paths = {
  copyFromAppDir: [
    './node_modules/**',
    './www/**',
    './routes/**',
    './**/*.+(jpg|png|svg)'
  ]
}

to

let paths = {
  copyFromAppDir: [
    './node_modules/**',
    './www/**',
    './routes/**',
    './**/*.+(jpg|png|svg)',
    './icon.ico',
    './icon.icns',
    './background.png'
  ]
}

... so that those icon resources can be put in the src folder and they will end up in the build folder for the benefit of electron-builder packaging.

I'm actually still fighting to get electron-builder to build an executable for me on Linux, but this is probably part of the puzzle anyway. I'm getting:

{:timestamp=>"2017-06-07T15:49:40.251127-0400", :message=>"Invalid package configuration: Cannot package the path '/tmp/electron-builder-wew21A/0-1-linux.iconset/icon_256x256x32.png', does it exist?", :level=>:error}
vicatcu commented 7 years ago

FYI, got past that last problem by generating the icns file on a Mac instead of trying to synthesize it from a png using a website converter.

paulsutherland commented 7 years ago

Thank you, I have updated as requested.

Thanks for the feedback.

Paul