# Proper detection of Cubase version

**URL:** https://forum.juce.com/t/proper-detection-of-cubase-version/23952
**Category:** Audio Plugins
**Created:** [August 29, 2017, 2:24pm UTC](https://forum.juce.com/t/proper-detection-of-cubase-version/23952 "2017-08-29T14:24:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)
#### Post date: [August 29, 2017, 2:24pm UTC](https://forum.juce.com/t/proper-detection-of-cubase-version/23952/1 "2017-08-29T14:24:29Z")

</div>

As a side effect of my investigations reported [here](https://forum.juce.com/t/issues-with-version-integer-reported-by-vst2/23867), 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](https://github.com/WeAreROLI/JUCE/pull/255)

---

<div class="post-metadata">

### Author: ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)
#### Post date: [August 30, 2017, 10:47am UTC](https://forum.juce.com/t/proper-detection-of-cubase-version/23952/2 "2017-08-30T10:47:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)
#### Post date: [August 30, 2017, 1:55pm UTC](https://forum.juce.com/t/proper-detection-of-cubase-version/23952/3 "2017-08-30T13:55:50Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)
#### Post date: [August 30, 2017, 1:59pm UTC](https://forum.juce.com/t/proper-detection-of-cubase-version/23952/4 "2017-08-30T13:59:53Z")

</div>

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;
```

---

<div class="post-metadata">

### Author: ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)
#### Post date: [August 30, 2017, 2:14pm UTC](https://forum.juce.com/t/proper-detection-of-cubase-version/23952/5 "2017-08-30T14:14:25Z")

</div>

Thanks for this.

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

---

<div class="post-metadata">

### Author: ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)
#### Post date: [August 30, 2017, 2:56pm UTC](https://forum.juce.com/t/proper-detection-of-cubase-version/23952/6 "2017-08-30T14:56:30Z")

</div>

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;
```
