Skip to content

Commit

Permalink
ReleaseVersion: Allow compilation on 32-bit machines
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiecohen committed Jan 15, 2013
1 parent 633968e commit 07e6598
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Redist/ReleaseVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,17 @@ def get_reg_values(reg_key, value_list):
sys.exit(3)

elif platform.system() == 'Windows':
import win32con,pywintypes,win32api
import win32con,pywintypes,win32api,platform

(bits,linkage) = platform.architecture()
matchObject = re.search('64',bits)
is_64_bit_machine = matchObject is not None

MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0")
if is_64_bit_machine:
MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0")
else:
MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\VisualStudio\10.0")

MSVC_VALUES = [("InstallDir", win32con.REG_SZ)]
VS_INST_DIR = get_reg_values(MSVC_KEY, MSVC_VALUES)[0]
PROJECT_SLN = "..\OpenNI.sln"
Expand Down

0 comments on commit 07e6598

Please sign in to comment.