windows: Detect VS2017 compiler and tools

Authored by kfunk on Oct 11 2018, 6:43 AM.



Visual Studio 2017 defines the VS150COMNTOOLS env variable which
kdevelop-msvc.bat ignored till now. By default VS does not set the
VS150COMNTOOLS as system-wide variable so we have to do be a bit more
clever to detect the VS2017 install.

Also allow to start using VS2017 compiler, using either 32 bit or 64 bit
compilers by prompting the user.

Diff Detail

R32 KDevelop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
kfunk created this revision.Oct 11 2018, 6:43 AM
Restricted Application added a project: KDevelop. · View Herald TranscriptOct 11 2018, 6:43 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
kfunk requested review of this revision.Oct 11 2018, 6:43 AM
kfunk added a comment.Oct 11 2018, 6:44 AM

Note: This is alternative approach to

kfunk updated this revision to Diff 43373.Oct 11 2018, 6:52 AM

Check whether base is defined at another place

This batch file seems very clean and simple, I like it. Unfortunately I can't help reviewing this patch as I no longer have access to Windows machines and I don't a dual-boot system :(

Is this a problem for you guys?

brauch accepted this revision.Oct 12 2018, 7:29 AM
brauch added a subscriber: brauch.

I also find this reasonably simple to read. The "type your compiler arch" thing is extremely 80s of course, but the whole concept is a hack :/

If it works, let's merge this.

This revision is now accepted and ready to land.Oct 12 2018, 7:29 AM

I hate tο be a naysayer here, but shouldn't we not assume that VS2017 is installed in C:\Program Files (x86) so that we don't hardcode it's path? I remember my self installing VS once in another drive, because C:\ was tiny and full.

@Petross404 Hmm, true. Let me push my patch anyway, for now.

Not hard-coding the VS installation path could be fixed by using portions of your patch and replace the very first hunk of this patch. Not sure I'll have more time for working on that during the weekend though.

This revision was automatically updated to reflect the committed changes.