You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/05/30 23:20:46 UTC

[8/8] git commit: updated wp7 + wp8 to 2.8.x branch

updated wp7 + wp8 to 2.8.x branch


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/1309777e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/1309777e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/1309777e

Branch: refs/heads/master2
Commit: 1309777e41becf013e93599f37bef992d5f77357
Parents: aff149d
Author: Benn Mapes <be...@gmail.com>
Authored: Tue May 28 17:19:58 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Thu May 30 14:15:04 2013 -0700

----------------------------------------------------------------------
 lib/cordova-wp7/VERSION                            |    2 +-
 lib/cordova-wp7/bin/create.js                      |    3 +
 .../framework/Properties/AssemblyInfo.cs           |    4 +-
 .../templates/standalone/CordovaAppProj.csproj     |   97 +-
 .../templates/standalone/Plugins/Device.cs         |    2 +-
 lib/cordova-wp7/templates/standalone/VERSION       |    2 +-
 .../templates/standalone/cordova/lib/build.js      |   25 +-
 .../templates/standalone/cordova/lib/clean.js      |   43 +-
 .../templates/standalone/cordova/version.bat       |    9 +
 .../standalone/cordovalib/ConfigHandler.cs         |  121 +-
 .../standalone/cordovalib/CordovaView.xaml.cs      |   12 +
 .../templates/standalone/www/cordova-2.7.0.js      | 6700 --------------
 .../templates/standalone/www/cordova.js            | 6723 +++++++++++++++
 .../templates/standalone/www/index.html            |    2 +-
 .../templates/vs/MyTemplateStandAlone.vstemplate   |   38 +-
 lib/cordova-wp7/tooling/scripts/buildjs.js         |   31 +-
 lib/cordova-wp7/tooling/scripts/dist.js            |   37 +-
 lib/cordova-wp7/tooling/scripts/package.js         |   50 +-
 lib/cordova-wp7/tooling/scripts/reversion.js       |   13 +-
 lib/cordova-wp7/tooling/scripts/win-zip.js         |   32 -
 lib/cordova-wp8/VERSION                            |    2 +-
 lib/cordova-wp8/bin/create.js                      |    3 +
 .../framework/Properties/AssemblyInfo.cs           |    6 +-
 .../templates/standalone/CordovaAppProj.csproj     |   91 +-
 .../templates/standalone/Plugins/Device.cs         |    2 +-
 lib/cordova-wp8/templates/standalone/VERSION       |    2 +-
 .../templates/standalone/cordova/lib/clean.js      |   43 +-
 .../templates/standalone/cordova/version.bat       |    9 +
 .../standalone/cordovalib/ConfigHandler.cs         |   85 +-
 .../standalone/cordovalib/CordovaView.xaml         |   18 +-
 .../standalone/cordovalib/CordovaView.xaml.cs      |   18 +-
 .../templates/standalone/www/cordova-2.7.0.js      | 6700 --------------
 .../templates/standalone/www/cordova.js            | 6723 +++++++++++++++
 .../templates/standalone/www/index.html            |    2 +-
 .../templates/vs/MyTemplateStandAlone.vstemplate   |   39 +-
 lib/cordova-wp8/templates/vs/description.txt       |    4 +-
 lib/cordova-wp8/tooling/scripts/buildjs.js         |   36 +-
 lib/cordova-wp8/tooling/scripts/dist.js            |   90 +-
 lib/cordova-wp8/tooling/scripts/package.js         |   50 +-
 lib/cordova-wp8/tooling/scripts/reversion.js       |   10 -
 lib/cordova-wp8/tooling/scripts/win-zip.js         |   43 -
 41 files changed, 14138 insertions(+), 13784 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/VERSION
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/VERSION b/lib/cordova-wp7/VERSION
index 9aa3464..1277c83 100644
--- a/lib/cordova-wp7/VERSION
+++ b/lib/cordova-wp7/VERSION
@@ -1 +1 @@
-2.7.0
\ No newline at end of file
+2.8.0rc1

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/bin/create.js
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/bin/create.js b/lib/cordova-wp7/bin/create.js
index a789e20..7d89d0a 100644
--- a/lib/cordova-wp7/bin/create.js
+++ b/lib/cordova-wp7/bin/create.js
@@ -203,6 +203,9 @@ function create(path, namespace, name) {
         }
     }
 
+    //clean up any Bin/obj or other generated files
+    exec('cscript ' + path + '\\cordova\\lib\\clean.js //nologo');
+
     Log("CREATE SUCCESS : " + path);
 
     // TODO: Name the project according to the arguments

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/framework/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/framework/Properties/AssemblyInfo.cs b/lib/cordova-wp7/framework/Properties/AssemblyInfo.cs
index 62c7964..58fcdbb 100644
--- a/lib/cordova-wp7/framework/Properties/AssemblyInfo.cs
+++ b/lib/cordova-wp7/framework/Properties/AssemblyInfo.cs
@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("WPCordovaClassLib")]
-[assembly: AssemblyDescription("2.7.0")]
+[assembly: AssemblyDescription("2.8.0rc1")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Apache Cordova")]
 [assembly: AssemblyProduct("WPCordovaClassLib")]
@@ -32,6 +32,6 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 
-[assembly: AssemblyVersion("2.7.0.0")]
+[assembly: AssemblyVersion("2.8.0.0")]
 [assembly: AssemblyFileVersion("2.6.0rc1")]
 

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/templates/standalone/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/CordovaAppProj.csproj b/lib/cordova-wp7/templates/standalone/CordovaAppProj.csproj
index 61b3be1..0bfcad2 100644
--- a/lib/cordova-wp7/templates/standalone/CordovaAppProj.csproj
+++ b/lib/cordova-wp7/templates/standalone/CordovaAppProj.csproj
@@ -98,9 +98,6 @@
     <Compile Include="cordovalib\OrientationHelper.cs" />
     <Compile Include="cordovalib\PluginResult.cs" />
     <Compile Include="cordovalib\ScriptCallback.cs" />
-
-
-
     <Compile Include="MainPage.xaml.cs">
       <DependentUpon>MainPage.xaml</DependentUpon>
     </Compile>
@@ -111,42 +108,37 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </ApplicationDefinition>
-    <Page Include="cordovalib\CordovaView.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    
     <Page Include="MainPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-
-    <Page Include="Plugins\UI\AudioRecorder.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="Plugins\UI\ImageCapture.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="Plugins\UI\NotificationBox.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="Plugins\UI\VideoRecorder.xaml">
+    <Page Include="cordovalib\CordovaView.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-
   </ItemGroup>
   <ItemGroup>
+    <None Include="cordova\lib\build.js" />
+    <None Include="cordova\lib\clean.js" />
+    <None Include="cordova\lib\deploy.js" />
+    <None Include="cordova\lib\log.js" />
+    <None Include="cordova\lib\target-list.js" />
     <Content Include="www\**" />
     <Content Include="config.xml" />
     <Content Include="Images\**" />
-
     <Content Include="resources\notification-beep.wav" />
+    <None Include="cordova\build.bat" />
+    <None Include="cordova\clean.bat" />
+    <None Include="cordova\lib\install-device.bat" />
+    <None Include="cordova\lib\install-emulator.bat" />
+    <None Include="cordova\lib\list-devices.bat" />
+    <None Include="cordova\lib\list-emulator-images.bat" />
+    <None Include="cordova\lib\list-started-emulators.bat" />
+    <None Include="cordova\lib\start-emulator.bat" />
+    <None Include="cordova\log.bat" />
+    <None Include="cordova\run.bat" />
+    <None Include="cordova\version.bat" />
     <None Include="VERSION" />
-    
     <Content Include="CordovaSourceDictionary.xml">
       <SubType>Designer</SubType>
     </Content>
@@ -174,8 +166,57 @@
     <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
   </ItemGroup>
   <ItemGroup>
-      <Compile Include="Plugins\*" />
-      <Compile Include="Plugins\UI\*.cs" />
+    <Compile Include="Plugins\Accelerometer.cs" />
+    <Compile Include="Plugins\AudioFormatsHelper.cs" />
+    <Compile Include="Plugins\AudioPlayer.cs" />
+    <Compile Include="Plugins\Battery.cs" />
+    <Compile Include="Plugins\Camera.cs" />
+    <Compile Include="Plugins\Compass.cs" />
+    <Compile Include="Plugins\Contacts.cs" />
+    <Compile Include="Plugins\DebugConsole.cs" />
+    <Compile Include="Plugins\Device.cs" />
+    <Compile Include="Plugins\File.cs" />
+    <Compile Include="Plugins\FileTransfer.cs" />
+    <Compile Include="Plugins\GeoLocation.cs" />
+    <Compile Include="Plugins\Globalization.cs" />
+    <Compile Include="Plugins\ImageExifHelper.cs" />
+    <Compile Include="Plugins\InAppBrowser.cs" />
+    <Compile Include="Plugins\Media.cs" />
+    <Compile Include="Plugins\MimeTypeMapper.cs" />
+    <Compile Include="Plugins\NetworkStatus.cs" />
+    <Compile Include="Plugins\Notification.cs" />
+    <Compile Include="Plugins\UI\AudioCaptureTask.cs" />
+    <Compile Include="Plugins\UI\AudioRecorder.xaml.cs" >
+      <DependentUpon>AudioRecorder.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Plugins\UI\ImageCapture.xaml.cs" >
+      <DependentUpon>ImageCapture.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Plugins\UI\NotificationBox.xaml.cs" >
+      <DependentUpon>NotificationBox.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Plugins\UI\VideoCaptureTask.cs" />
+    <Compile Include="Plugins\UI\VideoRecorder.xaml.cs" >
+      <DependentUpon>VideoRecorder.xaml</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="Plugins\UI\AudioRecorder.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Plugins\UI\ImageCapture.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Plugins\UI\NotificationBox.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Plugins\UI\VideoRecorder.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
   </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
   <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
@@ -194,4 +235,4 @@
     <PostBuildEvent>
     </PostBuildEvent>
   </PropertyGroup>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/templates/standalone/Plugins/Device.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/Device.cs b/lib/cordova-wp7/templates/standalone/Plugins/Device.cs
index 07100ae..52b124e 100644
--- a/lib/cordova-wp7/templates/standalone/Plugins/Device.cs
+++ b/lib/cordova-wp7/templates/standalone/Plugins/Device.cs
@@ -73,7 +73,7 @@ namespace WPCordovaClassLib.Cordova.Commands
             get
             {
                 // TODO: should be able to dynamically read the Cordova version from somewhere...
-                return "2.7.0";
+                return "2.8.0rc1";
             }
         }
 

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/templates/standalone/VERSION
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/VERSION b/lib/cordova-wp7/templates/standalone/VERSION
index 9aa3464..1277c83 100644
--- a/lib/cordova-wp7/templates/standalone/VERSION
+++ b/lib/cordova-wp7/templates/standalone/VERSION
@@ -1 +1 @@
-2.7.0
\ No newline at end of file
+2.8.0rc1

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/templates/standalone/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/cordova/lib/build.js b/lib/cordova-wp7/templates/standalone/cordova/lib/build.js
index 9986a7e..1375c54 100644
--- a/lib/cordova-wp7/templates/standalone/cordova/lib/build.js
+++ b/lib/cordova-wp7/templates/standalone/cordova/lib/build.js
@@ -85,14 +85,27 @@ function is_cordova_project(path) {
     return false;
 }
 
+function get_solution_name(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()) == 'sln') {
+                return proj_files.item();
+            }
+        }
+    }
+    return null;
+}
+
 // builds the project and .xap in release mode
 function build_xap_release(path) {
-    Log("Building Cordova-WP8 Project:");
+    Log("Building Cordova-WP7 Project:");
     Log("\tConfiguration : Release");
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Release');
+    exec_verbose('msbuild ' + get_solution_name(path) + ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Release');
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Release')) {
@@ -105,18 +118,18 @@ function build_xap_release(path) {
             }
         }
     }
-    Log('ERROR: MSBuild failed to create .xap when building cordova-wp8 for release.', true);
+    Log('ERROR: MSBuild failed to create .xap when building cordova-wp7 for release.', true);
     WScript.Quit(2);
 }
 
 // builds the project and .xap in debug mode
 function build_xap_debug(path) {
-    Log("Building Cordova-WP8 Project:");
+    Log("Building Cordova-WP7 Project:");
     Log("\tConfiguration : Debug");
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug');
+    exec_verbose('msbuild ' + get_solution_name(path) + ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug');
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Debug')) {
@@ -129,7 +142,7 @@ function build_xap_debug(path) {
             }
         }
     }
-    Log('ERROR: MSBuild failed to create .xap when building cordova-wp8 for debugging.', true);
+    Log('ERROR: MSBuild failed to create .xap when building cordova-wp7 for debugging.', true);
     WScript.Quit(2);
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/templates/standalone/cordova/lib/clean.js
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/cordova/lib/clean.js b/lib/cordova-wp7/templates/standalone/cordova/lib/clean.js
index 3a8c871..b091425 100644
--- a/lib/cordova-wp7/templates/standalone/cordova/lib/clean.js
+++ b/lib/cordova-wp7/templates/standalone/cordova/lib/clean.js
@@ -50,32 +50,43 @@ function Log(msg, error) {
 
 // cleans any generated files in the cordova project
 function clean_project(path) {
-    if (fso.FolderExists(path + "\\obj")) {
-        fso.DeleteFolder(path + "\\obj");
-    }
-    if (fso.FolderExists(path + "\\Bin")) {
-        fso.DeleteFolder(path + "\\Bin");
+    delete_if_exists(path + "\\obj");
+    delete_if_exists(path + "\\Bin");
+
+    // checks to see if a .csproj file exists in the project root
+    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()) == 'user') {
+                delete_if_exists(proj_files.item())
+            } else if (fso.GetExtensionName(proj_files.item()) == 'sou') {
+                delete_if_exists(proj_files.item())
+            }
+        }
     }
-    //TODO: delete CordovaAppProj.csproj.user as well? Service References?
+    //TODO: delete Service References?
 }
 
 // cleans any files generated by build --debug
 function clean_debug(path) {
-    if (fso.FolderExists(path + "\\obj\\Debug")) {
-        fso.DeleteFolder(path + "\\obj\\Debug");
-    }
-    if (fso.FolderExists(path + "\\Bin\\Debug")) {
-        fso.DeleteFolder(path + "\\Bin\\Debug");
-    }
+    delete_if_exists(path + "\\obj\\Debug");
+    delete_if_exists(path + "\\Bin\\Debug");
 }
 
 // cleans any files generated by build --release
 function clean_release(path) {
-    if (fso.FolderExists(path + "\\obj\\Release")) {
-        fso.DeleteFolder(path + "\\obj\\Release");
+    delete_if_exists(path + "\\obj\\Release");
+    delete_if_exists(path + "\\Bin\\Release");
+}
+
+// deletes the path element if it exists
+function delete_if_exists(path) {
+    if (fso.FolderExists(path)) {
+        fso.DeleteFolder(path);
     }
-    if (fso.FolderExists(path + "\\Bin\\Release")) {
-        fso.DeleteFolder(path + "\\Bin\\Release");
+    else if (fso.FileExists(path)) {
+        fso.DeleteFile(path);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/templates/standalone/cordova/version.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/cordova/version.bat b/lib/cordova-wp7/templates/standalone/cordova/version.bat
new file mode 100644
index 0000000..714e876
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/cordova/version.bat
@@ -0,0 +1,9 @@
+@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-cli/blob/1309777e/lib/cordova-wp7/templates/standalone/cordovalib/ConfigHandler.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/cordovalib/ConfigHandler.cs b/lib/cordova-wp7/templates/standalone/cordovalib/ConfigHandler.cs
index d90e9b5..31934c1 100644
--- a/lib/cordova-wp7/templates/standalone/cordovalib/ConfigHandler.cs
+++ b/lib/cordova-wp7/templates/standalone/cordovalib/ConfigHandler.cs
@@ -13,16 +13,29 @@ namespace WPCordovaClassLib.CordovaLib
 {
     class ConfigHandler
     {
-        protected List<string> AllowedPlugins;
+        public class PluginConfig
+        {
+            public PluginConfig(string name, bool autoLoad = false)
+            {
+                Name = name;
+                isAutoLoad = autoLoad;
+            }
+            public string Name;
+            public bool isAutoLoad;
+        }
+
+        protected Dictionary<string, PluginConfig> AllowedPlugins;
         protected List<string> AllowedDomains;
         protected Dictionary<string, string> Preferences;
 
+        public string ContentSrc { get; private set; }
+
         protected bool AllowAllDomains = false;
         protected bool AllowAllPlugins = false;
 
         public ConfigHandler()
         {
-            AllowedPlugins = new List<string>();
+            AllowedPlugins = new Dictionary<string, PluginConfig>();
             AllowedDomains = new List<string>();
             Preferences = new Dictionary<string, string>();
         }
@@ -32,37 +45,6 @@ namespace WPCordovaClassLib.CordovaLib
             return Preferences[key];
         }
 
-/*
-    - (BOOL)URLIsAllowed:(NSURL*)url
-{
-    if (self.expandedWhitelist == nil) {
-        return NO;
-    }
-
-    if (self.allowAll) {
-        return YES;
-    }
-
-    // iterate through settings ExternalHosts, check for equality
-    NSEnumerator* enumerator = [self.expandedWhitelist objectEnumerator];
-    id regex = nil;
-    NSString* urlHost = [url host];
-
-    // if the url host IS found in the whitelist, load it in the app (however UIWebViewNavigationTypeOther kicks it out to Safari)
-    // if the url host IS NOT found in the whitelist, we do nothing
-    while (regex = [enumerator nextObject]) {
-        NSPredicate* regex_test = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
-
-        if ([regex_test evaluateWithObject:urlHost] == YES) {
-            // if it matches at least one rule, return
-            return YES;
-        }
-    }
-
-    NSLog(@"%@", [self errorStringForURL:url]);
-    // if we got here, the url host is not in the white-list, do nothing
-    return NO;
-}*/
         protected static string[] AllowedSchemes = {"http","https","ftp","ftps"};
         protected bool SchemeIsAllowed(string scheme)
         {
@@ -182,9 +164,54 @@ namespace WPCordovaClassLib.CordovaLib
 
         public bool IsPluginAllowed(string key)
         {
-            return AllowAllPlugins || AllowedPlugins.Contains(key);
+            return AllowAllPlugins || AllowedPlugins.Keys.Contains(key);
         }
 
+        private void LoadPluginFeatures(XDocument document)
+        {
+            var plugins = from results in document.Descendants("plugin")
+                          select new
+                          {
+                              name = (string)results.Attribute("name"),
+                              autoLoad = results.Attribute("onload")
+                          };
+
+            foreach (var plugin in plugins)
+            {
+                Debug.WriteLine("Warning: Deprecated use of <plugin> by plugin : " + plugin.name);
+                PluginConfig pConfig = new PluginConfig(plugin.name, plugin.autoLoad != null && plugin.autoLoad.Value == "true");
+                if (pConfig.Name == "*")
+                {
+                    AllowAllPlugins = true;
+                    // break; wait, don't, some still could be autoload
+                }
+                else
+                {
+                    AllowedPlugins[pConfig.Name] = pConfig;
+                }
+            }
+
+            var features = document.Descendants("feature");
+
+
+            foreach (var feature in features)
+            {
+                var name = feature.Attribute("name");
+                var values = from results in feature.Descendants("param")
+                             where ((string)results.Attribute("name") == "wp-package")
+                             select results;
+
+                var value = values.FirstOrDefault();
+                if (value != null)
+                {
+                    string key = (string)value.Attribute("value");
+                    Debug.WriteLine("Adding feature.value=" + key);
+                    var onload = value.Attribute("onload");
+                    PluginConfig pConfig = new PluginConfig(key, onload != null && onload.Value == "true");
+                    AllowedPlugins[key] = pConfig;
+                }
+            }
+        }
 
         public void LoadAppPackageConfig()
         {
@@ -196,23 +223,7 @@ namespace WPCordovaClassLib.CordovaLib
                 //This will Read Keys Collection for the xml file
                 XDocument document = XDocument.Parse(sr.ReadToEnd());
 
-                var plugins = from results in document.Descendants("plugin")
-                              select new { name = (string)results.Attribute("name") };
-
-
-                foreach (var plugin in plugins)
-                {
-                    Debug.WriteLine("plugin " + plugin.name);
-                    if (plugin.name == "*")
-                    {
-                        AllowAllPlugins = true;
-                        break;
-                    }
-                    else
-                    {
-                        AllowedPlugins.Add(plugin.name);
-                    }
-                }
+                LoadPluginFeatures(document);
 
                 var preferences = from results in document.Descendants("preference")
                                   select new
@@ -223,6 +234,7 @@ namespace WPCordovaClassLib.CordovaLib
 
                 foreach (var pref in preferences)
                 {
+                    Preferences[pref.name] = pref.value;
                     Debug.WriteLine("pref" + pref.name + ", " + pref.value);
                 }
 
@@ -237,6 +249,13 @@ namespace WPCordovaClassLib.CordovaLib
                 {
                     AddWhiteListEntry(accessElem.origin, accessElem.subdomains);
                 }
+
+                var contentsTag = document.Descendants("content").FirstOrDefault();
+                if (contentsTag != null)
+                {
+                    var src = contentsTag.Attribute("src");
+                    ContentSrc = (string)src.Value;
+                }
             }
             else
             {

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1309777e/lib/cordova-wp7/templates/standalone/cordovalib/CordovaView.xaml.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/cordovalib/CordovaView.xaml.cs b/lib/cordova-wp7/templates/standalone/cordovalib/CordovaView.xaml.cs
index f6584a8..d57249a 100644
--- a/lib/cordova-wp7/templates/standalone/cordovalib/CordovaView.xaml.cs
+++ b/lib/cordova-wp7/templates/standalone/cordovalib/CordovaView.xaml.cs
@@ -152,6 +152,18 @@ namespace WPCordovaClassLib
             configHandler = new ConfigHandler();
             configHandler.LoadAppPackageConfig();
 
+            if (configHandler.ContentSrc != null)
+            {
+                if (Uri.IsWellFormedUriString(configHandler.ContentSrc, UriKind.Absolute))
+                {
+                    this.StartPageUri = new Uri(configHandler.ContentSrc, UriKind.Absolute);
+                }
+                else
+                {
+                    this.StartPageUri = new Uri(AppRoot + "www/" + configHandler.ContentSrc, UriKind.Relative);
+                }
+            }  
+
             // initializes native execution logic
             nativeExecution = new NativeExecution(ref this.CordovaBrowser);
             bmHelper = new BrowserMouseHelper(ref this.CordovaBrowser);