Commit 311405e7 authored by Matt Harbison's avatar Matt Harbison
Browse files

add support for building with 'Microsoft Visual C++ Compiler for Python 2.7'

The build process already builds Mercurial with this compiler if it is
installed, so we might as well use this to compile the shell extension if it is
available.  The only manual change needed is to download these merge modules:

    vc9-crt-x64-msm
    vc9-crt-x64-msm-policy

create 'Redist\VC' here:

    %LOCALAPPDATA%\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\

and name them:

    Microsoft.VCxx.CRT.x64_msm.msm
    policy.x.xx.Microsoft.VCxx.CRT.x64_msm.msm

I have no idea why, but DISTUTILS_USE_SDK can't be set, otherwise Mercurial
fails to build its C extensions.  The strange thing is that the new packaging
scripts *do* set this.

[1] https://github.com/indygreg/vc90-merge-modules
parent f7ec8e13e103
......@@ -684,11 +684,16 @@ def verify_hg_env():
global installenv
global win7sdk
win7sdk = try_paths([r'\Microsoft SDKs\Windows\v7.1\Bin',
r'\Microsoft SDKs\Windows\v7.0\Bin'])
if not win7sdk:
print 'Unable to find Microsoft Windows SDK 7.1, please install'
sys.exit(1)
win7sdk = (r'%s\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\Bin'
% os.environ['LOCALAPPDATA'])
if not os.path.exists(win7sdk):
win7sdk = try_paths([r'\Microsoft SDKs\Windows\v7.1\Bin',
r'\Microsoft SDKs\Windows\v7.0\Bin'])
if not win7sdk:
print 'Unable to find Microsoft Windows SDK 7.1, please install'
sys.exit(1)
win7sdk = win7sdk[:-4]
try:
......@@ -737,7 +742,6 @@ def verify_hg_env():
installenv['HGPLAIN'] = '1'
installenv['PATH'] = os.pathsep.join(path)
installenv['DISTUTILS_USE_SDK'] = '1'
installenv['hhc_compiler'] = 'hhc.exe'
def verify_doc_env():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment