Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1E754192C1 for ; Wed, 30 Mar 2016 19:11:25 +0000 (UTC) Received: (qmail 95887 invoked by uid 500); 30 Mar 2016 19:11:25 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 95863 invoked by uid 500); 30 Mar 2016 19:11:25 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 95854 invoked by uid 99); 30 Mar 2016 19:11:24 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2016 19:11:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D7BEADFC8E; Wed, 30 Mar 2016 19:11:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: rakatyal@apache.org To: commits@cordova.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: cordova-windows git commit: CB-10927 - Framework references in plugin.xml file prevent Windows Universal projects from being used on other machines Date: Wed, 30 Mar 2016 19:11:24 +0000 (UTC) Repository: cordova-windows Updated Branches: refs/heads/master 10594681c -> 844913445 CB-10927 - Framework references in plugin.xml file prevent Windows Universal projects from being used on other machines -Stop using a hardcoded path to framework references -Modify tests to deal with non-hardcoded framework paths This closes #163 Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/84491344 Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/84491344 Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/84491344 Branch: refs/heads/master Commit: 8449134457f6550c829a900be107d7cce5679771 Parents: 1059468 Author: dubeejw Authored: Tue Mar 22 11:14:09 2016 -0400 Committer: Raghav Katyal Committed: Wed Mar 30 12:10:30 2016 -0700 ---------------------------------------------------------------------- ...ovaApp.Phone_0.0.1.0_AnyCPU_debug.appxbundle | 1 + ...CordovaApp.Windows_0.0.1.0_anycpu_debug.appx | 1 + .../platforms/windows/CordovaApp.Phone.jsproj | 99 +++++++++++++++++ .../platforms/windows/CordovaApp.Windows.jsproj | 99 +++++++++++++++++ .../windows/CordovaApp.Windows10.jsproj | 61 +++++++++++ .../windows/CordovaApp.Windows80.jsproj | 93 ++++++++++++++++ .../platforms/windows/CordovaApp.projitems | 32 ++++++ .../platforms/windows/CordovaApp.shproj | 30 ++++++ .../testProj/platforms/windows/CordovaApp.sln | 106 +++++++++++++++++++ .../platforms/windows/CordovaApp.vs2012.sln | 64 +++++++++++ .../windows/CordovaApp_TemporaryKey.pfx | Bin 0 -> 2544 bytes .../fixtures/testProj/platforms/windows/VERSION | 1 + .../testProj/platforms/windows/config.xml | 14 +++ .../windows/package.phone.appxmanifest | 57 ++++++++++ .../windows/package.windows.appxmanifest | 58 ++++++++++ .../windows/package.windows80.appxmanifest | 50 +++++++++ .../org.test.plugins.dummyplugin/plugin.xml | 79 ++++++++++++++ .../src/windows/dummer.js | 1 + .../src/windows/dummy1.dll | 0 .../src/windows/dummy1.vcxproj | 7 ++ .../src/windows/dummy2.dll | 0 .../src/windows/dummy2.vcxproj | 7 ++ .../src/windows/dummy3.dll | 0 .../src/windows/dummy3.vcxproj | 7 ++ .../src/windows/dummy4.dll | 0 .../src/windows/dummy4.vcxproj | 7 ++ .../src/windows/dummy5.dll | 0 .../src/windows/dummy6.dll | 0 .../src/windows/text_sample1.txt | 0 .../src/windows/text_sample2.txt | 0 .../src/windows/text_sample3.txt | 0 .../src/windows/text_sample4.txt | 0 .../www/dummyplugin.js | 1 + .../www/dummyplugin/image.jpg | 1 + spec/unit/pluginHandler/windows.spec.js | 48 ++++++--- template/cordova/lib/JsprojManager.js | 2 +- template/cordova/lib/PluginHandler.js | 8 +- 37 files changed, 915 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/AppPackages/CordovaApp.Phone_0.0.1.0_debug_Test/CordovaApp.Phone_0.0.1.0_AnyCPU_debug.appxbundle ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/AppPackages/CordovaApp.Phone_0.0.1.0_debug_Test/CordovaApp.Phone_0.0.1.0_AnyCPU_debug.appxbundle b/spec/unit/fixtures/testProj/platforms/windows/AppPackages/CordovaApp.Phone_0.0.1.0_debug_Test/CordovaApp.Phone_0.0.1.0_AnyCPU_debug.appxbundle new file mode 100644 index 0000000..654e7f0 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/AppPackages/CordovaApp.Phone_0.0.1.0_debug_Test/CordovaApp.Phone_0.0.1.0_AnyCPU_debug.appxbundle @@ -0,0 +1 @@ +(dummy package) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/AppPackages/CordovaApp.Windows_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows_0.0.1.0_anycpu_debug.appx ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/AppPackages/CordovaApp.Windows_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows_0.0.1.0_anycpu_debug.appx b/spec/unit/fixtures/testProj/platforms/windows/AppPackages/CordovaApp.Windows_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows_0.0.1.0_anycpu_debug.appx new file mode 100644 index 0000000..654e7f0 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/AppPackages/CordovaApp.Windows_0.0.1.0_anycpu_debug_Test/CordovaApp.Windows_0.0.1.0_anycpu_debug.appx @@ -0,0 +1 @@ +(dummy package) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Phone.jsproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Phone.jsproj b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Phone.jsproj new file mode 100644 index 0000000..43e4fe2 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Phone.jsproj @@ -0,0 +1,99 @@ + + + + + build\phone\$(Configuration)\$(Platform)\ + build\phone\bld\ + + + + Debug + AnyCPU + + + Debug + ARM + + + Debug + x64 + + + Debug + x86 + + + Release + AnyCPU + + + Release + ARM + + + Release + x64 + + + Release + x86 + + + + 31b67a35-9503-4213-857e-f44eb42ae549 + + + + 12.0 + + + + WindowsPhoneApp + 8.1 + 8.1 + 12.0 + + + + en-US + + + + Designer + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows.jsproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows.jsproj b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows.jsproj new file mode 100644 index 0000000..6905ba6 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows.jsproj @@ -0,0 +1,99 @@ + + + + + build\windows\$(Configuration)\$(Platform)\ + build\windows\bld\ + + + + Debug + AnyCPU + + + Debug + ARM + + + Debug + x64 + + + Debug + x86 + + + Release + AnyCPU + + + Release + ARM + + + Release + x64 + + + Release + x86 + + + + 58950fb6-2f93-4963-b9cd-637f83f3efbf + + + + 12.0 + + + + + Windows + 8.1 + 8.1 + 12.0 + en-US + CordovaApp_TemporaryKey.pfx + + + + Designer + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows10.jsproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows10.jsproj b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows10.jsproj new file mode 100644 index 0000000..e4b9b06 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows10.jsproj @@ -0,0 +1,61 @@ + + + + build\windows\$(Configuration)\$(Platform)\ + build\windows\bld\ + true + + + + Debug + AnyCPU + + + Debug + ARM + + + Debug + x64 + + + Debug + x86 + + + Release + AnyCPU + + + Release + ARM + + + Release + x64 + + + Release + x86 + + + + f9b0ae20-c91c-42b9-9c6e-d3bc28b4509e + + + + 14.0 + + + + + UAP + 10.0.10240.0 + 10.0.10240.0 + 14.0 + + + 10.0 + 10.0 + + http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows80.jsproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows80.jsproj b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows80.jsproj new file mode 100644 index 0000000..34d1985 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.Windows80.jsproj @@ -0,0 +1,93 @@ + + + + + build\windows80\$(Configuration)\$(Platform)\ + build\windows80\bld\ + + + + Debug + AnyCPU + + + Debug + ARM + + + Debug + x64 + + + Debug + x86 + + + Release + AnyCPU + + + Release + ARM + + + Release + x64 + + + Release + x86 + + + + efffab2f-bfc5-4eda-b545-45ef4995f55a + + + 11.0 + + + + + + Windows + 8.0 + en-US + CordovaApp_TemporaryKey.pfx + + + + Designer + + + + + + + + + + + false + + cd /d $(MSBuildThisFileDirectory) + node -e "require('./cordova/lib/prepare.js').applyPlatformConfig()" + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.projitems ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.projitems b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.projitems new file mode 100644 index 0000000..972a1a4 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.projitems @@ -0,0 +1,32 @@ + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 9ebdb27f-d75b-4d8c-b53f-7be4a1fe89f9 + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.shproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.shproj b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.shproj new file mode 100644 index 0000000..08b59df --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.shproj @@ -0,0 +1,30 @@ + + + + + {9ebdb27f-d75b-4d8c-b53f-7be4a1fe89f9} + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.sln ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.sln b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.sln new file mode 100644 index 0000000..5d4c18f --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.sln @@ -0,0 +1,106 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +# +# 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. +# +VisualStudioVersion = 12.0.30324.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CordovaApp", "CordovaApp", "{3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CordovaApp", "CordovaApp.shproj", "{9EBDB27F-D75B-4D8C-B53F-7BE4A1FE89F9}" +EndProject +Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp.Windows", "CordovaApp.Windows.jsproj", "{58950FB6-2F93-4963-B9CD-637F83F3EFBF}" +EndProject +Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp.Phone", "CordovaApp.Phone.jsproj", "{31B67A35-9503-4213-857E-F44EB42AE549}" +EndProject +Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + CordovaApp.projitems*{58950fb6-2f93-4963-b9cd-637f83f3efbf}*SharedItemsImports = 5 + CordovaApp.projitems*{9ebdb27f-d75b-4d8c-b53f-7be4a1fe89f9}*SharedItemsImports = 13 + CordovaApp.projitems*{31b67a35-9503-4213-857e-f44eb42ae549}*SharedItemsImports = 5 + EndGlobalSection + 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 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|ARM.ActiveCfg = Debug|ARM + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|ARM.Build.0 = Debug|ARM + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|ARM.Deploy.0 = Debug|ARM + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x64.ActiveCfg = Debug|x64 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x64.Build.0 = Debug|x64 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x64.Deploy.0 = Debug|x64 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x86.ActiveCfg = Debug|x86 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x86.Build.0 = Debug|x86 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x86.Deploy.0 = Debug|x86 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|Any CPU.Build.0 = Release|Any CPU + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|Any CPU.Deploy.0 = Release|Any CPU + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|ARM.ActiveCfg = Release|ARM + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|ARM.Build.0 = Release|ARM + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|ARM.Deploy.0 = Release|ARM + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x64.ActiveCfg = Release|x64 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x64.Build.0 = Release|x64 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x64.Deploy.0 = Release|x64 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x86.ActiveCfg = Release|x86 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x86.Build.0 = Release|x86 + {58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x86.Deploy.0 = Release|x86 + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|ARM.ActiveCfg = Debug|ARM + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|ARM.Build.0 = Debug|ARM + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|ARM.Deploy.0 = Debug|ARM + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x64.ActiveCfg = Debug|x64 + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x64.Build.0 = Debug|x64 + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x64.Deploy.0 = Debug|x64 + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x86.ActiveCfg = Debug|x86 + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x86.Build.0 = Debug|x86 + {31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x86.Deploy.0 = Debug|x86 + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|Any CPU.ActiveCfg = Release|Any CPU + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|Any CPU.Build.0 = Release|Any CPU + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|Any CPU.Deploy.0 = Release|Any CPU + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|ARM.ActiveCfg = Release|ARM + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|ARM.Build.0 = Release|ARM + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|ARM.Deploy.0 = Release|ARM + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|x64.ActiveCfg = Release|x64 + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|x64.Build.0 = Release|x64 + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|x64.Deploy.0 = Release|x64 + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|x86.ActiveCfg = Release|x86 + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|x86.Build.0 = Release|x86 + {31B67A35-9503-4213-857E-F44EB42AE549}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {9EBDB27F-D75B-4D8C-B53F-7BE4A1FE89F9} = {3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944} + {58950FB6-2F93-4963-B9CD-637F83F3EFBF} = {3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944} + {31B67A35-9503-4213-857E-F44EB42AE549} = {3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944} + EndGlobalSection +EndGlobal http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.vs2012.sln ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.vs2012.sln b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.vs2012.sln new file mode 100644 index 0000000..b08ca94 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp.vs2012.sln @@ -0,0 +1,64 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp.Windows8.0", "CordovaApp.Windows80.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|AnyCPU = Debug|AnyCPU + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|AnyCPU = Release|AnyCPU + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.Build.0 = Debug|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.Deploy.0 = Debug|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.ActiveCfg = Debug|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Build.0 = Debug|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Deploy.0 = Debug|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.ActiveCfg = Debug|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Build.0 = Debug|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Deploy.0 = Debug|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.ActiveCfg = Debug|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Build.0 = Debug|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Deploy.0 = Debug|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.ActiveCfg = Release|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.Build.0 = Release|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.Deploy.0 = Release|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.ActiveCfg = Release|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Build.0 = Release|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Deploy.0 = Release|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.ActiveCfg = Release|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Build.0 = Release|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Deploy.0 = Release|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.ActiveCfg = Release|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Build.0 = Release|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/CordovaApp_TemporaryKey.pfx ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/CordovaApp_TemporaryKey.pfx b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp_TemporaryKey.pfx new file mode 100644 index 0000000..90d7ab2 Binary files /dev/null and b/spec/unit/fixtures/testProj/platforms/windows/CordovaApp_TemporaryKey.pfx differ http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/VERSION ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/VERSION b/spec/unit/fixtures/testProj/platforms/windows/VERSION new file mode 100644 index 0000000..a76ccff --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/VERSION @@ -0,0 +1 @@ +3.7.1 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/config.xml ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/config.xml b/spec/unit/fixtures/testProj/platforms/windows/config.xml new file mode 100644 index 0000000..621d9c9 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/config.xml @@ -0,0 +1,14 @@ + + + + + CordovaApp + + A sample Apache Cordova application that responds to the deviceready event. + + + Apache Cordova Team + + + + http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/package.phone.appxmanifest ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/package.phone.appxmanifest b/spec/unit/fixtures/testProj/platforms/windows/package.phone.appxmanifest new file mode 100644 index 0000000..c8644d4 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/package.phone.appxmanifest @@ -0,0 +1,57 @@ + + + + + + + CordovaApp + $username$ + images\StoreLogo.png + + + 6.3.1 + 6.3.1 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/package.windows.appxmanifest ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/package.windows.appxmanifest b/spec/unit/fixtures/testProj/platforms/windows/package.windows.appxmanifest new file mode 100644 index 0000000..782980e --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/package.windows.appxmanifest @@ -0,0 +1,58 @@ + + + + + + CordovaApp + $username$ + images\StoreLogo.png + + + 6.3.0 + 6.3.0 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/platforms/windows/package.windows80.appxmanifest ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/platforms/windows/package.windows80.appxmanifest b/spec/unit/fixtures/testProj/platforms/windows/package.windows80.appxmanifest new file mode 100644 index 0000000..af9b9d9 --- /dev/null +++ b/spec/unit/fixtures/testProj/platforms/windows/package.windows80.appxmanifest @@ -0,0 +1,50 @@ + + + + + + CordovaApp + $username$ + images\storelogo.png + + + 6.2.1 + 6.2.1 + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/plugin.xml ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/plugin.xml b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/plugin.xml new file mode 100644 index 0000000..3a316b1 --- /dev/null +++ b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/plugin.xml @@ -0,0 +1,79 @@ + + + + + + + dummyplugin + + my description + Jackson Badman + dummy,plugin + BSD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummer.js ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummer.js b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummer.js new file mode 100644 index 0000000..48388bc --- /dev/null +++ b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummer.js @@ -0,0 +1 @@ +./org.test.plugins.dummyplugin/src/windows8/dummer.js http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy1.dll ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy1.dll b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy1.dll new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy1.vcxproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy1.vcxproj b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy1.vcxproj new file mode 100644 index 0000000..c454905 --- /dev/null +++ b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy1.vcxproj @@ -0,0 +1,7 @@ + + + + {ef7dd979-6f12-4bdf-8754-9468ce799c4d} + dummy1 + + http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy2.dll ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy2.dll b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy2.dll new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy2.vcxproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy2.vcxproj b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy2.vcxproj new file mode 100644 index 0000000..8edd706 --- /dev/null +++ b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy2.vcxproj @@ -0,0 +1,7 @@ + + + + {6a760eea-8c27-442e-b98b-a487964ded42} + dummy2 + + http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy3.dll ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy3.dll b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy3.dll new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy3.vcxproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy3.vcxproj b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy3.vcxproj new file mode 100644 index 0000000..600167c --- /dev/null +++ b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy3.vcxproj @@ -0,0 +1,7 @@ + + + + {5318c3c8-0921-4870-b4ad-8cce06c88238} + dummy3 + + http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy4.dll ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy4.dll b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy4.dll new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy4.vcxproj ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy4.vcxproj b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy4.vcxproj new file mode 100644 index 0000000..d7acf04 --- /dev/null +++ b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy4.vcxproj @@ -0,0 +1,7 @@ + + + + {8e430a1b-094b-4c27-8b76-fdd7021dbfe9} + dummy4 + + http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy5.dll ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy5.dll b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy5.dll new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy6.dll ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy6.dll b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/dummy6.dll new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample1.txt ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample1.txt b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample1.txt new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample2.txt ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample2.txt b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample2.txt new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample3.txt ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample3.txt b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample3.txt new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample4.txt ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample4.txt b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/src/windows/text_sample4.txt new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/www/dummyplugin.js ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/www/dummyplugin.js b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/www/dummyplugin.js new file mode 100644 index 0000000..631d6da --- /dev/null +++ b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/www/dummyplugin.js @@ -0,0 +1 @@ +./org.test.plugins.dummyplugin/www/dummyplugin.js http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/www/dummyplugin/image.jpg ---------------------------------------------------------------------- diff --git a/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/www/dummyplugin/image.jpg b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/www/dummyplugin/image.jpg new file mode 100644 index 0000000..219c78a --- /dev/null +++ b/spec/unit/fixtures/testProj/plugins/org.test.plugins.dummyplugin/www/dummyplugin/image.jpg @@ -0,0 +1 @@ +./org.test.plugins.dummyplugin/www/dummyplugin/image.jpg http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/spec/unit/pluginHandler/windows.spec.js ---------------------------------------------------------------------- diff --git a/spec/unit/pluginHandler/windows.spec.js b/spec/unit/pluginHandler/windows.spec.js index cf9d956..89fe7f8 100644 --- a/spec/unit/pluginHandler/windows.spec.js +++ b/spec/unit/pluginHandler/windows.spec.js @@ -32,7 +32,7 @@ var cordovaProjectWindowsPlatformDir = path.join(cordovaProjectDir, 'platforms', var cordovaProjectPluginsDir = path.join(cordovaProjectDir, 'plugins'); var PluginInfo = require('cordova-common').PluginInfo; -var dummyplugin = path.join(__dirname, '../fixtures/org.test.plugins.dummyplugin'); +var dummyplugin = path.join(__dirname, '../fixtures/testProj/plugins/org.test.plugins.dummyplugin'); var dummyPluginInfo = new PluginInfo(dummyplugin); var valid_source = dummyPluginInfo.getSourceFiles('windows'); var valid_resourceFiles = dummyPluginInfo.getResourceFiles('windows'); @@ -305,17 +305,25 @@ describe('windows project handler', function () { var frameworks = copyArray(valid_frameworks); it('should write to correct project files when conditions are specified', function () { - var xpath = 'ProjectReference[@Include="' + winJoin(dummyplugin, 'src', 'windows', 'dummy1.vcxproj') + '"][@Condition="\'$(Platform)\'==\'x64\'"]'; + var curDir; + var xpath; + + curDir = __dirname; + process.chdir(path.join(curDir, '..', 'fixtures', 'testProj')); + + xpath = 'ProjectReference[@Include="' + winJoin('..', '..', 'plugins', 'org.test.plugins.dummyplugin', 'src', 'windows', 'dummy1.vcxproj') + '"][@Condition="\'$(Platform)\'==\'x64\'"]'; validateInstalledProjects('framework', frameworks[6], xpath, ['all']); - xpath = 'ProjectReference[@Include="' + winJoin(dummyplugin, 'src', 'windows', 'dummy2.vcxproj') + '"]'; + xpath = 'ProjectReference[@Include="' + winJoin('..', '..', 'plugins', 'org.test.plugins.dummyplugin', 'src', 'windows', 'dummy2.vcxproj') + '"]'; validateInstalledProjects('framework', frameworks[7], xpath, ['windows8']); - xpath = 'ProjectReference[@Include="' + winJoin(dummyplugin, 'src', 'windows', 'dummy3.vcxproj') + '"]'; + xpath = 'ProjectReference[@Include="' + winJoin('..', '..', 'plugins', 'org.test.plugins.dummyplugin', 'src', 'windows', 'dummy3.vcxproj') + '"]'; validateInstalledProjects('framework', frameworks[8], xpath, ['windows', 'windows8', 'windows10']); - xpath = 'ProjectReference[@Include="' + winJoin(dummyplugin, 'src', 'windows', 'dummy4.vcxproj') + '"][@Condition="\'$(Platform)\'==\'x86\'"]'; + xpath = 'ProjectReference[@Include="' + winJoin('..', '..', 'plugins', 'org.test.plugins.dummyplugin', 'src', 'windows', 'dummy4.vcxproj') + '"]'; validateInstalledProjects('framework', frameworks[9], xpath, ['windows', 'phone']); + + process.chdir(path.join(curDir, '..', '..', '..')); }); }); }); @@ -392,7 +400,6 @@ describe('windows project handler', function () { resourcefiles.forEach(function(resourceFile) { install(resourceFile, dummyPluginInfo, dummyProject); }); - var path = 'ItemGroup/Content'; var incText = computeResourcePath(resourcefiles[0]); var targetConditions = {versions: undefined, deviceTarget: undefined, arch: 'x86'}; @@ -441,40 +448,47 @@ describe('windows project handler', function () { }); }); - describe('of elements', function () { + describe('of elements', function () { // This could be separated into individual specs, but that results in a lot of copying and deleting the // project files, which is not needed. it('should remove from correct project files when conditions specified', function () { + var curDir; + curDir = __dirname; + process.chdir(path.join(curDir, '..', 'fixtures', 'testProj')); + var frameworks = copyArray(valid_frameworks); frameworks.forEach(function(framework) { PluginHandler.getInstaller('framework')(framework, dummyPluginInfo, dummyProject); }); - var path = 'ItemGroup/Reference'; + + var path2 = 'ItemGroup/Reference'; var incText = 'dummy1'; var targetConditions = {versions: undefined, deviceTarget: undefined, arch: 'x64'}; - validateUninstalledProjects('framework', frameworks[0], path, incText, targetConditions, ['all']); + validateUninstalledProjects('framework', frameworks[0], path2, incText, targetConditions, ['all']); incText = 'dummy2'; targetConditions = {versions: '>=8.0', deviceTarget: undefined, arch: undefined}; - validateUninstalledProjects('framework', frameworks[1], path, incText, targetConditions, ['all']); + validateUninstalledProjects('framework', frameworks[1], path2, incText, targetConditions, ['all']); incText = 'dummy3'; targetConditions = {versions: undefined, deviceTarget: 'windows', arch: undefined}; - validateUninstalledProjects('framework', frameworks[2], path, incText, targetConditions, ['windows', 'windows8', 'windows10']); + validateUninstalledProjects('framework', frameworks[2], path2, incText, targetConditions, ['windows', 'windows8', 'windows10']); incText = 'dummy4'; targetConditions = {versions: '8.1', deviceTarget: 'phone', arch: 'ARM'}; - validateUninstalledProjects('framework', frameworks[3], path, incText, targetConditions, ['phone']); + validateUninstalledProjects('framework', frameworks[3], path2, incText, targetConditions, ['phone']); incText = 'dummy5'; targetConditions = {versions: undefined, deviceTarget: 'phone', arch: undefined}; - validateUninstalledProjects('framework', frameworks[4], path, incText, targetConditions, ['phone']); + validateUninstalledProjects('framework', frameworks[4], path2, incText, targetConditions, ['phone']); incText = 'dummy6'; targetConditions = {versions: '>=8.1', deviceTarget: undefined, arch: undefined}; - validateUninstalledProjects('framework', frameworks[5], path, incText, targetConditions, ['windows', 'windows10', 'phone']); + validateUninstalledProjects('framework', frameworks[5], path2, incText, targetConditions, ['windows', 'windows10', 'phone']); + + process.chdir(path.join(curDir, '..', '..', '..')); }); }); @@ -482,6 +496,10 @@ describe('windows project handler', function () { // This could be separated into individual specs, but that results in a lot of copying and deleting the // project files, which is not needed. it('should remove from correct project files when conditions specified', function () { + var curDir; + curDir = __dirname; + process.chdir(path.join(curDir, '..', 'fixtures', 'testProj')); + var frameworks = copyArray(valid_frameworks); frameworks.forEach(function(framework) { @@ -504,6 +522,8 @@ describe('windows project handler', function () { incText = winJoin(dummyPluginInfo.dir, frameworks[9].src); targetConditions = {versions: '8.1', deviceTarget: 'all', arch: 'x86'}; validateUninstalledProjects('framework', frameworks[9], xmlPath, incText, targetConditions, ['windows', 'phone']); + + process.chdir(path.join(curDir, '..', '..', '..')); }); }); }); http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/template/cordova/lib/JsprojManager.js ---------------------------------------------------------------------- diff --git a/template/cordova/lib/JsprojManager.js b/template/cordova/lib/JsprojManager.js index d92b629..c823314 100644 --- a/template/cordova/lib/JsprojManager.js +++ b/template/cordova/lib/JsprojManager.js @@ -181,7 +181,7 @@ jsprojManager.prototype = { // relative_path is the actual path to the file in the current OS, where-as inserted_path is what we write in // the project file, and is always in Windows format. relative_path = path.normalize(relative_path); - var inserted_path = relative_path.split('/').join('\\'); + var inserted_path = path.join('..', '..', relative_path).split('/').join('\\'); var pluginProjectXML = xml_helpers.parseElementtreeSync(relative_path); http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/84491344/template/cordova/lib/PluginHandler.js ---------------------------------------------------------------------- diff --git a/template/cordova/lib/PluginHandler.js b/template/cordova/lib/PluginHandler.js index 4e031f6..ab2f315 100644 --- a/template/cordova/lib/PluginHandler.js +++ b/template/cordova/lib/PluginHandler.js @@ -85,12 +85,12 @@ var handlers = { var src = obj.src; var dest = src; var type = obj.type; + var targetDir = obj.targetDir || ''; if(type === 'projectReference') { - project.addProjectReference(path.join(plugin.dir,src), getTargetConditions(obj)); - } - else { - var targetDir = obj.targetDir || ''; + dest = path.join('plugins', plugin.id, targetDir, src); + project.addProjectReference(dest, getTargetConditions(obj)); + } else { // path.join ignores empty paths passed so we don't check whether targetDir is not empty dest = path.join('plugins', plugin.id, targetDir, path.basename(src)); copyFile(plugin.dir, src, project.root, dest); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org