Almost all information about your plugin resides in a manifest file that WinGate parses to determine entry points for your plugin, dependent files that need synchronising between engine and module and to ensure they haven't been tampered with. In order to prepare a manifest file for distribution you need to run the ManifestPrep utility which is found in the tools directory of the SDK.
ManifestPrep essentially does two things:
- Hashes and records information about dependent files.
- Signs the manifest.
Overview
ManifestPrep is a utility that prepares your module's manifest file so that your module can be used with a retail licensed (non-developer) WinGate. The tool generates information about your module, places it into the manifest and signs it. WinGate will then load the manifest file, check that it is signed and validate the information in it against the actual files themselves. If anything is deemed to be suspect then the module will not be loaded.
...
Documentation of the manifest file format is coming soon.
Running ManifestPrep
Run ManifestPrep specifying the path to the manifest file, the output manifest name and the name (or part thereof) of the certificate that you want to use to sign the manifest. e.g.
...
NOTE: When testing your module, if you used the WinGate Module Wizard to register your package with WinGate, then the output name of the manifest MUST be the same as the input name, minus the .XML suffix as demonstrated above. When you create your own installer for your product you can name the manifest anything you wish and place the path to the manifest file in the correct WinGate\Packages key. See below for more information on the Packages key.
%SourceRoot%
Inside the manifest file generated by the WinGate Module Wizard is a <signInfo> node for each file the module depends on. This node is there to assist manifest prep in finding the source file for that dependency. This is typically inside a developer's Release directory. The WinGate Module Wizard generates this node for you if you create your projects with it.
...
Will sign and generate a retail manifest file using "c:\source\MyWinGateModule" as the base path and adding "Release" to that in order to find the correct file.
Deploying your package
Once manifest prep has been successfully run you need to package up the manifest file and the dependency files in your preferred format. Where they are installed is up to your installer and the end user.
NOTE: At present, when you install the files they need to all reside in the same directory as the manifest file; there is no support for sub-directory dependencies.
Getting WinGate to load your modules
In order to get WinGate to load your module(s) you need to add a registry key for the entire package under HKLM\Software\Qbik Software\WinGate\Packages. The name of the key must be the UUID of the package in your manifest file including any braces e.g {05b70dd3-55f0-4958-abc3-15a2aebe5ffe}. The WinGate Module Wizard generates this package UUID for you so you can just look in the raw manifest.xml file to find it.
...
NOTE: The actual dependency files themselves do NOT need to be signed. The manifest file contains all the information it needs to validate the files and ensure they haven't been tampered with.
Other ManifestPrep Options
-L List the available certificates in all system stores
-LS List the available certificate system stores
-P Show progress
-D Show debug information
-S storename Use a specific store (For listing or signing. Default is 'My'
-R rootdirectory Specify the root directory for files usable with %SourceRoot%
...