Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Unified Diff: visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs

Issue 10928194: explicitly set VSNaClSDKRoot in vcxproj rather than (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs
diff --git a/visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs b/visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs
index 91ed9aab29978383e15331ccc5bc4db16baf7704..5262b03febdd940221219fa3849af120dd63a572 100644
--- a/visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs
+++ b/visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,7 +11,9 @@ namespace NativeClientVSAddIn
using Extensibility;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.VCProjectEngine;
-
+ using System.Collections.Generic;
+ using System.Diagnostics;
+
/// <summary>The object for implementing an Add-in.</summary>
/// <seealso class='IDTExtensibility2' />
public class Connect : IDTExtensibility2
@@ -175,11 +177,13 @@ namespace NativeClientVSAddIn
foreach (VCConfiguration config in configs)
{
properties.SetTarget(config);
- if (string.IsNullOrEmpty(properties.NaClAddInVersion))
+ if (properties.NaClAddInVersion != naclAddInVersion)
{
+ Debug.WriteLine("Modifying Config: " + config.Name);
+
// Set the NaCl add-in version so that it is stored in the project file.
properties.SetProperty("ConfigurationGeneral", "NaClAddInVersion", naclAddInVersion);
-
+
// Expand the CHROME_PATH variable to its full path.
string expandedChrome = properties.GetProperty(
"WindowsLocalDebugger", "LocalDebuggerCommand");
@@ -224,9 +228,29 @@ namespace NativeClientVSAddIn
string arguments = debugger.GetUnevaluatedPropertyValue("LocalDebuggerCommandArguments");
debugger.SetPropertyValue("LocalDebuggerCommandArguments", arguments);
+ // NaCl Platform Specific:
+ if (config.Platform.Name == Strings.NaClPlatformName)
+ {
+ IVCRulePropertyStorage general = config.Rules.Item("ConfigurationGeneral");
+ string[] keys = {"VSNaClSDKRoot", "OutDir", "IntDir"};
+ Dictionary<string, string> values = new Dictionary<string, string>();
+ foreach (var key in keys)
+ {
+ values[key] = general.GetUnevaluatedPropertyValue(key);
+ general.DeleteProperty(key);
+ }
+
+ foreach (var key in keys)
+ {
+ general.SetPropertyValue(key, values[key]);
+ }
+ }
+
IVCRulePropertyStorage directories = config.Rules.Item("ConfigurationDirectories");
string includePath = directories.GetUnevaluatedPropertyValue("IncludePath");
string libraryPath = directories.GetUnevaluatedPropertyValue("LibraryPath");
+ directories.DeleteProperty("IncludePath");
+ directories.DeleteProperty("LibraryPath");
directories.SetPropertyValue("IncludePath", includePath);
directories.SetPropertyValue("LibraryPath", libraryPath);
« no previous file with comments | « visual_studio/NativeClientVSAddIn/InstallerResources/examples/hello_world_gles/hello_world_gles/hello_world_gles.vcxproj ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698