You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2016/02/03 09:40:58 UTC
[3/3] cordova-windows git commit: CB-10480 Remove Windows 8 template
from cordova-windows
CB-10480 Remove Windows 8 template from cordova-windows
Adds a friendly error message for windows-target-version = 8.0
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/d783f207
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/d783f207
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/d783f207
Branch: refs/heads/master
Commit: d783f2073430492e59d99009b30411fb8e8e897a
Parents: 826670c
Author: daserge <v-...@microsoft.com>
Authored: Wed Feb 3 10:52:05 2016 +0300
Committer: daserge <v-...@microsoft.com>
Committed: Wed Feb 3 10:53:47 2016 +0300
----------------------------------------------------------------------
bin/lib/create.js | 4 +-
cordova-js-src/platform.js | 7 +-
...rdovaApp.Windows80_0.0.1.0_anycpu_debug.appx | 1 -
...CordovaApp.Windows_0.0.1.0_anycpu_debug.appx | 1 +
template/CordovaApp.Windows80.jsproj | 83 -----------
template/CordovaApp.vs2012.sln | 64 --------
template/cordova/lib/build.js | 149 +++++++------------
template/cordova/lib/package.js | 2 +-
template/cordova/lib/prepare.js | 28 ++--
template/package.windows80.appxmanifest | 50 -------
template/www/cordova.js | 11 +-
11 files changed, 76 insertions(+), 324 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index 22e713a..9663db9 100644
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -89,8 +89,8 @@ module.exports.create = function (destinationDir, config, options, events) {
// replace specific values in manifests' templates
events.emit('verbose', 'Updating manifest files with project configuration.');
- [ 'package.windows.appxmanifest', 'package.windows80.appxmanifest',
- 'package.phone.appxmanifest', 'package.windows10.appxmanifest' ]
+ [ 'package.windows.appxmanifest', 'package.phone.appxmanifest',
+ 'package.windows10.appxmanifest' ]
.forEach(function (item) {
var manifest = AppxManifest.get(path.join(projectPath, item));
if (manifest.hasPhoneIdentity) {
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/cordova-js-src/platform.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/platform.js b/cordova-js-src/platform.js
index 002017f..4350c14 100644
--- a/cordova-js-src/platform.js
+++ b/cordova-js-src/platform.js
@@ -20,9 +20,7 @@
*/
module.exports = {
- // for backward compatibility we report 'windows8' when run on Windows 8.0 and
- // 'windows' for Windows 8.1 and Windows Phone 8.1
- id: (navigator.appVersion.indexOf("MSAppHost/1.0") !== -1) ? 'windows8' : 'windows',
+ id: 'windows',
bootstrap:function() {
var cordova = require('cordova'),
exec = require('cordova/exec'),
@@ -80,9 +78,6 @@ module.exports = {
} else if (navigator.appVersion.indexOf("MSAppHost/2.0;") !== -1) {
// windows 8.1 + IE 11
scriptElem.src = "//Microsoft.WinJS.2.0/js/base.js";
- } else {
- // windows 8.0 + IE 10
- scriptElem.src = "//Microsoft.WinJS.1.0/js/base.js";
}
scriptElem.addEventListener("load", onWinJSReady);
document.head.appendChild(scriptElem);
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/spec/unit/fixtures/EmptyProject/AppPackages/CordovaApp.Windows80_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows80_0.0.1.0_anycpu_debug.appx
----------------------------------------------------------------------
diff --git a/spec/unit/fixtures/EmptyProject/AppPackages/CordovaApp.Windows80_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows80_0.0.1.0_anycpu_debug.appx b/spec/unit/fixtures/EmptyProject/AppPackages/CordovaApp.Windows80_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows80_0.0.1.0_anycpu_debug.appx
deleted file mode 100644
index 654e7f0..0000000
--- a/spec/unit/fixtures/EmptyProject/AppPackages/CordovaApp.Windows80_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows80_0.0.1.0_anycpu_debug.appx
+++ /dev/null
@@ -1 +0,0 @@
-(dummy package)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/spec/unit/fixtures/EmptyProject/AppPackages/CordovaApp.Windows_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows_0.0.1.0_anycpu_debug.appx
----------------------------------------------------------------------
diff --git a/spec/unit/fixtures/EmptyProject/AppPackages/CordovaApp.Windows_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows_0.0.1.0_anycpu_debug.appx b/spec/unit/fixtures/EmptyProject/AppPackages/CordovaApp.Windows_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows_0.0.1.0_anycpu_debug.appx
new file mode 100644
index 0000000..654e7f0
--- /dev/null
+++ b/spec/unit/fixtures/EmptyProject/AppPackages/CordovaApp.Windows_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows_0.0.1.0_anycpu_debug.appx
@@ -0,0 +1 @@
+(dummy package)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/template/CordovaApp.Windows80.jsproj
----------------------------------------------------------------------
diff --git a/template/CordovaApp.Windows80.jsproj b/template/CordovaApp.Windows80.jsproj
deleted file mode 100644
index 5b84ae6..0000000
--- a/template/CordovaApp.Windows80.jsproj
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputPath>build\windows80\$(Configuration)\$(Platform)\</OutputPath>
- <IntermediateOutputPath>build\windows80\bld\</IntermediateOutputPath>
- </PropertyGroup>
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|AnyCPU">
- <Configuration>Debug</Configuration>
- <Platform>AnyCPU</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|ARM">
- <Configuration>Debug</Configuration>
- <Platform>ARM</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x86">
- <Configuration>Debug</Configuration>
- <Platform>x86</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|AnyCPU">
- <Configuration>Release</Configuration>
- <Platform>AnyCPU</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|ARM">
- <Configuration>Release</Configuration>
- <Platform>ARM</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x86">
- <Configuration>Release</Configuration>
- <Platform>x86</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid>
- </PropertyGroup>
- <PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '11.0'">
- <VisualStudioVersion>11.0</VisualStudioVersion>
- </PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
- <PropertyGroup>
- <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
- <TargetPlatformVersion>8.0</TargetPlatformVersion>
- </PropertyGroup>
- <ItemGroup>
- <AppxManifest Include="package.windows80.appxmanifest">
- <SubType>Designer</SubType>
- </AppxManifest>
- <Content Include="images\*.png" Exclude="images\*.scale-240.*" />
- </ItemGroup>
- <ItemGroup>
- <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
- </ItemGroup>
- <Import Project="CordovaApp.projitems" Label="Shared" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
-</Project>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/template/CordovaApp.vs2012.sln
----------------------------------------------------------------------
diff --git a/template/CordovaApp.vs2012.sln b/template/CordovaApp.vs2012.sln
deleted file mode 100644
index b08ca94..0000000
--- a/template/CordovaApp.vs2012.sln
+++ /dev/null
@@ -1,64 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp.Windows8.0", "CordovaApp.Windows80.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|AnyCPU = Debug|AnyCPU
- Debug|ARM = Debug|ARM
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|AnyCPU = Release|AnyCPU
- Release|ARM = Release|ARM
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.Deploy.0 = Debug|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.ActiveCfg = Debug|ARM
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Build.0 = Debug|ARM
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Deploy.0 = Debug|ARM
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.ActiveCfg = Debug|x64
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Build.0 = Debug|x64
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Deploy.0 = Debug|x64
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.ActiveCfg = Debug|x86
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Build.0 = Debug|x86
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Deploy.0 = Debug|x86
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.Build.0 = Release|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.Deploy.0 = Release|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.ActiveCfg = Release|ARM
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Build.0 = Release|ARM
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Deploy.0 = Release|ARM
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.ActiveCfg = Release|x64
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Build.0 = Release|x64
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Deploy.0 = Release|x64
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.ActiveCfg = Release|x86
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Build.0 = Release|x86
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Deploy.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index 9335223..d924627 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -35,13 +35,11 @@ var CordovaError = require('cordova-common').CordovaError;
var projFiles = {
phone: 'CordovaApp.Phone.jsproj',
win: 'CordovaApp.Windows.jsproj',
- win80: 'CordovaApp.Windows80.jsproj',
win10: 'CordovaApp.Windows10.jsproj'
};
var projFilesToManifests = {
'CordovaApp.Phone.jsproj': 'package.phone.appxmanifest',
'CordovaApp.Windows.jsproj': 'package.windows.appxmanifest',
- 'CordovaApp.Windows80.jsproj': 'package.windows80.appxmanifest',
'CordovaApp.Windows10.jsproj': 'package.windows10.appxmanifest'
};
@@ -71,8 +69,7 @@ module.exports.run = function run (buildOptions) {
if (buildConfig.publisherId) {
updateManifestWithPublisher(msbuildTools, buildConfig);
}
- // bug: Windows 8 build fails on a system with MSBuild 14 on it.
- // Don't regress, make sure MSBuild 4 is selected for a Windows 8 build.
+
cleanIntermediates();
return buildTargets(msbuildTools, buildConfig).then(function(pkg) {
events.emit('verbose', ' BUILD OUTPUT: ' + pkg.appx);
@@ -107,19 +104,18 @@ module.exports.getBuildTargets = function(isWinSwitch, isPhoneSwitch, projOverr
if (isWinSwitch || noSwitches) { // if --win or no arg
var windowsTargetVersion = configXML.getWindowsTargetVersion();
switch(windowsTargetVersion.toLowerCase()) {
- case '8':
- case '8.0':
- targets.push(projFiles.win80);
- break;
- case '8.1':
- targets.push(projFiles.win);
- break;
- case '10.0':
- case 'uap':
- targets.push(projFiles.win10);
- break;
- default:
- throw new CordovaError('Unsupported windows-target-version value: ' + windowsTargetVersion);
+ case '8':
+ case '8.0':
+ throw new CordovaError('windows8 platform is deprecated. To use windows-target-version=8.0 you may downgrade to cordova-windows@4.');
+ case '8.1':
+ targets.push(projFiles.win);
+ break;
+ case '10.0':
+ case 'uap':
+ targets.push(projFiles.win10);
+ break;
+ default:
+ throw new CordovaError('Unsupported windows-target-version value: ' + windowsTargetVersion);
}
}
@@ -127,20 +123,20 @@ module.exports.getBuildTargets = function(isWinSwitch, isPhoneSwitch, projOverr
if (isPhoneSwitch || noSwitches) { // if --phone or no arg
var windowsPhoneTargetVersion = configXML.getWindowsPhoneTargetVersion();
switch(windowsPhoneTargetVersion.toLowerCase()) {
- case '8.1':
- targets.push(projFiles.phone);
- break;
- case '10.0':
- case 'uap':
- if (targets.indexOf(projFiles.win10) < 0) {
- // Already built due to --win or no switches
- // and since the same thing can be run on Phone as Windows,
- // we can skip this one.
- targets.push(projFiles.win10);
- }
- break;
- default:
- throw new Error('Unsupported windows-phone-target-version value: ' + windowsPhoneTargetVersion);
+ case '8.1':
+ targets.push(projFiles.phone);
+ break;
+ case '10.0':
+ case 'uap':
+ if (targets.indexOf(projFiles.win10) < 0) {
+ // Already built due to --win or no switches
+ // and since the same thing can be run on Phone as Windows,
+ // we can skip this one.
+ targets.push(projFiles.win10);
+ }
+ break;
+ default:
+ throw new Error('Unsupported windows-phone-target-version value: ' + windowsPhoneTargetVersion);
}
}
@@ -301,12 +297,6 @@ function buildTargets(allMsBuildVersions, config) {
var bundleTerms = '';
var hasAnyCpu = false;
var shouldBundle = !!config.bundle;
- if (myBuildTargets.indexOf(projFiles.win80) > -1) {
- if (shouldBundle) {
- events.emit('warn', 'Bundling is disabled because a Windows 8 project was detected.');
- }
- shouldBundle = false;
- }
// collect all build configurations (pairs of project to build and target architecture)
myBuildTargets.forEach(function(buildTarget) {
@@ -337,10 +327,6 @@ function buildTargets(allMsBuildVersions, config) {
if (build.arch == 'any cpu') {
build.arch = 'anycpu';
}
- // msbuild 4.0 requires .sln file, we can't build jsproj
- if (msbuild.version == '4.0' && build.target == projFiles.win80) {
- build.target = 'CordovaApp.vs2012.sln';
- }
var otherProperties = { };
// Only add the CordovaBundlePlatforms argument when on the last build step
@@ -416,19 +402,18 @@ function getBuildTargets(buildConfig) {
if (buildConfig.win || noSwitches) { // if --win or no arg
var windowsTargetVersion = configXML.getWindowsTargetVersion();
switch(windowsTargetVersion) {
- case '8':
- case '8.0':
- targets.push(projFiles.win80);
- break;
- case '8.1':
- targets.push(projFiles.win);
- break;
- case '10.0':
- case 'UAP':
- targets.push(projFiles.win10);
- break;
- default:
- throw new Error('Unsupported windows-target-version value: ' + windowsTargetVersion);
+ case '8':
+ case '8.0':
+ throw new CordovaError('windows8 platform is deprecated. To use windows-target-version=8.0 you may downgrade to cordova-windows@4.');
+ case '8.1':
+ targets.push(projFiles.win);
+ break;
+ case '10.0':
+ case 'UAP':
+ targets.push(projFiles.win10);
+ break;
+ default:
+ throw new Error('Unsupported windows-target-version value: ' + windowsTargetVersion);
}
}
@@ -436,20 +421,20 @@ function getBuildTargets(buildConfig) {
if (buildConfig.phone || noSwitches) { // if --phone or no arg
var windowsPhoneTargetVersion = configXML.getWindowsPhoneTargetVersion();
switch(windowsPhoneTargetVersion) {
- case '8.1':
- targets.push(projFiles.phone);
- break;
- case '10.0':
- case 'UAP':
- if (!buildConfig.win && !noSwitches) {
- // Already built due to --win or no switches
- // and since the same thing can be run on Phone as Windows,
- // we can skip this one.
- targets.push(projFiles.win10);
- }
- break;
- default:
- throw new Error('Unsupported windows-phone-target-version value: ' + windowsPhoneTargetVersion);
+ case '8.1':
+ targets.push(projFiles.phone);
+ break;
+ case '10.0':
+ case 'UAP':
+ if (!buildConfig.win && !noSwitches) {
+ // Already built due to --win or no switches
+ // and since the same thing can be run on Phone as Windows,
+ // we can skip this one.
+ targets.push(projFiles.win10);
+ }
+ break;
+ default:
+ throw new Error('Unsupported windows-phone-target-version value: ' + windowsPhoneTargetVersion);
}
}
@@ -475,9 +460,6 @@ function getBuildTargets(buildConfig) {
// as part of build configuration. This will be used for determining the binary to 'run' after build is done.
if (targets.length > 0) {
switch (targets[0]) {
- case projFiles.win80:
- buildConfig.targetProject = 'windows80';
- break;
case projFiles.phone:
buildConfig.targetProject = 'phone';
break;
@@ -502,30 +484,14 @@ function getMsBuildForTargets(selectedTargets, buildConfig, allMsBuildVersions)
return obj;
}, {});
- var result = null;
-
- if (selectedTargets.indexOf(projFiles.win80) > -1) {
- // building Windows 8; prefer 4.0, unless phone is also present, in which case prefer 12
- // prefer 12. If not present, can't build this; error in the filterSupportedTargets function
- result = availableVersions['12.0'] || availableVersions['4.0'];
- } else {
- // 15 and 14 can build Windows 10, Windows 8.1, and Windows Phone 8.1, so resolve to those if available, else 12
- result = (availableVersions['15.0'] || availableVersions['14.0'] || availableVersions['12.0']);
- }
-
- return result;
+ return availableVersions['15.0'] || availableVersions['14.0'] || availableVersions['12.0'];
}
// TODO: Fix this so that it outlines supported versions based on version criteria:
// - v14: Windows 8.1, Windows 10
-// - v12: Windows 8.1, Windows 8.0
-// - v4: Windows 8.0
-function msBuild4TargetsFilter(target) {
- return target === projFiles.win80;
-}
-
+// - v12: Windows 8.1
function msBuild12TargetsFilter(target) {
- return target === projFiles.win80 || target === projFiles.win || target === projFiles.phone;
+ return target === projFiles.win || target === projFiles.phone;
}
function msBuild14TargetsFilter(target) {
@@ -543,7 +509,6 @@ function filterSupportedTargets (targets, msbuild) {
}
var targetFilters = {
- '4.0': msBuild4TargetsFilter,
'12.0': msBuild12TargetsFilter,
'14.0': msBuild14TargetsFilter,
'15.0': msBuild15TargetsFilter
@@ -560,7 +525,7 @@ function filterSupportedTargets (targets, msbuild) {
if (supportedTargets.length !== targets.length) {
events.emit('warn', 'Not all desired build targets are compatible with the current build environment. ' +
'Please install Visual Studio 2015 for Windows 8.1 and Windows 10, ' +
- 'or Visual Studio 2013 Update 2 for Windows 8 and 8.1.');
+ 'or Visual Studio 2013 Update 2 for Windows 8.1.');
}
return supportedTargets;
}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/template/cordova/lib/package.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/package.js b/template/cordova/lib/package.js
index cd3de0e..5bd17e1 100644
--- a/template/cordova/lib/package.js
+++ b/template/cordova/lib/package.js
@@ -81,7 +81,7 @@ module.exports.getPackageFileInfo = function (packageFile) {
// CordovaApp.Phone_0.0.1.0_x86_debug.appxbundle
// CordovaApp.Windows10_0.0.1.0_x64_x86_arm.appxbundle
- var props = /.*\.(Phone|Windows|Windows80|Windows10)_((?:\d*\.)*\d*)*((?:_(AnyCPU|x86|x64|ARM)){1,4})(?:(_Debug))?.(appx|appxbundle)$/i.exec(pkgName);
+ var props = /.*\.(Phone|Windows|Windows10)_((?:\d*\.)*\d*)*((?:_(AnyCPU|x86|x64|ARM)){1,4})(?:(_Debug))?.(appx|appxbundle)$/i.exec(pkgName);
if (props) {
return {
type : props[1].toLowerCase(),
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/template/cordova/lib/prepare.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/prepare.js b/template/cordova/lib/prepare.js
index 699e379..e8a3355 100644
--- a/template/cordova/lib/prepare.js
+++ b/template/cordova/lib/prepare.js
@@ -30,7 +30,6 @@ var events = require('cordova-common').events;
var xmlHelpers = require('cordova-common').xmlHelpers;
var PROJECT_WINDOWS10 = 'CordovaApp.Windows10.jsproj',
- MANIFEST_WINDOWS8 = 'package.windows80.appxmanifest',
MANIFEST_WINDOWS = 'package.windows.appxmanifest',
MANIFEST_PHONE = 'package.phone.appxmanifest',
MANIFEST_WINDOWS10 = 'package.windows10.appxmanifest';
@@ -492,10 +491,6 @@ function updateConfigFilesFrom(sourceConfig, configMunger, locations) {
var config = new ConfigParser(ownConfig);
xmlHelpers.mergeXml(sourceConfig.doc.getroot(),
config.doc.getroot(), 'windows', /*clobber=*/true);
- // CB-6976 Windows Universal Apps. For smooth transition and to prevent mass api failures
- // we allow using windows8 tag for new windows platform
- xmlHelpers.mergeXml(sourceConfig.doc.getroot(),
- config.doc.getroot(), 'windows8', /*clobber=*/true);
config.write();
return config;
@@ -520,17 +515,16 @@ function updateWwwFrom(cordovaProject, destinations) {
shell.cp('-rf', path.join(destinations.platformWww, '*'), destinations.www);
// If project contains 'merges' for our platform, use them as another overrides
- // CB-6976 Windows Universal Apps. For smooth transition from 'windows8' platform
- // we allow using 'windows8' merges for new 'windows' platform
- ['windows8', 'windows'].forEach(function (platform) {
- var mergesPath = path.join(cordovaProject.root, 'merges', platform);
- // if no 'merges' directory found, no further actions needed
- if (!fs.existsSync(mergesPath)) return;
-
- events.emit('verbose', 'Found "merges" for ' + platform + ' platform. Copying over existing "www" files.');
- var overrides = path.join(mergesPath, '*');
- shell.cp('-rf', overrides, destinations.www);
- });
+ var platform = 'windows';
+ var mergesPath = path.join(cordovaProject.root, 'merges', platform);
+ // if no 'merges' directory found, no further actions needed
+ if (!fs.existsSync(mergesPath)) {
+ return;
+ }
+
+ events.emit('verbose', 'Found "merges" for ' + platform + ' platform. Copying over existing "www" files.');
+ var overrides = path.join(mergesPath, '*');
+ shell.cp('-rf', overrides, destinations.www);
}
/**
@@ -542,7 +536,7 @@ function updateWwwFrom(cordovaProject, destinations) {
*/
function updateProjectAccordingTo(projectConfig, locations) {
// Apply appxmanifest changes
- [MANIFEST_WINDOWS, MANIFEST_WINDOWS8, MANIFEST_WINDOWS10, MANIFEST_PHONE]
+ [MANIFEST_WINDOWS, MANIFEST_WINDOWS10, MANIFEST_PHONE]
.forEach(function(manifestFile) {
updateManifestFile(projectConfig, path.join(locations.root, manifestFile));
});
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/template/package.windows80.appxmanifest
----------------------------------------------------------------------
diff --git a/template/package.windows80.appxmanifest b/template/package.windows80.appxmanifest
deleted file mode 100644
index c964a4b..0000000
--- a/template/package.windows80.appxmanifest
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
- <Identity Name="$packagename$" Version="1.0.0.0" Publisher="CN=$username$" />
- <Properties>
- <DisplayName>$projectname$</DisplayName>
- <PublisherDisplayName>$username$</PublisherDisplayName>
- <Logo>images\storelogo.png</Logo>
- </Properties>
- <Prerequisites>
- <OSMinVersion>6.2.1</OSMinVersion>
- <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
- </Prerequisites>
- <Resources>
- <Resource Language="x-generate" />
- </Resources>
- <Applications>
- <Application Id="App" StartPage="www/index.html">
- <VisualElements DisplayName="$projectname$"
- Logo="images\Square150x150Logo.png"
- SmallLogo="images\Square30x30Logo.png"
- Description="CordovaApp"
- ForegroundText="light"
- BackgroundColor="#464646">
- <DefaultTile ShowName="allLogos" WideLogo="images\Wide310x150Logo.png"/>
- <SplashScreen Image="images\splashscreen.png" />
- </VisualElements>
- </Application>
- </Applications>
- <Capabilities>
- <Capability Name="internetClient" />
- </Capabilities>
-</Package>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d783f207/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/template/www/cordova.js b/template/www/cordova.js
index 2929c56..e27887a 100644
--- a/template/www/cordova.js
+++ b/template/www/cordova.js
@@ -817,7 +817,7 @@ module.exports = channel;
});
-// file: e:/cordova/cordova-windows/cordova-js-src/exec.js
+// file: d:/coho/cordova-windows/cordova-js-src/exec.js
define("cordova/exec", function(require, exports, module) {
/*jslint sloppy:true, plusplus:true*/
@@ -1394,13 +1394,11 @@ exports.reset();
});
-// file: e:/cordova/cordova-windows/cordova-js-src/platform.js
+// file: d:/coho/cordova-windows/cordova-js-src/platform.js
define("cordova/platform", function(require, exports, module) {
module.exports = {
- // for backward compatibility we report 'windows8' when run on Windows 8.0 and
- // 'windows' for Windows 8.1 and Windows Phone 8.1
- id: (navigator.appVersion.indexOf("MSAppHost/1.0") !== -1) ? 'windows8' : 'windows',
+ id: 'windows',
bootstrap:function() {
var cordova = require('cordova'),
exec = require('cordova/exec'),
@@ -1458,9 +1456,6 @@ module.exports = {
} else if (navigator.appVersion.indexOf("MSAppHost/2.0;") !== -1) {
// windows 8.1 + IE 11
scriptElem.src = "//Microsoft.WinJS.2.0/js/base.js";
- } else {
- // windows 8.0 + IE 10
- scriptElem.src = "//Microsoft.WinJS.1.0/js/base.js";
}
scriptElem.addEventListener("load", onWinJSReady);
document.head.appendChild(scriptElem);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org