Proper detection of Cubase version


#1

As a side effect of my investigations reported here, I have found that JUCE mistakenly classifies Cubase 8.5 as simply Cubase 8.

Since Cubase 8.5 is marketed as a different product, on the same level as Cubase 8 and Cubase 9, I thought it would be a good idea to add an explicit entry for that to PluginHostType.

See my proposed changes:
https://github.com/WeAreROLI/JUCE/pull/255


#2

I’ve updated the above pull request adding the detection of Cubase 9, which was also missing.

Please notice that starting with Cubase 9, the scanning of plug-ins seems to happen using an external executable named “vst2xscanner”, which is located inside the “Cubase 9.app” bundle on macOS, and inside the installation directory “C:\Program Files\Steinberg\Cubase 9” on Windows.

My patch above takes into account that, and also detects that scanner as Cubase 9 because it wouldn’t make sense to have a different behavior if you are running in the scanner rather than into the “real” Cubase 9.


#3

Is there ever an occasion where on Windows hostPath.containsIgnoreCase ("Cubase 9") would be true and we wouldn’t want to report the host as Cubase 9?


#4

I suppose there is no such case, I was just coding defensively in the unlikely case where someone overrides the default installation path and writes there just “Cubase” rather than “Cubase 9”.

In that case, at least the detection of the “real” DAW based on its “Cubase9.exe” name would succeed.

EDIT: I see your point now, adding the check on the name “vst2xscanner.exe” in AND with the check on having found “Cubase 9” in the full path does not really serve any purpose.

I believe it is ok to write simply:

if (hostFilename.containsIgnoreCase ("Cubase9.exe")
    || hostPath.containsIgnoreCase ("Cubase 9")) return SteinbergCubase9;

#5

Thanks for this.

I’ll add these changes to the develop branch shorty.


#6

Thank you.

BTW, something very minor that I noticed just now, the detection of TracktionGeneric in the Windows part is done twice. It’s probably a copy/paste mistake which resulted in a duplicate line, at line 268

    if (hostPath.containsIgnoreCase       ("Tracktion 3"))       return Tracktion3;
    if (hostFilename.containsIgnoreCase   ("Tracktion"))         return TracktionGeneric;
    if (hostFilename.containsIgnoreCase   ("Tracktion"))         return TracktionGeneric;
    if (hostFilename.containsIgnoreCase   ("reaper"))            return Reaper;