Load MathCAT relative to the app directory (#19230)
<!-- Please read and fill in the following template, for an explanation
of the sections see:
https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/githubPullRequestTemplateExplanationAndExamples.md
Please also note that the NVDA project has a Citizen and Contributor
Code of Conduct which can be found at
https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV
Access expects that all contributors and other community members read
and abide by the rules set out in this document while participating or
contributing to this project. This includes creating or commenting on
issues and pull requests.
Please initially open PRs as a draft.
When you would like a review, mark the PR as "ready for review".
See
https://github.com/nvaccess/nvda/blob/master/.github/CONTRIBUTING.md.
-->
### Link to issue number:
Split from #19227.
### Summary of the issue:
MathCAT is loaded from `sys.prefix`, which does not reliably point to
the MathCAT directory on source copies.
### Description of how this pull request fixes the issue:
The MathCAT path is calculated relative to `globalVars.appDir`.
### Testing strategy:
Verified that MathCAT is usable on source copies.
### Known issues with pull request:
None known
### Code Review Checklist:
<!--
This checklist is a reminder of things commonly forgotten in a new PR.
Authors, please do a self-review of this pull-request.
Check items to confirm you have thought about the relevance of the item.
Where items are missing (eg unit / system tests), please explain in the
PR.
To check an item `- [ ]` becomes `- [x]`, note spacing.
You can also check the checkboxes after the PR is created.
A detailed explanation of this checklist is available here:
https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/githubPullRequestTemplateExplanationAndExamples.md#code-review-checklist
-->
- [n/a] Documentation: (out-of-scope, see #19227)
- Change log entry
- User Documentation
- Developer / Technical Documentation
- Context sensitive help for GUI changes
- [x] Testing:
- Unit tests
- System (end to end) tests
- Manual testing
- [x] UX of all users considered:
- Speech
- Braille
- Low Vision
- Different web browsers
- Localization in other languages / culture than English
- [x] API is compatible with existing add-ons.
- [x] Security precautions taken.