-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
The original change that added support for running custom actions during the install process (e7c84f8) assumed that Visual Studio 2013 is used to generate the installer file. However, that is not always the case, and older versions of Visual Studio should allow users to generate Windows installer files. This change makes the custom actions visual studio project use the visual studio version that is found by vcbuild.bat. Conflicts: vcbuild.bat
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,32 +84,42 @@ if defined noperfctr set noperfctr_arg=--without-perfctr& set noperfctr_msi_arg= | |
@rem Look for Visual Studio 2013 | ||
if not defined VS120COMNTOOLS goto vc-set-2012 | ||
if not exist "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2012 | ||
if defined msi if not exist "%WIX%\SDK\VS2013" goto vc-set-2012 | ||
This comment has been minimized.
Sorry, something went wrong.
misterdjules
Owner
|
||
call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" | ||
if not defined VCINSTALLDIR goto msbuild-not-found | ||
set GYP_MSVS_VERSION=2013 | ||
set PLATFORM_TOOLSET=v120 | ||
goto msbuild-found | ||
|
||
:vc-set-2012 | ||
@rem Look for Visual Studio 2012 | ||
if not defined VS110COMNTOOLS goto vc-set-2010 | ||
if not exist "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2010 | ||
if defined msi if not exist "%WIX%\SDK\VS2012" goto vc-set-2010 | ||
call "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" | ||
if not defined VCINSTALLDIR goto msbuild-not-found | ||
set GYP_MSVS_VERSION=2012 | ||
set PLATFORM_TOOLSET=v110 | ||
goto msbuild-found | ||
|
||
:vc-set-2010 | ||
if not defined VS100COMNTOOLS goto msbuild-not-found | ||
if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto msbuild-not-found | ||
if defined msi if not exist "%WIX%\SDK\VS2010" goto wix-not-found | ||
call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" | ||
if not defined VCINSTALLDIR goto msbuild-not-found | ||
set GYP_MSVS_VERSION=2010 | ||
set PLATFORM_TOOLSET=v100 | ||
goto msbuild-found | ||
|
||
:msbuild-not-found | ||
echo Failed to find Visual Studio installation. | ||
goto exit | ||
|
||
:wix-not-found | ||
echo Build skipped. To generate installer, you need to install Wix. | ||
goto run | ||
|
||
:msbuild-found | ||
|
||
:project-gen | ||
|
@@ -156,7 +166,7 @@ set NODE_VERSION=%NODE_VERSION%.%NIGHTLY% | |
|
||
:msibuild | ||
echo Building node-%NODE_VERSION% | ||
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo | ||
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:PlatformToolset=%PLATFORM_TOOLSET% /p:VisualStudioVersion=%GYP_MSVS_VERSION% /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo | ||
if errorlevel 1 goto exit | ||
|
||
if defined nosign goto run | ||
|
I'm not sure exactly how
ToolsVersion
works, but from the MSDN documentation it seems that even setting it to4.0
here would make Visual Studio 2013 use a value of12.0
. Since a value of4.0
seems to be used consistently in all projects files, I thought it would be better to use4.0
here too./cc @orangemocha @joaocgreis