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 2014/06/12 03:28:21 UTC
[3/5] Creating Win32 branch with just the windows7 content
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/package.json
----------------------------------------------------------------------
diff --git a/windows8/package.json b/windows8/package.json
deleted file mode 100644
index b1fb64f..0000000
--- a/windows8/package.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "cordova-windows8",
- "version": "3.4.0",
- "description": "cordova-windows8 release",
- "main": "bin/create",
- "repository":{
- "type":"git",
- "url":"https://git-wip-us.apache.org/repos/asf/cordova-windows.git"
- },
- "keywords": [
- "windows8",
- "cordova",
- "apache"
- ],
- "author": "Apache Software Foundation",
- "license": "Apache Version 2.0"
-}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/CordovaApp.jsproj
----------------------------------------------------------------------
diff --git a/windows8/template/CordovaApp.jsproj b/windows8/template/CordovaApp.jsproj
deleted file mode 100644
index 9efbaf4..0000000
--- a/windows8/template/CordovaApp.jsproj
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <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>
- <DefaultLanguage>en-US</DefaultLanguage>
- <PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
- </PropertyGroup>
- <ItemGroup>
- <AppxManifest Include="package.appxmanifest">
- <SubType>Designer</SubType>
- </AppxManifest>
- <Content Include="images\logo.png" />
- <Content Include="images\smalllogo.png" />
- <Content Include="images\splashscreen.png" />
- <Content Include="images\storelogo.png" />
- <Content Include="www\cordova.js" />
- <Content Include="www\css\index.css" />
- <Content Include="www\img\logo.png" />
- <Content Include="www\img\smalllogo.png" />
- <Content Include="www\img\splashscreen.png" />
- <Content Include="www\img\storelogo.png" />
- <Content Include="www\index.html" />
- <Content Include="www\js\index.js" />
- <None Include="CordovaApp_TemporaryKey.pfx" />
- </ItemGroup>
- <ItemGroup>
- <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
- <!-- To modify your build process, add your task inside one of the targets below then uncomment
- that target and the DisableFastUpToDateCheck PropertyGroup.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- <PropertyGroup>
- <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
- </PropertyGroup>
- -->
- <PropertyGroup>
- <PreBuildEvent>
-Powershell -ExecutionPolicy RemoteSigned Unblock-File '$(ProjectDir)\cordova\lib\ApplyPlatformConfig.ps1'; Powershell -File '$(ProjectDir)\cordova\lib\ApplyPlatformConfig.ps1' '$(ProjectDir)\';
- </PreBuildEvent>
- </PropertyGroup>
-</Project>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/CordovaApp.sln
----------------------------------------------------------------------
diff --git a/windows8/template/CordovaApp.sln b/windows8/template/CordovaApp.sln
deleted file mode 100644
index ff2be54..0000000
--- a/windows8/template/CordovaApp.sln
+++ /dev/null
@@ -1,46 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Express 2012 for Windows 8
-Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp", "CordovaApp.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|ARM = Debug|ARM
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|ARM = Release|ARM
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.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|Any CPU.ActiveCfg = Release|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Build.0 = Release|Any CPU
- {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.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/115b37b2/windows8/template/CordovaApp_TemporaryKey.pfx
----------------------------------------------------------------------
diff --git a/windows8/template/CordovaApp_TemporaryKey.pfx b/windows8/template/CordovaApp_TemporaryKey.pfx
deleted file mode 100644
index ac90ea2..0000000
Binary files a/windows8/template/CordovaApp_TemporaryKey.pfx and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/MyTemplate.vstemplate
----------------------------------------------------------------------
diff --git a/windows8/template/MyTemplate.vstemplate b/windows8/template/MyTemplate.vstemplate
deleted file mode 100644
index 01f7e6f..0000000
--- a/windows8/template/MyTemplate.vstemplate
+++ /dev/null
@@ -1,44 +0,0 @@
-<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
- <TemplateData>
- <Name>CordovaAppWin8</Name>
- <Description>CordovaAppWin8</Description>
- <ProjectType>JavaScript</ProjectType>
- <ProjectSubType>
- </ProjectSubType>
- <SortOrder>1000</SortOrder>
- <CreateNewFolder>true</CreateNewFolder>
- <DefaultName>CordovaAppWin8</DefaultName>
- <ProvideDefaultName>true</ProvideDefaultName>
- <LocationField>Enabled</LocationField>
- <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
- <Icon>__TemplateIcon.ico</Icon>
- </TemplateData>
- <TemplateContent>
- <Project TargetFileName="CordovaApp.jsproj" File="CordovaApp.jsproj" ReplaceParameters="true">
- <Folder Name="images" TargetFolderName="images">
- <ProjectItem ReplaceParameters="false" TargetFileName="logo.png">logo.png</ProjectItem>
- <ProjectItem ReplaceParameters="false" TargetFileName="smalllogo.png">smalllogo.png</ProjectItem>
- <ProjectItem ReplaceParameters="false" TargetFileName="splashscreen.png">splashscreen.png</ProjectItem>
- <ProjectItem ReplaceParameters="false" TargetFileName="storelogo.png">storelogo.png</ProjectItem>
- </Folder>
- <Folder Name="www" TargetFolderName="www">
- <Folder Name="css" TargetFolderName="css">
- <ProjectItem ReplaceParameters="true" TargetFileName="index.css">index.css</ProjectItem>
- </Folder>
- <Folder Name="img" TargetFolderName="img">
- <ProjectItem ReplaceParameters="false" TargetFileName="logo.png">logo.png</ProjectItem>
- <ProjectItem ReplaceParameters="false" TargetFileName="smalllogo.png">smalllogo.png</ProjectItem>
- <ProjectItem ReplaceParameters="false" TargetFileName="splashscreen.png">splashscreen.png</ProjectItem>
- <ProjectItem ReplaceParameters="false" TargetFileName="storelogo.png">storelogo.png</ProjectItem>
- </Folder>
- <Folder Name="js" TargetFolderName="js">
- <ProjectItem ReplaceParameters="true" TargetFileName="index.js">index.js</ProjectItem>
- </Folder>
- <ProjectItem ReplaceParameters="true" TargetFileName="cordova.js">cordova.js</ProjectItem>
- <ProjectItem ReplaceParameters="true" TargetFileName="index.html">index.html</ProjectItem>
- </Folder>
- <ProjectItem ReplaceParameters="false" TargetFileName="CordovaApp_TemporaryKey.pfx">CordovaApp_TemporaryKey.pfx</ProjectItem>
- <ProjectItem ReplaceParameters="true" TargetFileName="package.appxmanifest">package.appxmanifest</ProjectItem>
- </Project>
- </TemplateContent>
-</VSTemplate>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/VERSION
----------------------------------------------------------------------
diff --git a/windows8/template/VERSION b/windows8/template/VERSION
deleted file mode 100644
index 216add7..0000000
--- a/windows8/template/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-3.5.0-dev
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/config.xml
----------------------------------------------------------------------
diff --git a/windows8/template/config.xml b/windows8/template/config.xml
deleted file mode 100644
index 8fc478e..0000000
--- a/windows8/template/config.xml
+++ /dev/null
@@ -1,24 +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.
-#
--->
-<widget xmlns="http://www.w3.org/ns/widgets">
- <access origin="*"/>
-</widget>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/build.bat
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/build.bat b/windows8/template/cordova/build.bat
deleted file mode 100644
index 9ae4c95..0000000
--- a/windows8/template/cordova/build.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST "%full_path%lib\build.js" (
- cscript "%full_path%lib\build.js" %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'build.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/clean.bat b/windows8/template/cordova/clean.bat
deleted file mode 100644
index 6af7953..0000000
--- a/windows8/template/cordova/clean.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST "%full_path%lib\clean.js" (
- cscript "%full_path%lib\clean.js" %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'clean.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/ApplyPlatformConfig.ps1
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/ApplyPlatformConfig.ps1 b/windows8/template/cordova/lib/ApplyPlatformConfig.ps1
deleted file mode 100644
index 0b89dda..0000000
--- a/windows8/template/cordova/lib/ApplyPlatformConfig.ps1
+++ /dev/null
@@ -1,157 +0,0 @@
-<#
- 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.
-#>
-
-param(
- [Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
- [string] $platformRoot
-)
-
-Write-Host "Applying Platform Config ..."
-
-$configFile = "$platformRoot\config.xml"
-$manifestFile = "$platformRoot\package.appxmanifest"
-
-[xml]$config = Get-Content $configFile
-[xml]$manifest = Get-Content $manifestFile
-
-# Replace app start page with config.xml setting.
-if($config.widget.content -and $config.widget.content.src) {
- $startPage = $config.widget.content.src
- $manifest.Package.Applications.Application.StartPage = "www/$startpage"
-}
-
-# Add domain whitelist rules
-
-$acls = [string[]]$config.widget.access.origin
-$rules = $manifest.Package.Applications.Application.ApplicationContentUriRules
-$NS = $manifest.DocumentElement.NamespaceURI
-
-# Remove existing rules from manifest
-
-if ($rules) {
- $manifest.Package.Applications.Application.RemoveChild($rules)
-}
-
-if ($acls -and ($acls -notcontains "*")) {
- $rules = $manifest.CreateElement("ApplicationContentUriRules", $NS)
- $manifest.Package.Applications.Application.AppendChild($rules)
- $acls | foreach {
- $elem = $manifest.CreateElement("Rule", $NS)
- $elem.SetAttribute("Match", $_)
- $elem.SetAttribute("Type", "include")
- $rules.AppendChild($elem)
- }
-}
-
-# Splash screen support
-$configSplashScreen = $config.SelectNodes('//*[local-name()="preference"][@name="SplashScreen"]').value
-if($configSplashScreen)
-{
- "Setting SplashScreen = $configSplashScreen"
- $imgPath = $null;
-
- # do search relative to platform and app folders
- foreach ($testPath in @($configSplashScreen, "..\..\$configSplashScreen"))
- {
- $testPath = join-path $platformRoot $testPath
-
- if (Test-Path -PathType Leaf $testPath)
- {
- $imgPath = $testPath;
- break
- }
- }
-
- if ($imgPath -eq $null)
- {
- "Unable to locate splash image: $configSplashScreen"
- } else {
- # Default splash screen is stored as 'images\splashscreen.png'
- # http://msdn.microsoft.com/en-us/library/windows/apps/hh465346.aspx
- Copy-Item $imgPath -Destination (join-path $platformRoot "images\splashscreen.png")
- }
-}
-
-# Format splash screen background color to windows8 format
-$configSplashScreenBGColor = $config.SelectNodes('//*[local-name()="preference"][@name="SplashScreenBackgroundColor"]').value
-if($configSplashScreenBGColor)
-{
- "Setting SplashScreenBackgroundColor = $configSplashScreenBGColor"
-
- $bgColor = ($configSplashScreenBGColor -replace "0x", "") -replace "#", ""
-
- # Double all bytes if color specified as "fff"
- if ($bgColor.Length -eq 3) {
- $bgColor = $bgColor[0] + $bgColor[0] + $bgColor[1] + $bgColor[1] + $bgColor[2] + $bgColor[2]
- }
-
- # Parse hex representation to array of color bytes [b, g, r, a]
- $colorBytes = [System.BitConverter]::GetBytes(
- [int]::Parse($bgColor,
- [System.Globalization.NumberStyles]::HexNumber))
-
- Add-Type -AssemblyName PresentationCore
-
- # Create new Color object ignoring alpha, because windows 8 doesn't support it
- # see http://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx
- $color = ([System.Windows.Media.Color]::FromRgb(
- $colorBytes[2], $colorBytes[1], $colorBytes[0]
- # FromRGB method add 100% alpha, so we remove it from resulting string
- ).ToString()) -replace "#FF", "#"
-
- $manifest.Package.Applications.Application.VisualElements.SplashScreen.BackgroundColor = [string]$color
-}
-
-
-# Format background color to windows8 format
-$configBgColor = $config.SelectNodes('//*[local-name()="preference"][@name="BackgroundColor"]').value
-
-if($configBgColor)
-{
- "Setting BackgroundColor = $configBgColor"
- $bgColor = ($configBgColor -replace "0x", "") -replace "#", ""
-
- # Double all bytes if color specified as "fff"
- if ($bgColor.Length -eq 3) {
- $bgColor = $bgColor[0] + $bgColor[0] + $bgColor[1] + $bgColor[1] + $bgColor[2] + $bgColor[2]
- }
-
- # Parse hex representation to array of color bytes [b, g, r, a]
- $colorBytes = [System.BitConverter]::GetBytes(
- [int]::Parse($bgColor,
- [System.Globalization.NumberStyles]::HexNumber))
-
- Add-Type -AssemblyName PresentationCore
-
- # Create new Color object ignoring alpha, because windows 8 doesn't support it
- # see http://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx
- $color = ([System.Windows.Media.Color]::FromRgb(
- $colorBytes[2], $colorBytes[1], $colorBytes[0]
- # FromRGB method add 100% alpha, so we remove it from resulting string
- ).ToString()) -replace "#FF", "#"
-
- $manifest.Package.Applications.Application.VisualElements.BackgroundColor = [string]$color
-}
-
-# Write modified manifest file
-$xmlWriter = New-Object System.Xml.XmlTextWriter($manifestFile, $null)
-$xmlWriter.Formatting = "Indented"
-$xmlWriter.Indentation = 4
-$manifest.WriteContentTo($xmlWriter)
-$xmlWriter.Close()
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/WindowsStoreAppUtils.ps1
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/WindowsStoreAppUtils.ps1 b/windows8/template/cordova/lib/WindowsStoreAppUtils.ps1
deleted file mode 100644
index 5d8c7a9..0000000
--- a/windows8/template/cordova/lib/WindowsStoreAppUtils.ps1
+++ /dev/null
@@ -1,116 +0,0 @@
-<#
- 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.
-#>
-$code = @"
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-namespace StoreAppRunner
-{
- public enum ActivateOptions
- {
- None = 0,
- DesignMode = 0x1,
- NoErrorUI = 0x2,
- NoSplashScreen = 0x4
- }
-
- [ComImport]
- [Guid("2e941141-7f97-4756-ba1d-9decde894a3d")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- public interface IApplicationActivationManager
- {
- IntPtr ActivateApplication([In] String appUserModelId, [In] String arguments, [In] ActivateOptions options, [Out] out UInt32 processId);
- IntPtr ActivateForFile([In] String appUserModelId, [In] IntPtr itemArray, [In] String verb, [Out] out UInt32 processId);
- IntPtr ActivateForProtocol([In] String appUserModelId, [In] IntPtr itemArray, [Out] out UInt32 processId);
- }
- [ComImport]
- [Guid("45BA127D-10A8-46EA-8AB7-56EA9078943C")]
- public class ApplicationActivationManager : IApplicationActivationManager
- {
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public extern IntPtr ActivateApplication([In] String appUserModelId, [In] String arguments, [In] ActivateOptions options, [Out] out UInt32 processId);
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public extern IntPtr ActivateForFile([In] String appUserModelId, [In] IntPtr itemArray, [In] String verb, [Out] out UInt32 processId);
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public extern IntPtr ActivateForProtocol([In] String appUserModelId, [In] IntPtr itemArray, [Out] out UInt32 processId);
- }
-}
-"@
-
-function Uninstall-App {
- param(
- [Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
- [string] $ID <# package.appxmanifest//Identity@name #>
- )
-
- $package = Get-AppxPackage $ID
-
- if($package) {
- Remove-AppxPackage $package.PackageFullName
- }
-}
-
-#
-# Checks whether the machine is missing a valid developer license.
-#
-function CheckIfNeedDeveloperLicense
-{
- $Result = $true
- try
- {
- $Result = (Get-WindowsDeveloperLicense | Where-Object { $_.IsValid }).Count -eq 0
- }
- catch {}
-
- return $Result
-}
-
-function Install-App {
- param(
- [Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
- [string] $Path <# Full path to Add-AppDevPackage.ps1 #>
- )
-
- if (CheckIfNeedDeveloperLicense)
- {
- # we can't run the script with -force param if license installation step is required
- Invoke-Expression ("& `"$Path`"")
- }
- else
- {
- Invoke-Expression ("& `"$Path`" -force")
- }
-}
-
-function Start-Locally {
- param(
- [Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
- [string] $ID <# package.appxmanifest//Identity@name #>
- )
-
- $package = Get-AppxPackage $ID
- $manifest = Get-appxpackagemanifest $package
- $applicationUserModelId = $package.PackageFamilyName + "!" + $manifest.package.applications.application.id
-
- Write-Host "ActivateApplication: " $applicationUserModelId
-
- add-type -TypeDefinition $code
- $appActivator = new-object StoreAppRunner.ApplicationActivationManager
- $appActivator.ActivateApplication($applicationUserModelId,$null,[StoreAppRunner.ActivateOptions]::None,[ref]0)
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/build.js b/windows8/template/cordova/lib/build.js
deleted file mode 100644
index a342921..0000000
--- a/windows8/template/cordova/lib/build.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-
-var args = WScript.Arguments;
-
-// build type. Possible values: "debug", "release"
-var buildType = null,
-// list of build architectures. list of strings
-buildArchs = null;
-
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\build.js').join('');
-
-// help/usage function
-function Usage() {
- Log("");
- Log("Usage: build [ --debug | --release ] [--archs=\"<list of architectures...>\"]");
- Log(" --help : Displays this dialog.");
- Log(" --debug : builds project in debug mode. (Default)");
- Log(" --release : builds project in release mode.");
- Log(" -r : shortcut :: builds project in release mode.");
- Log(" --archs : Builds project binaries for specific chip architectures. `arm` + `x86` + `x64` are supported.");
- Log("examples:");
- Log(" build ");
- Log(" build --debug");
- Log(" build --release");
- Log(" build --release --archs=\"arm x86\"");
- Log("");
-}
-
-// logs messaged to stdout and stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// executes a commmand in the shell
-function exec_verbose(command) {
- //Log("Command: " + command);
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- //Wait a little bit so we're not super looping
- WScript.sleep(100);
- //Print any stdout output from the script
- if (!oShell.StdOut.AtEndOfStream) {
- var line = oShell.StdOut.ReadLine();
- Log(line);
- }
- }
- //Check to make sure our scripts did not encounter an error
- if (!oShell.StdErr.AtEndOfStream) {
- var line = oShell.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(2);
- }
- return oShell.ExitCode;
-}
-
-// checks to see if a .jsproj file exists in the project root
-function is_cordova_project(path) {
- if (fso.FolderExists(path)) {
- var proj_folder = fso.GetFolder(path);
- var proj_files = new Enumerator(proj_folder.Files);
- for (;!proj_files.atEnd(); proj_files.moveNext()) {
- if (fso.GetExtensionName(proj_files.item()) == 'jsproj') {
- return true;
- }
- }
- }
- return false;
-}
-
-// escapes a path so that it can be passed to shell command.
-function escapePath(path) {
- return '"' + path + '"';
-}
-
-// returns full path to .sln file
-function getSolutionDir(path) {
- var proj_folder = fso.GetFolder(path);
- var proj_files = new Enumerator(proj_folder.Files);
- for (;!proj_files.atEnd(); proj_files.moveNext()) {
- if (fso.GetExtensionName(proj_files.item()) == 'sln') {
- return path + '\\' + fso.GetFileName(proj_files.item());
- }
- }
-
- return null;
-}
-
-// returns full path to msbuild tools required to build the project
-function getMSBuildToolsPath(path) {
- // use the latest version of the msbuild tools available on this machine
- var toolsVersions = ['12.0', '4.0'];
- for (idx in toolsVersions) {
- try {
- return wscript_shell.RegRead('HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\' + toolsVersions[idx] + '\\MSBuildToolsPath');
- } catch(err) {}
- }
- Log('MSBuild tools have not been found. Please install Microsoft Visual Studio 2012 or later', true);
- WScript.Quit(2);
-}
-
-// builds the project and .xap in debug mode
-function build_appx(path, buildtype, buildarchs) {
-
- if (!buildtype) {
- Log("WARNING: [ --debug | --release ] not specified, defaulting to debug...");
- buildtype = "debug";
- }
-
- if (!buildarchs) {
- Log("WARNING: target architecture not specified, defaulting to AnyCPU...");
- buildarchs = ["Any CPU"];
- }
-
- for (var i = 0; i < buildarchs.length; i++) {
-
- var buildarch = buildarchs[i];
-
- Log("\nBuilding Cordova Windows 8 Project:");
- Log("\tConfiguration : " + buildtype);
- Log("\tPlatform : " + buildarch);
- Log("\tDirectory : " + path);
-
- try {
- wscript_shell.CurrentDirectory = path;
-
- var MSBuildToolsPath = getMSBuildToolsPath(path);
- Log("\tMSBuildToolsPath: " + MSBuildToolsPath);
- var solutionDir = getSolutionDir(path);
- var buildCommand = escapePath(MSBuildToolsPath + 'msbuild') +
- ' ' + escapePath(solutionDir) +
- ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal' +
- ' /nologo' +
- ' /p:Configuration=' + buildtype +
- ' /p:Platform="' + buildarch + '"';
-
- // hack to get rid of 'Access is denied.' error when running the shell w/ access to C:\path..
- buildCommand = 'cmd /c "' + buildCommand + '"';
- Log(buildCommand);
- if (exec_verbose(buildCommand) !== 0) {
- // msbuild failed
- WScript.Quit(2);
- }
- } catch (err) {
- Log("Build failed: " + err.message, true);
- }
- }
-
- // TODO: there could be multiple AppPackages
- // check if AppPackages created
- if (fso.FolderExists(path + '\\AppPackages')) {
- var out_folder = fso.GetFolder(path + '\\AppPackages');
- var subFolders = new Enumerator(out_folder.SubFolders);
- for(;!subFolders.atEnd();subFolders.moveNext())
- {
- var subFolder = subFolders.item();
- var files = new Enumerator(subFolder.Files);
- for(;!files.atEnd();files.moveNext())
- {
- if(fso.GetExtensionName(files.item()) == "ps1")
- {
- // app was built, installation script exists
- return "\nSUCCESS";
- }
- }
-
- }
-
- }
- Log("Error : AppPackages were not built");
- WScript.Quit(2);
-
-}
-
-// parses script args and set global variables for build
-// throws error if unknown argument specified.
-function parseArgs () {
-
- // return build type, specified by input string, or null, if not build type parameter
- function getBuildType (arg) {
- arg = arg.toLowerCase();
- if (arg == "--debug" || arg == "-d") {
- return "debug";
- }
- else if (arg == "--release" || arg == "-r") {
- return "release";
- }
- return null;
- }
-
- // returns build architectures list, specified by input string
- // or null if nothing specified, or not --archs parameter
- function getBuildArchs (arg) {
- arg = arg.toLowerCase();
- var archs = /--archs=(.+)/.exec(arg);
- if (archs) {
- // if architectures list contains commas, suppose that is comma delimited
- if (archs[1].indexOf(',') != -1){
- return archs[1].split(',');
- }
- // else space delimited
- return archs[1].split(/\s/);
- }
- return null;
- }
-
- for (var i = 0; i < args.Length; i++) {
- if (getBuildType(args(i))) {
- buildType = getBuildType(args(i));
- } else if (getBuildArchs(args(i))) {
- buildArchs = getBuildArchs(args(i));
- } else {
- Log("Error: \"" + args(i) + "\" is not recognized as a build option", true);
- Usage();
- WScript.Quit(2);
- }
- }
-}
-
-var result;
-var isRelease = false;
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(2);
- }
- else if (!fso.FolderExists(ROOT) || !is_cordova_project(ROOT)) {
- Log("Error: could not find project at " + ROOT, true);
- WScript.Quit(2);
- }
-
- parseArgs();
-}
-
-Log(build_appx(ROOT, buildType, buildArchs));
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/clean.js
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/clean.js b/windows8/template/cordova/lib/clean.js
deleted file mode 100644
index 6ef19af..0000000
--- a/windows8/template/cordova/lib/clean.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-var args = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\clean.js').join('');
-
-
-// help function
-function Usage() {
- Log("");
- Log("Usage: clean");
- Log(" - deletes all generated files in project");
- Log("");
-}
-
-// logs to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// cleans any generated files in the cordova project
-function clean_project(path) {
- delete_if_exists(path + "\\bld");
- delete_if_exists(path + "\\bin");
-}
-
-
-// deletes the path element if it exists
-function delete_if_exists(path) {
- if (fso.FolderExists(path)) {
- fso.DeleteFolder(path);
- }
- else if (fso.FileExists(path)) {
- fso.DeleteFile(path);
- }
-}
-
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(2);
- }
- else if (args.Count() > 1) {
- Log("Error: Too many arguments.", true);
- Usage();
- WScript.Quit(2);
- }
-}
-else {
- if (fso.FolderExists(ROOT)) {
- Log("Cleaning cordova project...");
- clean_project(ROOT);
- }
- else {
- Log("Error: Project directory not found,", true);
- Usage();
- WScript.Quit(2);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/deploy.js
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/deploy.js b/windows8/template/cordova/lib/deploy.js
deleted file mode 100644
index 8cdcde9..0000000
--- a/windows8/template/cordova/lib/deploy.js
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- 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.
-*/
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-
-var args = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\deploy.js').join('');
-// path to WindowsStoreAppUtils.ps1; provides helper functions to install/unistall/start Windows Store app
-var WINDOWS_STORE_UTILS = '\\cordova\\lib\\WindowsStoreAppUtils.ps1';
-
-//build types
-var NONE = 0,
- DEBUG = 1,
- RELEASE = 2,
- NO_BUILD = 3;
-var build_type = NONE;
-
-var PACKAGE_NAME = '$namespace$';
-
-// help function
-function Usage() {
- Log("");
- Log("Usage: run [ --device | --emulator | --target=<id> ] [ --debug | --release | --nobuild ]");
- Log(" --device : Deploys and runs the project on the connected device.");
- Log(" --emulator : Deploys and runs the project on an emulator.");
- Log(" --target=<id> : Deploys and runs the project on the specified target.");
- Log(" --debug : Builds project in debug mode.");
- Log(" --release : Builds project in release mode.");
- Log(" --nobuild : Ueses pre-built xap, or errors if project is not built.");
- Log("examples:");
- Log(" run");
- Log(" run --emulator");
- Log(" run --device");
- Log(" run --target=7988B8C3-3ADE-488d-BA3E-D052AC9DC710");
- Log(" run --device --release");
- Log(" run --emulator --debug");
- Log("");
-}
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-var ForReading = 1, ForWriting = 2, ForAppending = 8;
-var TristateUseDefault = 2, TristateTrue = 1, TristateFalse = 0;
-
-
-// executes a commmand in the shell
-function exec(command) {
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- WScript.sleep(100);
- }
-}
-
-// executes a commmand in the shell
-function exec_verbose(command) {
- //Log("Command: " + command);
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- //Wait a little bit so we're not super looping
- WScript.sleep(100);
- //Print any stdout output from the script
- if (!oShell.StdOut.AtEndOfStream) {
- var line = oShell.StdOut.ReadAll();
- Log(line);
- }
- }
- //Check to make sure our scripts did not encounter an error
- if (!oShell.StdErr.AtEndOfStream) {
- var line = oShell.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(2);
- }
-}
-
-function localMachine(path) {
- Log('Deploying to local machine ...');
- makeAppStoreUtils(path);
- uninstallApp(path);
- installApp(path);
-
- var command = "powershell -ExecutionPolicy RemoteSigned \". .\\" + WINDOWS_STORE_UTILS + "; Start-Locally '" + PACKAGE_NAME + "'\"";
- Log(command);
- exec_verbose(command);
-}
-
-// launches project on device
-function device(path)
-{
- // on windows8 platform we treat this command as running application on local machine
- localMachine(path);
-}
-
-// launches project on emulator
-function emulator(path)
-{
- // TODO: currently we can run application on local machine only
- localMachine(path);
-}
-
-// builds and launches the project on the specified target
-function target(path, device_id) {
- Log('ERROR: not supported yet', true);
- Log('DEPLOY FAILED.', true);
- WScript.Quit(2);
-
-}
-
-function makeAppStoreUtils(path) {
- if (fso.FileExists(path + WINDOWS_STORE_UTILS)) {
- Log("Removing execution restrictions from AppStoreUtils...");
- var command = "powershell \"Unblock-File \'" + path + WINDOWS_STORE_UTILS + "\'\"";
- exec_verbose(command);
- return;
- }
-}
-
-// uninstalls previous application instance (if exists)
-function uninstallApp(path) {
- Log("Attempt to uninstall previous application version...");
- Log("\tDirectory : " + path);
-
- wscript_shell.CurrentDirectory = path;
- var command = "powershell -ExecutionPolicy RemoteSigned \". .\\" + WINDOWS_STORE_UTILS + "; Uninstall-App " + PACKAGE_NAME;
- Log(command);
- exec_verbose(command);
-}
-
-// executes store application installation script (Add-AppDevPackage.ps1)
-function installApp(path) {
-
- Log("Attempt to install application...");
- Log("\tDirectory : " + path);
-
- wscript_shell.CurrentDirectory = path;
-
- // TODO: there could be multiple AppPackages
- // check if AppPackages created
- if (fso.FolderExists(path + '\\AppPackages')) {
- var out_folder = fso.GetFolder(path + '\\AppPackages');
- var subFolders = new Enumerator(out_folder.SubFolders);
- for(;!subFolders.atEnd();subFolders.moveNext())
- {
- var subFolder = subFolders.item();
- var files = new Enumerator(subFolder.Files);
- for(;!files.atEnd();files.moveNext())
- {
- if(fso.GetExtensionName(files.item()) == "ps1")
- {
- var command = "powershell -ExecutionPolicy RemoteSigned \". .\\" + WINDOWS_STORE_UTILS + "; Install-App " + "'" + files.item() + "'\"";
- Log(command);
- exec_verbose(command);
- return;
- }
-
- }
- }
-
- }
- Log('Error : AppPackages were not built or Add-AppDevPackage.ps1 was not found', true);
- WScript.Quit(2);
-}
-
-function build(path) {
- switch (build_type) {
- case DEBUG :
- exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --debug');
- break;
- case RELEASE :
- exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --release');
- break;
- case NO_BUILD :
- break;
- case NONE :
- Log("WARNING: [ --debug | --release | --nobuild ] not specified, defaulting to --debug.");
- exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\build" --debug');
- break;
- default :
- Log("Build option not recognized: " + build_type, true);
- WScript.Quit(2);
- break;
- }
-}
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(2);
- }
- else if (args.Count() > 2) {
- Log('Error: Too many arguments.', true);
- Usage();
- WScript.Quit(2);
- }
- else if (fso.FolderExists(ROOT)) {
- if (args.Count() > 1) {
- if (args(1) == "--release") {
- build_type = RELEASE;
- }
- else if (args(1) == "--debug") {
- build_type = DEBUG;
- }
- else if (args(1) == "--nobuild") {
- build_type = NO_BUILD;
- }
- else {
- Log('Error: \"' + args(1) + '\" is not recognized as a deploy option', true);
- Usage();
- WScript.Quit(2);
- }
- }
-
- if (args(0) == "--emulator" || args(0) == "-e") {
- build(ROOT);
- emulator(ROOT);
- }
- else if (args(0) == "--device" || args(0) == "-d") {
- build(ROOT);
- device(ROOT);
- }
- else if (args(0).substr(0,9) == "--target=") {
- build(ROOT);
- var device_id = args(0).split("--target=").join("");
- target(ROOT, device_id);
- }
- else {
- Log("WARNING: [ --target=<ID> | --emulator | --device ] not specified, defaulting to --emulator");
- if (args(0) == "--release") {
- build_type = RELEASE;
- build(ROOT);
- emulator(ROOT);
- }
- else if (args(0) == "--debug") {
- build_type = DEBUG;
- build(ROOT);
- emulator(ROOT);
- }
- else if (args(0) == "--nobuild") {
- build_type = NO_BUILD;
- emulator(ROOT);
- }
- else {
- Log('Error: \"' + args(0) + '\" is not recognized as a deploy option', true);
- Usage();
- WScript.Quit(2);
- }
- }
- }
- else {
- Log('Error: Project directory not found,', true);
- Usage();
- WScript.Quit(2);
- }
-}
-else {
- Log("WARNING: [ --target=<ID> | --emulator | --device ] not specified, defaulting to --emulator");
- build(ROOT);
- emulator(ROOT);
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/list-devices.bat
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/list-devices.bat b/windows8/template/cordova/lib/list-devices.bat
deleted file mode 100644
index 3c0aac7..0000000
--- a/windows8/template/cordova/lib/list-devices.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@ECHO OFF
-ECHO Error! Windows 8 Cordova CLI tools do not support multiple devices currently.
-EXIT /B 1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/list-emulator-images.bat
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/list-emulator-images.bat b/windows8/template/cordova/lib/list-emulator-images.bat
deleted file mode 100644
index 149e2d0..0000000
--- a/windows8/template/cordova/lib/list-emulator-images.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@ECHO OFF
-ECHO Error! Windows 8 Cordova CLI tools do not support list-emulator-images currently.
-EXIT /B 1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/list-started-emulators.bat
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/list-started-emulators.bat b/windows8/template/cordova/lib/list-started-emulators.bat
deleted file mode 100644
index 1a6ffa4..0000000
--- a/windows8/template/cordova/lib/list-started-emulators.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@ECHO OFF
-ECHO Error! Windows 8 Cordova CLI tools do not support list-started-emulators currently.
-EXIT /B 1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/log.js
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/log.js b/windows8/template/cordova/lib/log.js
deleted file mode 100644
index 0b4ea7d..0000000
--- a/windows8/template/cordova/lib/log.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-var args = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\log.js').join('');
-
-
-// help function
-function Usage() {
- Log("");
- Log("Usage: log");
- Log("examples:");
- Log(" log");
- Log(" - logs output from running application *NOT IMPLIMENTED*");
- Log("");
-}
-
-// logs to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// log output from running projects *NOT IMPLEMENTED*
-function log_output(path) {
- Log("ERROR: Logging is not supported on Windows Phone", true);
- WScript.Quit(1);
-}
-
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(2);
- }
- else {
- Log("Error: \"" + args(0) + "\" is not recognized as a log option.", true);
- Usage();
- WScript.Quit(2);
- }
-}
-else {
- if (fso.FolderExists(ROOT)) {
- log_output(ROOT);
- }
- else {
- Log("Error: Project directory not found,", true);
- Usage();
- WScript.Quit(2);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/lib/target-list.js
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/lib/target-list.js b/windows8/template/cordova/lib/target-list.js
deleted file mode 100644
index 805eea5..0000000
--- a/windows8/template/cordova/lib/target-list.js
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-
-var args = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\target-list.js').join('');
- // path to CordovaDeploy.exe
-var CORDOVA_DEPLOY_EXE = '\\cordova\\lib\\CordovaDeploy\\CordovaDeploy\\bin\\Debug\\CordovaDeploy.exe';
- // path to CordovaDeploy
-var CORDOVA_DEPLOY = '\\cordova\\lib\\CordovaDeploy';
-
-// help/usage function
-function Usage() {
- Log("");
- Log("Usage: cscript target-list.js [ --emulators | --devices | --started_emulators | --all ]");
- Log(" --emulators : List the possible target emulators availible.");
- Log(" --devices : List the possible target devices availible. *NOT IMPLEMENTED YET*");
- Log(" --started_emulators : List any started emulators availible. *NOT IMPLEMENTED YET*");
- Log(" --all : List all devices returned by CordovaDeploy.exe -devices ");
- Log("examples:");
- Log(" cscript target-list.js --emulators");
- Log(" cscript target-list.js --devices");
- Log(" cscript target-list.js --started_emulators");
- Log(" cscript target-list.js --all");
- Log("");
-}
-
-// logs messaged to stdout and stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// executes a commmand in the shell
-function exec(command) {
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- //Wait a little bit so we're not super looping
- WScript.sleep(100);
- //Print output? Naa.....
- if (!oShell.StdOut.AtEndOfStream) {
- var line = oShell.StdOut.ReadAll();
- //Log(line);
- }
- }
- //Check to make sure our scripts did not encounter an error
- if (!oShell.StdErr.AtEndOfStream) {
- var line = oShell.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(2);
- }
-}
-
-// returns all possible targets generated by the CordovaDeploy tool
-function get_targets(path) {
- if (!fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- cordovaDeploy(path);
- }
- wscript_shell.CurrentDirectory = path + CORDOVA_DEPLOY + '\\CordovaDeploy\\bin\\Debug';
- var cmd = 'CordovaDeploy -devices';
- var out = wscript_shell.Exec(cmd);
- while(out.Status == 0) {
- WScript.Sleep(100);
- }
- //Check to make sure our script did not encounter an error
- if (!out.StdErr.AtEndOfStream) {
- var line = out.StdErr.ReadAll();
- Log("Error calling CordovaDeploy : ", true);
- Log(line, true);
- WScript.Quit(2);
- }
- else {
- if (!out.StdOut.AtEndOfStream) {
- var line = out.StdOut.ReadAll();
- var targets = line.split('\r\n');
- //format (ID DESCRIPTION)
- for (i in targets) {
- // remove device index and separator colen
- targets[i] = targets[i].replace(/\d*\s\:\s/, '').replace(/\:\s/, '');
- }
- return targets;
- }
- else {
- Log('Error : CordovaDeploy Failed to find any devices', true);
- WScript.Quit(2);
- }
- }
-}
-
-function list_targets(path) {
- var targets = get_targets(path);
- for (i in targets) {
- Log(targets[i]);
- }
-}
-
-// lists the Device returned by CordovaDeploy (NOTE: this does not indicate that a device is connected)
-function list_devices(path) {
- var targets = get_targets(path);
- var device_found = false;
- for (i in targets) {
- if (targets[i].match(/Device/)) {
- Log(targets[i]);
- device_found = true;
- }
- }
- if (device_found) {
- Log('');
- Log('WARNING : This does not mean that a device is connected, make');
- Log(' sure your device is connected before deploying to it.');
- }
-}
-
-// lists the emulators availible to CordovaDeploy
-function list_emulator_images(path) {
- var targets = get_targets(path);
- for (i in targets) {
- if (targets[i].match(/Emulator/)) {
- Log(targets[i]);
- }
- }
-}
-
-// lists any started emulators *NOT IMPLEMENTED*
-function list_started_emulators(path) {
- Log('ERROR : list-started-emulators is not supported on Windows Phone.', true);
- WScript.Quit(1);
-}
-
-// builds the CordovaDeploy.exe if it does not already exist
-function cordovaDeploy(path) {
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- return;
- }
-
- // build CordovaDeploy.exe
- if (fso.FolderExists(path + '\\cordova') && fso.FolderExists(path + CORDOVA_DEPLOY) &&
- fso.FileExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln')) {
- // delete any previously generated files
- if (fso.FolderExists(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\obj")) {
- fso.DeleteFolder(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\obj");
- }
- if (fso.FolderExists(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin")) {
- fso.DeleteFolder(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin");
- }
- exec('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
-
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- return;
- }
- else {
- Log("ERROR: MSBUILD FAILED TO COMPILE CordovaDeploy.exe", true);
- WScript.Quit(2);
- }
- }
- else {
- Log("ERROR: CordovaDeploy.sln not found, unable to compile CordovaDeploy tool.", true);
- WScript.Quit(2);
- }
-}
-
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(2);
- }
- else if (args.Count() > 1) {
- Log("Error: Too many arguments.", true);
- Usage();
- WScript.Quit(2);
- }
- else if (fso.FolderExists(ROOT)) {
- if (!fso.FolderExists(ROOT + '\\cordova')) {
- Log("Error: cordova tooling folder not found in project directory,", true);
- Log("could not lsit targets.", true);
- WScript.Quit(2);
- }
-
- if (args(0) == "--emulators" || args(0) == "-e") {
- list_emulator_images(ROOT);
- }
- else if (args(0) == "--devices" || args(0) == "-d") {
- list_devices(ROOT);
- }
- else if (args(0) == "--started_emulators" || args(0) == "-s") {
- list_started_emulators(ROOT);
- }
- else if (args(0) == "--all" || args(0) == "-a") {
- list_targets(ROOT);
- }
- else {
- Log("Error: \"" + args(0) + "\" is not recognized as a target-list option", true);
- Usage();
- WScript.Quit(2);
- }
- }
- else {
- Log("Error: Project directory not found,", true);
- Usage();
- WScript.Quit(2);
- }
-}
-else {
- Log("WARNING: target list not specified, showing all targets...");
- list_targets(ROOT);
-}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/log.bat
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/log.bat b/windows8/template/cordova/log.bat
deleted file mode 100644
index d34a8ab..0000000
--- a/windows8/template/cordova/log.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@ECHO OFF
-ECHO Sorry, logging is not supported for Windows Phone. 1>&2
-EXIT /B 1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/run.bat
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/run.bat b/windows8/template/cordova/run.bat
deleted file mode 100644
index 850104f..0000000
--- a/windows8/template/cordova/run.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST "%full_path%lib\deploy.js" (
- cscript "%full_path%lib\deploy.js" %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/cordova/version.bat
----------------------------------------------------------------------
diff --git a/windows8/template/cordova/version.bat b/windows8/template/cordova/version.bat
deleted file mode 100644
index 714e876..0000000
--- a/windows8/template/cordova/version.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST "%full_path%..\VERSION" (
- type "%full_path%..\VERSION"
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find file VERSION in project folder
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/images/logo.png
----------------------------------------------------------------------
diff --git a/windows8/template/images/logo.png b/windows8/template/images/logo.png
deleted file mode 100644
index 86a48a8..0000000
Binary files a/windows8/template/images/logo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/images/smalllogo.png
----------------------------------------------------------------------
diff --git a/windows8/template/images/smalllogo.png b/windows8/template/images/smalllogo.png
deleted file mode 100644
index 0e648ef..0000000
Binary files a/windows8/template/images/smalllogo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/images/splashscreen.png
----------------------------------------------------------------------
diff --git a/windows8/template/images/splashscreen.png b/windows8/template/images/splashscreen.png
deleted file mode 100644
index d1e6c98..0000000
Binary files a/windows8/template/images/splashscreen.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/images/storelogo.png
----------------------------------------------------------------------
diff --git a/windows8/template/images/storelogo.png b/windows8/template/images/storelogo.png
deleted file mode 100644
index dd00478..0000000
Binary files a/windows8/template/images/storelogo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/115b37b2/windows8/template/package.appxmanifest
----------------------------------------------------------------------
diff --git a/windows8/template/package.appxmanifest b/windows8/template/package.appxmanifest
deleted file mode 100644
index 4f64cc2..0000000
--- a/windows8/template/package.appxmanifest
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
- <Identity Name="$guid1$" 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="$safeprojectname$" StartPage="www/index.html">
- <VisualElements DisplayName="$projectname$"
- Logo="images\logo.png"
- SmallLogo="images\smalllogo.png"
- Description="CordovaApp"
- ForegroundText="light"
- BackgroundColor="#464646">
- <DefaultTile ShowName="allLogos" />
- <SplashScreen Image="images\splashscreen.png" />
- </VisualElements>
- </Application>
- </Applications>
- <Capabilities>
- <Capability Name="internetClient" />
- </Capabilities>
-</Package>
\ No newline at end of file