unfix: add some bugs
呃这个可能有点炸了
This commit is contained in:
20
WordDictationStudentApp/node_modules/rcedit/LICENSE
generated
vendored
Normal file
20
WordDictationStudentApp/node_modules/rcedit/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 GitHub, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
46
WordDictationStudentApp/node_modules/rcedit/README.md
generated
vendored
Normal file
46
WordDictationStudentApp/node_modules/rcedit/README.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# node-rcedit
|
||||
|
||||
[](https://circleci.com/gh/electron/node-rcedit/tree/master)
|
||||
[](https://npm.im/rcedit)
|
||||
|
||||
Node module to edit resources of Windows executables.
|
||||
|
||||
## Requirements
|
||||
|
||||
On platforms other than Windows, you will need to have [Wine](https://winehq.org)
|
||||
1.6 or later installed and in the system path.
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
const rcedit = require('rcedit')
|
||||
```
|
||||
|
||||
### `async rcedit(exePath, options)`
|
||||
|
||||
`exePath` is the path to the Windows executable to be modified.
|
||||
|
||||
`options` is an object that can contain following fields:
|
||||
|
||||
* `version-string` - An object containing properties to change the `exePath`'s
|
||||
version string.
|
||||
* `file-version` - File's version to change to.
|
||||
* `product-version` - Product's version to change to.
|
||||
* `icon` - Path to the icon file (`.ico`) to set as the `exePath`'s default icon.
|
||||
* `requested-execution-level` - Requested execution level to change to, must be
|
||||
either `asInvoker`, `highestAvailable`, or `requireAdministrator`. See
|
||||
[here](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) for
|
||||
more details.
|
||||
* `application-manifest` - String path to a local manifest file to use.
|
||||
See [here](https://msdn.microsoft.com/en-us/library/windows/desktop/aa374191.aspx)
|
||||
for more details.
|
||||
* `resource-string` - An object in the form of `{ [id]: value }` to add to the
|
||||
[string table](https://docs.microsoft.com/en-us/windows/win32/menurc/stringtable-resource).
|
||||
|
||||
Returns a `Promise` with no value.
|
||||
|
||||
## Building
|
||||
|
||||
* Clone the repository
|
||||
* Run `yarn install`
|
||||
* Run `yarn test` to run the tests
|
||||
BIN
WordDictationStudentApp/node_modules/rcedit/bin/rcedit-x64.exe
generated
vendored
Executable file
BIN
WordDictationStudentApp/node_modules/rcedit/bin/rcedit-x64.exe
generated
vendored
Executable file
Binary file not shown.
BIN
WordDictationStudentApp/node_modules/rcedit/bin/rcedit.exe
generated
vendored
Executable file
BIN
WordDictationStudentApp/node_modules/rcedit/bin/rcedit.exe
generated
vendored
Executable file
Binary file not shown.
79
WordDictationStudentApp/node_modules/rcedit/lib/index.d.ts
generated
vendored
Normal file
79
WordDictationStudentApp/node_modules/rcedit/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Runs the `rcedit` Windows binary (via Wine on macOS/Linux) to modify the metadata of a
|
||||
* Windows executable.
|
||||
*
|
||||
* @param exePath - the path to the Windows executable to be modified
|
||||
* @param options - metadata used to update the Windows executable
|
||||
*/
|
||||
declare function rcedit (exePath: string, options: rcedit.Options): Promise<void>
|
||||
|
||||
/* eslint-disable-next-line no-redeclare */
|
||||
declare namespace rcedit {
|
||||
/** See [MSDN](https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevel) for details. */
|
||||
type RequestedExecutionLevel = 'asInvoker' | 'highestAvailable' | 'requireAdministrator'
|
||||
/**
|
||||
* Basic user-supplied metadata embedded in the application. Docstrings are copied from MSDN.
|
||||
*
|
||||
* See [MSDN](https://docs.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block) for details.
|
||||
*/
|
||||
interface VersionStringOptions {
|
||||
/** Additional information that should be displayed for diagnostic purposes. */
|
||||
Comments?: string
|
||||
/** Company that produced the executable. */
|
||||
CompanyName?: string
|
||||
/** File description to be presented to users. */
|
||||
FileDescription?: string
|
||||
/** Internal name of the file. Usually, this string should be the original filename, without the extension. */
|
||||
InternalFilename?: string
|
||||
/** Copyright notices that apply, including the full text of all notices, legal symbols, copyright dates, etc. */
|
||||
LegalCopyright?: string
|
||||
/** Trademarks and registered trademarks, including the full text of all notices, legal symbols, trademark numbers, etc. */
|
||||
LegalTrademarks1?: string
|
||||
/** Trademarks and registered trademarks, including the full text of all notices, legal symbols, trademark numbers, etc. */
|
||||
LegalTrademarks2?: string
|
||||
/** Original name of the file, not including a path. */
|
||||
OriginalFilename?: string
|
||||
/** Name of the product with which the file is distributed. */
|
||||
ProductName?: string
|
||||
}
|
||||
/**
|
||||
* Resource strings. See [string table](https://docs.microsoft.com/en-us/windows/win32/menurc/stringtable-resource)
|
||||
* for details.
|
||||
*/
|
||||
interface ResourceStrings {
|
||||
[n: number]: string
|
||||
}
|
||||
/**
|
||||
* EXE metadata that can be changed.
|
||||
*/
|
||||
interface Options {
|
||||
/** The metadata within a version-information resource. */
|
||||
'version-string'?: VersionStringOptions
|
||||
/**
|
||||
* See [MSDN](https://docs.microsoft.com/en-us/windows/win32/msi/version) for the version format.
|
||||
*/
|
||||
'file-version'?: string
|
||||
/**
|
||||
* See [MSDN](https://docs.microsoft.com/en-us/windows/win32/msi/version) for the version format.
|
||||
*/
|
||||
'product-version'?: string
|
||||
/**
|
||||
* Absolute path to the [ICO-formatted icon](https://en.wikipedia.org/wiki/ICO_(file_format))
|
||||
* to set as the application's icon.
|
||||
*/
|
||||
icon?: string
|
||||
/** See [MSDN](https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevel) for details. */
|
||||
'requested-execution-level'?: RequestedExecutionLevel
|
||||
/**
|
||||
* The path to the [application manifest](https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests)
|
||||
* XML that is to be embedded in the EXE.
|
||||
*/
|
||||
'application-manifest'?: string
|
||||
/**
|
||||
* Set resource strings.
|
||||
*/
|
||||
'resource-string'?: ResourceStrings
|
||||
}
|
||||
}
|
||||
|
||||
export = rcedit
|
||||
43
WordDictationStudentApp/node_modules/rcedit/lib/rcedit.js
generated
vendored
Normal file
43
WordDictationStudentApp/node_modules/rcedit/lib/rcedit.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
const { canRunWindowsExeNatively, is64BitArch, spawnExe } = require('cross-spawn-windows-exe')
|
||||
const path = require('path')
|
||||
|
||||
const pairSettings = ['version-string', 'resource-string']
|
||||
const singleSettings = ['file-version', 'product-version', 'icon', 'requested-execution-level']
|
||||
const noPrefixSettings = ['application-manifest']
|
||||
|
||||
module.exports = async (exe, options) => {
|
||||
const rceditExe = is64BitArch(process.arch) ? 'rcedit-x64.exe' : 'rcedit.exe'
|
||||
const rcedit = path.resolve(__dirname, '..', 'bin', rceditExe)
|
||||
const args = [exe]
|
||||
|
||||
for (const name of pairSettings) {
|
||||
if (options[name]) {
|
||||
for (const [key, value] of Object.entries(options[name])) {
|
||||
args.push(`--set-${name}`, key, value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const name of singleSettings) {
|
||||
if (options[name]) {
|
||||
args.push(`--set-${name}`, options[name])
|
||||
}
|
||||
}
|
||||
|
||||
for (const name of noPrefixSettings) {
|
||||
if (options[name]) {
|
||||
args.push(`--${name}`, options[name])
|
||||
}
|
||||
}
|
||||
|
||||
const spawnOptions = {
|
||||
env: { ...process.env }
|
||||
}
|
||||
|
||||
if (!canRunWindowsExeNatively()) {
|
||||
// Suppress "fixme:" stderr log messages
|
||||
spawnOptions.env.WINEDEBUG = '-all'
|
||||
}
|
||||
|
||||
await spawnExe(rcedit, args, spawnOptions)
|
||||
}
|
||||
48
WordDictationStudentApp/node_modules/rcedit/package.json
generated
vendored
Normal file
48
WordDictationStudentApp/node_modules/rcedit/package.json
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "rcedit",
|
||||
"version": "3.1.0",
|
||||
"description": "Node module to edit resources of exe",
|
||||
"main": "lib/rcedit.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"files": [
|
||||
"bin",
|
||||
"lib/index.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"docs:build": "node script/build-docs.js",
|
||||
"mocha": "mocha test/*.js",
|
||||
"test": "npm run lint && npm run tsd && npm run mocha",
|
||||
"lint": "npm run lint:js && npm run lint:ts",
|
||||
"lint:js": "standard",
|
||||
"lint:ts": "ts-standard",
|
||||
"tsd": "tsd"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/electron/node-rcedit.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/electron/node-rcedit/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn-windows-exe": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@continuous-auth/semantic-release-npm": "^2.0.0",
|
||||
"got": "^11.8.0",
|
||||
"mocha": "^8.2.1",
|
||||
"standard": "^16.0.3",
|
||||
"temp": "^0.9.4",
|
||||
"ts-standard": "^10.0.0",
|
||||
"tsd": "^0.14.0",
|
||||
"typedoc": "^0.20.0-beta.27",
|
||||
"typescript": "^4.1.2"
|
||||
},
|
||||
"tsd": {
|
||||
"directory": "test"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user