From 97dda2b88d838f9d7e39c1825d05bcb869955571 Mon Sep 17 00:00:00 2001 From: Paul Hickman Date: Sun, 27 Mar 2016 16:40:10 +0100 Subject: [PATCH 1/2] Add support for windows platform to resources.js --- lib/resources.js | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/resources.js b/lib/resources.js index a965702..b381e2e 100644 --- a/lib/resources.js +++ b/lib/resources.js @@ -26,7 +26,7 @@ var Settings = { iconSourceFile: 'icon', splashSourceFile: 'splash', sourceExtensions: ['psd', 'ai', 'png'], - supportedPlatforms: ['android', 'ios', 'wp8'], + supportedPlatforms: ['android', 'ios', 'wp8', 'windows'], configFile: 'config.xml', generateThrottle: 4, defaultMaxIconSize: 96, @@ -125,6 +125,34 @@ var Platforms = { nodeName: 'splash', nodeAttributes: ['src', 'width', 'height'] } + }, + + windows: { + icon: { + images: [ + { name: 'Square30x30Logo.scale-100.png', width: 30, height: 30 }, + { name: 'Square44x44Logo.scale-100.png', width: 44, height: 44 }, + { name: 'Square44x44Logo.scale-240.png', width: 106, height: 106 }, + { name: 'Square70x70Logo.scale-100.png', width: 70, height: 70 }, + { name: 'Square71x71Logo.scale-100.png', width: 71, height: 71 }, + { name: 'Square150x150Logo.scale-100.png', width: 150, height: 150 }, + { name: 'quare150x150Logo.scale-240.png', width: 360, height: 360 }, + { name: 'Wide310x150Logo.scale-100.png', width: 310, height: 150 }, + { name: 'Wide310x150Logo.scale-240.png', width: 744, height: 360 }, + { name: 'StoreLogo.scale-100.png', width: 50, height: 50 }, + { name: 'StoreLogo.scale-240.png', width: 120, height: 120 } + ], + nodeName: 'icon', + nodeAttributes: ['src', 'width', 'height'] + }, + splash: { + images: [ + { name: 'SplashScreen.scale-100.png', width: 620, height: 300 }, + { name: 'SplashScreenPhone.scale-240.png', width: 1152, height: 1920 }, + ], + nodeName: 'splash', + nodeAttributes: ['src', 'width', 'height'] + } } }; @@ -174,6 +202,8 @@ function generate(dir, options) { buildPlatforms.push('android'); } else if (_.contains(options.platforms, 'wp8')) { buildPlatforms.push('wp8'); + } else if (_.contains(options.platforms, 'windows')) { + buildPlatforms.push('windows'); } else if (!fs.existsSync(path.join(appDirectory, 'platforms'))) { hasPlatforms = false; } else { From 35a20530c995aa3e0f7635d662866ac8363e79a4 Mon Sep 17 00:00:00 2001 From: Paul Hickman Date: Sun, 27 Mar 2016 17:12:55 +0100 Subject: [PATCH 2/2] Added two missing windows platform images to resource.js --- lib/resources.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/resources.js b/lib/resources.js index b381e2e..a203983 100644 --- a/lib/resources.js +++ b/lib/resources.js @@ -135,6 +135,8 @@ var Platforms = { { name: 'Square44x44Logo.scale-240.png', width: 106, height: 106 }, { name: 'Square70x70Logo.scale-100.png', width: 70, height: 70 }, { name: 'Square71x71Logo.scale-100.png', width: 71, height: 71 }, + { name: 'Square71x71Logo.scale-240.png', width: 170, height: 170 }, + { name: 'Square310x310Logo.scale-100.png', width: 310, height: 310 }, { name: 'Square150x150Logo.scale-100.png', width: 150, height: 150 }, { name: 'quare150x150Logo.scale-240.png', width: 360, height: 360 }, { name: 'Wide310x150Logo.scale-100.png', width: 310, height: 150 },