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

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

Issue 10826232: NaCl VS Add-in User Changed Properties Fix (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 4 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 1bc73c8086451d37069b1e60f856a5cb32ed4801..c573b49b59baa1e52e6a0e002a680ee270b97816 100644
--- a/visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs
+++ b/visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs
@@ -185,6 +185,28 @@ namespace NativeClientVSAddIn
"WindowsLocalDebugger", "LocalDebuggerCommand");
properties.SetProperty("WindowsLocalDebugger", "LocalDebuggerCommand", expandedChrome);
+ // Change the library includes to have the appropriate extension.
+ string libs = properties.GetProperty("Link", "AdditionalDependencies");
+ if (properties.ProjectPlatform == PropertyManager.ProjectPlatformType.NaCl)
+ {
+ libs = libs.Replace(".lib", string.Empty);
+ }
+ else if (properties.ProjectPlatform == PropertyManager.ProjectPlatformType.Pepper)
+ {
+ string[] libsList = libs.Split(';');
noelallen1 2012/08/09 18:19:45 Doesn't '\n' also work as a delimiter when you ent
tysand 2012/08/09 18:23:38 Double checked, and Visual Studio will automatical
+ libs = string.Empty;
+ foreach (string lib in libsList)
+ {
+ string baseLibName = lib.Replace(".lib", string.Empty);
+ if (!string.IsNullOrWhiteSpace(lib))
+ {
+ libs = string.Concat(libs, baseLibName, ".lib;");
noelallen1 2012/08/09 18:19:45 Trailing ;?
tysand 2012/08/09 18:23:38 Verified this is a non-issue. On 2012/08/09 18:19:
+ }
+ }
+ }
+
+ properties.SetProperty("Link", "AdditionalDependencies", libs);
+
// Work around for issue 140162. Forces some properties to save to the project file.
PerformPropertyFixes(config);
}
@@ -201,6 +223,31 @@ namespace NativeClientVSAddIn
IVCRulePropertyStorage debugger = config.Rules.Item("WindowsLocalDebugger");
string arguments = debugger.GetUnevaluatedPropertyValue("LocalDebuggerCommandArguments");
debugger.SetPropertyValue("LocalDebuggerCommandArguments", arguments);
+
+ IVCRulePropertyStorage directories = config.Rules.Item("ConfigurationDirectories");
+ string includePath = directories.GetUnevaluatedPropertyValue("IncludePath");
+ string libraryPath = directories.GetUnevaluatedPropertyValue("LibraryPath");
+ directories.SetPropertyValue("IncludePath", includePath);
+ directories.SetPropertyValue("LibraryPath", libraryPath);
+
+ // Pepper specific:
+ if (config.Platform.Name == Strings.PepperPlatformName)
+ {
+ string executablePath = directories.GetUnevaluatedPropertyValue("ExecutablePath");
+ directories.SetPropertyValue("ExecutablePath", executablePath);
+ }
+
+ // NaCl Platform Specific:
+ if (config.Platform.Name == Strings.NaClPlatformName)
+ {
+ IVCRulePropertyStorage general = config.Rules.Item("ConfigurationGeneral");
+ string outdir = general.GetUnevaluatedPropertyValue("OutDir");
+ string intdir = general.GetUnevaluatedPropertyValue("IntDir");
+ string irtPath = general.GetUnevaluatedPropertyValue("NaClIrtPath");
+ general.SetPropertyValue("NaClIrtPath", irtPath);
+ general.SetPropertyValue("OutDir", outdir);
+ general.SetPropertyValue("IntDir", intdir);
+ }
}
/// <summary>

Powered by Google App Engine
This is Rietveld 408576698