You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2015/04/28 07:04:00 UTC
[2/7] cordova-windows git commit: Added support for Windows 10.
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29178057/template/WinJS/js/en-US/ui.strings.js
----------------------------------------------------------------------
diff --git a/template/WinJS/js/en-US/ui.strings.js b/template/WinJS/js/en-US/ui.strings.js
new file mode 100644
index 0000000..d9f9b0f
--- /dev/null
+++ b/template/WinJS/js/en-US/ui.strings.js
@@ -0,0 +1,476 @@
+/*!
+ Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information.
+ Build: 4.0.0.winjs.2015.4.23
+ Version: WinJS.4.0
+*/
+
+(function () {
+ var globalObject =
+ typeof window !== 'undefined' ? window :
+ typeof self !== 'undefined' ? self :
+ typeof global !== 'undefined' ? global :
+ {};
+ globalObject.strings = globalObject.strings || {};
+
+ var appxVersion = "WinJS.4.0";
+ var developerPrefix = "Developer.";
+ if (appxVersion.indexOf(developerPrefix) === 0) {
+ appxVersion = appxVersion.substring(developerPrefix.length);
+ }
+
+ function addStrings(keyPrefix, strings) {
+ Object.keys(strings).forEach(function (key) {
+ globalObject.strings[keyPrefix + key.replace("\\", "/")] = strings[key];
+ });
+ }
+ addStrings("ms-resource://"+appxVersion+"/ui/",
+{
+ "appBarAriaLabel": "App Bar",
+ "appBarCommandAriaLabel": "App Bar Item",
+ "appBarOverflowButtonAriaLabel": "View more",
+ "autoSuggestBoxAriaLabel": "Autosuggestbox",
+ "autoSuggestBoxAriaLabelInputNoPlaceHolder": "Autosuggestbox, enter to submit query, esc to clear text",
+ "autoSuggestBoxAriaLabelInputPlaceHolder": "Autosuggestbox, {0}, enter to submit query, esc to clear text",
+ "autoSuggestBoxAriaLabelQuery": "Suggestion: {0}",
+ "_autoSuggestBoxAriaLabelQuery.comment": "Suggestion: query text (example: Suggestion: contoso)",
+ "autoSuggestBoxAriaLabelSeparator": "Separator: {0}",
+ "_autoSuggestBoxAriaLabelSeparator.comment": "Separator: separator text (example: Separator: People or Separator: Apps)",
+ "autoSuggestBoxAriaLabelResult": "Result: {0}, {1}",
+ "_autoSuggestBoxAriaLabelResult.comment": "Result: text, detailed text (example: Result: contoso, www.contoso.com)",
+ "averageRating": "Average Rating",
+ "backbuttonarialabel": "Back",
+ "clearYourRating" : "Clear your rating",
+ "closeOverlay" : "Close",
+ "commandingSurfaceAriaLabel": "CommandingSurface",
+ "commandingSurfaceOverflowButtonAriaLabel": "View more",
+ "datePicker": "Date Picker",
+ "flipViewPanningContainerAriaLabel": "Scrolling Container",
+ "flyoutAriaLabel": "Flyout",
+ "hubViewportAriaLabel": "Scrolling Container",
+ "listViewViewportAriaLabel": "Scrolling Container",
+ "menuCommandAriaLabel": "Menu Item",
+ "menuAriaLabel": "Menu",
+ "navBarContainerViewportAriaLabel": "Scrolling Container",
+ "off" : "Off",
+ "on" : "On",
+ "pivotAriaLabel": "Pivot",
+ "pivotViewportAriaLabel": "Scrolling Container",
+ "searchBoxAriaLabel": "Searchbox",
+ "searchBoxAriaLabelInputNoPlaceHolder": "Searchbox, enter to submit query, esc to clear text",
+ "searchBoxAriaLabelInputPlaceHolder": "Searchbox, {0}, enter to submit query, esc to clear text",
+ "searchBoxAriaLabelButton": "Click to submit query",
+ "seeMore": "See more",
+ "selectAMPM": "Select A.M P.M",
+ "selectDay": "Select Day",
+ "selectHour": "Select Hour",
+ "selectMinute": "Select Minute",
+ "selectMonth": "Select Month",
+ "selectYear": "Select Year",
+ "settingsFlyoutAriaLabel": "Settings Flyout",
+ "tentativeRating": "Tentative Rating",
+ "timePicker": "Time Picker",
+ "toolbarAriaLabel": "ToolBar",
+ "toolbarOverflowButtonAriaLabel": "View more",
+ "unrated": "Unrated",
+ "userRating": "User Rating",
+ // AppBar Icons follow, the format of the ui.js and ui.resjson differ for
+ // the AppBarIcon namespace. The remainder of the file therefore differs.
+ // Code point comments are the icon glyphs in the 'Segoe UI Symbol' font.
+ "appBarIcons\\previous": "\uE100", // group:Media
+ "_appBarIcons\\previous.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\next": "\uE101", // group:Media
+ "_appBarIcons\\next.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\play": "\uE102", // group:Media
+ "_appBarIcons\\play.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\pause": "\uE103", // group:Media
+ "_appBarIcons\\pause.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\edit": "\uE104", // group:File
+ "_appBarIcons\\edit.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\save": "\uE105", // group:File
+ "_appBarIcons\\save.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\clear": "\uE106", // group:File
+ "_appBarIcons\\clear.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\delete": "\uE107", // group:File
+ "_appBarIcons\\delete.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\remove": "\uE108", // group:File
+ "_appBarIcons\\remove.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\add": "\uE109", // group:File
+ "_appBarIcons\\add.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\cancel": "\uE10A", // group:Editing
+ "_appBarIcons\\cancel.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\accept": "\uE10B", // group:General
+ "_appBarIcons\\accept.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\more": "\uE10C", // group:General
+ "_appBarIcons\\more.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\redo": "\uE10D", // group:Editing
+ "_appBarIcons\\redo.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\undo": "\uE10E", // group:Editing
+ "_appBarIcons\\undo.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\home": "\uE10F", // group:General
+ "_appBarIcons\\home.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\up": "\uE110", // group:General
+ "_appBarIcons\\up.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\forward": "\uE111", // group:General
+ "_appBarIcons\\forward.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\right": "\uE111", // group:General
+ "_appBarIcons\\right.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\back": "\uE112", // group:General
+ "_appBarIcons\\back.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\left": "\uE112", // group:General
+ "_appBarIcons\\left.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\favorite": "\uE113", // group:Media
+ "_appBarIcons\\favorite.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\camera": "\uE114", // group:System
+ "_appBarIcons\\camera.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\settings": "\uE115", // group:System
+ "_appBarIcons\\settings.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\video": "\uE116", // group:Media
+ "_appBarIcons\\video.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\sync": "\uE117", // group:Media
+ "_appBarIcons\\sync.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\download": "\uE118", // group:Media
+ "_appBarIcons\\download.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\mail": "\uE119", // group:Mail and calendar
+ "_appBarIcons\\mail.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\find": "\uE11A", // group:Data
+ "_appBarIcons\\find.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\help": "\uE11B", // group:General
+ "_appBarIcons\\help.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\upload": "\uE11C", // group:Media
+ "_appBarIcons\\upload.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\emoji": "\uE11D", // group:Communications
+ "_appBarIcons\\emoji.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\twopage": "\uE11E", // group:Layout
+ "_appBarIcons\\twopage.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\leavechat": "\uE11F", // group:Communications
+ "_appBarIcons\\leavechat.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\mailforward": "\uE120", // group:Mail and calendar
+ "_appBarIcons\\mailforward.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\clock": "\uE121", // group:General
+ "_appBarIcons\\clock.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\send": "\uE122", // group:Mail and calendar
+ "_appBarIcons\\send.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\crop": "\uE123", // group:Editing
+ "_appBarIcons\\crop.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\rotatecamera": "\uE124", // group:System
+ "_appBarIcons\\rotatecamera.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\people": "\uE125", // group:Communications
+ "_appBarIcons\\people.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\closepane": "\uE126", // group:Layout
+ "_appBarIcons\\closepane.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\openpane": "\uE127", // group:Layout
+ "_appBarIcons\\openpane.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\world": "\uE128", // group:General
+ "_appBarIcons\\world.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\flag": "\uE129", // group:Mail and calendar
+ "_appBarIcons\\flag.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\previewlink": "\uE12A", // group:General
+ "_appBarIcons\\previewlink.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\globe": "\uE12B", // group:Communications
+ "_appBarIcons\\globe.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\trim": "\uE12C", // group:Editing
+ "_appBarIcons\\trim.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\attachcamera": "\uE12D", // group:System
+ "_appBarIcons\\attachcamera.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\zoomin": "\uE12E", // group:Layout
+ "_appBarIcons\\zoomin.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\bookmarks": "\uE12F", // group:Editing
+ "_appBarIcons\\bookmarks.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\document": "\uE130", // group:File
+ "_appBarIcons\\document.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\protecteddocument": "\uE131", // group:File
+ "_appBarIcons\\protecteddocument.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\page": "\uE132", // group:Layout
+ "_appBarIcons\\page.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\bullets": "\uE133", // group:Editing
+ "_appBarIcons\\bullets.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\comment": "\uE134", // group:Communications
+ "_appBarIcons\\comment.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\mail2": "\uE135", // group:Mail and calendar
+ "_appBarIcons\\mail2.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\contactinfo": "\uE136", // group:Communications
+ "_appBarIcons\\contactinfo.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\hangup": "\uE137", // group:Communications
+ "_appBarIcons\\hangup.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\viewall": "\uE138", // group:Data
+ "_appBarIcons\\viewall.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\mappin": "\uE139", // group:General
+ "_appBarIcons\\mappin.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\phone": "\uE13A", // group:Communications
+ "_appBarIcons\\phone.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\videochat": "\uE13B", // group:Communications
+ "_appBarIcons\\videochat.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\switch": "\uE13C", // group:Communications
+ "_appBarIcons\\switch.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\contact": "\uE13D", // group:Communications
+ "_appBarIcons\\contact.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\rename": "\uE13E", // group:File
+ "_appBarIcons\\rename.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\pin": "\uE141", // group:System
+ "_appBarIcons\\pin.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\musicinfo": "\uE142", // group:Media
+ "_appBarIcons\\musicinfo.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\go": "\uE143", // group:General
+ "_appBarIcons\\go.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\keyboard": "\uE144", // group:System
+ "_appBarIcons\\keyboard.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\dockleft": "\uE145", // group:Layout
+ "_appBarIcons\\dockleft.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\dockright": "\uE146", // group:Layout
+ "_appBarIcons\\dockright.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\dockbottom": "\uE147", // group:Layout
+ "_appBarIcons\\dockbottom.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\remote": "\uE148", // group:System
+ "_appBarIcons\\remote.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\refresh": "\uE149", // group:Data
+ "_appBarIcons\\refresh.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\rotate": "\uE14A", // group:Layout
+ "_appBarIcons\\rotate.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\shuffle": "\uE14B", // group:Media
+ "_appBarIcons\\shuffle.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\list": "\uE14C", // group:Editing
+ "_appBarIcons\\list.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\shop": "\uE14D", // group:General
+ "_appBarIcons\\shop.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\selectall": "\uE14E", // group:Data
+ "_appBarIcons\\selectall.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\orientation": "\uE14F", // group:Layout
+ "_appBarIcons\\orientation.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\import": "\uE150", // group:Data
+ "_appBarIcons\\import.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\importall": "\uE151", // group:Data
+ "_appBarIcons\\importall.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\browsephotos": "\uE155", // group:Media
+ "_appBarIcons\\browsephotos.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\webcam": "\uE156", // group:System
+ "_appBarIcons\\webcam.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\pictures": "\uE158", // group:Media
+ "_appBarIcons\\pictures.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\savelocal": "\uE159", // group:File
+ "_appBarIcons\\savelocal.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\caption": "\uE15A", // group:Media
+ "_appBarIcons\\caption.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\stop": "\uE15B", // group:Media
+ "_appBarIcons\\stop.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\showresults": "\uE15C", // group:Data
+ "_appBarIcons\\showresults.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\volume": "\uE15D", // group:Media
+ "_appBarIcons\\volume.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\repair": "\uE15E", // group:System
+ "_appBarIcons\\repair.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\message": "\uE15F", // group:Communications
+ "_appBarIcons\\message.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\page2": "\uE160", // group:Layout
+ "_appBarIcons\\page2.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\calendarday": "\uE161", // group:Mail and calendar
+ "_appBarIcons\\calendarday.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\calendarweek": "\uE162", // group:Mail and calendar
+ "_appBarIcons\\calendarweek.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\calendar": "\uE163", // group:Mail and calendar
+ "_appBarIcons\\calendar.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\characters": "\uE164", // group:Editing
+ "_appBarIcons\\characters.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\mailreplyall": "\uE165", // group:Mail and calendar
+ "_appBarIcons\\mailreplyall.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\read": "\uE166", // group:Mail and calendar
+ "_appBarIcons\\read.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\link": "\uE167", // group:Communications
+ "_appBarIcons\\link.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\accounts": "\uE168", // group:Communications
+ "_appBarIcons\\accounts.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\showbcc": "\uE169", // group:Mail and calendar
+ "_appBarIcons\\showbcc.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\hidebcc": "\uE16A", // group:Mail and calendar
+ "_appBarIcons\\hidebcc.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\cut": "\uE16B", // group:Editing
+ "_appBarIcons\\cut.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\attach": "\uE16C", // group:Mail and calendar
+ "_appBarIcons\\attach.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\paste": "\uE16D", // group:Editing
+ "_appBarIcons\\paste.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\filter": "\uE16E", // group:Data
+ "_appBarIcons\\filter.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\copy": "\uE16F", // group:Editing
+ "_appBarIcons\\copy.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\emoji2": "\uE170", // group:Mail and calendar
+ "_appBarIcons\\emoji2.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\important": "\uE171", // group:Mail and calendar
+ "_appBarIcons\\important.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\mailreply": "\uE172", // group:Mail and calendar
+ "_appBarIcons\\mailreply.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\slideshow": "\uE173", // group:Media
+ "_appBarIcons\\slideshow.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\sort": "\uE174", // group:Data
+ "_appBarIcons\\sort.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\manage": "\uE178", // group:System
+ "_appBarIcons\\manage.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\allapps": "\uE179", // group:System
+ "_appBarIcons\\allapps.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\disconnectdrive": "\uE17A", // group:System
+ "_appBarIcons\\disconnectdrive.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\mapdrive": "\uE17B", // group:System
+ "_appBarIcons\\mapdrive.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\newwindow": "\uE17C", // group:System
+ "_appBarIcons\\newwindow.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\openwith": "\uE17D", // group:System
+ "_appBarIcons\\openwith.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\contactpresence": "\uE181", // group:Communications
+ "_appBarIcons\\contactpresence.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\priority": "\uE182", // group:Mail and calendar
+ "_appBarIcons\\priority.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\uploadskydrive": "\uE183", // group:File
+ "_appBarIcons\\uploadskydrive.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\gototoday": "\uE184", // group:Mail and calendar
+ "_appBarIcons\\gototoday.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\font": "\uE185", // group:Editing
+ "_appBarIcons\\font.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\fontcolor": "\uE186", // group:Editing
+ "_appBarIcons\\fontcolor.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\contact2": "\uE187", // group:Communications
+ "_appBarIcons\\contact2.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\folder": "\uE188", // group:File
+ "_appBarIcons\\folder.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\audio": "\uE189", // group:Media
+ "_appBarIcons\\audio.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\placeholder": "\uE18A", // group:General
+ "_appBarIcons\\placeholder.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\view": "\uE18B", // group:Layout
+ "_appBarIcons\\view.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\setlockscreen": "\uE18C", // group:System
+ "_appBarIcons\\setlockscreen.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\settile": "\uE18D", // group:System
+ "_appBarIcons\\settile.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\cc": "\uE190", // group:Media
+ "_appBarIcons\\cc.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\stopslideshow": "\uE191", // group:Media
+ "_appBarIcons\\stopslideshow.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\permissions": "\uE192", // group:System
+ "_appBarIcons\\permissions.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\highlight": "\uE193", // group:Editing
+ "_appBarIcons\\highlight.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\disableupdates": "\uE194", // group:System
+ "_appBarIcons\\disableupdates.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\unfavorite": "\uE195", // group:Media
+ "_appBarIcons\\unfavorite.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\unpin": "\uE196", // group:System
+ "_appBarIcons\\unpin.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\openlocal": "\uE197", // group:File
+ "_appBarIcons\\openlocal.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\mute": "\uE198", // group:Media
+ "_appBarIcons\\mute.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\italic": "\uE199", // group:Editing
+ "_appBarIcons\\italic.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\underline": "\uE19A", // group:Editing
+ "_appBarIcons\\underline.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\bold": "\uE19B", // group:Editing
+ "_appBarIcons\\bold.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\movetofolder": "\uE19C", // group:File
+ "_appBarIcons\\movetofolder.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\likedislike": "\uE19D", // group:Data
+ "_appBarIcons\\likedislike.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\dislike": "\uE19E", // group:Data
+ "_appBarIcons\\dislike.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\like": "\uE19F", // group:Data
+ "_appBarIcons\\like.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\alignright": "\uE1A0", // group:Editing
+ "_appBarIcons\\alignright.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\aligncenter": "\uE1A1", // group:Editing
+ "_appBarIcons\\aligncenter.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\alignleft": "\uE1A2", // group:Editing
+ "_appBarIcons\\alignleft.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\zoom": "\uE1A3", // group:Layout
+ "_appBarIcons\\zoom.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\zoomout": "\uE1A4", // group:Layout
+ "_appBarIcons\\zoomout.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\openfile": "\uE1A5", // group:File
+ "_appBarIcons\\openfile.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\otheruser": "\uE1A6", // group:System
+ "_appBarIcons\\otheruser.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\admin": "\uE1A7", // group:System
+ "_appBarIcons\\admin.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\street": "\uE1C3", // group:General
+ "_appBarIcons\\street.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\map": "\uE1C4", // group:General
+ "_appBarIcons\\map.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\clearselection": "\uE1C5", // group:Data
+ "_appBarIcons\\clearselection.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\fontdecrease": "\uE1C6", // group:Editing
+ "_appBarIcons\\fontdecrease.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\fontincrease": "\uE1C7", // group:Editing
+ "_appBarIcons\\fontincrease.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\fontsize": "\uE1C8", // group:Editing
+ "_appBarIcons\\fontsize.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\cellphone": "\uE1C9", // group:Communications
+ "_appBarIcons\\cellphone.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\reshare": "\uE1CA", // group:Communications
+ "_appBarIcons\\reshare.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\tag": "\uE1CB", // group:Data
+ "_appBarIcons\\tag.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\repeatone": "\uE1CC", // group:Media
+ "_appBarIcons\\repeatone.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\repeatall": "\uE1CD", // group:Media
+ "_appBarIcons\\repeatall.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\outlinestar": "\uE1CE", // group:Data
+ "_appBarIcons\\outlinestar.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\solidstar": "\uE1CF", // group:Data
+ "_appBarIcons\\solidstar.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\calculator": "\uE1D0", // group:General
+ "_appBarIcons\\calculator.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\directions": "\uE1D1", // group:General
+ "_appBarIcons\\directions.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\target": "\uE1D2", // group:General
+ "_appBarIcons\\target.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\library": "\uE1D3", // group:Media
+ "_appBarIcons\\library.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\phonebook": "\uE1D4", // group:Communications
+ "_appBarIcons\\phonebook.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\memo": "\uE1D5", // group:Communications
+ "_appBarIcons\\memo.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\microphone": "\uE1D6", // group:System
+ "_appBarIcons\\microphone.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\postupdate": "\uE1D7", // group:Communications
+ "_appBarIcons\\postupdate.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\backtowindow": "\uE1D8", // group:Layout
+ "_appBarIcons\\backtowindow.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\fullscreen": "\uE1D9", // group:Layout
+ "_appBarIcons\\fullscreen.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\newfolder": "\uE1DA", // group:File
+ "_appBarIcons\\newfolder.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\calendarreply": "\uE1DB", // group:Mail and calendar
+ "_appBarIcons\\calendarreply.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\unsyncfolder": "\uE1DD", // group:File
+ "_appBarIcons\\unsyncfolder.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\reporthacked": "\uE1DE", // group:Communications
+ "_appBarIcons\\reporthacked.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\syncfolder": "\uE1DF", // group:File
+ "_appBarIcons\\syncfolder.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\blockcontact": "\uE1E0", // group:Communications
+ "_appBarIcons\\blockcontact.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\switchapps": "\uE1E1", // group:System
+ "_appBarIcons\\switchapps.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\addfriend": "\uE1E2", // group:Communications
+ "_appBarIcons\\addfriend.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\touchpointer": "\uE1E3", // group:System
+ "_appBarIcons\\touchpointer.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\gotostart": "\uE1E4", // group:System
+ "_appBarIcons\\gotostart.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\zerobars": "\uE1E5", // group:System
+ "_appBarIcons\\zerobars.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\onebar": "\uE1E6", // group:System
+ "_appBarIcons\\onebar.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\twobars": "\uE1E7", // group:System
+ "_appBarIcons\\twobars.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\threebars": "\uE1E8", // group:System
+ "_appBarIcons\\threebars.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\fourbars": "\uE1E9", // group:System
+ "_appBarIcons\\fourbars.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\scan": "\uE294", // group:General
+ "_appBarIcons\\scan.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\preview": "\uE295", // group:General
+ "_appBarIcons\\preview.comment": "{Locked:qps-ploc,qps-plocm}",
+ "appBarIcons\\hamburger": "\uE700", // group:General
+ "_appBarIcons\\hamburger.comment": "{Locked:qps-ploc,qps-plocm}"
+}
+
+);
+}());
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29178057/template/config.xml
----------------------------------------------------------------------
diff --git a/template/config.xml b/template/config.xml
index 558496c..1850536 100644
--- a/template/config.xml
+++ b/template/config.xml
@@ -20,6 +20,5 @@
#
-->
<widget xmlns="http://www.w3.org/ns/widgets">
- <preference name="windows-target-version" value="8.0" />
- <preference name="windows-phone-target-version" value="8.1" />
+
</widget>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29178057/template/cordova/lib/ConfigParser.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/ConfigParser.js b/template/cordova/lib/ConfigParser.js
index ef81e7c..583da4d 100644
--- a/template/cordova/lib/ConfigParser.js
+++ b/template/cordova/lib/ConfigParser.js
@@ -113,6 +113,17 @@ ConfigParser.prototype = {
});
return ret;
},
+ getMatchingPreferences: function(regexp) {
+ var preferences = this.doc.findall('preference');
+ var result = [];
+ preferences.forEach(function(preference) {
+ if (regexp.test(preference.attrib.name)) {
+ result.push({ name: preference.attrib.name, value: preference.attrib.value });
+ }
+ });
+
+ return result;
+ },
/**
* Returns all resources.
* @param {string} resourceName Type of static resources to return.
@@ -163,7 +174,50 @@ ConfigParser.prototype = {
});
return ret;
},
+
+ /**
+ * Returns all <allow-navigation> rules.
+ * @return {string[]} Array of allow-navigation rules.
+ */
+ getNavigationWhitelistRules: function() {
+ var rules = this.doc.getroot().findall('allow-navigation');
+ var result = [];
+ rules.forEach(function(rule) {
+ if (rule.attrib.href) {
+ result.push(rule.attrib.href);
+ }
+ });
+ return result;
+ },
+
+ getWindowsTargetVersion: function() {
+ // PascalCased version is the new official preference name, but retain the old for back-compat
+ var preference = this.getPreference('WindowsTargetVersion') || this.getPreference('windows-target-version');
+
+ if (!preference)
+ preference = '8.1'; // default is 8.1.
+
+ return preference;
+ },
+
+ getWindowsPhoneTargetVersion: function() {
+ // This is a little more complicated than the previous one.
+ // 1. Check for an explicit preference. If the preference is set explicitly, return that, irrespective of whether it is valid
+ // 2. Get the Windows baseline version. If it's equivalent to 8.0, bump it to 8.1.
+ // 3. Return the Windows baseline version.
+ var explicitPreference = this.getPreference('WindowsPhoneTargetVersion') || this.getPreference('windows-phone-target-version');
+ if (explicitPreference)
+ return explicitPreference;
+
+ var windowsTargetVersion = this.getWindowsTargetVersion();
+ if (windowsTargetVersion === '8' || windowsTargetVersion === '8.0')
+ windowsTargetVersion = '8.1';
+
+ return windowsTargetVersion;
+
+ },
+
// Returns the widget defaultLocale
defaultLocale: function() {
return this.doc.getroot().attrib['defaultlocale'];
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29178057/template/cordova/lib/MSBuildTools.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/MSBuildTools.js b/template/cordova/lib/MSBuildTools.js
index 4b67e61..402225d 100644
--- a/template/cordova/lib/MSBuildTools.js
+++ b/template/cordova/lib/MSBuildTools.js
@@ -20,7 +20,9 @@
var Q = require('Q'),
path = require('path'),
exec = require('./exec'),
- spawn = require('./spawn');
+ shell = require('shelljs'),
+ spawn = require('./spawn'),
+ Version = require('./Version');
function MSBuildTools (version, path) {
this.version = version;
@@ -68,4 +70,33 @@ function checkMSBuildVersion(version) {
deferred.resolve(null);
});
return deferred.promise;
-}
\ No newline at end of file
+}
+
+function getProgramFiles32Folder() {
+ /* jshint ignore:start */ /* Wants to use dot syntax for ProgramFiles, leaving as-is for consistency */
+ return process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
+ /* jshint ignore:end */
+}
+
+/// returns an array of available UAP Versions
+function getAvailableUAPVersions() {
+ var uapFolderPath = path.join(getProgramFiles32Folder(), 'Windows Kits', '10', 'Platforms', 'UAP');
+ if (!shell.test('-e', uapFolderPath)) {
+ console.log('No UAP SDK exists on this machine.');
+ return []; // No UAP SDK exists on this machine
+ }
+
+ var result = [];
+ shell.ls(uapFolderPath).filter(function(uapDir) {
+ return shell.test('-d', path.join(uapFolderPath, uapDir));
+ }).map(function(folder) {
+ return Version.tryParse(folder);
+ }).forEach(function(version, index) {
+ if (version) {
+ result.push(version);
+ }
+ });
+
+ return result;
+}
+module.exports.getAvailableUAPVersions = getAvailableUAPVersions;
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29178057/template/cordova/lib/Version.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/Version.js b/template/cordova/lib/Version.js
new file mode 100644
index 0000000..3885a8a
--- /dev/null
+++ b/template/cordova/lib/Version.js
@@ -0,0 +1,114 @@
+/*
+ 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.
+*/
+
+function Version(major, minor, build, qfe) {
+ this.major = major;
+ this.minor = zeroIfUndefined(minor);
+ this.build = zeroIfUndefined(build);
+ this.qfe = zeroIfUndefined(qfe);
+}
+
+function zeroIfUndefined(val) {
+ if (typeof val === 'undefined')
+ return 0;
+
+ return val;
+}
+
+Version.Expression = /^\d{1,8}\.\d{1,8}\.\d{1,8}\.\d{1,8}$/;
+Version.fromString = function(str) {
+ var result = Version.tryParse(str);
+ if (!result)
+ throw new RangeError('Could not parse a version from the provided value "' + str + '".');
+
+ return result;
+};
+
+Version.tryParse = function(str) {
+ if (Version.Expression.test(str)) {
+ var parts = str.split('.').map(function(part) {
+ return parseInt(part, 10);
+ });
+
+ var result = new Version(parts[0], parts[1], parts[2], parts[3]);
+ return result;
+ }
+
+ return false;
+};
+
+Version.comparer = function(a, b) {
+ if (a.constructor !== Version || b.constructor !== Version)
+ throw new TypeError('Must compare only Versions');
+
+ if (a.gt(b))
+ return 1;
+ else if (a.eq(b))
+ return 0;
+
+ return -1;
+};
+
+Version.prototype.gt = function(other) {
+ if (other.constructor !== Version)
+ throw new TypeError('other is not a Version.');
+
+ if (this.major > other.major) return true;
+ if (this.major < other.major) return false;
+ if (this.minor > other.minor) return true;
+ if (this.minor < other.minor) return false;
+ if (this.build > other.build) return true;
+ if (this.build < other.build) return false;
+ if (this.qfe > other.qfe) return true;
+ if (this.qfe < other.qfe) return false;
+
+ return false;
+};
+
+Version.prototype.gte = function(other) {
+ if (other.constructor !== Version)
+ throw new TypeError('other is not a Version.');
+
+ if (this.major > other.major) return true;
+ if (this.major < other.major) return false;
+ if (this.minor > other.minor) return true;
+ if (this.minor < other.minor) return false;
+ if (this.build > other.build) return true;
+ if (this.build < other.build) return false;
+ if (this.qfe > other.qfe) return true;
+ if (this.qfe < other.qfe) return false;
+
+ return true;
+};
+
+Version.prototype.eq = function(other) {
+ if (other.constructor !== Version)
+ throw new TypeError('other is not a Version.');
+
+ if (this.major === other.major && this.minor === other.minor && this.build === other.build && this.qfe === other.qfe)
+ return true;
+
+ return false;
+};
+
+Version.prototype.toString = function() {
+ return this.major + '.' + this.minor + '.' + this.build + '.' + this.qfe;
+};
+
+module.exports = Version;
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29178057/template/cordova/lib/WindowsStoreAppUtils.ps1
----------------------------------------------------------------------
diff --git a/template/cordova/lib/WindowsStoreAppUtils.ps1 b/template/cordova/lib/WindowsStoreAppUtils.ps1
index 86bc579..60caecb 100644
--- a/template/cordova/lib/WindowsStoreAppUtils.ps1
+++ b/template/cordova/lib/WindowsStoreAppUtils.ps1
@@ -129,6 +129,24 @@ function Install-App {
}
}
+function Install-AppFromDirectory {
+ param(
+ [Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
+ [string] $Path <# Full path to actual AppxManifest.xml #>
+ )
+
+ Add-AppxPackage -Path $Path -Register -ForceApplicationShutdown
+}
+
+function Install-AppFromAppx {
+ param(
+ [Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
+ [string] $Path <# Full path to actual .appx #>
+ )
+
+ Add-AppxPackage -Path $Path -ForceApplicationShutdown
+}
+
function Start-Locally {
param(
[Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29178057/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index d5c45cf..ebc85b9 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -20,6 +20,7 @@
var Q = require('Q'),
path = require('path'),
nopt = require('nopt'),
+ shell = require('shelljs'),
utils = require('./utils'),
prepare = require('./prepare'),
MSBuildTools = require('./MSBuildTools'),
@@ -30,7 +31,8 @@ var ROOT = path.join(__dirname, '..', '..');
var projFiles = {
phone: 'CordovaApp.Phone.jsproj',
win: 'CordovaApp.Windows.jsproj',
- win80: 'CordovaApp.Windows80.jsproj'
+ win80: 'CordovaApp.Windows80.jsproj',
+ win10: 'CordovaApp.Windows10.jsproj'
};
// parsed nopt arguments
var args;
@@ -40,6 +42,8 @@ var buildType;
var buildArchs;
// MSBuild Tools available on this development machine
var msbuild;
+// Override WindowsTargetVersion for all devices
+var projVerOverride;
// builds cordova-windows application with parameters provided.
// See 'help' function for args list
@@ -57,9 +61,9 @@ module.exports.run = function run (argv) {
// update platform as per configuration settings
prepare.applyPlatformConfig();
-
return MSBuildTools.findAvailableVersion().then(
function(msbuildTools) {
+ cleanIntermediates();
msbuild = msbuildTools;
console.log('MSBuildToolsPath: ' + msbuild.path);
return buildTargets();
@@ -69,26 +73,30 @@ module.exports.run = function run (argv) {
// help/usage function
module.exports.help = function help() {
console.log('');
- console.log('Usage: build [ --debug | --release ] [--archs=\"<list of architectures...>\"] [--phone | --win]');
+ console.log('Usage: build [ --debug | --release ] [--archs="<list of architectures...>""] [--phone | --win]');
console.log(' --help : Displays this dialog.');
console.log(' --debug : Builds project in debug mode. (Default)');
console.log(' --release : Builds project in release mode.');
console.log(' -r : Shortcut :: builds project in release mode.');
- console.log(' --archs : Builds project binaries for specific chip architectures (`anycpu`, `arm`, `x86`, `x64`).');
+ console.log(' --archs : Builds project binaries for specific chip architectures ("anycpu", "arm", "x86", "x64").');
console.log(' --phone, --win');
console.log(' : Specifies, what type of project to build');
+ console.log(' --appx=<8.1-win|8.1-phone|uap>');
+ console.log(' : Overrides WindowsTargetVersion to build Windows 8.1, Windows Phone 8.1, or Windows 10 Universal.');
console.log('examples:');
console.log(' build ');
console.log(' build --debug');
console.log(' build --release');
console.log(' build --release --archs="arm x86"');
+ console.log(' build --appx=8.1-phone -r');
console.log('');
+
process.exit(0);
};
function parseAndValidateArgs(argv) {
// parse and validate args
- args = nopt({'debug': Boolean, 'release': Boolean, 'archs': [String],
+ args = nopt({'debug': Boolean, 'release': Boolean, 'archs': [String], 'appx': String,
'phone': Boolean, 'win': Boolean}, {'-r': '--release'}, argv);
// Validate args
if (args.debug && args.release) {
@@ -97,6 +105,10 @@ function parseAndValidateArgs(argv) {
if (args.phone && args.win) {
throw 'Only one of "phone"/"win" options should be specified';
}
+
+ if (args.appx) {
+ projVerOverride = args.appx;
+ }
// get build options/defaults
buildType = args.release ? 'release' : 'debug';
@@ -107,7 +119,6 @@ function buildTargets() {
// filter targets to make sure they are supported on this development machine
var myBuildTargets = filterSupportedTargets(getBuildTargets(), msbuild);
-
var buildConfigs = [];
// collect all build configurations (pairs of project to build and target architecture)
@@ -139,7 +150,7 @@ function getBuildTargets() {
var noSwitches = !(args.phone || args.win);
// Windows
if (args.win || noSwitches) { // if --win or no arg
- var windowsTargetVersion = config.getPreference('windows-target-version');
+ var windowsTargetVersion = config.getWindowsTargetVersion();
switch(windowsTargetVersion) {
case '8':
case '8.0':
@@ -148,43 +159,102 @@ function getBuildTargets() {
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);
+ throw new Error('Unsupported WindowsTargetVersion value: ' + windowsTargetVersion);
}
}
// Windows Phone
if (args.phone || noSwitches) { // if --phone or no arg
- var windowsPhoneTargetVersion = config.getPreference('windows-phone-target-version');
+ var windowsPhoneTargetVersion = config.getWindowsPhoneTargetVersion();
switch(windowsPhoneTargetVersion) {
case '8.1':
targets.push(projFiles.phone);
break;
+ case '10.0':
+ case 'UAP':
+ if (!args.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);
+ throw new Error('Unsupported WindowsPhoneTargetVersion value: ' + windowsPhoneTargetVersion);
+ }
+ }
+
+ // apply build target override if one was specified
+ if (projVerOverride) {
+ switch (projVerOverride) {
+ case '8.1-phone':
+ targets = [projFiles.phone];
+ break;
+ case '8.1-win':
+ targets = [projFiles.win];
+ break;
+ case 'uap':
+ targets = [projFiles.win10];
+ break;
+ default:
+ console.warn('Unrecognized --appx parameter passed to build: "' + projVerOverride + '", ignoring.');
+ break;
}
}
+
return targets;
}
+// 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;
+}
+
+function msBuild12TargetsFilter(target) {
+ return target === projFiles.win80 || target === projFiles.win || target === projFiles.phone;
+}
+
+function msBuild14TargetsFilter(target) {
+ return target === projFiles.win || target === projFiles.phone || target === projFiles.win10;
+}
+
function filterSupportedTargets (targets) {
if (!targets || targets.length === 0) {
console.warn('\r\nNo build targets are specified.');
return [];
}
- if (msbuild.version != '4.0') {
- return targets;
- }
+ var targetFilters = {
+ '4.0': msBuild4TargetsFilter,
+ '12.0': msBuild12TargetsFilter,
+ '14.0': msBuild14TargetsFilter
+ };
- // MSBuild 4.0 does not support Windows 8.1 and Windows Phone 8.1
- var supportedTargets = targets.filter(function(target) {
- return target != projFiles.win && target != projFiles.phone;
- });
+ var filter = targetFilters[msbuild.version];
+ if (!filter) {
+ console.warn('Unsupported msbuild version "' + msbuild.version + '", aborting.');
+ return [];
+ }
+ var supportedTargets = targets.filter(filter);
// unsupported targets have been detected
- if (supportedTargets.length != targets.length) {
- console.warn('\r\nWarning. Windows 8.1 and Windows Phone 8.1 target platforms are not supported on this development machine and will be skipped.');
- console.warn('Please install OS Windows 8.1 and Visual Studio 2013 Update2 in order to build for Windows 8.1 and Windows Phone 8.1.\r\n');
+ if (supportedTargets.length !== targets.length) {
+ console.warn('Warning: Not all desired build targets are compatible with the current build environment.');
+ console.warn('Please install Visual Studio 2015 for Windows 8.1 and Windows 10, or Visual Studio 2013 Update 2 for Windows 8 and 8.1.');
}
return supportedTargets;
}
+
+function cleanIntermediates() {
+ var buildPath = path.join(ROOT, 'build');
+ if (shell.test('-e', buildPath)) {
+ shell.rm('-rf', buildPath);
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/29178057/template/cordova/lib/package.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/package.js b/template/cordova/lib/package.js
index 92ed76c..74541aa 100644
--- a/template/cordova/lib/package.js
+++ b/template/cordova/lib/package.js
@@ -18,9 +18,9 @@
*/
var Q = require('q'),
+ exec = require('./exec'),
fs = require('fs'),
path = require('path'),
- exec = require('./exec'),
spawn = require('./spawn'),
utils = require('./utils');
@@ -62,19 +62,25 @@ module.exports.getPackage = function (projectType, buildtype, buildArch) {
return Q.reject('Package with specified parameters not found in AppPackages folder');
};
+function getPackagePhoneProductId(packageFile) {
+ var windowsPlatformPath = path.join(packageFile, '..', '..', '..');
+ return module.exports.getAppId(windowsPlatformPath);
+}
+
// returns package info object or null if it is not valid package
module.exports.getPackageFileInfo = function (packageFile) {
var pkgName = path.basename(packageFile);
// CordovaApp.Windows_0.0.1.0_anycpu_debug.appx
// CordovaApp.Phone_0.0.1.0_x86_debug.appxbundle
- var props = /.*\.(Phone|Windows|Windows80)_((?:\d*\.)*\d*)_(AnyCPU|x64|x86|ARM)(?:_(Debug))?.(appx|appxbundle)$/i.exec(pkgName);
+ var props = /.*\.(Phone|Windows|Windows80|Windows10)_((?:\d*\.)*\d*)_(AnyCPU|x64|x86|ARM)(?:_(Debug))?.(appx|appxbundle)$/i.exec(pkgName);
if (props) {
- return {type : props[1].toLowerCase(),
+ return {
+ type : props[1].toLowerCase(),
arch : props[3].toLowerCase(),
buildtype : props[4] ? props[4].toLowerCase() : 'release',
- file : props[1].toLowerCase() != 'phone' ?
- path.join(packageFile, '..', 'Add-AppDevPackage.ps1') :
- packageFile
+ appx : packageFile,
+ script : path.join(packageFile, '..', 'Add-AppDevPackage.ps1'),
+ phoneId : getPackagePhoneProductId(packageFile)
};
}
return null;
@@ -85,22 +91,25 @@ module.exports.getPackageFileInfo = function (packageFile) {
module.exports.getAppId = function (platformPath) {
var manifest = path.join(platformPath, 'package.phone.appxmanifest');
try {
- return Q.resolve(/PhoneProductId="(.*?)"/gi.exec(fs.readFileSync(manifest, 'utf8'))[1]);
+ return /PhoneProductId="(.*?)"/gi.exec(fs.readFileSync(manifest, 'utf8'))[1];
} catch (e) {
- return Q.reject('Can\'t read appId from phone manifest' + e);
+ throw new Error('Can\'t read appId from phone manifest', e);
}
};
// return package name fetched from appxmanifest
// return rejected promise if appxmanifest not valid
-module.exports.getPackageName = function (platformPath) {
+function getPackageName(platformPath) {
+ // Can reliably read from package.windows.appxmanifest even if targeting Windows 10
+ // because the function is only used for desktop deployment, which always has the same
+ // package name when uninstalling / reinstalling
var manifest = path.join(platformPath, 'package.windows.appxmanifest');
try {
return Q.resolve(/Application Id="(.*?)"/gi.exec(fs.readFileSync(manifest, 'utf8'))[1]);
} catch (e) {
return Q.reject('Can\'t read package name from manifest ' + e);
}
-};
+}
// returns one of available devices which name match with provided string
// return rejected promise if device with name specified not found
@@ -135,16 +144,16 @@ module.exports.listDevices = function () {
};
// deploys specified phone package to device/emulator
-module.exports.deployToPhone = function (appxPath, deployTarget) {
+module.exports.deployToPhone = function (package, deployTarget, targetWindows10) {
var getTarget = deployTarget == 'device' ? Q('de') :
deployTarget == 'emulator' ? Q('xd') : module.exports.findDevice(deployTarget);
// /installlaunch option sometimes fails with 'Error: The parameter is incorrect.'
// so we use separate steps to /install and then /launch
return getTarget.then(function(target) {
- return utils.getAppDeployUtils().then(function(appDeployUtils) {
+ return utils.getAppDeployUtils(targetWindows10).then(function(appDeployUtils) {
console.log('Installing application');
- return spawn(appDeployUtils, ['/install', appxPath, '/targetdevice:' + target]).then(function() {
+ return spawn(appDeployUtils, ['/install', package.appx, '/targetdevice:' + target]).then(function() {
// TODO: resolve AppId without specifying project root;
return module.exports.getAppId(path.join(__dirname, '..', '..'));
}).then(function(appId) {
@@ -155,20 +164,60 @@ module.exports.deployToPhone = function (appxPath, deployTarget) {
});
};
+function installAppToPhone(appDeployUtils, package, target, update) {
+ var cmd = update ? '/updatelaunch' : '/installlaunch';
+ console.log('Installing application...');
+ return spawn(appDeployUtils, [cmd, package.appx, '/targetdevice:' + target]);
+}
+
+function uninstallAppFromPhone(appDeployUtils, package, target) {
+ console.log('Attempting to remove previously installed application...');
+ return spawn(appDeployUtils, ['/uninstall', package.phoneId, '/targetdevice:' + target]);
+}
+
+module.exports.deployToPhoneAndRun = function (package, deployTarget, targetWindows10) {
+ var getTarget = deployTarget == 'device' ? Q('de') :
+ deployTarget == 'emulator' ? Q('xd') : module.exports.findDevice(deployTarget);
+
+ return getTarget.then(function(target) {
+ return utils.getAppDeployUtils(targetWindows10).then(function(appDeployUtils) {
+
+ return uninstallAppFromPhone(appDeployUtils, package, target).then(
+ function() {}, function() {}).then(function() {
+ return installAppToPhone(appDeployUtils, package, target, false);
+ }).then(function() {}, function(error) {
+
+ if (error.indexOf('Error code 2148734208 for command') === 0) {
+ return installAppToPhone(appDeployUtils, package, target, true);
+ }
+ else {
+ console.warn('Unexpected error from installation:');
+ console.warn(error);
+ console.warn('You may have previously installed the app with an earlier version of cordova-windows.');
+ console.warn('Ensure the app is uninstalled from the phone and then try to run again.');
+ throw error;
+ }
+ }).then(function() {
+ return module.exports.getAppId(path.join(__dirname, '..', '..'));
+ });
+ });
+ });
+};
+
// deploys specified package to desktop
-module.exports.deployToDesktop = function (appxScript, deployTarget) {
+module.exports.deployToDesktop = function (package, deployTarget) {
if (deployTarget != 'device' && deployTarget != 'emulator') {
return Q.reject('Deploying desktop apps to specific target not supported');
}
return utils.getAppStoreUtils().then(function(appStoreUtils) {
- return module.exports.getPackageName(path.join(__dirname, '..', '..')).then(function(pkgname) {
+ return getPackageName(path.join(__dirname, '..', '..')).then(function(pkgname) {
// uninstalls previous application instance (if exists)
console.log('Attempt to uninstall previous application version...');
return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Uninstall-App ' + pkgname])
.then(function() {
console.log('Attempt to install application...');
- return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Install-App', utils.quote(appxScript)]);
+ return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Install-App', utils.quote(package.script)]);
}).then(function() {
console.log('Starting application...');
return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Start-Locally', pkgname]);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org