@@ -58,7 +58,7 @@ signtool -K application_private.pem -x 1 -v 0.0.1 \
58
58
The resulting signature block is exported that can then by cut & pasted into the application manifest,
59
59
which you can value add to include a change notice related to the installer release.
60
60
61
- ```
61
+ ``` xml
62
62
<title ></title >
63
63
<link ></link >
64
64
<description ></description >
@@ -76,9 +76,31 @@ which you can value add to include a change notice related to the installer rele
76
76
type =" application/octet-stream" />
77
77
```
78
78
79
- Example application.manifest.
79
+ ### sign application integration
80
+
81
+ To simplifying application integration a customised version of _ signtool_ can be built.
82
+ Using the provided application shim, default arguments can be provided stream-lining software management.
83
+
84
+ ``` C++
85
+ //
86
+ // signtool specialisation
87
+ //
88
+ #include " libappupdater/sign/signtoolshim.h" // SignToolShim()
80
89
90
+ int
91
+ main (int argc, char * argv[ ] )
92
+ {
93
+ struct SignToolArgs args = {0};
94
+
95
+ args.hosturl = "https://github.com/user/repo~application.manifest ";
96
+
97
+ return SignToolShim(argc, argv, &args);
98
+ }
81
99
```
100
+
101
+ ## Example application.manifest
102
+
103
+ ```xml
82
104
<?xml version="1.0" encoding="utf-8"?>
83
105
<manifest>
84
106
<channel name="release">
@@ -127,6 +149,66 @@ ul.b { list-style-type: square; padding: 0px; margin: 0px; }
127
149
</manifest>
128
150
```
129
151
152
+ ### Updater application integration
153
+
154
+ Application integration can be achieved using several methods.
155
+
156
+ - As a stand-alone updater application; or
157
+ - embedded within the target application.
158
+
159
+ Working examples are provided as test applications. For following demonstrates one method
160
+
161
+ #### Standalone integration:
162
+
163
+ ``` C++
164
+ #include " libappupdater/update/updatetoolshim.h" // UpdaterToolShim()
165
+
166
+ #include " version.h" // VERSION_TAG, build-system version.
167
+ #include " private_key.h" // PUBLIC_KEY and KEY_VERSION, see: keygen
168
+
169
+ int
170
+ main (int argc, char * argv[ ] )
171
+ {
172
+ struct UpdateToolArgs args = {0};
173
+
174
+ args.title = "MyApplication updater";
175
+ args.version = VERSION_TAG;
176
+ args.hosturl = "https://github.com/user/repo~application.manifest ";
177
+ args.publickey = PUBLIC_KEY;
178
+ args.keyversion = KEY_VERSION;
179
+
180
+ return UpdateToolShim(argc, argv, &args);
181
+ }
182
+ ```
183
+
184
+ #### Embedded integration:
185
+
186
+ ```C++
187
+ #include "libappupdater/src/AutoUpdater.h" // AutoUpdater
188
+
189
+ #include "version.h" // VERSION_TAG, build-system version.
190
+ #include "private_key.h" // PUBLIC_KEY and KEY_VERSION, see: keygen
191
+
192
+ int
193
+ Application::CheckForUpdates()
194
+ {
195
+ AutoUpdater au;
196
+
197
+ // Note parameters stated either by:
198
+ // o Explicit run-time arguments; or
199
+ // o Application resource elements, alone-side VERSIONINFO information;
200
+ // see AutoConfig.h for further details.
201
+ //
202
+ au.EnableDialog();
203
+ au.AppName("Application Name");
204
+ au.AppVersion(VERSION_TAG);
205
+ au.HostURL("https://github.com/user/repo~application.manifest");
206
+ au.PublicKey(PUBLIC_KEY, KEY_VERSION);
207
+
208
+ au.Execute(AutoUpdater::ExecuteAuto, true);
209
+ }
210
+ ```
211
+
130
212
## License
131
213
132
214
MIT License
@@ -151,4 +233,3 @@ ul.b { list-style-type: square; padding: 0px; margin: 0px; }
151
233
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
152
234
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
153
235
SOFTWARE.
154
-
0 commit comments