You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/02/27 12:43:28 UTC

[cordova-windows] 10/26: remove package.phone.appxmanifest and package.windows.appxmanifest and related

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch janpio-win10only
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git

commit c56569c04cec16e155c8b5e279d3285c5c619bb0
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Feb 15 23:22:02 2018 +0100

    remove package.phone.appxmanifest and package.windows.appxmanifest and related
---
 bin/lib/update.js                    |  2 +-
 spec/unit/AppxManifest.spec.js       | 10 ----------
 spec/unit/ConfigChanges.spec.js      |  2 --
 template/cordova/lib/AppxManifest.js |  2 +-
 template/cordova/lib/build.js        |  2 --
 template/cordova/lib/prepare.js      |  6 +-----
 6 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/bin/lib/update.js b/bin/lib/update.js
index 68ff26c..d708adc 100644
--- a/bin/lib/update.js
+++ b/bin/lib/update.js
@@ -47,7 +47,7 @@ module.exports.update = function (destinationDir, options) {
     // The only place, where it is being persisted - phone/win10 appxmanifest file,
     // but since win10 introduced just recently, we can't rely on its manifest
     // for old platform versions.
-    var manifestPath = path.join(destinationDir, 'package.phone.appxmanifest');
+    var manifestPath = path.join(destinationDir, 'package.phone.appxmanifest'); // TODO
     try {
         guid = AppxManifest.get(manifestPath).getPhoneIdentity().getPhoneProductId();
     } catch (e) { /* ignore IO errors */ }
diff --git a/spec/unit/AppxManifest.spec.js b/spec/unit/AppxManifest.spec.js
index 882b1d3..b11fb9f 100644
--- a/spec/unit/AppxManifest.spec.js
+++ b/spec/unit/AppxManifest.spec.js
@@ -24,9 +24,7 @@ var AppxManifest = rewire('../../template/cordova/lib/AppxManifest');
 var Win10AppxManifest = AppxManifest.__get__('Win10AppxManifest');
 var refineColor = AppxManifest.__get__('refineColor');
 
-var WINDOWS_MANIFEST = 'template/package.windows.appxmanifest';
 var WINDOWS_10_MANIFEST = 'template/package.windows10.appxmanifest';
-var WINDOWS_PHONE_MANIFEST = 'template/package.phone.appxmanifest';
 var CSS_COLOR_NAME = 'turquoise';
 
 describe('AppxManifest', function () {
@@ -214,23 +212,15 @@ describe('AppxManifest', function () {
         });
 
         it('Test #018 : getSplashScreenExtension/setSplashScreenExtension', function () {
-            var visualElementsWindows = AppxManifest.get(WINDOWS_MANIFEST).getVisualElements();
             var visualElementsWindows10 = AppxManifest.get(WINDOWS_10_MANIFEST).getVisualElements();
-            var visualElementsWindowsPhone = AppxManifest.get(WINDOWS_PHONE_MANIFEST).getVisualElements();
             var jpgExtension = '.jpg';
 
             // PNG is default extension
-            expect(visualElementsWindows.getSplashScreenExtension()).toEqual('.png');
             expect(visualElementsWindows10.getSplashScreenExtension()).toEqual('.png');
-            expect(visualElementsWindowsPhone.getSplashScreenExtension()).toEqual('.png');
 
             // Set to jpg
-            visualElementsWindows.setSplashScreenExtension(jpgExtension);
-            expect(visualElementsWindows.getSplashScreenExtension()).toEqual(jpgExtension);
             visualElementsWindows10.setSplashScreenExtension(jpgExtension);
             expect(visualElementsWindows10.getSplashScreenExtension()).toEqual(jpgExtension);
-            visualElementsWindowsPhone.setSplashScreenExtension(jpgExtension);
-            expect(visualElementsWindowsPhone.getSplashScreenExtension()).toEqual(jpgExtension);
         });
     });
 });
diff --git a/spec/unit/ConfigChanges.spec.js b/spec/unit/ConfigChanges.spec.js
index 80ed0b9..5ad96b5 100644
--- a/spec/unit/ConfigChanges.spec.js
+++ b/spec/unit/ConfigChanges.spec.js
@@ -250,8 +250,6 @@ describe('generate_plugin_config_munge for windows project', function () {
 
         var changes = AppxManifest.processChanges(testChanges);
         expect(changes.length).toBe(3);
-        expect(changes[0].target).toBe('package.windows.appxmanifest');
-        expect(changes[1].target).toBe('package.phone.appxmanifest');
         expect(changes[2].target).toBe('package.windows10.appxmanifest');
     });
 });
diff --git a/template/cordova/lib/AppxManifest.js b/template/cordova/lib/AppxManifest.js
index a2d4e8c..9c7164b 100644
--- a/template/cordova/lib/AppxManifest.js
+++ b/template/cordova/lib/AppxManifest.js
@@ -53,7 +53,7 @@ var MANIFESTS = {
     }
 };
 
-var SUBSTS = ['package.phone.appxmanifest', 'package.windows.appxmanifest', 'package.windows10.appxmanifest'];
+var SUBSTS = ['package.windows10.appxmanifest'];
 var TARGETS = ['windows', 'phone', 'all'];
 
 /**
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index e1a95fb..9da94fe 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -38,8 +38,6 @@ var projFiles = {
     win10: 'CordovaApp.Windows10.jsproj'
 };
 var projFilesToManifests = {
-    'CordovaApp.Phone.jsproj': 'package.phone.appxmanifest',
-    'CordovaApp.Windows.jsproj': 'package.windows.appxmanifest',
     'CordovaApp.Windows10.jsproj': 'package.windows10.appxmanifest'
 };
 
diff --git a/template/cordova/lib/prepare.js b/template/cordova/lib/prepare.js
index 31ecab0..bc97c8f 100644
--- a/template/cordova/lib/prepare.js
+++ b/template/cordova/lib/prepare.js
@@ -39,8 +39,6 @@ var PluginInfoProvider = require('cordova-common').PluginInfoProvider;
 var DEFAULT_DESCRIPTION = 'CordovaApp';
 
 var PROJECT_WINDOWS10 = 'CordovaApp.Windows10.jsproj';
-var MANIFEST_WINDOWS = 'package.windows.appxmanifest';
-var MANIFEST_PHONE = 'package.phone.appxmanifest';
 var MANIFEST_WINDOWS10 = 'package.windows10.appxmanifest';
 
 var TEMPLATE =
@@ -566,9 +564,7 @@ function updateSplashScreenImageExtensions (cordovaProject, locations) {
     checkThatExtensionsAreNotMixed();
 
     var manifestSplashScreenMap = {};
-    manifestSplashScreenMap[MANIFEST_WINDOWS] = desktopSplashScreen;
     manifestSplashScreenMap[MANIFEST_WINDOWS10] = desktopSplashScreen;
-    manifestSplashScreenMap[MANIFEST_PHONE] = phoneSplashScreen;
 
     for (var manifest in manifestSplashScreenMap) {
         if (manifestSplashScreenMap.hasOwnProperty(manifest)) {
@@ -779,7 +775,7 @@ function cleanWww (projectRoot, locations) {
  */
 function updateProjectAccordingTo (projectConfig, locations) {
     // Apply appxmanifest changes
-    [MANIFEST_WINDOWS, MANIFEST_WINDOWS10, MANIFEST_PHONE]
+    [MANIFEST_WINDOWS10] // TODO simplify
         .forEach(function (manifestFile) {
             updateManifestFile(projectConfig, path.join(locations.root, manifestFile));
         });

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org