dictation-toolbox / natlink

Natlink provides the interface between Dragon and python
Other
25 stars 17 forks source link

Dragon version number code references don't reflect supported versions of Dragon. #159

Closed LexiconCode closed 1 year ago

LexiconCode commented 1 year ago

The hardcoded references in current code base takes place in two aspects of the CodeBase the build system and packaging:

build system

https://github.com/dictation-toolbox/natlink/blob/1cd632478ff28d2c2155f8c9a856b896f7acb02a/NatlinkSource/CMakeLists.txt#L56-L61

Then referenced in the COM as a feature switch

https://github.com/dictation-toolbox/natlink/blob/1cd632478ff28d2c2155f8c9a856b896f7acb02a/NatlinkSource/COM/speech.h#L573-L574

https://github.com/dictation-toolbox/natlink/blob/1cd632478ff28d2c2155f8c9a856b896f7acb02a/NatlinkSource/COM/dspeech.h#L304-L305

Packaging When building a package the code expects dragonversion to be 13 or 15

The BestGuessDragonIniDir updates the global variable dragonversion

https://github.com/dictation-toolbox/natlink/blob/1cd632478ff28d2c2155f8c9a856b896f7acb02a/InstallerSource/inno-code.iss#L15

global variable dragonversion is returned in the following function GetDragonVersion

https://github.com/dictation-toolbox/natlink/blob/1896e74b0a2c6d4ba08550f339a11ec71aed5d4c/InstallerSource/inno-code.iss#L50

GetDragonVersion is used when registering .pyd which must be v13 or v15 as those are the only two filenames that exist. See _natlink_core{code:GetDragonVersion}.pyd below

https://github.com/dictation-toolbox/natlink/blob/1cd632478ff28d2c2155f8c9a856b896f7acb02a/InstallerSource/inno-setup-natlink.iss#L95

There are other places not referenced here but most of them refer to the naming of the .pyd file

Proposed change: packaging Change .pyd naming convention

natlink_core13 would become _natlink_core_legacy supporting DNS 13, 14

_natlink_core15 would become _natlink_core supporting DPI 15 and 16 Proposed change: CodeBase references

CodeBase references would change DRAGON_VERSION string to LEGACY bool

A scenario with a future code breaking change with the new DNS version