You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition, 'allicon'/'allIcon' and 'allcursor'/'allCursor' can also be used
143
+
for --delete-xxxxx (e.g. --delete-allicon).
116
144
```
117
145
118
146
### Main options
@@ -277,13 +305,61 @@ Note: The value from `--lang` will be used as the language for all resources. To
277
305
278
306
Specifies any resource data to contain. `<data>` must be either `<type>,<ID>,<string-value>` or `<type>,<ID>,@<file-name>`, whose values are as followings:
279
307
280
-
-`<type>` : Resource type value which must be integer or string. This tool does not convert the type value to commonly-used type identifier (e.g. specify `24` value for `RT_MANIFEST`, not specify `"RT_MANIFEST"`)
308
+
-`<type>` : Resource type value which must be integer or string. This tool does not convert the type value to commonly-used type identifier (e.g. specify `24` value for `RT_MANIFEST`, not specify `"RT_MANIFEST"`). To use commonly name, use `--raw2` instead.
309
+
-`<ID>` : Resource ID value which must be integer or string.
310
+
-`<string-value>` : Actual resource data. The value will be stored as UTF-8 string data.
311
+
-`@<file-name>` : File name containing data for the resource. `@` character must be followed by the file name.
312
+
313
+
This option can be specified one or more.
314
+
315
+
#### `--raw2 <data>`
316
+
317
+
-`string`
318
+
319
+
Specifies any resource data to contain. Similar to `--raw`, but `<type>` will be `<typeName>`, which must be the predefined type name, instead.
320
+
321
+
`<data>` must be either `<typeName>,<ID>,<string-value>` or `<typeName>,<ID>,@<file-name>`, whose values are as followings:
-`<ID>` : Resource ID value which must be integer or string.
282
325
-`<string-value>` : Actual resource data. The value will be stored as UTF-8 string data.
283
326
-`@<file-name>` : File name containing data for the resource. `@` character must be followed by the file name.
284
327
285
328
This option can be specified one or more.
286
329
330
+
### Delete options
331
+
332
+
If following options are used, appropriate resources are deleted first, and adding/replacing operations will be performed.
333
+
334
+
#### `--delete <data>`
335
+
336
+
-`string`
337
+
338
+
Specifies resource data to delete. `<data>` must be `<type>` or `<type>,<ID>`, whose values are as followings:
339
+
340
+
-`<type>` : Resource type value which must be integer or string. This tool does not convert the type value to commonly-used type identifier (e.g. specify `24` value for `RT_MANIFEST`, not specify `"RT_MANIFEST"`). To use commonly name, use `--delete-xxxxx` instead.
341
+
-`<ID>` : (optional) Resource ID value which must be integer or string. `,<ID>` can be omitted; in this case, all resources with the type will be deleted.
342
+
343
+
Note that `--lang` value is ignored for deletion.
344
+
345
+
#### `--delete-xxxxx [<ID>]`
346
+
347
+
-`string`
348
+
349
+
Specifies resource data to delete by type. `xxxxx` is a placeholder (see below). `[<ID>]` is a resource ID value, which must be integer or string, to delete. If omitted, all resources with the type will be deleted.
350
+
351
+
`xxxxx` must be the predefined names as: `accelerator`, `anicursor`, `aniCursor`, `aniicon`, `aniIcon`, `bitmap`, `cursor`, `dialog`, `dlginclude`, `dlgInclude`, `font`, `fontdir`, `fontDir`, `groupcursor`, `groupCursor`, `groupicon`, `groupIcon`, `html`, `icon`, `manifest`, `menu`, `messagetable`, `messageTable`, `plugplay`, `plugPlay`, `rcdata`, `rcData`, `string`, `version`, `vxd` (these are equal to the name available in `--raw2`).
352
+
353
+
Additionally, `allicon`, `allIcon`, `allcursor`, `allCursor` can be used for `xxxxx`. `allicon` and `allIcon` deletes `icon`, `groupIcon`, and `aniIcon`, and `allcursor` and `allCursor` deletes `cursor`, `groupCursor`, and `aniCursor`.
354
+
355
+
Note that `--lang` value is ignored for deletion.
356
+
357
+
#### `--fail-if-no-delete`
358
+
359
+
- Flag (`boolean`)
360
+
361
+
If specified, and the resource data to be deleted does not exist, the tool will fail.
362
+
287
363
### Signing options
288
364
289
365
#### `--sign`
@@ -363,7 +439,7 @@ Specifies an algorithm for generating digest. Some algorithms are available only
363
439
364
440
Specifies a URL of the Time Stamping Authority (TSA), to add a time-stamp information for signed binary. The server must accept and response Time-Stamp Protocol (TSP) based on RFC 3161.
365
441
366
-
By default Node.js `http` or `https` module will be used for connection, but you can use [request](https://www.npmjs.com/package/request) module or [node-fetch](https://www.npmjs.com/package/node-fetch) by installing it manually as followings:
442
+
By default Node.js native `fetch`, or `http` or `https` module will be used for connection, but you can use [request](https://www.npmjs.com/package/request) module or [node-fetch](https://www.npmjs.com/package/node-fetch) by installing it manually as followings:
> - For `request`, at least `request@2.88.0` is expected. If less than 2.88.0, a warning log will be printed.
375
451
> - For `node-fetch`, `node-fetch@3` is expected. You can instead set `global.fetch` variable with a valid function. This means that you can use another `fetch` library such as `isomorphic-fetch`.
376
-
> - Currently if both `request` and fetch are available, `request` is used.
452
+
> - Currently if both `request` and fetch are available, fetch is used.
377
453
378
454
By installing one of them, you can connect to the server with features that those module supports, such as with a HTTP proxy. (If those modules are not installed, HTTP proxies cannot be used.)
379
455
@@ -458,9 +534,9 @@ version:
458
534
productVersion: 2.3.0.0
459
535
```
460
536
461
-
As JS file:
537
+
As JS file (.mjs):
462
538
463
-
```js
539
+
```mjs
464
540
import * as path from 'path';
465
541
466
542
// a user-defined function to retrieve data asynchronously
@@ -496,9 +572,11 @@ async function loadDefintion() {
496
572
}
497
573
498
574
// Since cosmiconfig supports, you can export 'Promise' object.
499
-
module.exports = loadDefintion();
575
+
export default loadDefintion();
500
576
```
501
577
578
+
> .cjs is still supported.
579
+
502
580
## APIs
503
581
504
582
This tool is created for the command line tool, but you can also use this as a Node.js library.
0 commit comments