|
| 1 | +# Shared MSI packages |
| 2 | + |
| 3 | +This document explains how RHVoice SAPI5 installer executables share |
| 4 | +MSI Packages for Core, Language and Voice, and how to create a |
| 5 | +consistent and maintainable series of SAPI5 installs for your voice. |
| 6 | + |
| 7 | +## What goes into a SAPI5.exe for a voice install? |
| 8 | + |
| 9 | +The exe contains your voice data files, wrapped inside an MSI package. |
| 10 | + |
| 11 | +It must also contain whatever version of the RHVoice language files |
| 12 | +that your voice needs. That set of language files is also wrapped in its |
| 13 | +own MSI package. |
| 14 | + |
| 15 | +And finally, both a 32- and 64-bit versions of the RHVoice Core TTS, |
| 16 | +each in its own MSI package. |
| 17 | + |
| 18 | +## Understanding MSI package versioning. |
| 19 | + |
| 20 | +The four components mentioned above (voice data, language files, and |
| 21 | +two versions of the core), all have their own RHVoice versions, and |
| 22 | +they all have to be compatible with each other. But, in addition to |
| 23 | +taking care of that version control system, you need to be aware of |
| 24 | +MSI package version effects. This is in order for you to upgrade your |
| 25 | +users, or to supply users who have other voices in the same language |
| 26 | +as yours, and who obtained their language files elsewhere than from |
| 27 | +you. |
| 28 | + |
| 29 | +When the Microsoft Installer opens a new package, it checks if it already has the contents of this package installed. Here is where problems could arise. |
| 30 | + |
| 31 | +Every MSI package is assigned a unique package code at build time. If |
| 32 | +the package is removed and then rebuilt without any other changes |
| 33 | +being introduced, with exactly the same contents as before, the newly |
| 34 | +built package file will still have a different package code. |
| 35 | + |
| 36 | +And two packages containing the same version of the same component, |
| 37 | +but having different package codes, will cause an installation error. |
| 38 | + |
| 39 | +For example, you are distributing an upgrade of your voice from your |
| 40 | +version 4.0 to 4.1. You need to include in the exe the other three |
| 41 | +components. Those - the core and the language pack - have not changed. |
| 42 | +But we must make sure that we do not create new MSI packages for them. |
| 43 | +We do not want the installation to fail because, say, the installer |
| 44 | +opens up what looks like a new MSI package for the language, only to |
| 45 | +find that it contains the same version of the language files already |
| 46 | +installed. And thus the whole install fails. You will learn below how |
| 47 | +our exe build script takes care of this. |
| 48 | + |
| 49 | +## Building your voice installers |
| 50 | + |
| 51 | +When you build RHVoice on Windows by executing the `scons` command, |
| 52 | +voice installer executables will be created for all the voices as part |
| 53 | +of the overall build process. |
| 54 | + |
| 55 | +### Which core MSIs will be used |
| 56 | + |
| 57 | +The MSI packages containing the latest stable version of the core are |
| 58 | +published in this repository. They will be used by default. |
| 59 | + |
| 60 | +### MSI packages of languages and voices |
| 61 | + |
| 62 | +This is how the build script will select an appropriate MSI package |
| 63 | +for each voice or language. The paths are relative to the root |
| 64 | +directory of the main RHVoice repository. |
| 65 | + |
| 66 | +1. Read the version number from the corresponding voice.info or |
| 67 | + language.info file. |
| 68 | + |
| 69 | +2. Look for an MSI package with this version number in the |
| 70 | + bin/msi/local directory. Here the build script expects to find your |
| 71 | + locally saved packages from previous builds. Put here your voice |
| 72 | + packages for reuse, as well as your language packages while the |
| 73 | + language is in development and not considered stable. |
| 74 | + |
| 75 | +3. If no package has been found at step 2, the build script looks in |
| 76 | + the bin/msi/shared directory. Here are the public MSI packages |
| 77 | + shared in this repository: the core and the stable versions of the |
| 78 | + languages. |
| 79 | + |
| 80 | +4. If no package has been found at step 3, the script builds a new one |
| 81 | + and saves it in the build/windows/packages/sapi/msi directory. You |
| 82 | + should copy any new packages you or other developers may need in |
| 83 | + the future from this directory right away, as they may be |
| 84 | + overwritten by a future build. |
| 85 | + |
| 86 | +## Your Responsibility for Voice MSI Package versioning. |
| 87 | + |
| 88 | +As a result, one situation where you must take responsibility is when |
| 89 | +you want to give your voice users upgrades to the core or to the |
| 90 | +language, and when the voice itself has not changed. You are the one |
| 91 | +who must supply the MSI package for the voice. You must not supply a |
| 92 | +brand new MSI package for the voice. You must re-use the same MSI |
| 93 | +package you last used to deliver the existing voice version to users. |
| 94 | +Thus, it is imperative that you save each voice MSI Package that you |
| 95 | +distribute. If you do not, and you want to distribute a core or |
| 96 | +language update, you will need to ask your users to first uninstall |
| 97 | +the voice. |
| 98 | + |
| 99 | +## Your responsibility as language developers. |
| 100 | + |
| 101 | +Language developers, please share your stable language MSI packages by |
| 102 | +making a pull request here, so other developers of voices for your |
| 103 | +language can create compatible voice installers. We need your language |
| 104 | +MSI packages, not just the language files. If you have given a voice |
| 105 | +in your language to a SAPI user, and another developer wants to |
| 106 | +distribute a different voice, that developer must include the same MSI |
| 107 | +package of your language, and not just the same version of your |
| 108 | +language files, with their voice, they will need one of your language |
| 109 | +MSI packages. |
0 commit comments