Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 572311

Summary: Install latest VisualStudio 2019 and Win10-SDK on SWT windows build machine
Product: Community Reporter: Carsten Hammer <carsten.hammer>
Component: CI-JenkinsAssignee: CI Admin Inbox <ci.admin-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: akurtakov, mikael.barbero, niraj.modi, webmaster
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=528319
Whiteboard:
Bug Depends on:    
Bug Blocks: 572308, 572544    

Description Carsten Hammer CLA 2021-03-25 12:41:17 EDT
This is adopted from Bug 528319 to match Visual Studio 2019. I don't know exactly the versions in 5. so left the ones from the older bugzilla about the update to Visual Studio 2017.

In order to progress with bug 572308, we need to install latest Windows 10 SDK and VisualStudio 2019 community edition SDK which are free, on SWT Windows build machine(machine recently setup via bug 520200)

Steps to be followed:
1. Take backup(save image) of the current Windows 2016 SWT build machine.
2. Download the web installer(~ 1MB) from below site
https://visualstudio.microsoft.com/de/thank-you-downloading-visual-studio/?sku=Community&rel=16#
3. Run the above web installer
4. Go to "Desktop development with C++"
5. Select/turn the checkbox ON for below items from the list
- VC++ 2019 v141 toolset(x86, x64)
- Windows 10 SDK (10.0.16299.0) for Desktop C++
Note: The exact version value might change(or rather upgrade) when you install.
6. Click install which should be few GBs(IIRC it was ~5GBs)
Comment 1 Mikaël Barbero CLA 2021-03-25 13:46:57 EDT
@Carsten, you're not a committer on the project so you're not entitled to make such a request.

Feel free to make this ticket be re-opened by committers/project leads once you've talked to them.
Comment 2 Niraj Modi CLA 2021-03-26 05:41:46 EDT
(In reply to Mikaël Barbero from comment #1)
> @Carsten, you're not a committer on the project so you're not entitled to
> make such a request.
> 
> Feel free to make this ticket be re-opened by committers/project leads once
> you've talked to them.

Hi Mikael,
Reopening this, Carsten happen to raise this bug on my request as per our discussion on below gerrit: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175294

Just to confirm on one point:
Even after installing the newer VS2019, we should still have VS2017 present on the build machine(just as a backup) ?
Comment 3 Mikaël Barbero CLA 2021-03-26 08:00:37 EDT
(In reply to Niraj Modi from comment #2)
> Reopening this, Carsten happen to raise this bug on my request as per our
> discussion on below gerrit:
> https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175294

Thanks Niraj for the heads up. Sorry Carsten, as those requests touch infra, we want to be sure projects are aware of such changes.

> Just to confirm on one point:
> Even after installing the newer VS2019, we should still have VS2017 present
> on the build machine(just as a backup) ?

It should. I cannot say as I never installed VS2019 yet :) I'll try on a test instance first to see if I can have both versions at the same time.

This is scheduled for sometime next week.
Comment 4 Niraj Modi CLA 2021-03-31 07:37:54 EDT
(In reply to Mikaël Barbero from comment #3)
> (In reply to Niraj Modi from comment #2)
> > Just to confirm on one point:
> > Even after installing the newer VS2019, we should still have VS2017 present
> > on the build machine(just as a backup) ?
> 
> It should. I cannot say as I never installed VS2019 yet :) I'll try on a
> test instance first to see if I can have both versions at the same time.
> 
> This is scheduled for sometime next week.

Thanks Mikaël, just an update on above point:
- Tested locally we can have both VS2019 and VS2017 at the same time, after upgrade SWT Windows native build doesn't work with VS2017 anymore possibly due to Win10 SDK upgrade.

Just checking: If possible can we keep a backup of existing Win10 build machine setup(Most likely we won't need that, but to be on safer side) ?
Comment 5 Niraj Modi CLA 2021-04-01 06:45:29 EDT
Ping!
Comment 6 Mikaël Barbero CLA 2021-04-01 13:01:36 EDT
install in progress...
Comment 7 Mikaël Barbero CLA 2021-04-01 14:29:28 EDT
Done. VS 2019 has been installed in W:\Microsoft\Visual Studio\2019
Comment 8 Alexander Kurtakov CLA 2021-04-02 03:53:50 EDT
Build fails with:

The system cannot find the path specified.
W:\Microsoft\Visual Studio\9.0\VC\bin\cl.exe

Is this correct path?
Comment 9 Mikaël Barbero CLA 2021-04-02 04:01:31 EDT
"W:\Microsoft\Visual Studio\9.0\VC\bin\cl.exe" definitely exists, but it's an old version (it's VS 2008). I did not touch anything about this install for this bug.

For VS 2019, I guess you would like to use one of the following:

W:\Microsoft\Visual Studio\2019\VC\Tools\MSVC\14.28.29910\bin\Hostx86\x86\cl.exe
W:\Microsoft\Visual Studio\2019\VC\Tools\MSVC\14.28.29910\bin\Hostx86\x64\cl.exe
W:\Microsoft\Visual Studio\2019\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x86\cl.exe
W:\Microsoft\Visual Studio\2019\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\cl.exe

See https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-160 for the details about this version.
Comment 10 Alexander Kurtakov CLA 2021-04-02 04:09:14 EDT
AFAICT there is nothing setting the 9.0 version in our scripts so I wonder whether it's some registry value or PATH on the vm.
Comment 11 Niraj Modi CLA 2021-04-02 06:05:31 EDT
(In reply to Mikaël Barbero from comment #9)
> "W:\Microsoft\Visual Studio\9.0\VC\bin\cl.exe" definitely exists, but it's
> an old version (it's VS 2008). I did not touch anything about this install
> for this bug.
> 
> For VS 2019, I guess you would like to use one of the following:
> 
> W:\Microsoft\Visual
> Studio\2019\VC\Tools\MSVC\14.28.29910\bin\Hostx86\x86\cl.exe
> W:\Microsoft\Visual
> Studio\2019\VC\Tools\MSVC\14.28.29910\bin\Hostx86\x64\cl.exe
> W:\Microsoft\Visual
> Studio\2019\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x86\cl.exe
> W:\Microsoft\Visual
> Studio\2019\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\cl.exe
> 
> See
> https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-
> line?view=msvc-160 for the details about this version.

Thanks Mikaël for the installation.

VS2019 installation path is without the edition information "Community":
- This was unlike VS2017 installation, where-in we had edition information "Community" in the installed path(https://bugs.eclipse.org/bugs/show_bug.cgi?id=528319#c6)

This caused yesterday's Eclispe IBuild to broke:
- Anyways we made a fix for Bug 572544 to adjust SWT Windows build script to point to new VS2019 as per the SWT Windows build machine.

We should be good now, but will wait for the next Eclipse Ibuild before closing this.
Thanks!
Comment 12 Mikaël Barbero CLA 2021-04-02 06:07:48 EDT
Thanks Niraj for the feedbacks. Will wait for your feedbacks for closing this one.
Comment 13 Niraj Modi CLA 2021-04-02 08:57:58 EDT
(In reply to Mikaël Barbero from comment #12)
> Thanks Niraj for the feedbacks. Will wait for your feedbacks for closing
> this one.

Eclipse IBuild is successful, we can close this bug. Thanks!
Comment 14 Mikaël Barbero CLA 2021-04-02 09:09:47 EDT
Closing.