Anonymous avatar Anonymous committed a85cb04

Minor build fix for 64-bit Win32 platforms.

Comments (0)

Files changed (2)

 0. Description
 --------------
 Pygame2 is a cross-platform multimedia framework for the excellent Python
-programming language. It's purpose is to make writing multimedia applications,
+programming language. Its purpose is to make writing multimedia applications,
 such as games, with Python as easy as possible, while providing the developer a
 reliable and extensible programming interface.
 
 import subprocess
 import re
 import glob
+import platform
 try:
     if helpers.getversion()[0] >= 3:
         import winreg as _winreg
     
     return re.match('/[A-Z]/', path, re.I) is not None
 
+def is64bit ():
+    return "64" in platform.architecture ()[0]
+
 class MsysException(Exception):
     """Path retrieval problem"""
     pass
     key = None
     subkey = (
         'Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS-1.0_is1')
+    if is64bit ():
+        subkey = ('Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS-1.0_is1')
     try:
         key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, subkey)
         try:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.