You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by ap...@apache.org on 2010/10/01 10:51:30 UTC

svn commit: r1003473 - in /incubator/npanday/branches/npanday-vs2010-support: components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/ dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/ plugins/...

Author: apadilla
Date: Fri Oct  1 10:51:29 2010
New Revision: 1003473

URL: http://svn.apache.org/viewvc?rev=1003473&view=rev
Log:
Added patch for VS 2010 support - http://npanday.codeplex.com/workitem/13479
 * applied patch submitted by artemfedorenko to fix NPanday addin startup in VS 2010
 * revised code to support 4.0 Framework
 

Modified:
    incubator/npanday/branches/npanday-vs2010-support/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java
    incubator/npanday/branches/npanday-vs2010-support/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/Connect.cs
    incubator/npanday/branches/npanday-vs2010-support/plugins/netplugins/NPanday.Plugin.Settings/src/main/csharp/NPanday/Plugin/Settings/SettingsGeneratorMojo.cs

Modified: incubator/npanday/branches/npanday-vs2010-support/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/npanday-vs2010-support/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java?rev=1003473&r1=1003472&r2=1003473&view=diff
==============================================================================
--- incubator/npanday/branches/npanday-vs2010-support/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java (original)
+++ incubator/npanday/branches/npanday-vs2010-support/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java Fri Oct  1 10:51:29 2010
@@ -165,6 +165,14 @@ public final class DefaultCompiler
             commands.add( wcfRef + "Microsoft.VisualC.STLCLR.dll" );
         }
 
+        //liit
+        if ( compilerContext.getCompilerRequirement().getVendor().equals( Vendor.MICROSOFT ) &&
+            compilerContext.getCompilerRequirement().getFrameworkVersion().equals( "4.0" ) )
+        {
+            String wcfRef = "/reference:" + System.getenv( "SystemRoot" ) +
+                "\\Microsoft.NET\\Framework\\v4.0.30319\\";
+        }
+        
         if ( compilerContext.getKeyInfo().getKeyFileUri() != null )
         {
             commands.add( "/keyfile:" + compilerContext.getKeyInfo().getKeyFileUri() );

Modified: incubator/npanday/branches/npanday-vs2010-support/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/Connect.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/npanday-vs2010-support/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/Connect.cs?rev=1003473&r1=1003472&r2=1003473&view=diff
==============================================================================
--- incubator/npanday/branches/npanday-vs2010-support/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/Connect.cs (original)
+++ incubator/npanday/branches/npanday-vs2010-support/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/Connect.cs Fri Oct  1 10:51:29 2010
@@ -978,7 +978,12 @@ namespace NPanday.VisualStudio.Addin
             buildControls = new List<CommandBarControl>();
             foreach (CommandBar commandBar in (CommandBars)dte2.CommandBars)
             {
-                foreach (CommandBarControl control in commandBar.Controls)
+				IList<CommandBarControl> barControls = new List<CommandBarControl>();
+				foreach (CommandBarControl control in commandBar.Controls)
+				{
+					barControls.Add(control);
+				}
+				foreach (CommandBarControl control in barControls)
                 {
                     if (control.Caption.Equals(Messages.MSG_C_ADD_REFERENCE))
                     {
@@ -1074,7 +1079,7 @@ namespace NPanday.VisualStudio.Addin
                 System.Type.Missing, System.Type.Missing, 1, true);
             buildButton.Caption = Messages.MSG_C_BUILD;
             buildButton.Visible = true;
-            buildButton.FaceId = 645;
+            //buildButton.FaceId = 645;
             buildButton.Click += new _CommandBarButtonEvents_ClickEventHandler(cbBuild_Click);
 
 
@@ -1228,7 +1233,7 @@ namespace NPanday.VisualStudio.Addin
                 System.Type.Missing, System.Type.Missing, 1, true);
             buildAllButton.Caption = Messages.MSG_C_BUILD;
             buildAllButton.Visible = true;
-            buildAllButton.FaceId = 645;
+            //buildAllButton.FaceId = 645;
             buildAllButton.Click += new _CommandBarButtonEvents_ClickEventHandler(cbBuildAll_Click);
 
             buildControls.Add(buildAllButton);

Modified: incubator/npanday/branches/npanday-vs2010-support/plugins/netplugins/NPanday.Plugin.Settings/src/main/csharp/NPanday/Plugin/Settings/SettingsGeneratorMojo.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/npanday-vs2010-support/plugins/netplugins/NPanday.Plugin.Settings/src/main/csharp/NPanday/Plugin/Settings/SettingsGeneratorMojo.cs?rev=1003473&r1=1003472&r2=1003473&view=diff
==============================================================================
--- incubator/npanday/branches/npanday-vs2010-support/plugins/netplugins/NPanday.Plugin.Settings/src/main/csharp/NPanday/Plugin/Settings/SettingsGeneratorMojo.cs (original)
+++ incubator/npanday/branches/npanday-vs2010-support/plugins/netplugins/NPanday.Plugin.Settings/src/main/csharp/NPanday/Plugin/Settings/SettingsGeneratorMojo.cs Fri Oct  1 10:51:29 2010
@@ -124,12 +124,17 @@ namespace NPanday.Plugin.Settings
             bool dirInfo20 = new DirectoryInfo(Path.Combine(installRoot, "v2.0.50727")).Exists;
             bool dirInfo35 = new DirectoryInfo(Path.Combine(installRoot, "v3.5")).Exists;
 
+            //liit
+            bool dirInfo40 = new DirectoryInfo(Path.Combine(installRoot, "v4.0.30319")).Exists;            
+
             if(installRoot != null)
             {
-                if(!dirInfo11 && !dirInfo20 && !dirInfo35)
+                //if(!dirInfo11 && !dirInfo20 && !dirInfo35)
+                if(!dirInfo11 && !dirInfo20 && !dirInfo35 && !dirInfo40)
                     return null;
                 defaultSetup.vendorName = "MICROSOFT";
-                defaultSetup.vendorVersion = (dirInfo20) ? "2.0.50727" : ((dirInfo35) ? "3.5" : "1.1.4322");
+                //defaultSetup.vendorVersion = (dirInfo20) ? "2.0.50727" : ((dirInfo35) ? "3.5" : "1.1.4322");
+                defaultSetup.vendorVersion = (dirInfo20) ? "2.0.50727" : (dirInfo35) ? "3.5" : ((dirInfo40) ? "4.0" : "1.1.4322");
                 defaultSetup.frameworkVersion = defaultSetup.vendorVersion;
                 return defaultSetup;
             }
@@ -190,6 +195,10 @@ namespace NPanday.Plugin.Settings
             DirectoryInfo dirInfo20 = new DirectoryInfo(Path.Combine(installRoot, "v2.0.50727"));
             DirectoryInfo dirInfo30 = new DirectoryInfo(Path.Combine(installRoot, "v3.0"));
             DirectoryInfo dirInfo35 = new DirectoryInfo(Path.Combine(installRoot, "v3.5"));
+            
+            //liit
+            DirectoryInfo dirInfo40 = new DirectoryInfo(Path.Combine(installRoot, "v4.0.30319"));
+
             int vendorCounter = 0;
             if (dirInfo11.Exists)
             {
@@ -238,15 +247,17 @@ namespace NPanday.Plugin.Settings
                 vendor.frameworks = vendorFrameworks;
                 vendors[vendorCounter++] = vendor;
             }
-            if (dirInfo35.Exists)
+            
+            //liit
+            if (dirInfo40.Exists)
             {
                 npandaySettingsVendorsVendor vendor = new npandaySettingsVendorsVendor();
                 vendor.vendorName = "MICROSOFT";
-                vendor.vendorVersion = "3.5";
+                vendor.vendorVersion = "4.0";
                 npandaySettingsVendorsVendorFrameworksFramework[] vendorFrameworks = new npandaySettingsVendorsVendorFrameworksFramework[1];
                 npandaySettingsVendorsVendorFrameworksFramework vf11 = new npandaySettingsVendorsVendorFrameworksFramework();
-                vf11.installRoot = dirInfo35.FullName;
-                vf11.frameworkVersion = "3.5";
+                vf11.installRoot = dirInfo40.FullName;
+                vf11.frameworkVersion = "4.0";
                 vendorFrameworks[0] = vf11;
                 vf11.sdkInstallRoot = sdkInstallRoot20;
                 vendor.frameworks = vendorFrameworks;
@@ -284,6 +295,11 @@ namespace NPanday.Plugin.Settings
                 vf35.frameworkVersion = "3.5";
                 vendorFrameworks[2] = vf35;
 
+                npandaySettingsVendorsVendorFrameworksFramework vf40 = new npandaySettingsVendorsVendorFrameworksFramework();
+                vf40.installRoot = installRoot;
+                vf40.frameworkVersion = "4.0";
+                vendorFrameworks[3] = vf40;
+                
                 npandaySettingsVendorsVendor vendor = new npandaySettingsVendorsVendor();
                 vendor.vendorName = "MONO";
                 vendor.vendorVersion = keyName;