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

Unified Diff: visual_studio/NativeClientVSAddIn/InstallerResources/install.py

Issue 11092028: Fix for running buildbot script with 32-bit python under WOW64 (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: visual_studio/NativeClientVSAddIn/InstallerResources/install.py
diff --git a/visual_studio/NativeClientVSAddIn/InstallerResources/install.py b/visual_studio/NativeClientVSAddIn/InstallerResources/install.py
index e6cd0e8c3765442a4d81fedf39397b0a905fd0c5..a8d4bab0e2fd886b9d48cc955b23c4a593f1fc89 100644
--- a/visual_studio/NativeClientVSAddIn/InstallerResources/install.py
+++ b/visual_studio/NativeClientVSAddIn/InstallerResources/install.py
@@ -25,8 +25,6 @@ PEPPER_PLATFORM_NAME = 'PPAPI'
DEFAULT_VS_USER_DIRECTORY = os.path.expandvars(
'%USERPROFILE%\\My Documents\\Visual Studio 2010')
-DEFAULT_MS_BUILD_DIRECTORY = os.path.expandvars('%ProgramFiles(x86)%\\MSBuild')
-
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
ADDIN_FILES = ['NativeClientVSAddIn.AddIn', 'NativeClientVSAddIn.dll']
@@ -75,8 +73,7 @@ def Ask(question):
def main():
parser = optparse.OptionParser(usage='Usage: %prog [options]')
parser.add_option('-b', '--msbuild-path', dest='msbuild_path',
- default=DEFAULT_MS_BUILD_DIRECTORY, metavar='PATH',
- help='Provide the path to the MSBuild directory')
+ metavar='PATH', help='Provide the path to the MSBuild directory')
parser.add_option('-a', '--vsuser-path', dest='vsuser_path',
default=DEFAULT_VS_USER_DIRECTORY, metavar='PATH',
help='Provide the path to the Visual Studio user directory')
@@ -97,6 +94,17 @@ def main():
if platform.system() != 'Windows':
raise InstallError('Must install to Windows system')
+ if not options.msbuild_path:
+ # Find the x86 program files folder. If we are uing a 64-bit version of
+ # python.exe then ProgramFiles(x86). If we using a 32-bit python then
+ # ProgramFiles will always be set to point the x86 program files even
+ # under W0W64.
+ if 'ProgramFiles(x86)' in os.environ:
+ options.msbuild_path = os.path.expandvars('%ProgramFiles(x86)%\\MSBuild')
+ else:
+ options.msbuild_path = os.path.expandvars('%ProgramFiles%\\MSBuild')
+
+
if CheckForRunningProgams():
if not options.force:
print "Visual Studio and MSBuild must be closed during installation"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698