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

Side by Side Diff: visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs

Issue 11266051: Add PNaCl support for VS addin. (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: fix nits and tests Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 namespace NativeClientVSAddIn 5 namespace NativeClientVSAddIn
6 { 6 {
7 using System; 7 using System;
8 8
9 using EnvDTE; 9 using EnvDTE;
10 using EnvDTE80; 10 using EnvDTE80;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // Set the NaCl add-in version so that it is stored in the project fil e. 193 // Set the NaCl add-in version so that it is stored in the project fil e.
194 properties.SetProperty("ConfigurationGeneral", "NaClAddInVersion", nac lAddInVersion); 194 properties.SetProperty("ConfigurationGeneral", "NaClAddInVersion", nac lAddInVersion);
195 195
196 // Expand the CHROME_PATH variable to its full path. 196 // Expand the CHROME_PATH variable to its full path.
197 string expandedChrome = properties.GetProperty( 197 string expandedChrome = properties.GetProperty(
198 "WindowsLocalDebugger", "LocalDebuggerCommand"); 198 "WindowsLocalDebugger", "LocalDebuggerCommand");
199 properties.SetProperty("WindowsLocalDebugger", "LocalDebuggerCommand", expandedChrome); 199 properties.SetProperty("WindowsLocalDebugger", "LocalDebuggerCommand", expandedChrome);
200 200
201 // Change the library includes to have the appropriate extension. 201 // Change the library includes to have the appropriate extension.
202 string libs = properties.GetProperty("Link", "AdditionalDependencies") ; 202 string libs = properties.GetProperty("Link", "AdditionalDependencies") ;
203 if (properties.ProjectPlatform == PropertyManager.ProjectPlatformType. NaCl) 203 if (properties.PlatformType == PropertyManager.ProjectPlatformType.NaC l)
204 { 204 {
205 libs = libs.Replace(".lib", string.Empty); 205 libs = libs.Replace(".lib", string.Empty);
206 } 206 }
207 else if (properties.ProjectPlatform == PropertyManager.ProjectPlatform Type.Pepper) 207 else if (properties.PlatformType == PropertyManager.ProjectPlatformTyp e.Pepper)
208 { 208 {
209 string[] libsList = libs.Split(';'); 209 string[] libsList = libs.Split(';');
210 libs = string.Empty; 210 libs = string.Empty;
211 foreach (string lib in libsList) 211 foreach (string lib in libsList)
212 { 212 {
213 string baseLibName = lib.Replace(".lib", string.Empty); 213 string baseLibName = lib.Replace(".lib", string.Empty);
214 if (!string.IsNullOrWhiteSpace(lib)) 214 if (!string.IsNullOrWhiteSpace(lib))
215 { 215 {
216 libs = string.Concat(libs, baseLibName, ".lib;"); 216 libs = string.Concat(libs, baseLibName, ".lib;");
217 } 217 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 /// </summary> 260 /// </summary>
261 /// <param name="reason">Indicates how we are entering run mode (breakpoint or launch).</param> 261 /// <param name="reason">Indicates how we are entering run mode (breakpoint or launch).</param>
262 private void DebuggerOnEnterRunMode(dbgEventReason reason) 262 private void DebuggerOnEnterRunMode(dbgEventReason reason)
263 { 263 {
264 // If we are starting debugging (not re-entering from a breakpoint) 264 // If we are starting debugging (not re-entering from a breakpoint)
265 // then load project settings and start the debugger-helper. 265 // then load project settings and start the debugger-helper.
266 if (reason == dbgEventReason.dbgEventReasonLaunchProgram) 266 if (reason == dbgEventReason.dbgEventReasonLaunchProgram)
267 { 267 {
268 PropertyManager properties = new PropertyManager(); 268 PropertyManager properties = new PropertyManager();
269 properties.SetTargetToActive(dte_); 269 properties.SetTargetToActive(dte_);
270 if (properties.ProjectPlatform == PropertyManager.ProjectPlatformType.Na Cl) 270 if (properties.PlatformType == PropertyManager.ProjectPlatformType.NaCl)
271 { 271 {
272 debugger_ = new PluginDebuggerGDB(dte_, properties); 272 debugger_ = new PluginDebuggerGDB(dte_, properties);
273 webServer_ = new WebServer(webServerOutputPane_, properties); 273 webServer_ = new WebServer(webServerOutputPane_, properties);
274 } 274 }
275 else if (properties.ProjectPlatform == PropertyManager.ProjectPlatformTy pe.Pepper) 275 else if (properties.PlatformType == PropertyManager.ProjectPlatformType. Pepper)
276 { 276 {
277 debugger_ = new PluginDebuggerVS(dte_, properties); 277 debugger_ = new PluginDebuggerVS(dte_, properties);
278 webServer_ = new WebServer(webServerOutputPane_, properties); 278 webServer_ = new WebServer(webServerOutputPane_, properties);
279 } 279 }
280 } 280 }
281 } 281 }
282 } 282 }
283 } 283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698