From 703e03aba33f234712206769f57717ba7d92d23d Mon Sep 17 00:00:00 2001 From: LinuxWizard42 Date: Wed, 12 Oct 2022 22:54:37 +0300 Subject: Added export_allowed file to make repository visible in cgit --- node_modules/rcedit/.circleci/config.yml | 127 +++++++++++++++++++++++++++++++ node_modules/rcedit/.releaserc.json | 8 ++ node_modules/rcedit/CONTRIBUTING.md | 18 +++++ node_modules/rcedit/LICENSE | 20 +++++ node_modules/rcedit/README.md | 43 +++++++++++ node_modules/rcedit/SUPPORT.md | 9 +++ node_modules/rcedit/bin/rcedit-x64.exe | Bin 0 -> 1326592 bytes node_modules/rcedit/bin/rcedit.exe | Bin 0 -> 955904 bytes node_modules/rcedit/lib/index.d.ts | 68 +++++++++++++++++ node_modules/rcedit/lib/rcedit.js | 43 +++++++++++ node_modules/rcedit/package.json | 46 +++++++++++ node_modules/rcedit/tsconfig.eslint.json | 14 ++++ 12 files changed, 396 insertions(+) create mode 100644 node_modules/rcedit/.circleci/config.yml create mode 100644 node_modules/rcedit/.releaserc.json create mode 100644 node_modules/rcedit/CONTRIBUTING.md create mode 100644 node_modules/rcedit/LICENSE create mode 100644 node_modules/rcedit/README.md create mode 100644 node_modules/rcedit/SUPPORT.md create mode 100755 node_modules/rcedit/bin/rcedit-x64.exe create mode 100755 node_modules/rcedit/bin/rcedit.exe create mode 100644 node_modules/rcedit/lib/index.d.ts create mode 100644 node_modules/rcedit/lib/rcedit.js create mode 100644 node_modules/rcedit/package.json create mode 100644 node_modules/rcedit/tsconfig.eslint.json (limited to 'node_modules/rcedit') diff --git a/node_modules/rcedit/.circleci/config.yml b/node_modules/rcedit/.circleci/config.yml new file mode 100644 index 0000000..8c6e6d6 --- /dev/null +++ b/node_modules/rcedit/.circleci/config.yml @@ -0,0 +1,127 @@ +step-env: &step-env + run: + # prevent Wine popup dialogs about installing additional packages + name: Setup Environment Variables + command: | + echo 'export WINEDLLOVERRIDES="mscoree,mshtml="' >> $BASH_ENV + echo 'export WINEDEBUG="-all"' >> $BASH_ENV + +step-restore-brew-cache: &step-restore-brew-cache + restore_cache: + name: Restoring Homebrew cache + paths: + - /usr/local/Homebrew + keys: + - v1-brew-cache-{{ arch }} + +step-save-brew-cache: &step-save-brew-cache + save_cache: + name: Persisting Homebrew cache + paths: + - /usr/local/Homebrew + key: v1-brew-cache-{{ arch }} + +step-restore-cache: &step-restore-cache + restore_cache: + keys: + - v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }} + - v1-dependencies-{{ arch }} + +step-save-cache: &step-save-cache + save_cache: + paths: + - node_modules + key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }} + +step-install-os-dependencies: &step-install-os-dependencies + run: + name: Install OS Dependencies + command: | + case "$(uname)" in + Linux) + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install --no-install-recommends -y wine64 wine32 wine + ;; + Darwin) + brew install --cask xquartz wine-stable + ;; + esac + +steps-linux-win: &steps-linux-win + steps: + - *step-env + - *step-install-os-dependencies + - checkout + - *step-restore-cache + - run: yarn + - *step-save-cache + - run: yarn test + +steps-mac: &steps-mac + steps: + - *step-env + - *step-restore-brew-cache + - *step-install-os-dependencies + - *step-save-brew-cache + - checkout + - *step-restore-cache + - run: yarn + - *step-save-cache + - run: yarn test + +version: 2.1 +orbs: + win: circleci/windows@1.0.0 +jobs: + test-linux-10: + docker: + - image: circleci/node:10 + <<: *steps-linux-win + test-linux-12: + docker: + - image: circleci/node:12 + <<: *steps-linux-win + test-linux-14: + docker: + - image: circleci/node:14 + <<: *steps-linux-win + test-mac: + macos: + xcode: "10.2.0" + <<: *steps-mac + test-windows: + executor: + name: win/vs2019 + shell: bash.exe + <<: *steps-linux-win + + release: + docker: + - image: circleci/node:14.15.1 + steps: + - checkout + - *step-restore-cache + - run: yarn + - run: npx semantic-release +workflows: + version: 2 + test_and_release: + # Run the test jobs first, then the release only when all the test jobs are successful + jobs: + - test-linux-10 + - test-linux-12 + - test-linux-14 + - test-mac + - test-windows + - release: + requires: + - test-linux-10 + - test-linux-12 + - test-linux-14 + - test-mac + - test-windows + filters: + branches: + only: + - master diff --git a/node_modules/rcedit/.releaserc.json b/node_modules/rcedit/.releaserc.json new file mode 100644 index 0000000..6131682 --- /dev/null +++ b/node_modules/rcedit/.releaserc.json @@ -0,0 +1,8 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@continuous-auth/semantic-release-npm", + "@semantic-release/github" + ] +} diff --git a/node_modules/rcedit/CONTRIBUTING.md b/node_modules/rcedit/CONTRIBUTING.md new file mode 100644 index 0000000..a651d50 --- /dev/null +++ b/node_modules/rcedit/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing to `node-rcedit` + +## Code of Conduct + +This project is a part of the Electron ecosystem. As such, all contributions to this project follow [Electron's code of conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) +where appropriate. + +## Bugs / Feature Requests + +Most bugs and feature requests in `node-rcedit` can be attributed to +[`rcedit`](https://github.com/electron/rcedit) itself. Please look in that project's issue tracker +first before filing an issue here. + +## Releases + +`node-rcedit` uses `semantic-release` plus a plugin named "continuous factor authentication" to +publish new releases to NPM. When a pull request is merged, a new release is queued in CircleCI, and +a member of the Electron [Docs & Tools Working Group](https://github.com/electron/governance/tree/master/wg-docs-tools) needs to approve it. diff --git a/node_modules/rcedit/LICENSE b/node_modules/rcedit/LICENSE new file mode 100644 index 0000000..859df54 --- /dev/null +++ b/node_modules/rcedit/LICENSE @@ -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. diff --git a/node_modules/rcedit/README.md b/node_modules/rcedit/README.md new file mode 100644 index 0000000..eee2ce7 --- /dev/null +++ b/node_modules/rcedit/README.md @@ -0,0 +1,43 @@ +# node-rcedit + +[![CircleCI build status](https://circleci.com/gh/electron/node-rcedit/tree/master.svg?style=svg)](https://circleci.com/gh/electron/node-rcedit/tree/master) + +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. + +Returns a `Promise` with no value. + +## Building + +* Clone the repository +* Run `npm install` +* Run `npm test` to run the tests diff --git a/node_modules/rcedit/SUPPORT.md b/node_modules/rcedit/SUPPORT.md new file mode 100644 index 0000000..a24ba70 --- /dev/null +++ b/node_modules/rcedit/SUPPORT.md @@ -0,0 +1,9 @@ +# Support for `node-rcedit` + +## Troubleshooting + +This module uses the [`debug`](https://npm.im/debug) module to print out debugging information. To +use it, consult your operating system's documentation on setting environment variables _([Windows +notes](https://github.com/visionmedia/debug#windows-command-prompt-notes))_. Set the `DEBUG` +environment variable to `rcedit`, and it will print out information, including any `STDERR` output +from `rcedit.exe`/`rcedit-x64.exe`. diff --git a/node_modules/rcedit/bin/rcedit-x64.exe b/node_modules/rcedit/bin/rcedit-x64.exe new file mode 100755 index 0000000..1f4e093 Binary files /dev/null and b/node_modules/rcedit/bin/rcedit-x64.exe differ diff --git a/node_modules/rcedit/bin/rcedit.exe b/node_modules/rcedit/bin/rcedit.exe new file mode 100755 index 0000000..2f6a148 Binary files /dev/null and b/node_modules/rcedit/bin/rcedit.exe differ diff --git a/node_modules/rcedit/lib/index.d.ts b/node_modules/rcedit/lib/index.d.ts new file mode 100644 index 0000000..24c931a --- /dev/null +++ b/node_modules/rcedit/lib/index.d.ts @@ -0,0 +1,68 @@ +/** + * 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 + +/* 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 + } + /** + * 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 + } +} + +export = rcedit diff --git a/node_modules/rcedit/lib/rcedit.js b/node_modules/rcedit/lib/rcedit.js new file mode 100644 index 0000000..b6bd5ce --- /dev/null +++ b/node_modules/rcedit/lib/rcedit.js @@ -0,0 +1,43 @@ +const { canRunWindowsExeNatively, is64BitArch, spawnExe } = require('cross-spawn-windows-exe') +const path = require('path') + +const pairSettings = ['version-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) +} diff --git a/node_modules/rcedit/package.json b/node_modules/rcedit/package.json new file mode 100644 index 0000000..c64638b --- /dev/null +++ b/node_modules/rcedit/package.json @@ -0,0 +1,46 @@ +{ + "name": "rcedit", + "version": "3.0.1", + "description": "Node module to edit resources of exe", + "main": "lib/rcedit.js", + "types": "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", + "rcinfo": "^0.1.3", + "semantic-release": "^17.3.0", + "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" + } +} diff --git a/node_modules/rcedit/tsconfig.eslint.json b/node_modules/rcedit/tsconfig.eslint.json new file mode 100644 index 0000000..bb36caf --- /dev/null +++ b/node_modules/rcedit/tsconfig.eslint.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2018", + "outDir": "dist", + "lib": ["es2018"], + "sourceMap": true, + "rootDir": ".", + "strict": true, + "esModuleInterop": true, + "declaration": true + }, + "include": ["lib/index.d.ts", "test/index.test-d.ts"] +} -- cgit v1.2.3-86-g962b