Why target platform 8.1


#1

I recently did a fresh install of visual studio 2017 and downloaded juce 5 and tried to build the demo app. It didn’t succed because the toolset was set to 8.1, whereas my vs 2017 install only contained toolsets for windows 10.

No big deal, easy to change to 10.0.14393.0 in the vs settings, but why is it set to 8.1 in the first place? I mean who targets 8.1 nowadays? Or is it the only way to be compatible to old time windows 7?

Another suggestion is to set the Debug Information Format to

Program Database for Edit And Continue (/ZI)

(talking about the Projucer now), while I guess that’s used by most developers.


#2

I guess we could change this. The reasoning behind this is that the Projucer normally will use the exporter’s default if you choose ‘(default)’ for an exporter property in the Projucer. So, if you choose ‘(default)’ for the platform toolset in the Projucer, for example, then this doesn’t mean what the JUCE team thinks the default should be, but whatever Visual Studio’s default is. And Visual Studio seems to use Windows 8.1 on projects where the platform toolset is not specified - even if the 8.1 SDK is not available. Not sure what Visual Studio’s reasoning is for this default.

In any case we could override VS’s default with 10.0.14393.0 if this is the default platform toolset that the VS2017 installer chooses.


#3

Hmm, if i create a new win32 project in vs 2017 it defaults to Target Platform Windows 10, SDK version 10.0.14393 and toolset 2017 v141. Now this might be different if you did install support for win 8.1, which I didn’t.

Anyway, the number of people installing support for only windows 8.1 in vs 2017 is probably rather small so an “active” default to windows 10 and 10.0.14393.0 is probably safe.


#4

Yep, that is right. to keep backwards compatability with windows7 (and even vista) you need to target the 8.1 platform. https://msdn.microsoft.com/en-us/library/8x480de8.aspx


#5

If you create a new project in VS 2017, then VS will select the Windows 10 SDK version. However, if you have a new empty project and the platform target is left empty in the project XML, then VS will fallback to the 8.1 platform target even if this is not installed.

I still think it would be good if the Projucer simply ignore VS2017’s default and uses 10.0.14393.0. I’ll get that fixed…


#6

Thanks. While still in fix mood you might also consider changing all those ifndefs like

#ifndef    JUCE_ASIO
     //#define JUCE_ASIO
#endif

to

#ifndef    JUCE_ASIO
     //#define JUCE_ASIO 1
#endif

for obvious reasons…


#7

Both requests will appear on develop shortly. However, I’m not so sure how useful the latter request will be because uncommenting any line in the AppConfig.h will be overwritten the next time the Projucer saves your .jucer project. It’s far easier and better to simply enable/disable that config flag from within the Projucer.


#8

Well, I guess I meant the projucer (or whatever app that produces the ifndef code in the first place) should add a 1 to the commented line.

I guess I’m not the only one that just uncomments the line and gets hit by a blow of compiler errors before engaging brain…


#9

Both requests are on develop now.


#10

So, now that the default has been changed to SDK version 10, it is going to cause confusion in the future for people who are not aware of this and want their stuff to work on Windows 7…


#11

By chance I asked a similar question on Stackoverflow some days ago and got the answer that the Windows 10 SDK can be used.

As the answer says: “Then the minimum target version is controlled through preprocessor symbols (WINVER and _WIN32_WINNT). Set them to 0x0601 to target Windows 7 and up. See Using the Windows Headers for details.”

I haven’t tried it, though. But anyway, I’d vote for defaulting to 8.1 SDK, to not drop Windows 7 compatibility.

A general feedback on the Projucer options: I’d love if all options would default to a value (instead of “Default”), then there’s no question what the Default is.

And, more importantly, do some short but helpful help texts in the Projucer. The current help texts on the “Windows Target Platform” selection currently says “The Windows target platform to use”. More helpful might be something along the lines “Use 8.1 to ensure Windows 7 compatibility”.


#12

The question here is not to drop windows 7 compatibility, but to make the demo work “out of the box”.

If you’re old enough to be using windows 7, you probably know the different platform whereabouts more than any newbie who’s just installed vs 2017 for the first time, eager to check out the demo.


#13

Thanks! That is very useful information that I have not seen anywhere else. I will surely give it a try.