-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build,win,msi: support WiX with VS2017 #17101
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,12 +192,24 @@ if %target_arch%==x64 if %msvs_host_arch%==amd64 set vcvarsall_arg=amd64 | |
:vs-set-2017 | ||
if defined target_env if "%target_env%" NEQ "vs2017" goto vs-set-2015 | ||
echo Looking for Visual Studio 2017 | ||
call tools\msvs\vswhere_usability_wrapper.cmd | ||
if "_%VCINSTALLDIR%_" == "__" goto vs-set-2015 | ||
if defined msi ( | ||
echo Looking for WiX installation for Visual Studio 2017... | ||
if not exist "%WIX%\SDK\VS2017" ( | ||
echo Failed to find WiX install for Visual Studio 2017 | ||
echo VS2017 support for WiX is only present starting at version 3.11 | ||
goto vs-set-2015 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we really fall back to VS2015 (or exit once #16969 lands) if the extension is not installed? Perhaps msi should just be skipped instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MSI is not enabled by default, and this only applies if |
||
) | ||
if not exist "%VCINSTALLDIR%\..\MSBuild\Microsoft\WiX" ( | ||
echo Failed to find the Wix Toolset Visual Studio 2017 Extension | ||
goto vs-set-2015 | ||
) | ||
) | ||
@rem check if VS2017 is already setup, and for the requested arch | ||
if "_%VisualStudioVersion%_" == "_15.0_" if "_%VSCMD_ARG_TGT_ARCH%_"=="_%target_arch%_" goto found_vs2017 | ||
@rem need to clear VSINSTALLDIR for vcvarsall to work as expected | ||
set "VSINSTALLDIR=" | ||
call tools\msvs\vswhere_usability_wrapper.cmd | ||
if "_%VCINSTALLDIR%_" == "__" goto vs-set-2015 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought the idea was to avoid calling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
@rem prevent VsDevCmd.bat from changing the current working directory | ||
set "VSCMD_START_DIR=%CD%" | ||
set vcvars_call="%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg% | ||
|
@@ -354,7 +366,9 @@ if not defined msi goto run | |
|
||
:msibuild | ||
echo Building node-v%FULLVERSION%-%target_arch%.msi | ||
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:PlatformToolset=%PLATFORM_TOOLSET% /p:GypMsvsVersion=%GYP_MSVS_VERSION% /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo | ||
set "msbsdk=" | ||
if defined WindowsSDKVersion set "msbsdk=/p:WindowsTargetPlatformVersion=%WindowsSDKVersion:~0,-1%" | ||
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build %msbsdk% /p:PlatformToolset=%PLATFORM_TOOLSET% /p:GypMsvsVersion=%GYP_MSVS_VERSION% /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo | ||
if errorlevel 1 goto exit | ||
|
||
if not defined sign goto upload | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building MSI was previously undocumented, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.