sillsdev / SpeechAnalyzer

SIL Speech Analyzer is a Windows program for acoustic analysis of speech sounds.
https://software.sil.org/speech-analyzer/
7 stars 3 forks source link

Update Dev Guide to Show OCX Instructions #109

Closed micahtmaclean closed 1 year ago

micahtmaclean commented 1 year ago

I wrote a section in the dev guide to mention how to register the OCX.

darcywong00 commented 1 year ago

Thanks for the PR. I'm not familiar with OCX, so could you provide some additional info? (either as comments on the PR or in the document). Sorry for so many questions - just wondering the several use-cases.

  1. Which users/developers would need to "register MSHFlexGrid"? Is it every user or just some?
  2. Will this also need be done for build infrastructure / CI? Currently we have GitHub actions building SA and creating the installer
  3. If this is only for developers, maybe we can move the file to its own folder in /DevUtils.
  4. How would a developer maintain/update MSHFLXGD.OCX? (if ever)
  5. Would there ever be a need to "unregister" MSHFLXGD.OCX?
  6. If end-users would need to do this, maybe we bundle the file in the installer?
micahtmaclean commented 1 year ago

OCX and DLL are both file extensions that Microsoft uses for Dynamically Linked Libraries. These are simply libraries that can be used for applications. Previous versions of Windows would have MSHFLXGRD.ocx registered already, but it is no longer installed automatically by Microsoft. That being said Windows 10+ can still use any ocx file that previous generations would have been able to if the user downloads the file and registers it.

In order, response to the comments you had.

  1. MSHFlexGrid is used in the edit formants dialog box allowing for customization of vowels shown based on formant values. Without it the dialog will not open up. Any users that intend to use that feature should register the ocx file.
  2. Since this is a visual component, it should not be required for any GitHub Actions builds.
  3. It is not primarily for devs. I wasn't sure if I should create a user guide for it, since we may want to have it automatically install.
  4. Since MSHFlexGrid is no longer being developed by Microsoft, there wouldn't be any need to update or maintain it. Microsoft likely will not release new versions, however, the ocx should work fine for years to come with the way Windows tries to maintain backwards compatibility.
  5. The main reason that newer computers do not have this specific ocx file is because it is an ActiveX component. ActiveX has some security concerns attached, but I don't think this should be an issue, because browsers should give some warning when a site wants to run an ActiveX component. I don't believe there are any other concerns for registering/deregistering the ocx. However it can be unregistered if someone wants to.
  6. I had thought about doing this but wasn't sure how to because it seemed like the installer was generated by some service rather than manually written. I would appreciate advise on how to do this.
megahirt commented 1 year ago

It sounds like this is a case of a Windows-dependency that Speech Analyzer relies on but that newer versions of Windows no longer have it installed. Thus, I think the installer should register the OCX since users expect the program to just work.

megahirt commented 1 year ago

@micahtmaclean thank you for all of the explanation. I'd like to propose the following changes to this PR:

  1. The OCX folder needs a home besides the repo root. I'm thinking DistFiles or maybe Lib. Ideas @darcywong00 ?
  2. The installer setup should be changed so that this OCX is installed with SA. Users should have to manually do this step, since you've described that it's more or less a harmless addition to Windows.
  3. I'm thinking two additions to https://github.com/sillsdev/SpeechAnalyzer/blob/master/Install/SpeechAnalyzer.iss One addition under [Files] and one under [Run] to register the OCX
micahtmaclean commented 1 year ago

I've done some commits that may be more in line with what you want. I'll PR that and we can continue discussion.