From 947a8c2a8b2c9fd2998e2dfc8d3d1057cb0ecba1 Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Thu, 28 Jan 2016 22:39:54 +0800 Subject: [PATCH] Add workaround to skip passing icon to electron packager if output platform is win32 --- src/buildApp.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/buildApp.js b/src/buildApp.js index f6eb887..072f004 100644 --- a/src/buildApp.js +++ b/src/buildApp.js @@ -64,7 +64,14 @@ function buildApp(options, callback) { }, (tempDir, options, callback) => { options.dir = tempDir; - packager(options, (error, appPathArray) => { + + const packageOptions = JSON.parse(JSON.stringify(options)); + + if (options.platform === 'win32') { + // todo check if wine exists before doing this + packageOptions.icon = null; + } + packager(packageOptions, (error, appPathArray) => { callback(error, options, appPathArray); }); },