Skip to content

Commit

Permalink
add win compiler pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
msarahan committed May 31, 2017
1 parent 7ca9221 commit f70b597
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 0 deletions.
51 changes: 51 additions & 0 deletions vs2008/activate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
:: Set env vars that tell distutils to use the compiler that we put on path
SET DISTUTILS_USE_SDK=1
SET MSSdk=1

:: http://stackoverflow.com/a/26874379/1170370
SET platform=
IF /I [%PROCESSOR_ARCHITECTURE%]==[amd64] set platform=true
IF /I [%PROCESSOR_ARCHITEW6432%]==[amd64] set platform=true

:: the Environment variable VisualStudioVersion is set by devenv.exe
:: if this batch is a child of devenv.exe external tools, we know which version to look at
VisualStudioVersion=9.0

if defined platform (
set VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%VisualStudioVersion%
) ELSE (
set VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\%VisualStudioVersion%
)
for /f "skip=2 tokens=2,*" %%A in ('reg query "%VSREGKEY%" /v InstallDir') do SET VSINSTALLDIR=%%B

if not "%VSINSTALLDIR%" == "" (
:: Look in VS90COMNTOOLS
set VSINSTALLDIR=%VS90COMNTOOLS%
)

if "%VSINSTALLDIR%" == "" (
ECHO "Did not find VS in registry or in VS90COMNTOOLS env var - exiting"
exit 1
)

echo "Found VS2008 at"
echo "%VSINSTALLDIR%"


CALL

SET "VS_VERSION=9.0"
SET "VS_MAJOR=9"
SET "VS_YEAR=2008"

if "%ARCH%" == "64" (
:: 64-bit
SET "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR% Win64"
) else (
:: 32-bit
SET "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"
)


set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"
set "MSYS2_ENV_CONV_EXCL=CL"
11 changes: 11 additions & 0 deletions vs2008/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package:
name: vs2008
version: "9.00.30729.1"

build:
run_exports:
- vc 9

about:
summary: Activation and version verification of MSVC 9 (VS 2008) compiler
license: BSD 3-clause
50 changes: 50 additions & 0 deletions vs2010/activate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
:: Set env vars that tell distutils to use the compiler that we put on path
SET DISTUTILS_USE_SDK=1
SET MSSdk=1

:: http://stackoverflow.com/a/26874379/1170370
SET platform=
IF /I [%PROCESSOR_ARCHITECTURE%]==[amd64] set platform=true
IF /I [%PROCESSOR_ARCHITEW6432%]==[amd64] set platform=true

:: the Environment variable VisualStudioVersion is set by devenv.exe
:: if this batch is a child of devenv.exe external tools, we know which version to look at
VisualStudioVersion=10.0

if defined platform (
set VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%VisualStudioVersion%
) ELSE (
set VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\%VisualStudioVersion%
)
for /f "skip=2 tokens=2,*" %%A in ('reg query "%VSREGKEY%" /v InstallDir') do SET VSINSTALLDIR=%%B

if not "%VSINSTALLDIR%" == "" (
set VSINSTALLDIR=%VS100COMNTOOLS%
)

if "%VSINSTALLDIR%" == "" (
ECHO "Did not find VS in registry or in VS90COMNTOOLS env var - exiting"
exit 1
)

echo "Found VS2010 at"
echo "%VSINSTALLDIR%"


CALL

SET "VS_VERSION=10.0"
SET "VS_MAJOR=10"
SET "VS_YEAR=2010"

if "%ARCH%" == "64" (
:: 64-bit
SET "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR% Win64"
) else (
:: 32-bit
SET "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"
)


set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"
set "MSYS2_ENV_CONV_EXCL=CL"
Empty file added vs2010/bld.bat
Empty file.
12 changes: 12 additions & 0 deletions vs2010/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package:
name: vs2010
version: "10.00.40219.1"


build:
impose_run_requirements:
- vc 10

about:
summary: Activation and version verification of MSVC 10 (VS 2010) compiler
license: BSD 3-clause
56 changes: 56 additions & 0 deletions vs2015/activate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
:: Set env vars that tell distutils to use the compiler that we put on path
SET DISTUTILS_USE_SDK=1
SET MSSdk=1

:: http://stackoverflow.com/a/26874379/1170370
SET platform=
IF /I [%PROCESSOR_ARCHITECTURE%]==[amd64] set platform=true
IF /I [%PROCESSOR_ARCHITEW6432%]==[amd64] set platform=true

:: the Environment variable VisualStudioVersion is set by devenv.exe
:: if this batch is a child of devenv.exe external tools, we know which version to look at
VisualStudioVersion=14.0

if defined platform (
set VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%VisualStudioVersion%
) ELSE (
set VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\%VisualStudioVersion%
)
for /f "skip=2 tokens=2,*" %%A in ('reg query "%VSREGKEY%" /v InstallDir') do SET VSINSTALLDIR=%%B

if not "%VSINSTALLDIR%" == "" (
set VSINSTALLDIR=%VS140COMNTOOLS%
)

if "%VSINSTALLDIR%" == "" (
ECHO "Did not find VS in registry or in VS90COMNTOOLS env var - exiting"
exit 1
)

echo "Found VS2014 at"
echo "%VSINSTALLDIR%"


CALL

SET "VS_VERSION=14.0"
SET "VS_MAJOR=14"
SET "VS_YEAR=2015"

if "%ARCH%" == "64" (
:: 64-bit
SET "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR% Win64"
) else (
:: 32-bit
SET "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"
)


set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"
set "MSYS2_ENV_CONV_EXCL=CL"

:: For Python 3.5+, ensure that we link with the dynamic runtime. See
:: http://stevedower.id.au/blog/building-for-python-3-5-part-two/ for more info
set PY_VCRUNTIME_REDIST=%PREFIX%\\bin\\vcruntime140.dll

CALL %VSINSTALLDIR%\
2 changes: 2 additions & 0 deletions vs2015/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdir %PREFIX%\etc\conda\activate.d
COPY activate.bat %PREFIX%\etc\conda\activate.d\vs2015_compiler_vars.bat
11 changes: 11 additions & 0 deletions vs2015/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package:
name: vs2015
version: "14.0.25123"

build:
impose_run_requirements:
- vc 14

about:
summary: Activation and version verification of MSVC 14 (VS 2015) compiler
license: BSD 3-clause

0 comments on commit f70b597

Please sign in to comment.