Showing preview only (980K chars total). Download the full file or copy to clipboard to get everything.
Repository: crabnebula-dev/cargo-packager
Branch: main
Commit: 37a538e76608
Files: 273
Total size: 896.3 KB
Directory structure:
gitextract_z80xgfak/
├── .changes/
│ ├── config.json
│ └── readme.md
├── .github/
│ └── workflows/
│ ├── audit.yml
│ ├── build-examples.yml
│ ├── check-nodejs-bindings.yml
│ ├── check.yml
│ ├── covector-status.yml
│ ├── covector-version-or-publish.yml
│ ├── integration-tests.yml
│ ├── publish-packager-nodejs.yml
│ ├── publish-packager-resource-resolver-nodejs.yml
│ └── publish-updater-nodejs.yml
├── .gitignore
├── .npmrc
├── .prettierignore
├── Cargo.toml
├── LICENSE.spdx
├── LICENSE_APACHE-2.0
├── LICENSE_MIT
├── README.md
├── SECURITY.md
├── bindings/
│ ├── packager/
│ │ └── nodejs/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── .npmignore
│ │ ├── .npmrc
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── __test__/
│ │ │ └── index.spec.mjs
│ │ ├── build.rs
│ │ ├── generate-config-type.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── npm/
│ │ │ ├── darwin-arm64/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── darwin-x64/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-arm-gnueabihf/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-arm64-gnu/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-arm64-musl/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-x64-gnu/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-x64-musl/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── win32-arm64-msvc/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── win32-ia32-msvc/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ └── win32-x64-msvc/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── package.json
│ │ ├── packager.js
│ │ ├── schema.json
│ │ ├── src/
│ │ │ └── lib.rs
│ │ ├── src-ts/
│ │ │ ├── config.d.ts
│ │ │ ├── index.ts
│ │ │ └── plugins/
│ │ │ ├── electron/
│ │ │ │ ├── index.ts
│ │ │ │ └── prune.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── resource-resolver/
│ │ └── nodejs/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── __test__/
│ │ │ └── index.spec.mjs
│ │ ├── build.rs
│ │ ├── fix-types.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── npm/
│ │ │ ├── darwin-arm64/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── darwin-x64/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-arm-gnueabihf/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-arm64-gnu/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-arm64-musl/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-x64-gnu/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── linux-x64-musl/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── win32-arm64-msvc/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── win32-ia32-msvc/
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ └── win32-x64-msvc/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── package.json
│ │ └── src/
│ │ └── lib.rs
│ └── updater/
│ └── nodejs/
│ ├── .cargo/
│ │ └── config.toml
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── __test__/
│ │ ├── app/
│ │ │ ├── index.html
│ │ │ ├── main.js
│ │ │ ├── package.json
│ │ │ └── preload.js
│ │ └── index.spec.mjs
│ ├── build.rs
│ ├── index.d.ts
│ ├── index.js
│ ├── npm/
│ │ ├── darwin-arm64/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── darwin-x64/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── linux-arm-gnueabihf/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── linux-arm64-gnu/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── linux-arm64-musl/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── linux-x64-gnu/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── linux-x64-musl/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── win32-arm64-msvc/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ ├── win32-ia32-msvc/
│ │ │ ├── README.md
│ │ │ └── package.json
│ │ └── win32-x64-msvc/
│ │ ├── README.md
│ │ └── package.json
│ ├── package.json
│ └── src/
│ ├── from_impls.rs
│ └── lib.rs
├── crates/
│ ├── config-schema-generator/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── main.rs
│ ├── packager/
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── LICENSE_APACHE-2.0
│ │ ├── LICENSE_MIT
│ │ ├── README.md
│ │ ├── schema.json
│ │ └── src/
│ │ ├── bin/
│ │ │ └── cargo-packager.rs
│ │ ├── cli/
│ │ │ ├── config.rs
│ │ │ ├── error.rs
│ │ │ ├── mod.rs
│ │ │ └── signer/
│ │ │ ├── generate.rs
│ │ │ ├── mod.rs
│ │ │ └── sign.rs
│ │ ├── codesign/
│ │ │ ├── macos.rs
│ │ │ ├── mod.rs
│ │ │ └── windows.rs
│ │ ├── config/
│ │ │ ├── builder.rs
│ │ │ ├── category.rs
│ │ │ └── mod.rs
│ │ ├── error.rs
│ │ ├── lib.rs
│ │ ├── package/
│ │ │ ├── app/
│ │ │ │ └── mod.rs
│ │ │ ├── appimage/
│ │ │ │ ├── appimage
│ │ │ │ └── mod.rs
│ │ │ ├── context.rs
│ │ │ ├── deb/
│ │ │ │ ├── main.desktop
│ │ │ │ └── mod.rs
│ │ │ ├── dmg/
│ │ │ │ ├── eula-resources-template.xml
│ │ │ │ ├── mod.rs
│ │ │ │ └── template.applescript
│ │ │ ├── mod.rs
│ │ │ ├── nsis/
│ │ │ │ ├── FileAssociation.nsh
│ │ │ │ ├── installer.nsi
│ │ │ │ ├── languages/
│ │ │ │ │ ├── Arabic.nsh
│ │ │ │ │ ├── Bulgarian.nsh
│ │ │ │ │ ├── Dutch.nsh
│ │ │ │ │ ├── English.nsh
│ │ │ │ │ ├── French.nsh
│ │ │ │ │ ├── Japanese.nsh
│ │ │ │ │ ├── Korean.nsh
│ │ │ │ │ ├── Persian.nsh
│ │ │ │ │ ├── PortugueseBR.nsh
│ │ │ │ │ ├── SimpChinese.nsh
│ │ │ │ │ ├── Spanish.nsh
│ │ │ │ │ ├── SpanishInternational.nsh
│ │ │ │ │ ├── Swedish.nsh
│ │ │ │ │ ├── TradChinese.nsh
│ │ │ │ │ └── Turkish.nsh
│ │ │ │ └── mod.rs
│ │ │ ├── pacman/
│ │ │ │ └── mod.rs
│ │ │ └── wix/
│ │ │ ├── default-locale-strings.xml
│ │ │ ├── languages.json
│ │ │ ├── main.wxs
│ │ │ └── mod.rs
│ │ ├── shell.rs
│ │ ├── sign.rs
│ │ └── util.rs
│ ├── resource-resolver/
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── error.rs
│ │ └── lib.rs
│ ├── updater/
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── src/
│ │ │ ├── custom_serialization.rs
│ │ │ ├── error.rs
│ │ │ └── lib.rs
│ │ └── tests/
│ │ ├── app/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── main.rs
│ │ ├── dummy.key
│ │ ├── dummy.pub.key
│ │ └── update.rs
│ └── utils/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── current_exe.rs
│ └── lib.rs
├── deny.toml
├── examples/
│ ├── deno/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── deno-example.js
│ │ └── packager.json
│ ├── dioxus/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── egui/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── electron/
│ │ ├── .gitignore
│ │ ├── index.html
│ │ ├── main.js
│ │ ├── package.json
│ │ └── preload.js
│ ├── slint/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── src/
│ │ │ └── main.rs
│ │ └── ui/
│ │ └── appwindow.slint
│ ├── tauri/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── capabilities/
│ │ │ └── base.json
│ │ ├── dummy.key
│ │ ├── dummy.pub.key
│ │ ├── icons/
│ │ │ └── icon.icns
│ │ ├── src/
│ │ │ └── main.rs
│ │ ├── src-ui/
│ │ │ ├── index.html
│ │ │ ├── main.js
│ │ │ └── styles.css
│ │ └── tauri.conf.json
│ ├── wails/
│ │ ├── .gitignore
│ │ ├── Packager.toml
│ │ ├── README.md
│ │ ├── app.go
│ │ ├── build.sh
│ │ ├── frontend/
│ │ │ ├── app.css
│ │ │ ├── index.html
│ │ │ ├── main.js
│ │ │ ├── style.css
│ │ │ └── wailsjs/
│ │ │ ├── go/
│ │ │ │ └── main/
│ │ │ │ ├── App.d.ts
│ │ │ │ └── App.js
│ │ │ └── runtime/
│ │ │ ├── package.json
│ │ │ ├── runtime.d.ts
│ │ │ └── runtime.js
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main.go
│ │ └── wails.json
│ └── wry/
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── main.rs
├── package.json
├── pnpm-workspace.yaml
└── renovate.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .changes/config.json
================================================
{
"gitSiteUrl": "https://www.github.com/crabnebula-dev/cargo-packager",
"timeout": 3600000,
"pkgManagers": {
"rust": {
"version": true,
"getPublishedVersion": {
"use": "fetch:check",
"options": {
"url": "https://crates.io/api/v1/crates/${ pkg.pkg }/${ pkg.pkgFile.version }"
}
},
"postversion": [
{
"command": "cargo generate-lockfile",
"dryRunCommand": true,
"runFromRoot": true,
"pipe": false
}
],
"prepublish": [
{
"command": "cargo generate-lockfile",
"dryRunCommand": true,
"runFromRoot": true,
"pipe": false
}
],
"publish": [
{
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "cargo publish",
"dryRunCommand": "cargo publish --dry-run",
"pipe": true
},
{
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
],
"postpublish": [
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor } -f",
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor }.${ pkgFile.versionMinor } -f",
"git push --tags -f"
]
},
"javascript": {
"version": true,
"getPublishedVersion": {
"use": "fetch:check",
"options": {
"url": "https://registry.npmjs.com/${ pkg.pkg }/${ pkg.pkgFile.version }"
}
},
"prepublish": [
{
"command": "pnpm install",
"dryRunCommand": true
},
{
"command": "echo '<details>\n<summary><em><h4>PNPM Audit</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "pnpm audit",
"dryRunCommand": true,
"runFromRoot": true,
"pipe": true
},
{
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "npm pack",
"dryRunCommand": true
}
],
"publish": [
"sleep 15s",
{
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "pnpm publish --access public",
"dryRunCommand": "npm publish --dry-run --access public",
"pipe": true
},
{
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
],
"postpublish": [
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor } -f",
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor }.${ pkgFile.versionMinor } -f",
"git push --tags -f"
]
}
},
"packages": {
"cargo-packager-utils": {
"path": "./crates/utils",
"manager": "rust"
},
"cargo-packager": {
"path": "./crates/packager",
"manager": "rust",
"dependencies": ["cargo-packager-utils"]
},
"@crabnebula/packager": {
"path": "./bindings/packager/nodejs",
"manager": "javascript",
"dependencies": ["cargo-packager", "cargo-packager-utils"],
"prepublish": [],
"publish": [],
"postpublish": []
},
"cargo-packager-updater": {
"path": "./crates/updater",
"dependencies": ["cargo-packager-utils"],
"manager": "rust"
},
"@crabnebula/updater": {
"path": "./bindings/updater/nodejs",
"manager": "javascript",
"dependencies": ["cargo-packager-updater", "cargo-packager-utils"],
"prepublish": [],
"publish": [],
"postpublish": []
},
"cargo-packager-resource-resolver": {
"path": "./crates/resource-resolver",
"dependencies": ["cargo-packager-utils"],
"manager": "rust"
},
"@crabnebula/packager-resource-resolver": {
"path": "./bindings/resource-resolver/nodejs",
"manager": "javascript",
"dependencies": [
"cargo-packager-resource-resolver",
"cargo-packager-utils"
],
"prepublish": [],
"publish": [],
"postpublish": []
}
}
}
================================================
FILE: .changes/readme.md
================================================
# Changes
##### via https://github.com/jbolda/covector
As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend it represents the overall change for our sanity.
When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
Use the following format:
```md
---
"cargo-packager": patch
---
Change summary goes here
```
Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.
Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).
================================================
FILE: .github/workflows/audit.yml
================================================
name: Audit Rust
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
paths:
- ".github/workflows/audit.yml"
- "**/Cargo.lock"
- "**/Cargo.toml"
pull_request:
branches:
- main
paths:
- ".github/workflows/audit.yml"
- "**/Cargo.lock"
- "**/Cargo.toml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/build-examples.yml
================================================
name: Package examples
on:
pull_request:
branches:
- main
paths:
- ".github/workflows/build-examples.yml"
- "crates/**"
- "examples/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
package:
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
- name: install webkit2gtk
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 webkit2gtk-4.0 libayatana-appindicator3-dev libxdo-dev
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-go@v6
with:
go-version: "stable"
- uses: denoland/setup-deno@v1
- uses: Swatinem/rust-cache@v2
- run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- run: cargo install cargo-binstall --locked
- run: cargo binstall tauri-cli --locked --force
- run: cargo r --package cargo-packager -- signer generate --password '123' --path ./signing-key -vvv
- run: cargo r --package cargo-packager -- --release --private-key ./signing-key --password '123' --formats all -vvv
================================================
FILE: .github/workflows/check-nodejs-bindings.yml
================================================
name: Check Node.js bindings
on:
push:
branches:
- main
paths:
- ".github/workflows/check-nodejs-bindings.yml"
- "crates/packager/**"
- "crates/updater/**"
- "crates/resource-resolver/**"
- "bindings/*/nodejs/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/check-nodejs-bindings.yml"
- "crates/packager/**"
- "crates/updater/**"
- "crates/resource-resolver/**"
- "bindings/*/nodejs/**"
env:
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v6
- uses: Swatinem/rust-cache@v2
- run: pnpm install
- run: pnpm build
================================================
FILE: .github/workflows/check.yml
================================================
name: Check
on:
push:
branches:
- main
paths:
- ".github/workflows/check.yml"
- "**/*.rs"
- "**/Cargo.toml"
pull_request:
branches:
- main
paths:
- ".github/workflows/check.yml"
- "**/*.rs"
- "**/Cargo.toml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
prettier:
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm install
- run: pnpm format:check
rustfmt:
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: install webkit2gtk
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libxdo-dev
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
rust-test:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
- name: install webkit2gtk
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libxdo-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace --lib --bins --tests --benches --all-features --no-fail-fast
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: EmbarkStudios/cargo-deny-action@v2
================================================
FILE: .github/workflows/covector-status.yml
================================================
name: Covector Status
on: [pull_request]
jobs:
covector:
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: covector status
uses: jbolda/covector/packages/action@covector-v0
id: covector
with:
command: "status"
================================================
FILE: .github/workflows/covector-version-or-publish.yml
================================================
name: Covector Version or Publish
on:
push:
branches:
- main
jobs:
version-or-publish:
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: cargo login
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0
id: covector
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "version-or-publish"
createRelease: true
- name: Create Pull Request With Versions Bumped
if: steps.covector.outputs.commandRan == 'version'
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: release/version-updates
title: "release: apply version updates from current changes"
commit-message: "release: apply version updates from current changes"
labels: "version updates"
body: ${{ steps.covector.outputs.change }}
sign-commits: true
- name: Trigger `@crabnebula/packager` publishing workflow
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, '@crabnebula/packager')
uses: peter-evans/repository-dispatch@v3
with:
event-type: publish-packager-nodejs
client-payload: >-
{"releaseId": "${{ steps.covector.outputs['-crabnebula-packager-releaseId'] }}" }
- name: Trigger `@crabnebula/updater` publishing workflow
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, '@crabnebula/updater')
uses: peter-evans/repository-dispatch@v3
with:
event-type: publish-updater-nodejs
client-payload: >-
{"releaseId": "${{ steps.covector.outputs['-crabnebula-updater-releaseId'] }}" }
- name: Trigger `@crabnebula/packager-resource-resolver` publishing workflow
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, '@crabnebula/packager-resource-resolver')
uses: peter-evans/repository-dispatch@v3
with:
event-type: publish-packager-resource-resolver-nodejs
client-payload: >-
{"releaseId": "${{ steps.covector.outputs['-crabnebula-packager-resource-resolver-releaseId'] }}" }
================================================
FILE: .github/workflows/integration-tests.yml
================================================
name: integration tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-rust:
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: install fuse
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y fuse libfuse2
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --test '*' -- --ignored --nocapture
test-nodejs:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v6
- uses: Swatinem/rust-cache@v2
- run: pnpm install
- run: pnpm build
- name: packager integration tests
run: |
cd bindings/packager/nodejs
pnpm test
timeout-minutes: 30
- name: install fuse
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y fuse libfuse2
- name: updater integration tests
run: |
cd bindings/updater/nodejs
pnpm test
timeout-minutes: 30
================================================
FILE: .github/workflows/publish-packager-nodejs.yml
================================================
name: Publish `@crabnebula/packager`
env:
DEBUG: napi:*
APP_NAME: packager
MACOSX_DEPLOYMENT_TARGET: "10.13"
permissions:
contents: write
id-token: write
on:
workflow_dispatch:
inputs:
releaseId:
description: "ID of the `@crabnebula/packager` release"
required: true
repository_dispatch:
types: [publish-packager-nodejs]
defaults:
run:
working-directory: bindings/packager/nodejs
jobs:
build:
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
build: |
pnpm build
strip -x *.node
- host: windows-latest
build: pnpm build
target: x86_64-pc-windows-msvc
- host: windows-latest
build: pnpm build --target i686-pc-windows-msvc
target: i686-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
npm i -g --force corepack
cd bindings/packager/nodejs
set -e &&
pnpm build --target x86_64-unknown-linux-gnu &&
strip *.node
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd bindings/packager/nodejs
set -e
pnpm build
strip *.node
- host: macos-latest
target: aarch64-apple-darwin
build: |
pnpm build --target aarch64-apple-darwin --features native-tls-vendored --cargo-flags="--no-default-features"
strip -x *.node
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
npm i -g --force corepack
cd bindings/packager/nodejs
set -e &&
pnpm build --target aarch64-unknown-linux-gnu &&
aarch64-unknown-linux-gnu-strip *.node
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: |
pnpm build --target armv7-unknown-linux-gnueabihf
arm-linux-gnueabihf-strip *.node
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd bindings/packager/nodejs
set -e &&
rustup target add aarch64-unknown-linux-musl &&
pnpm build --target aarch64-unknown-linux-musl &&
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
- host: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm build --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/packager/nodejs
- uses: actions/setup-node@v6
if: ${{ !matrix.settings.docker }}
- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
target/
key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }}
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with:
version: 0.11.0
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Setup node x86
if: matrix.settings.target == 'i686-pc-windows-msvc'
run: pnpm config set supportedArchitectures.cpu "ia32"
shell: bash
- run: pnpm install
- name: Setup node x86
uses: actions/setup-node@v6
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 18
architecture: x86
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: "--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build"
run: ${{ matrix.settings.build }}
- name: Build
run: ${{ matrix.settings.build }}
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: bindings/packager/nodejs/${{ env.APP_NAME }}.*.node
if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
- host: windows-latest
target: x86_64-pc-windows-msvc
node:
- "18"
- "20"
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/packager/nodejs
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- run: pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: bindings/packager/nodejs
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
run: |
pnpm postbuild
pnpm test
test-linux-x64-gnu-binding:
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/packager/nodejs
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- run: pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-x86_64-unknown-linux-gnu
path: bindings/packager/nodejs
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
working-directory: .
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim sh -c "cd bindings/packager/nodejs && yarn postbuild && PACKAGER_FORMATS=deb yarn test"
test-linux-x64-musl-binding:
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/packager/nodejs
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
pnpm config set supportedArchitectures.libc "musl"
pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-x86_64-unknown-linux-musl
path: bindings/packager/nodejs
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
working-directory: .
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine sh -c "cd bindings/packager/nodejs && yarn postbuild && PACKAGER_FORMATS=deb yarn test"
test-linux-aarch64-gnu-binding:
name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-unknown-linux-gnu
path: bindings/packager/nodejs
- name: List packages
run: ls -R .
shell: bash
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/packager/nodejs
- name: Install dependencies
run: |
pnpm config set supportedArchitectures.cpu "arm64"
pnpm config set supportedArchitectures.libc "glibc"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:${{ matrix.node }}-slim
options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
run: |
export PACKAGER_FORMATS=deb
set -e
cd bindings/packager/nodejs
yarn postbuild
yarn test
ls -la
test-linux-aarch64-musl-binding:
name: Test bindings on aarch64-unknown-linux-musl - node@${{ matrix.node }}
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-unknown-linux-musl
path: bindings/packager/nodejs
- name: List packages
run: ls -R .
shell: bash
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/packager/nodejs
- name: Install dependencies
run: |
pnpm config set supportedArchitectures.cpu "arm64"
pnpm config set supportedArchitectures.libc "musl"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:lts-alpine
options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
run: |
export PACKAGER_FORMATS=deb
set -e
cd bindings/packager/nodejs
yarn postbuild
yarn test
test-linux-arm-gnueabihf-binding:
name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-armv7-unknown-linux-gnueabihf
path: bindings/packager/nodejs
- name: List packages
run: ls -R .
shell: bash
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/packager/nodejs
- name: Install dependencies
run: |
pnpm config set supportedArchitectures.cpu "arm"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:${{ matrix.node }}-bullseye-slim
options: "--platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build"
run: |
export PACKAGER_FORMATS=deb
set -e
cd bindings/packager/nodejs
yarn postbuild
yarn test
ls -la
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- test-macOS-windows-binding
- test-linux-x64-gnu-binding
- test-linux-x64-musl-binding
- test-linux-aarch64-gnu-binding
- test-linux-aarch64-musl-binding
- test-linux-arm-gnueabihf-binding
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/packager/nodejs
- uses: actions/setup-node@v6
- run: pnpm install
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: bindings/packager/nodejs/artifacts
- name: Move artifacts
run: pnpm artifacts
- name: List packages
run: ls -R ./npm
shell: bash
- name: build TS binding
run: pnpm postbuild
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }}
================================================
FILE: .github/workflows/publish-packager-resource-resolver-nodejs.yml
================================================
name: Publish `@crabnebula/packager-resource-resolver`
env:
DEBUG: napi:*
APP_NAME: packager-resource-resolver
MACOSX_DEPLOYMENT_TARGET: "10.13"
permissions:
contents: write
id-token: write
on:
workflow_dispatch:
inputs:
releaseId:
description: "ID of the `@crabnebula/packager-resource-resolver` release"
required: true
repository_dispatch:
types: [publish-packager-resource-resolver-nodejs]
defaults:
run:
working-directory: bindings/resource-resolver/nodejs
jobs:
build:
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
build: |
pnpm build
strip -x *.node
- host: windows-latest
build: pnpm build
target: x86_64-pc-windows-msvc
- host: windows-latest
build: pnpm build --target i686-pc-windows-msvc
target: i686-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
npm i -g --force corepack
cd bindings/resource-resolver/nodejs
set -e &&
pnpm build --target x86_64-unknown-linux-gnu &&
strip *.node
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd bindings/resource-resolver/nodejs
set -e
pnpm build
strip *.node
- host: macos-latest
target: aarch64-apple-darwin
build: |
pnpm build --target aarch64-apple-darwin
strip -x *.node
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
npm i -g --force corepack
cd bindings/resource-resolver/nodejs
set -e &&
pnpm build --target aarch64-unknown-linux-gnu &&
aarch64-unknown-linux-gnu-strip *.node
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: |
npm i -g --force corepack
pnpm build --target armv7-unknown-linux-gnueabihf
arm-linux-gnueabihf-strip *.node
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
npm i -g --force corepack
cd bindings/resource-resolver/nodejs
set -e &&
rustup target add aarch64-unknown-linux-musl &&
pnpm build --target aarch64-unknown-linux-musl &&
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
- host: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm build --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/resource-resolver/nodejs
- uses: actions/setup-node@v6
if: ${{ !matrix.settings.docker }}
- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
target/
key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }}
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with:
version: 0.11.0
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Setup node x86
if: matrix.settings.target == 'i686-pc-windows-msvc'
run: pnpm config set supportedArchitectures.cpu "ia32"
shell: bash
- run: pnpm install
- name: Setup node x86
uses: actions/setup-node@v6
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 18
architecture: x86
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: "--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build"
run: ${{ matrix.settings.build }}
- name: Build
run: ${{ matrix.settings.build }}
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: bindings/resource-resolver/nodejs/${{ env.APP_NAME }}.*.node
if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
- host: windows-latest
target: x86_64-pc-windows-msvc
node:
- "18"
- "20"
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/resource-resolver/nodejs
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- run: pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: bindings/resource-resolver/nodejs
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
run: pnpm test
test-linux-x64-gnu-binding:
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/resource-resolver/nodejs
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- run: pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-x86_64-unknown-linux-gnu
path: bindings/resource-resolver/nodejs
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
working-directory: .
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim sh -c "cd bindings/resource-resolver/nodejs && yarn test"
test-linux-x64-musl-binding:
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/resource-resolver/nodejs
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
pnpm config set supportedArchitectures.libc "musl"
pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-x86_64-unknown-linux-musl
path: bindings/resource-resolver/nodejs
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
working-directory: .
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine sh -c "cd bindings/resource-resolver/nodejs && yarn test"
test-linux-aarch64-gnu-binding:
name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-unknown-linux-gnu
path: bindings/resource-resolver/nodejs
- name: List packages
run: ls -R .
shell: bash
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/resource-resolver/nodejs
- name: Install dependencies
run: |
pnpm config set supportedArchitectures.cpu "arm64"
pnpm config set supportedArchitectures.libc "glibc"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:${{ matrix.node }}-slim
options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
run: |
set -e
cd bindings/resource-resolver/nodejs
yarn test
ls -la
test-linux-aarch64-musl-binding:
name: Test bindings on aarch64-unknown-linux-musl - node@${{ matrix.node }}
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-unknown-linux-musl
path: bindings/resource-resolver/nodejs
- name: List packages
run: ls -R .
shell: bash
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/resource-resolver/nodejs
- name: Install dependencies
run: |
pnpm config set supportedArchitectures.cpu "arm64"
pnpm config set supportedArchitectures.libc "musl"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:lts-alpine
options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
run: |
set -e
cd bindings/resource-resolver/nodejs
yarn test
test-linux-arm-gnueabihf-binding:
name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- "18"
- "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-armv7-unknown-linux-gnueabihf
path: bindings/resource-resolver/nodejs
- name: List packages
run: ls -R .
shell: bash
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/resource-resolver/nodejs
- name: Install dependencies
run: |
pnpm config set supportedArchitectures.cpu "arm"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:${{ matrix.node }}-bullseye-slim
options: "--platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build"
run: |
set -e
cd bindings/resource-resolver/nodejs
yarn test
ls -la
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- build
- test-macOS-windows-binding
- test-linux-x64-gnu-binding
- test-linux-x64-musl-binding
- test-linux-aarch64-gnu-binding
- test-linux-aarch64-musl-binding
- test-linux-arm-gnueabihf-binding
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/resource-resolver/nodejs
- uses: actions/setup-node@v6
- run: pnpm install
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: bindings/resource-resolver/nodejs/artifacts
- name: Move artifacts
run: pnpm artifacts
- name: List packages
run: ls -R ./npm
shell: bash
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }}
================================================
FILE: .github/workflows/publish-updater-nodejs.yml
================================================
name: Publish `@crabnebula/updater`
env:
DEBUG: napi:*
APP_NAME: updater
MACOSX_DEPLOYMENT_TARGET: "10.13"
permissions:
contents: write
id-token: write
on:
workflow_dispatch:
inputs:
releaseId:
description: "ID of the `@crabnebula/updater` release"
required: true
repository_dispatch:
types: [publish-updater-nodejs]
defaults:
run:
working-directory: bindings/updater/nodejs
jobs:
build:
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
build: |
pnpm build
strip -x *.node
- host: windows-latest
build: pnpm build
target: x86_64-pc-windows-msvc
- host: windows-latest
build: pnpm build --target i686-pc-windows-msvc
target: i686-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
npm i -g --force corepack
cd bindings/updater/nodejs
set -e &&
pnpm build --target x86_64-unknown-linux-gnu &&
strip *.node
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd bindings/updater/nodejs
set -e
pnpm build
strip *.node
- host: macos-latest
target: aarch64-apple-darwin
build: |
pnpm build --target aarch64-apple-darwin --features native-tls-vendored --cargo-flags="--no-default-features"
strip -x *.node
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
npm i -g --force corepack
cd bindings/updater/nodejs
set -e &&
pnpm build --target aarch64-unknown-linux-gnu &&
aarch64-unknown-linux-gnu-strip *.node
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: |
pnpm build --target armv7-unknown-linux-gnueabihf
arm-linux-gnueabihf-strip *.node
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd bindings/updater/nodejs
set -e &&
rustup target add aarch64-unknown-linux-musl &&
pnpm build --target aarch64-unknown-linux-musl &&
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
- host: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm build --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/updater/nodejs
- uses: actions/setup-node@v6
if: ${{ !matrix.settings.docker }}
- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
target/
key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }}
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with:
version: 0.11.0
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Setup node x86
if: matrix.settings.target == 'i686-pc-windows-msvc'
run: pnpm config set supportedArchitectures.cpu "ia32"
shell: bash
- run: pnpm install
- name: Setup node x86
uses: actions/setup-node@v6
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 18
architecture: x86
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: "--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build"
run: ${{ matrix.settings.build }}
- name: Build
run: ${{ matrix.settings.build }}
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: bindings/updater/nodejs/${{ env.APP_NAME }}.*.node
if-no-files-found: error
# FIXME: updater tests needs packager to be build first
# so we need to figure how to build the packager here as well without duplicating
# the publish-packager-nodejs workflow here
# test-macOS-windows-binding:
# name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
# needs:
# - build
# strategy:
# fail-fast: false
# matrix:
# settings:
# - host: macos-latest
# target: x86_64-apple-darwin
# - host: windows-latest
# target: x86_64-pc-windows-msvc
# node:
# - "18"
# - "20"
# runs-on: ${{ matrix.settings.host }}
# steps:
# - uses: actions/checkout@v4
# - uses: pnpm/action-setup@v2
# with:
# version: latest
# package_json_file: bindings/updater/nodejs
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node }}
# - run: pnpm install
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: bindings-${{ matrix.settings.target }}
# path: bindings/updater/nodejs
# - name: List packages
# run: ls -R .
# shell: bash
# - name: Test bindings
# run: pnpm test
# test-linux-x64-gnu-binding:
# name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
# needs:
# - build
# strategy:
# fail-fast: false
# matrix:
# node:
# - "18"
# - "20"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: pnpm/action-setup@v2
# with:
# version: latest
# package_json_file: bindings/updater/nodejs
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node }}
# - run: pnpm install
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: bindings-x86_64-unknown-linux-gnu
# path: bindings/updater/nodejs
# - name: List packages
# run: ls -R .
# shell: bash
# - name: Test bindings
# working-directory: .
# run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim sh -c "cd bindings/updater/nodejs && yarn test"
# test-linux-x64-musl-binding:
# name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
# needs:
# - build
# strategy:
# fail-fast: false
# matrix:
# node:
# - "18"
# - "20"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: pnpm/action-setup@v2
# with:
# version: latest
# package_json_file: bindings/updater/nodejs
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node }}
# - name: Install dependencies
# run: |
# pnpm config set supportedArchitectures.libc "musl"
# pnpm install
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: bindings-x86_64-unknown-linux-musl
# path: bindings/updater/nodejs
# - name: List packages
# run: ls -R .
# shell: bash
# - name: Test bindings
# working-directory: .
# run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine sh -c "cd bindings/updater/nodejs && yarn test"
# test-linux-aarch64-gnu-binding:
# name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
# needs:
# - build
# strategy:
# fail-fast: false
# matrix:
# node:
# - "18"
# - "20"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: bindings-aarch64-unknown-linux-gnu
# path: bindings/updater/nodejs
# - name: List packages
# run: ls -R .
# shell: bash
# - uses: pnpm/action-setup@v2
# with:
# version: latest
# package_json_file: bindings/updater/nodejs
# - name: Install dependencies
# run: |
# pnpm config set supportedArchitectures.cpu "arm64"
# pnpm config set supportedArchitectures.libc "glibc"
# pnpm install
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# with:
# platforms: arm64
# - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# - name: Setup and run tests
# uses: addnab/docker-run-action@v3
# with:
# image: node:${{ matrix.node }}-slim
# options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
# run: |
# set -e
# cd bindings/updater/nodejs
# yarn test
# ls -la
# test-linux-aarch64-musl-binding:
# name: Test bindings on aarch64-unknown-linux-musl - node@${{ matrix.node }}
# needs:
# - build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: bindings-aarch64-unknown-linux-musl
# path: bindings/updater/nodejs
# - name: List packages
# run: ls -R .
# shell: bash
# - uses: pnpm/action-setup@v2
# with:
# version: latest
# package_json_file: bindings/updater/nodejs
# - name: Install dependencies
# run: |
# pnpm config set supportedArchitectures.cpu "arm64"
# pnpm config set supportedArchitectures.libc "musl"
# pnpm install
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# with:
# platforms: arm64
# - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# - name: Setup and run tests
# uses: addnab/docker-run-action@v3
# with:
# image: node:lts-alpine
# options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
# run: |
# set -e
# cd bindings/updater/nodejs
# yarn test
# test-linux-arm-gnueabihf-binding:
# name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
# needs:
# - build
# strategy:
# fail-fast: false
# matrix:
# node:
# - "18"
# - "20"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: bindings-armv7-unknown-linux-gnueabihf
# path: bindings/updater/nodejs
# - name: List packages
# run: ls -R .
# shell: bash
# - uses: pnpm/action-setup@v2
# with:
# version: latest
# package_json_file: bindings/updater/nodejs
# - name: Install dependencies
# run: |
# pnpm config set supportedArchitectures.cpu "arm"
# pnpm install
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# with:
# platforms: arm
# - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# - name: Setup and run tests
# uses: addnab/docker-run-action@v3
# with:
# image: node:${{ matrix.node }}-bullseye-slim
# options: "--platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build"
# run: |
# set -e
# cd bindings/updater/nodejs
# yarn test
# ls -la
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- build
# - test-macOS-windows-binding
# - test-linux-x64-gnu-binding
# - test-linux-x64-musl-binding
# - test-linux-aarch64-gnu-binding
# - test-linux-aarch64-musl-binding
# - test-linux-arm-gnueabihf-binding
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: pnpm/action-setup@v4
with:
version: latest
package_json_file: bindings/updater/nodejs
- uses: actions/setup-node@v6
- run: pnpm install
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: bindings/updater/nodejs/artifacts
- name: Move artifacts
run: pnpm artifacts
- name: List packages
run: ls -R ./npm
shell: bash
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }}
================================================
FILE: .gitignore
================================================
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
node_modules/
*.tgz
.yarn-integrity
.env
.env.test
dist
build
.DS_Store
/target
Cargo.lock
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
*.node
*.node.bak
yarn.lock
package-lock.json
.idea
================================================
FILE: .npmrc
================================================
enable-pre-post-scripts=true
update-notifier=false
engine-strict=true
resolution-mode=highest
================================================
FILE: .prettierignore
================================================
dist
build
*.wxs
*.nsi
*.nsh
*.sh
*.desktop
*.xml
*.md
pnpm-lock.yaml
schema.json
bindings/updater/nodejs/index.js
bindings/updater/nodejs/index.d.ts
bindings/packager/nodejs/index.js
bindings/packager/nodejs/index.d.ts
bindings/packager/nodejs/src-ts/config.d.ts
================================================
FILE: Cargo.toml
================================================
[workspace]
members = [
"crates/*",
"examples/*",
"bindings/*/nodejs",
"crates/updater/tests/app",
]
exclude = ["examples/deno", "examples/wails", "examples/electron"]
resolver = "2"
[workspace.package]
authors = ["CrabNebula Ltd."]
edition = "2021"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/crabnebula-dev/cargo-packager"
[workspace.dependencies]
thiserror = "2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
dunce = "1"
schemars = { version = "0.8", features = ["url", "preserve_order", "derive"] }
clap = { version = "4.5", features = ["derive"] }
dirs = "6.0"
semver = "1"
base64 = "0.22"
tracing = "0.1"
time = "0.3"
tar = "0.4"
napi = { version = "2.16", default-features = false }
napi-derive = "2.16"
napi-build = "2.1"
[profile.release-size-optimized]
inherits = "release"
codegen-units = 1
lto = true
incremental = false
opt-level = "s"
================================================
FILE: LICENSE.spdx
================================================
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
PackageName: cargo-packager
DataFormat: SPDXRef-1
PackageSupplier: Organization: CrabNebula Ltd.
PackageHomePage: https://github.com/crabnebula-dev/cargo-packager
PackageLicenseDeclared: Apache-2.0
PackageLicenseDeclared: MIT
PackageCopyrightText: 2023-2023, CrabNebula Ltd.
PackageSummary: <text>Rust executable packager, bundler and updater. A tool and library to generate installers or app bundles for your executables.
It also has a comptabile updater through cargo-packager-updater crate.
</text>
PackageComment: <text>The package includes the following libraries; see
Relationship information.
</text>
Created: 2023-09-30T09:00:00Z
PackageDownloadLocation: git://github.com/crabnebula-dev/cargo-packager
PackageDownloadLocation: git+https://github.com/crabnebula-dev/cargo-packager.git
PackageDownloadLocation: git+ssh://github.com/crabnebula-dev/cargo-packager.git
================================================
FILE: LICENSE_APACHE-2.0
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
================================================
FILE: LICENSE_MIT
================================================
MIT License
Copyright (c) 2023 - Present CrabNebula Ltd.
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.
================================================
FILE: README.md
================================================
# cargo-packager
<img src="https://raw.githubusercontent.com/crabnebula-dev/cargo-packager/main/.github/splash.png" alt="cargo-packager splash" />
Executable packager, bundler and updater. A cli tool and library to generate installers or app bundles for your executables.
It also has a compatible updater through [cargo-packager-updater](./crates/updater/).
#### Supported packages:
- macOS
- DMG (.dmg)
- Bundle (.app)
- Linux
- Debian package (.deb)
- AppImage (.AppImage)
- Pacman (.tar.gz and PKGBUILD)
- Windows
- NSIS (.exe)
- MSI using WiX Toolset (.msi)
## Rust
### CLI
The packager is distributed on crates.io as a cargo subcommand, you can install it using cargo:
```sh
cargo install cargo-packager --locked
```
You then need to configure your app so the cli can recognize it. Configuration can be done in `Packager.toml` or `packager.json` in your project or modify Cargo.toml and include this snippet:
```toml
[package.metadata.packager]
before-packaging-command = "cargo build --release"
```
Once, you are done configuring your app, run:
```sh
cargo packager --release
```
### Configuration
By default, the packager reads its configuration from `Packager.toml` or `packager.json` if it exists, and from `package.metadata.packager` table in `Cargo.toml`.
You can also specify a custom configuration using the `-c/--config` cli argument.
For a full list of configuration options, see https://docs.rs/cargo-packager/latest/cargo_packager/config/struct.Config.html.
You could also use the [schema](./crates/packager/schema.json) file from GitHub to validate your configuration or have auto completions in your IDE.
### Building your application before packaging
By default, the packager doesn't build your application, so if your app requires a compilation step, the packager has an option to specify a shell command to be executed before packaing your app, `beforePackagingCommand`.
### Cargo profiles
By default, the packager looks for binaries built using the `debug` profile, if your `beforePackagingCommand` builds your app using `cargo build --release`, you will also need to
run the packager in release mode `cargo packager --release`, otherwise, if you have a custom cargo profile, you will need to specify it using `--profile` cli arg `cargo packager --profile custom-release-profile`.
### Library
This crate is also published to crates.io as a library that you can integrate into your tooling, just make sure to disable the default-feature flags.
```sh
cargo add cargo-packager --no-default-features
```
#### Feature flags
- **`cli`**: Enables the cli specifc features and dependencies. Enabled by default.
- **`tracing`**: Enables `tracing` crate integration.
## NPM (Node.js)
Checkout the packager NPM cli [README](./bindings/packager/nodejs/README.md)
## Examples
The [`examples`](./examples/) directory contains a number of varying examples, if you want to build them all run `cargo r -p cargo-packager -- --release` in the root of this repository. Just make sure to have the tooling for each example installed on your system. You can find what tooling they require by checking the README in each example. The README also contains a command to build this example alone if you wish.
Examples list (non-exhaustive):
- [`tauri`](./examples/tauri/)
- [`wry`](./examples/wry/)
- [`dioxus`](./examples/dioxus/)
- [`egui`](./examples/egui/)
- [`deno`](./examples/deno/)
- [`slint`](./examples/slint/)
- [`wails`](./examples/wails)
## Licenses
MIT or MIT/Apache 2.0 where applicable.
================================================
FILE: SECURITY.md
================================================
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Alternatively, you can also send them by email to security@crabnebula.dev.
You can encrypt your mail using GnuPG if you want.
See the [security.txt](https://crabnebula.dev/.well-known/security.txt) from CrabNebula
```
Contact: mailto:security@crabnebula.dev
Expires: 2025-01-30T06:30:00.000Z
Encryption: https://crabnebula.dev/.well-known/pgp.txt
Preferred-Languages: en,de,fr
Canonical: https://crabnebula.dev/.well-known/security.txt
```
Include as much of the following information:
- Type of issue (e.g. buffer overflow, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used for reproduction.
- Step-by-step instructions to reproduce the issue
- Impact of the issue, including how an attacker might exploit the issue
- Preferred Languages
We prefer to receive reports in English. If necessary, we also understand French and German.
================================================
FILE: bindings/packager/nodejs/.cargo/config.toml
================================================
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
rustflags = ["-C", "target-feature=-crt-static"]
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
================================================
FILE: bindings/packager/nodejs/.npmignore
================================================
target
Cargo.lock
.cargo
.github
npm
.eslintrc
.prettierignore
rustfmt.toml
yarn.lock
*.node
.yarn
__test__
renovate.json
================================================
FILE: bindings/packager/nodejs/.npmrc
================================================
enable-pre-post-scripts=true
================================================
FILE: bindings/packager/nodejs/CHANGELOG.md
================================================
# Changelog
## \[0.11.8]
- [`6e6a10c`](https://www.github.com/crabnebula-dev/cargo-packager/commit/6e6a10cc1692973293966034dc4b798e3976d094) ([#321](https://www.github.com/crabnebula-dev/cargo-packager/pull/321)) Allow explicitly specifying the Package name for the .deb bundle.
- [`8488d86`](https://www.github.com/crabnebula-dev/cargo-packager/commit/8488d868935166e873474743c346c2724205d73e) ([#377](https://www.github.com/crabnebula-dev/cargo-packager/pull/377)) Fixed a bug where "binaries" parameter in Cargo.toml would be ignored and all targets would be packaged.
- [`b2b4916`](https://www.github.com/crabnebula-dev/cargo-packager/commit/b2b4916d1b062272fc7e34b5ed55b4fe8c8cd03a) ([#376](https://www.github.com/crabnebula-dev/cargo-packager/pull/376)) Fix bug that prevents reading macos signing certificates from environment variables.
- [`c34de36`](https://www.github.com/crabnebula-dev/cargo-packager/commit/c34de365705db150eb101caa94adf42eff74f71a) ([#365](https://www.github.com/crabnebula-dev/cargo-packager/pull/365)) Change nsi template from using `association.ext` to `association.extensions`, to match struct field in `FileAssociation`.
This allows file associations to be generated in `.nsi` files, and therefore in the final NSIS installer.
### Dependencies
- Upgraded to `cargo-packager@0.11.8`
## \[0.11.7]
- [`d49b606`](https://www.github.com/crabnebula-dev/cargo-packager/commit/d49b606ba8a612c833233ec8a6061481a2118639) ([#353](https://www.github.com/crabnebula-dev/cargo-packager/pull/353)) Allow using notarization credentials stored on the Keychain by providing the `APPLE_KEYCHAIN_PROFILE` environment variable. See `xcrun notarytool store-credentials` for more information.
- [`b337564`](https://www.github.com/crabnebula-dev/cargo-packager/commit/b337564c0e5a9de966b4124890dddea1e353acb4) ([#362](https://www.github.com/crabnebula-dev/cargo-packager/pull/362)) Updated linuxdeploy's AppImage plugin to not require libfuse on the user's system anymore.
### Dependencies
- Upgraded to `cargo-packager@0.11.7`
## \[0.11.6]
- [`b81b81f`](https://www.github.com/crabnebula-dev/cargo-packager/commit/b81b81fbd7fd185edfc7652f535d0cfacb786ac9) ([#354](https://www.github.com/crabnebula-dev/cargo-packager/pull/354)) Changed the download URL of a dependency of the AppImage bundler to Tauri's mirror to resolve 404 errors.
- [`5205088`](https://www.github.com/crabnebula-dev/cargo-packager/commit/5205088cd78412fb6cbe5e48a715524fcc5a2ee7) ([#340](https://www.github.com/crabnebula-dev/cargo-packager/pull/340)) Enhance sign error message.
### Dependencies
- Upgraded to `cargo-packager@0.11.6`
## \[0.11.5]
- [`17194a9`](https://www.github.com/crabnebula-dev/cargo-packager/commit/17194a92aabd59c9e075105072ff939f5d55a107) ([#313](https://www.github.com/crabnebula-dev/cargo-packager/pull/313)) Added `linux > generateDesktopEntry` config to allow disabling generating a .desktop file on Linux bundles (defaults to true).
- [`17c52f0`](https://www.github.com/crabnebula-dev/cargo-packager/commit/17c52f057d78340983689af3c00b1f2aeff3c417) ([#289](https://www.github.com/crabnebula-dev/cargo-packager/pull/289)) Added support to embedding additional apps in the macOS app bundle.
- [`17c52f0`](https://www.github.com/crabnebula-dev/cargo-packager/commit/17c52f057d78340983689af3c00b1f2aeff3c417) ([#289](https://www.github.com/crabnebula-dev/cargo-packager/pull/289)) Added support to adding an `embedded.provisionprofile` file to the macOS bundle.
- [`e010574`](https://www.github.com/crabnebula-dev/cargo-packager/commit/e010574c2efa4a1aa6b8e475a62bec46f24f2bc5) ([#318](https://www.github.com/crabnebula-dev/cargo-packager/pull/318)) Add `background-app` config setting for macOS to set `LSUIElement` to `true`.
### Dependencies
- Upgraded to `cargo-packager@0.11.5`
## \[0.11.4]
### Dependencies
- Upgraded to `cargo-packager@0.11.4`
## \[0.11.3]
### Dependencies
- Upgraded to `cargo-packager@0.11.3`
## \[0.11.2]
- [`fea80d5`](https://www.github.com/crabnebula-dev/cargo-packager/commit/fea80d5760882e6cdc21c8ed2f82d323e0598926) ([#264](https://www.github.com/crabnebula-dev/cargo-packager/pull/264)) Fix `pacman` package failing to install when source directory contained whitespace.
### Dependencies
- Upgraded to `cargo-packager@0.11.2`
## \[0.11.1]
- [`4523722`](https://www.github.com/crabnebula-dev/cargo-packager/commit/4523722d0808faef4a91dbb227badd0354f4c71a) ([#283](https://www.github.com/crabnebula-dev/cargo-packager/pull/283)) Fixes resources paths on NSIS when cross compiling.
### Dependencies
- Upgraded to `cargo-packager@0.11.1`
## \[0.11.0]
- [`41b05d0`](https://www.github.com/crabnebula-dev/cargo-packager/commit/41b05d08a635d593df4cf4eefbe921b92ace77b7) ([#277](https://www.github.com/crabnebula-dev/cargo-packager/pull/277)) Add `--target` flag to specify target triple to package.
### Dependencies
- Upgraded to `cargo-packager@0.11.0`
## \[0.10.3]
### Dependencies
- Upgraded to `cargo-packager@0.10.3`
## \[0.10.2]
### Dependencies
- Upgraded to `cargo-packager@0.10.2`
- Upgraded to `cargo-packager-utils@0.1.1`
## \[0.10.1]
- [`522f23b`](https://www.github.com/crabnebula-dev/cargo-packager/commit/522f23bd867b037eeec81c43295aafd38ebe60ec) ([#258](https://www.github.com/crabnebula-dev/cargo-packager/pull/258)) Update NSIS installer template URL.
- [`bce99ae`](https://www.github.com/crabnebula-dev/cargo-packager/commit/bce99aecb4160291a026dcd4750055f9079099f8) ([#260](https://www.github.com/crabnebula-dev/cargo-packager/pull/260)) Fix NSIS uninstaller removing the uninstall directory even if it was not empty.
### Dependencies
- Upgraded to `cargo-packager@0.10.1`
## \[0.10.0]
- [`c6207bb`](https://www.github.com/crabnebula-dev/cargo-packager/commit/c6207bba042a8a0184ddb7e12650a4cd8f415c23) ([#254](https://www.github.com/crabnebula-dev/cargo-packager/pull/254)) Allow Linux dependencies to be specified via a file path instead of just a direct String.
This enables the list of dependencies to by dynamically generated for both Debian `.deb` packages and pacman packages,
which can relieve the app developer from the burden of manually maintaining a fixed list of dependencies.
- [`de4dcca`](https://www.github.com/crabnebula-dev/cargo-packager/commit/de4dccaca4ae758d3adde517cc415a002873e642) ([#256](https://www.github.com/crabnebula-dev/cargo-packager/pull/256)) Automatically add an Exec arg (field code) in the `.desktop` file.
This adds an `{exec_arg}` field to the default `main.desktop` template.
This field is populated with a sane default value, based on the
`deep_link_protocols` or `file_associations` in the `Config` struct.
This allows an installed Debian package to be invoked by other
applications with URLs or files as arguments, as expected.
### Dependencies
- Upgraded to `cargo-packager@0.10.0`
## \[0.9.1]
- [`44a19ea`](https://www.github.com/crabnebula-dev/cargo-packager/commit/44a19eae1f5f26b1bd10ba84dd6eb3d856609a67) ([#246](https://www.github.com/crabnebula-dev/cargo-packager/pull/246)) On macOS, fix notarization skipping needed environment variables when macos specific config has been specified in the config file.
### Dependencies
- Upgraded to `cargo-packager@0.9.1`
## \[0.9.0]
- [`ab53974`](https://www.github.com/crabnebula-dev/cargo-packager/commit/ab53974b683ce282202e1a550c551eed951e9ca7) ([#235](https://www.github.com/crabnebula-dev/cargo-packager/pull/235)) Added deep link support.
### Dependencies
- Upgraded to `cargo-packager@0.9.0`
## \[0.8.1]
- [`1375380`](https://www.github.com/crabnebula-dev/cargo-packager/commit/1375380c7c9d2adf55ab18a2ce23917849967995)([#196](https://www.github.com/crabnebula-dev/cargo-packager/pull/196)) Always show shell commands output for `beforePackageCommand` and `beforeEachPackagingCommand` .
### Dependencies
- Upgraded to `cargo-packager@0.8.1`
## \[0.8.0]
- [`2164d02`](https://www.github.com/crabnebula-dev/cargo-packager/commit/2164d022f5705e59a189007aec7c99cce98136d8)([#198](https://www.github.com/crabnebula-dev/cargo-packager/pull/198)) Allow packaging the macOS app bundle on Linux and Windows hosts (without codesign support).
- [`3057a4a`](https://www.github.com/crabnebula-dev/cargo-packager/commit/3057a4a8440bc4dc897f3038ac821ed181644d43)([#197](https://www.github.com/crabnebula-dev/cargo-packager/pull/197)) Added `Config::binaries_dir` and `--binaries-dir` so you can specify the location of the binaries without modifying the output directory.
- [`4c4d919`](https://www.github.com/crabnebula-dev/cargo-packager/commit/4c4d9194fb0bd2a814f46336747e643b1e208b52)([#195](https://www.github.com/crabnebula-dev/cargo-packager/pull/195)) Error out if we cannot find a configuration file.
- [`b04332c`](https://www.github.com/crabnebula-dev/cargo-packager/commit/b04332c8fc61427dc002a40d9d46bc5f930025c2)([#194](https://www.github.com/crabnebula-dev/cargo-packager/pull/194)) Fixes a crash when packaging `.app` if an empty file is included in the bundle.
- [`3057a4a`](https://www.github.com/crabnebula-dev/cargo-packager/commit/3057a4a8440bc4dc897f3038ac821ed181644d43)([#197](https://www.github.com/crabnebula-dev/cargo-packager/pull/197)) Added `--out-dir/-o` flags and removed the positional argument to specify where to ouput packages, use the newly added flags instead.
### Dependencies
- Upgraded to `cargo-packager@0.8.0`
## \[0.7.0]
- [`cd8898a`](https://www.github.com/crabnebula-dev/cargo-packager/commit/cd8898a93b66a4aae050fa1006089c3c3b5646f9)([#187](https://www.github.com/crabnebula-dev/cargo-packager/pull/187)) Added codesign certificate and notarization credentials configuration options under the `macos` config (for programatic usage, taking precedence over environment variables).
### Dependencies
- Upgraded to `cargo-packager@0.7.0`
## \[0.6.1]
### Dependencies
- Upgraded to `cargo-packager@0.6.1`
## \[0.6.0]
- [`57b379a`](https://www.github.com/crabnebula-dev/cargo-packager/commit/57b379ad1d9029e767848fda99d4eb6415afe51a)([#148](https://www.github.com/crabnebula-dev/cargo-packager/pull/148)) Added config option to control excluded libs when packaging AppImage
- [`947e032`](https://www.github.com/crabnebula-dev/cargo-packager/commit/947e0328c89d6f043c3ef1b1db5d2252d4f072a5) Fix CLI failing with `Failed to read cargo metadata: cargo metadata` for non-rust projects.
- Bumpt to `0.6.0` version directly to match the Rust crate version.
### Dependencies
- Upgraded to `cargo-packager@0.6.0`
## \[0.2.0]
- [`9bdb953`](https://www.github.com/crabnebula-dev/cargo-packager/commit/9bdb953f1b48c8d69d86e9e42295cd36453c1648)([#137](https://www.github.com/crabnebula-dev/cargo-packager/pull/137)) Add Arch Linux package manager, `pacman` support for cargo packager.
- [`a29943e`](https://www.github.com/crabnebula-dev/cargo-packager/commit/a29943e8c95d70e8b77c23021ce52f6ee13314c8)([#140](https://www.github.com/crabnebula-dev/cargo-packager/pull/140)) Fix codesigning failing on macOS under certain circumstances when the order in which files were signed was not
deterministic and nesting required signing files nested more deeply first.
### Dependencies
- Upgraded to `cargo-packager@0.5.0`
- Upgraded to `cargo-packager-utils@0.1.0`
## \[0.1.5]
- [`f08e4b8`](https://www.github.com/crabnebula-dev/cargo-packager/commit/f08e4b8972b072617fdb78f11e222427e49ebe8e) Fix the signing and notarization process for MacOS bundles
- [`bfa3b00`](https://www.github.com/crabnebula-dev/cargo-packager/commit/bfa3b00cf1087b2ee1e93d9c57b6b577f6294891)([#126](https://www.github.com/crabnebula-dev/cargo-packager/pull/126)) Add `priority` and `section` options in Debian config
### Dependencies
- Upgraded to `cargo-packager@0.4.5`
## \[0.1.4]
- [`3b3ce76`](https://www.github.com/crabnebula-dev/cargo-packager/commit/3b3ce76da0581cf8d553d6edeb0df24f896c62a6)([#128](https://www.github.com/crabnebula-dev/cargo-packager/pull/128)) Fix file download not working on macOS and Windows (arm).
### Dependencies
- Upgraded to `cargo-packager@0.4.4`
## \[0.1.3]
- [`2a50c8e`](https://www.github.com/crabnebula-dev/cargo-packager/commit/2a50c8ea734193036db0ab461f9005ea904cf4b7)([#124](https://www.github.com/crabnebula-dev/cargo-packager/pull/124)) Fix packaing of external binaries.
### Dependencies
- Upgraded to `cargo-packager@0.4.3`
## \[0.1.2]
- [`bd7e6fc`](https://www.github.com/crabnebula-dev/cargo-packager/commit/bd7e6fc102a74dc4da39848f44d04968b498b3cf)([#123](https://www.github.com/crabnebula-dev/cargo-packager/pull/123)) Fixes published package not including the build folder.
### Dependencies
- Upgraded to `cargo-packager@0.4.2`
## \[0.1.1]
- [`7e05d24`](https://www.github.com/crabnebula-dev/cargo-packager/commit/7e05d24a697230b1f53ee5ee2f7d217047089d97)([#109](https://www.github.com/crabnebula-dev/cargo-packager/pull/109)) Check if required files/tools for packaging are outdated or mis-hashed and redownload them.
- [`ea6c31b`](https://www.github.com/crabnebula-dev/cargo-packager/commit/ea6c31b1a3b56bb5408a78f1b2d6b2a2d9ce1161)([#114](https://www.github.com/crabnebula-dev/cargo-packager/pull/114)) Fix NSIS uninstaller leaving resources behind and failing to remove the installation directory.
### Dependencies
- Upgraded to `cargo-packager@0.4.1`
## \[0.1.0]
- [`c4fa8fd`](https://www.github.com/crabnebula-dev/cargo-packager/commit/c4fa8fd6334b7fd0c32710ea2df0b54aa6bde713) Initial release.
### Dependencies
- Upgraded to `cargo-packager@0.4.0`
================================================
FILE: bindings/packager/nodejs/Cargo.toml
================================================
[package]
name = "crabnebula_packager"
version = "0.0.0"
publish = false
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
[lib]
crate-type = ["cdylib"]
[dependencies]
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
napi = { workspace = true, features = ["napi4"] }
napi-derive = { workspace = true }
cargo-packager = { path = "../../../crates/packager/", default-features = false, features = ["cli"] }
tracing = { workspace = true }
serde_json = { workspace = true }
[build-dependencies]
napi-build = { workspace = true }
[features]
default = ["cargo-packager/rustls-tls"]
native-tls = ["cargo-packager/native-tls"]
native-tls-vendored = ["cargo-packager/native-tls-vendored"]
================================================
FILE: bindings/packager/nodejs/README.md
================================================
# @crabnebula/packager
Executable packager, bundler and updater. A cli tool and library to generate installers or app bundles for your executables.
It also comes with useful addons:
- an [updater](https://www.npmjs.com/package/@crabnebula/updater)
- a [resource resolver](https://www.npmjs.com/package/@crabnebula/packager-resource-resolver)
#### Supported packages:
- macOS
- DMG (.dmg)
- Bundle (.app)
- Linux
- Debian package (.deb)
- AppImage (.AppImage)
- Pacman (.tar.gz and PKGBUILD)
- Windows
- NSIS (.exe)
- MSI using WiX Toolset (.msi)
### CLI
The packager is distributed on NPM as a CLI, you can install it:
```sh
# pnpm
pnpm add -D @crabnebula/packager
# yarn
yarn add -D @crabnebula/packager
# npm
npm i -D @crabnebula/packager
```
You then need to configure your app so the CLI can recognize it.
Configuration can be done in `Packager.toml` or `packager.json` in your project or `packager` key in `packager.json`
Once, you are done configuring your app, run:
```sh
# pnpm
pnpm packager
# yarn
yarn packager
# npm
npx packager
```
### Configuration
By default, the packager reads its configuration from `Packager.toml` or `packager.json` if it exists, and from `packager.json` key in `packager.json`,
You can also specify a custom configuration using the `-c/--config` cli argument.
For a full list of configuration options, see https://docs.rs/cargo-packager/latest/cargo_packager/config/struct.Config.html.
You could also use the [schema](./schema.json) file from GitHub to validate your configuration or have auto completions in your IDE.
### Building your application before packaging
By default, the packager doesn't build your application, so if your app requires a compilation step, the packager has an option to specify a shell command to be executed before packaing your app, `beforePackagingCommand`.
### Library
The packager is also a library that you can import and integrate into your tooling.
## Licenses
MIT or MIT/Apache 2.0 where applicable.
================================================
FILE: bindings/packager/nodejs/__test__/index.spec.mjs
================================================
import test from "ava";
import process from "process";
import { execSync } from "child_process";
import { packageApp } from "../build/index.js";
test("log error", async (t) => {
process.env.CI = true;
process.chdir("../../../examples/electron");
execSync("yarn install");
t.is(
await packageApp(
{
formats: process.env.PACKAGER_FORMATS
? process.env.PACKAGER_FORMATS.split(",")
: null,
},
{ verbosity: 2 },
),
undefined,
);
});
================================================
FILE: bindings/packager/nodejs/build.rs
================================================
extern crate napi_build;
fn main() {
napi_build::setup();
}
================================================
FILE: bindings/packager/nodejs/generate-config-type.js
================================================
const { compileFromFile } = require("json-schema-to-typescript");
const fs = require("fs");
const path = require("path");
// compile from file
compileFromFile(
path.join(__dirname, "../../../crates/packager/schema.json"),
).then((ts) => {
for (const dir of ["src-ts", "build"]) {
try {
fs.mkdirSync(dir);
} catch (_) {}
fs.writeFileSync(path.join(dir, "config.d.ts"), ts);
}
});
================================================
FILE: bindings/packager/nodejs/index.d.ts
================================================
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export function cli(args: Array<string>, binName?: string | undefined | null): void
export function packageApp(config: string): void
export function packageAndSignApp(config: string, signingConfig: string): void
export function initTracingSubscriber(verbosity: number): void
export function logError(error: string): void
================================================
FILE: bindings/packager/nodejs/index.js
================================================
/* tslint:disable */
/* eslint-disable */
/* prettier-ignore */
/* auto-generated by NAPI-RS */
const { existsSync, readFileSync } = require('fs')
const { join } = require('path')
const { platform, arch } = process
let nativeBinding = null
let localFileExisted = false
let loadError = null
function isMusl() {
// For Node 10
if (!process.report || typeof process.report.getReport !== 'function') {
try {
const lddPath = require('child_process').execSync('which ldd').toString().trim()
return readFileSync(lddPath, 'utf8').includes('musl')
} catch (e) {
return true
}
} else {
const { glibcVersionRuntime } = process.report.getReport().header
return !glibcVersionRuntime
}
}
switch (platform) {
case 'android':
switch (arch) {
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'packager.android-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./packager.android-arm64.node')
} else {
nativeBinding = require('@crabnebula/packager-android-arm64')
}
} catch (e) {
loadError = e
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'packager.android-arm-eabi.node'))
try {
if (localFileExisted) {
nativeBinding = require('./packager.android-arm-eabi.node')
} else {
nativeBinding = require('@crabnebula/packager-android-arm-eabi')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Android ${arch}`)
}
break
case 'win32':
switch (arch) {
case 'x64':
localFileExisted = existsSync(
join(__dirname, 'packager.win32-x64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.win32-x64-msvc.node')
} else {
nativeBinding = require('@crabnebula/packager-win32-x64-msvc')
}
} catch (e) {
loadError = e
}
break
case 'ia32':
localFileExisted = existsSync(
join(__dirname, 'packager.win32-ia32-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.win32-ia32-msvc.node')
} else {
nativeBinding = require('@crabnebula/packager-win32-ia32-msvc')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'packager.win32-arm64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.win32-arm64-msvc.node')
} else {
nativeBinding = require('@crabnebula/packager-win32-arm64-msvc')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Windows: ${arch}`)
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'packager.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./packager.darwin-universal.node')
} else {
nativeBinding = require('@crabnebula/packager-darwin-universal')
}
break
} catch {}
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'packager.darwin-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./packager.darwin-x64.node')
} else {
nativeBinding = require('@crabnebula/packager-darwin-x64')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'packager.darwin-arm64.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.darwin-arm64.node')
} else {
nativeBinding = require('@crabnebula/packager-darwin-arm64')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on macOS: ${arch}`)
}
break
case 'freebsd':
if (arch !== 'x64') {
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
}
localFileExisted = existsSync(join(__dirname, 'packager.freebsd-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./packager.freebsd-x64.node')
} else {
nativeBinding = require('@crabnebula/packager-freebsd-x64')
}
} catch (e) {
loadError = e
}
break
case 'linux':
switch (arch) {
case 'x64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'packager.linux-x64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.linux-x64-musl.node')
} else {
nativeBinding = require('@crabnebula/packager-linux-x64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'packager.linux-x64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.linux-x64-gnu.node')
} else {
nativeBinding = require('@crabnebula/packager-linux-x64-gnu')
}
} catch (e) {
loadError = e
}
}
break
case 'arm64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'packager.linux-arm64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.linux-arm64-musl.node')
} else {
nativeBinding = require('@crabnebula/packager-linux-arm64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'packager.linux-arm64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.linux-arm64-gnu.node')
} else {
nativeBinding = require('@crabnebula/packager-linux-arm64-gnu')
}
} catch (e) {
loadError = e
}
}
break
case 'arm':
localFileExisted = existsSync(
join(__dirname, 'packager.linux-arm-gnueabihf.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.linux-arm-gnueabihf.node')
} else {
nativeBinding = require('@crabnebula/packager-linux-arm-gnueabihf')
}
} catch (e) {
loadError = e
}
break
case 'riscv64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'packager.linux-riscv64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.linux-riscv64-musl.node')
} else {
nativeBinding = require('@crabnebula/packager-linux-riscv64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'packager.linux-riscv64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.linux-riscv64-gnu.node')
} else {
nativeBinding = require('@crabnebula/packager-linux-riscv64-gnu')
}
} catch (e) {
loadError = e
}
}
break
case 's390x':
localFileExisted = existsSync(
join(__dirname, 'packager.linux-s390x-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./packager.linux-s390x-gnu.node')
} else {
nativeBinding = require('@crabnebula/packager-linux-s390x-gnu')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Linux: ${arch}`)
}
break
default:
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
}
if (!nativeBinding) {
if (loadError) {
throw loadError
}
throw new Error(`Failed to load native binding`)
}
const { cli, packageApp, packageAndSignApp, initTracingSubscriber, logError } = nativeBinding
module.exports.cli = cli
module.exports.packageApp = packageApp
module.exports.packageAndSignApp = packageAndSignApp
module.exports.initTracingSubscriber = initTracingSubscriber
module.exports.logError = logError
================================================
FILE: bindings/packager/nodejs/npm/darwin-arm64/README.md
================================================
# `@crabnebula/packager-darwin-arm64`
This is the **aarch64-apple-darwin** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/darwin-arm64/package.json
================================================
{
"name": "@crabnebula/packager-darwin-arm64",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "packager.darwin-arm64.node",
"files": [
"packager.darwin-arm64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
================================================
FILE: bindings/packager/nodejs/npm/darwin-x64/README.md
================================================
# `@crabnebula/packager-darwin-x64`
This is the **x86_64-apple-darwin** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/darwin-x64/package.json
================================================
{
"name": "@crabnebula/packager-darwin-x64",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"x64"
],
"main": "packager.darwin-x64.node",
"files": [
"packager.darwin-x64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
================================================
FILE: bindings/packager/nodejs/npm/linux-arm-gnueabihf/README.md
================================================
# `@crabnebula/packager-linux-arm-gnueabihf`
This is the **armv7-unknown-linux-gnueabihf** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/linux-arm-gnueabihf/package.json
================================================
{
"name": "@crabnebula/packager-linux-arm-gnueabihf",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"arm"
],
"main": "packager.linux-arm-gnueabihf.node",
"files": [
"packager.linux-arm-gnueabihf.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
================================================
FILE: bindings/packager/nodejs/npm/linux-arm64-gnu/README.md
================================================
# `@crabnebula/packager-linux-arm64-gnu`
This is the **aarch64-unknown-linux-gnu** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/linux-arm64-gnu/package.json
================================================
{
"name": "@crabnebula/packager-linux-arm64-gnu",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"arm64"
],
"main": "packager.linux-arm64-gnu.node",
"files": [
"packager.linux-arm64-gnu.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
},
"libc": [
"glibc"
]
}
================================================
FILE: bindings/packager/nodejs/npm/linux-arm64-musl/README.md
================================================
# `@crabnebula/packager-linux-arm64-musl`
This is the **aarch64-unknown-linux-musl** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/linux-arm64-musl/package.json
================================================
{
"name": "@crabnebula/packager-linux-arm64-musl",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"arm64"
],
"main": "packager.linux-arm64-musl.node",
"files": [
"packager.linux-arm64-musl.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
},
"libc": [
"musl"
]
}
================================================
FILE: bindings/packager/nodejs/npm/linux-x64-gnu/README.md
================================================
# `@crabnebula/packager-linux-x64-gnu`
This is the **x86_64-unknown-linux-gnu** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/linux-x64-gnu/package.json
================================================
{
"name": "@crabnebula/packager-linux-x64-gnu",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"x64"
],
"main": "packager.linux-x64-gnu.node",
"files": [
"packager.linux-x64-gnu.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
},
"libc": [
"glibc"
]
}
================================================
FILE: bindings/packager/nodejs/npm/linux-x64-musl/README.md
================================================
# `@crabnebula/packager-linux-x64-musl`
This is the **x86_64-unknown-linux-musl** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/linux-x64-musl/package.json
================================================
{
"name": "@crabnebula/packager-linux-x64-musl",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"x64"
],
"main": "packager.linux-x64-musl.node",
"files": [
"packager.linux-x64-musl.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
},
"libc": [
"musl"
]
}
================================================
FILE: bindings/packager/nodejs/npm/win32-arm64-msvc/README.md
================================================
# `@crabnebula/packager-win32-arm64-msvc`
This is the **aarch64-pc-windows-msvc** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/win32-arm64-msvc/package.json
================================================
{
"name": "@crabnebula/packager-win32-arm64-msvc",
"version": "0.0.0",
"os": [
"win32"
],
"cpu": [
"arm64"
],
"main": "packager.win32-arm64-msvc.node",
"files": [
"packager.win32-arm64-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
================================================
FILE: bindings/packager/nodejs/npm/win32-ia32-msvc/README.md
================================================
# `@crabnebula/packager-win32-ia32-msvc`
This is the **i686-pc-windows-msvc** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/win32-ia32-msvc/package.json
================================================
{
"name": "@crabnebula/packager-win32-ia32-msvc",
"version": "0.0.0",
"os": [
"win32"
],
"cpu": [
"ia32"
],
"main": "packager.win32-ia32-msvc.node",
"files": [
"packager.win32-ia32-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
================================================
FILE: bindings/packager/nodejs/npm/win32-x64-msvc/README.md
================================================
# `@crabnebula/packager-win32-x64-msvc`
This is the **x86_64-pc-windows-msvc** binary for `@crabnebula/packager`
================================================
FILE: bindings/packager/nodejs/npm/win32-x64-msvc/package.json
================================================
{
"name": "@crabnebula/packager-win32-x64-msvc",
"version": "0.0.0",
"os": [
"win32"
],
"cpu": [
"x64"
],
"main": "packager.win32-x64-msvc.node",
"files": [
"packager.win32-x64-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
================================================
FILE: bindings/packager/nodejs/package.json
================================================
{
"name": "@crabnebula/packager",
"version": "0.11.8",
"main": "build/index.js",
"module": "build/index.js",
"types": "build/index.d.ts",
"author": {
"name": "CrabNebula Ltd."
},
"description": "Executable packager and bundler distributed as a CLI and library",
"bin": {
"packager": "./packager.js"
},
"napi": {
"name": "packager",
"triples": {
"additional": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"aarch64-pc-windows-msvc",
"armv7-unknown-linux-gnueabihf",
"x86_64-unknown-linux-musl",
"i686-pc-windows-msvc"
]
}
},
"license": "MIT",
"scripts": {
"artifacts": "napi artifacts",
"build": "napi build --platform --profile release-size-optimized",
"build:debug": "napi build --platform && pnpm run postbuild",
"postbuild": "rm -rf ./build && node generate-config-type.js && tsc",
"prepublishOnly": "napi prepublish -t npm --gh-release-id $RELEASE_ID",
"test": "ava --no-worker-threads",
"universal": "napi universal",
"version": "napi version"
},
"dependencies": {
"@electron/get": "^3.0.0",
"deepmerge": "^4.3.1",
"extract-zip": "^2.0.1",
"fs-extra": "^11.1.1",
"galactus": "^1.0.0"
},
"devDependencies": {
"@napi-rs/cli": "^2.18.1",
"@types/fs-extra": "^11.0.3",
"@types/node": "^20.8.10",
"ava": "^6.2.0",
"json-schema-to-typescript": "^15.0.0",
"typescript": "^5.4.5"
},
"ava": {
"timeout": "3m"
},
"engines": {
"node": ">= 10"
}
}
================================================
FILE: bindings/packager/nodejs/packager.js
================================================
#!/usr/bin/env node
const cli = require("./build");
const path = require("path");
const [bin, script, ...args] = process.argv;
const binStem = path.parse(bin).name.toLowerCase();
// We want to make a helpful binary name for the underlying CLI helper, if we
// can successfully detect what command likely started the execution.
let binName;
// deno run -A --unstable --node-modules-dir npm:@crabnebula/packager
if (bin === "@crabnebula/packager") {
binName = "@crabnebula/packager";
}
// Even if started by a package manager, the binary will be NodeJS.
// Some distribution still use "nodejs" as the binary name.
else if (binStem.match(/(nodejs|node|bun)\-?([0-9]*)*$/g)) {
const managerStem = process.env.npm_execpath
? path.parse(process.env.npm_execpath).name.toLowerCase()
: null;
if (managerStem) {
let manager;
switch (managerStem) {
// Only supported package manager that has a different filename is npm.
case "npm-cli":
manager = "npm";
break;
// Yarn, pnpm, and bun have the same stem name as their bin.
// We assume all unknown package managers do as well.
default:
manager = managerStem;
break;
}
binName = `${manager} run ${process.env.npm_lifecycle_event}`;
} else {
// Assume running NodeJS if we didn't detect a manager from the env.
// We normalize the path to prevent the script's absolute path being used.
const scriptNormal = path.normalize(path.relative(process.cwd(), script));
binName = `${binStem} ${scriptNormal}`;
}
} else {
// We don't know what started it, assume it's already stripped.
args.unshift(bin);
}
cli.cli(args, binName).catch((err) => {
cli.logError(err.message);
process.exit(1);
});
================================================
FILE: bindings/packager/nodejs/schema.json
================================================
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Config",
"description": "The packaging config.",
"type": "object",
"properties": {
"$schema": {
"description": "The JSON schema for the config.\n\nSetting this field has no effect, this just exists so we can parse the JSON correctly when it has `$schema` field set.",
"type": [
"string",
"null"
]
},
"name": {
"description": "The app name, this is just an identifier that could be used to filter which app to package using `--packages` cli arg when there is multiple apps in the workspace or in the same config.\n\nThis field resembles, the `name` field in `Cargo.toml` or `package.json`\n\nIf `unset`, the CLI will try to auto-detect it from `Cargo.toml` or `package.json` otherwise, it will keep it unset.",
"type": [
"string",
"null"
]
},
"enabled": {
"description": "Whether this config is enabled or not. Defaults to `true`.",
"default": true,
"type": "boolean"
},
"productName": {
"description": "The package's product name, for example \"My Awesome App\".",
"default": "",
"type": "string"
},
"version": {
"description": "The package's version.",
"default": "",
"type": "string"
},
"binaries": {
"description": "The binaries to package.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/Binary"
}
},
"identifier": {
"description": "The application identifier in reverse domain name notation (e.g. `com.packager.example`). This string must be unique across applications since it is used in some system configurations. This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-), and periods (.).",
"type": [
"string",
"null"
],
"pattern": "^[a-zA-Z0-9-\\.]*$"
},
"beforePackagingCommand": {
"description": "The command to run before starting to package an application.\n\nThis runs only once.",
"anyOf": [
{
"$ref": "#/definitions/HookCommand"
},
{
"type": "null"
}
]
},
"beforeEachPackageCommand": {
"description": "The command to run before packaging each format for an application.\n\nThis will run multiple times depending on the formats specifed.",
"anyOf": [
{
"$ref": "#/definitions/HookCommand"
},
{
"type": "null"
}
]
},
"logLevel": {
"description": "The logging level.",
"anyOf": [
{
"$ref": "#/definitions/LogLevel"
},
{
"type": "null"
}
]
},
"formats": {
"description": "The packaging formats to create, if not present, [`PackageFormat::platform_default`] is used.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/PackageFormat"
}
},
"outDir": {
"description": "The directory where the generated packages will be placed.\n\nIf [`Config::binaries_dir`] is not set, this is also where the [`Config::binaries`] exist.",
"default": "",
"type": "string"
},
"binariesDir": {
"description": "The directory where the [`Config::binaries`] exist.\n\nDefaults to [`Config::out_dir`].",
"default": null,
"type": [
"string",
"null"
]
},
"targetTriple": {
"description": "The target triple we are packaging for.\n\nDefaults to the current OS target triple.",
"type": [
"string",
"null"
]
},
"description": {
"description": "The package's description.",
"type": [
"string",
"null"
]
},
"longDescription": {
"description": "The app's long description.",
"type": [
"string",
"null"
]
},
"homepage": {
"description": "The package's homepage.",
"type": [
"string",
"null"
]
},
"authors": {
"description": "The package's authors.",
"default": null,
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"publisher": {
"description": "The app's publisher. Defaults to the second element in [`Config::identifier`](Config::identifier) string. Currently maps to the Manufacturer property of the Windows Installer.",
"type": [
"string",
"null"
]
},
"licenseFile": {
"description": "A path to the license file.",
"type": [
"string",
"null"
]
},
"copyright": {
"description": "The app's copyright.",
"type": [
"string",
"null"
]
},
"category": {
"description": "The app's category.",
"anyOf": [
{
"$ref": "#/definitions/AppCategory"
},
{
"type": "null"
}
]
},
"icons": {
"description": "The app's icon list. Supports glob patterns.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"fileAssociations": {
"description": "The file associations",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/FileAssociation"
}
},
"deepLinkProtocols": {
"description": "Deep-link protocols.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/DeepLinkProtocol"
}
},
"resources": {
"description": "The app's resources to package. This a list of either a glob pattern, path to a file, path to a directory or an object of `src` and `target` paths. In the case of using an object, the `src` could be either a glob pattern, path to a file, path to a directory, and the `target` is a path inside the final resources folder in the installed package.\n\n## Format-specific:\n\n- **[PackageFormat::Nsis] / [PackageFormat::Wix]**: The resources are placed next to the executable in the root of the packager. - **[PackageFormat::Deb]**: The resources are placed in `usr/lib` of the package.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Resource"
}
},
"externalBinaries": {
"description": "Paths to external binaries to add to the package.\n\nThe path specified should not include `-<target-triple><.exe>` suffix, it will be auto-added when by the packager when reading these paths, so the actual binary name should have the target platform's target triple appended, as well as `.exe` for Windows.\n\nFor example, if you're packaging an external binary called `sqlite3`, the packager expects a binary named `sqlite3-x86_64-unknown-linux-gnu` on linux, and `sqlite3-x86_64-pc-windows-gnu.exe` on windows.\n\nIf you are building a universal binary for MacOS, the packager expects your external binary to also be universal, and named after the target triple, e.g. `sqlite3-universal-apple-darwin`. See <https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary>",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"windows": {
"description": "Windows-specific configuration.",
"anyOf": [
{
"$ref": "#/definitions/WindowsConfig"
},
{
"type": "null"
}
]
},
"macos": {
"description": "MacOS-specific configuration.",
"anyOf": [
{
"$ref": "#/definitions/MacOsConfig"
},
{
"type": "null"
}
]
},
"linux": {
"description": "Linux-specific configuration",
"anyOf": [
{
"$ref": "#/definitions/LinuxConfig"
},
{
"type": "null"
}
]
},
"deb": {
"description": "Debian-specific configuration.",
"anyOf": [
{
"$ref": "#/definitions/DebianConfig"
},
{
"type": "null"
}
]
},
"appimage": {
"description": "AppImage configuration.",
"anyOf": [
{
"$ref": "#/definitions/AppImageConfig"
},
{
"type": "null"
}
]
},
"pacman": {
"description": "Pacman configuration.",
"anyOf": [
{
"$ref": "#/definitions/PacmanConfig"
},
{
"type": "null"
}
]
},
"wix": {
"description": "WiX configuration.",
"anyOf": [
{
"$ref": "#/definitions/WixConfig"
},
{
"type": "null"
}
]
},
"nsis": {
"description": "Nsis configuration.",
"anyOf": [
{
"$ref": "#/definitions/NsisConfig"
},
{
"type": "null"
}
]
},
"dmg": {
"description": "Dmg configuration.",
"anyOf": [
{
"$ref": "#/definitions/DmgConfig"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"definitions": {
"Binary": {
"description": "A binary to package within the final package.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Path to the binary (without `.exe` on Windows). If it's relative, it will be resolved from [`Config::out_dir`].",
"type": "string"
},
"main": {
"description": "Whether this is the main binary or not",
"default": false,
"type": "boolean"
}
},
"additionalProperties": false
},
"HookCommand": {
"description": "Describes a shell command to be executed when a CLI hook is triggered.",
"anyOf": [
{
"description": "Run the given script with the default options.",
"type": "string"
},
{
"description": "Run the given script with custom options.",
"type": "object",
"required": [
"script"
],
"properties": {
"script": {
"description": "The script to execute.",
"type": "string"
},
"dir": {
"description": "The working directory.",
"type": [
"string",
"null"
]
}
}
}
]
},
"LogLevel": {
"description": "An enum representing the available verbosity levels of the logger.",
"oneOf": [
{
"description": "The \"error\" level.\n\nDesignates very serious errors.",
"type": "string",
"enum": [
"error"
]
},
{
"description": "The \"warn\" level.\n\nDesignates hazardous situations.",
"type": "string",
"enum": [
"warn"
]
},
{
"description": "The \"info\" level.\n\nDesignates useful information.",
"type": "string",
"enum": [
"info"
]
},
{
"description": "The \"debug\" level.\n\nDesignates lower priority information.",
"type": "string",
"enum": [
"debug"
]
},
{
"description": "The \"trace\" level.\n\nDesignates very low priority, often extremely verbose, information.",
"type": "string",
"enum": [
"trace"
]
}
]
},
"PackageFormat": {
"description": "Types of supported packages by [`cargo-packager`](https://docs.rs/cargo-packager).",
"oneOf": [
{
"description": "All available package formats for the current platform.\n\nSee [`PackageFormat::platform_all`]",
"type": "string",
"enum": [
"all"
]
},
{
"description": "The default list of package formats for the current platform.\n\nSee [`PackageFormat::platform_default`]",
"type": "string",
"enum": [
"default"
]
},
{
"description": "The macOS application bundle (.app).",
"type": "string",
"enum": [
"app"
]
},
{
"description": "The macOS DMG package (.dmg).",
"type": "string",
"enum": [
"dmg"
]
},
{
"description": "The Microsoft Software Installer (.msi) through WiX Toolset.",
"type": "string",
"enum": [
"wix"
]
},
{
"description": "The NSIS installer (.exe).",
"type": "string",
"enum": [
"nsis"
]
},
{
"description": "The Linux Debian package (.deb).",
"type": "string",
"enum": [
"deb"
]
},
{
"description": "The Linux AppImage package (.AppImage).",
"type": "string",
"enum": [
"appimage"
]
},
{
"description": "The Linux Pacman package (.tar.gz and PKGBUILD)",
"type": "string",
"enum": [
"pacman"
]
}
]
},
"AppCategory": {
"description": "The possible app categories. Corresponds to `LSApplicationCategoryType` on macOS and the GNOME desktop categories on Debian.",
"type": "string",
"enum": [
"Business",
"DeveloperTool",
"Education",
"Entertainment",
"Finance",
"Game",
"ActionGame",
"AdventureGame",
"ArcadeGame",
"BoardGame",
"CardGame",
"CasinoGame",
"DiceGame",
"EducationalGame",
"FamilyGame",
"KidsGame",
"MusicGame",
"PuzzleGame",
"RacingGame",
"RolePlayingGame",
"SimulationGame",
"SportsGame",
"StrategyGame",
"TriviaGame",
"WordGame",
"GraphicsAndDesign",
"HealthcareAndFitness",
"Lifestyle",
"Medical",
"Music",
"News",
"Photography",
"Productivity",
"Reference",
"SocialNetworking",
"Sports",
"Travel",
"Utility",
"Video",
"Weather"
]
},
"FileAssociation": {
"description": "A file association configuration.",
"type": "object",
"required": [
"extensions"
],
"properties": {
"extensions": {
"description": "File extensions to associate with this app. e.g. 'png'",
"type": "array",
"items": {
"type": "string"
}
},
"mimeType": {
"description": "The mime-type e.g. 'image/png' or 'text/plain'. **Linux-only**.",
"type": [
"string",
"null"
]
},
"description": {
"description": "The association description. **Windows-only**. It is displayed on the `Type` column on Windows Explorer.",
"type": [
"string",
"null"
]
},
"name": {
"description": "The name. Maps to `CFBundleTypeName` on macOS. Defaults to the first item in `ext`",
"type": [
"string",
"null"
]
},
"role": {
"description": "The app's role with respect to the type. Maps to `CFBundleTypeRole` on macOS. Defaults to [`BundleTypeRole::Editor`]",
"default": "editor",
"allOf": [
{
"$ref": "#/definitions/BundleTypeRole"
}
]
}
},
"additionalProperties": false
},
"BundleTypeRole": {
"description": "*macOS-only**. Corresponds to CFBundleTypeRole",
"oneOf": [
{
"description": "CFBundleTypeRole.Editor. Files can be read and edited.",
"type": "string",
"enum": [
"editor"
]
},
{
"description": "CFBundleTypeRole.Viewer. Files can be read.",
"type": "string",
"enum": [
"viewer"
]
},
{
"description": "CFBundleTypeRole.Shell",
"type": "string",
"enum": [
"shell"
]
},
{
"description": "CFBundleTypeRole.QLGenerator",
"type": "string",
"enum": [
"qLGenerator"
]
},
{
"description": "CFBundleTypeRole.None",
"type": "string",
"enum": [
"none"
]
}
]
},
"DeepLinkProtocol": {
"description": "Deep link protocol",
"type": "object",
"required": [
"schemes"
],
"properties": {
"schemes": {
"description": "URL schemes to associate with this app without `://`. For example `my-app`",
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"description": "The protocol name. **macOS-only** and maps to `CFBundleTypeName`. Defaults to `<bundle-id>.<schemes[0]>`",
"type": [
"string",
"null"
]
},
"role": {
"description": "The app's role for these schemes. **macOS-only** and maps to `CFBundleTypeRole`.",
"default": "editor",
"allOf": [
{
"$ref": "#/definitions/BundleTypeRole"
}
]
}
},
"additionalProperties": false
},
"Resource": {
"description": "A path to a resource (with optional glob pattern) or an object of `src` and `target` paths.",
"anyOf": [
{
"description": "Supports glob patterns",
"type": "string"
},
{
"description": "An object descriping the src file or directory and its target location in the final package.",
"type": "object",
"required": [
"src",
"target"
],
"properties": {
"src": {
"description": "The src file or directory, supports glob patterns.",
"type": "string"
},
"target": {
"description": "A relative path from the root of the final package.\n\nIf `src` is a glob, this will always be treated as a directory where all globbed files will be placed under.",
"type": "string"
}
}
}
]
},
"WindowsConfig": {
"description": "The Windows configuration.",
"type": "object",
"properties": {
"digestAlgorithm": {
"description": "The file digest algorithm to use for creating file signatures. Required for code signing. SHA-256 is recommended.",
"type": [
"string",
"null"
]
},
"certificateThumbprint": {
"description": "The SHA1 hash of the signing certificate.",
"type": [
"string",
"null"
]
},
"tsp": {
"description": "Whether to use Time-Stamp Protocol (TSP, a.k.a. RFC 3161) for the timestamp server. Your code signing provider may use a TSP timestamp server, like e.g. SSL.com does. If so, enable TSP by setting to true.",
"default": false,
"type": "boolean"
},
"timestampUrl": {
"description": "Server to use during timestamping.",
"type": [
"string",
"null"
]
},
"allowDowngrades": {
"description": "Whether to validate a second app installation, blocking the user from installing an older version if set to `false`.\n\nFor instance, if `1.2.1` is installed, the user won't be able to install app version `1.2.0` or `1.1.5`.\n\nThe default value of this flag is `true`.",
"default": true,
"type": "boolean"
},
"signCommand": {
"description": "Specify a custom command to sign the binaries. This command needs to have a `%1` in it which is just a placeholder for the binary path, which we will detect and replace before calling the command.\n\nBy Default we use `signtool.exe` which can be found only on Windows so if you are on another platform and want to cross-compile and sign you will need to use another tool like `osslsigncode`.",
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"MacOsConfig": {
"description": "The macOS configuration.",
"type": "object",
"properties": {
"frameworks": {
"description": "MacOS frameworks that need to be packaged with the app.\n\nEach string can either be the name of a framework (without the `.framework` extension, e.g. `\"SDL2\"`), in which case we will search for that framework in the standard install locations (`~/Library/Frameworks/`, `/Library/Frameworks/`, and `/Network/Library/Frameworks/`), or a path to a specific framework bundle (e.g. `./data/frameworks/SDL2.framework`). Note that this setting just makes cargo-packager copy the specified frameworks into the OS X app bundle (under `Foobar.app/Contents/Frameworks/`); you are still responsible for:\n\n- arranging for the compiled binary to link against those frameworks (e.g. by emitting lines like `cargo:rustc-link-lib=framework=SDL2` from your `build.rs` script)\n\n- embedding the correct rpath in your binary (e.g. by running `install_name_tool -add_rpath \"@executable_path/../Frameworks\" path/to/binary` after compiling)",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"minimumSystemVersion": {
"description": "A version string indicating the minimum MacOS version that the packaged app supports (e.g. `\"10.11\"`). If you are using this config field, you may also want have your `build.rs` script emit `cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.11`.",
"type": [
"string",
"null"
]
},
"exceptionDomain": {
"description": "The exception domain to use on the macOS .app package.\n\nThis allows communication to the outside world e.g. a web server you're shipping.",
"type": [
"string",
"null"
]
},
"signingIdentity": {
"description": "Code signing identity.\n\nThis is typically of the form: `\"Developer ID Application: TEAM_NAME (TEAM_ID)\"`.",
"type": [
"string",
"null"
]
},
"providerShortName": {
"description": "Provider short name for notarization.",
"type": [
"string",
"null"
]
},
"entitlements": {
"description": "Path to the entitlements.plist file.",
"type": [
"string",
"null"
]
},
"infoPlistPath": {
"description": "Path to the Info.plist file for the package.",
"type": [
"string",
"null"
]
},
"embeddedProvisionprofilePath": {
"description": "Path to the embedded.provisionprofile file for the package.",
"type": [
"string",
"null"
]
},
"embeddedApps": {
"description": "Apps that need to be packaged within the app.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"backgroundApp": {
"description": "Whether this is a background application. If true, the app will not appear in the Dock.\n\nSets the `LSUIElement` flag in the macOS plist file.",
"default": false,
"type": "boolean"
}
},
"additionalProperties": false
},
"LinuxConfig": {
"description": "Linux configuration",
"type": "object",
"properties": {
"generateDesktopEntry": {
"description": "Flag to indicate if desktop entry should be generated.",
"default": true,
"type": "boolean"
}
},
"additionalProperties": false
},
"DebianConfig": {
"description": "The Linux Debian configuration.",
"type": "object",
"properties": {
"depends": {
"description": "The list of Debian dependencies.",
"anyOf": [
{
"$ref": "#/definitions/Dependencies"
},
{
"type": "null"
}
]
},
"desktopTemplate": {
"description": "Path to a custom desktop file Handlebars template.\n\nAvailable variables: `categories`, `comment` (optional), `exec`, `icon` and `name`.\n\nDefault file contents: ```text [Desktop Entry] Categories={{categories}} {{#if comment}} Comment={{comment}} {{/if}} Exec={{exec}} {{exec_arg}} Icon={{icon}} Name={{name}} Terminal=false Type=Application {{#if mime_type}} MimeType={{mime_type}} {{/if}} ```\n\nThe `{{exec_arg}}` will be set to: * \"%F\", if at least one [Config::file_associations] was specified but no deep link protocols were given. * The \"%F\" arg means that your application can be invoked with multiple file paths. * \"%U\", if at least one [Config::deep_link_protocols] was specified. * The \"%U\" arg means that your application can be invoked with multiple URLs. * If both [Config::file_associations] and [Config::deep_link_protocols] were specified, the \"%U\" arg will be used, causing the file paths to be passed to your app as `file://` URLs. * An empty string \"\" (nothing) if neither are given. * This means that your application will never be invoked with any URLs or file paths.\n\nTo specify a custom `exec_arg`, just use plaintext directly instead of `{{exec_arg}}`: ```text Exec={{exec}} %u ```\n\nSee more here: <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables>.",
"type": [
"string",
"null"
]
},
"section": {
"description": "Define the section in Debian Control file. See : <https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections>",
"type": [
"string",
"null"
]
},
"priority": {
"description": "Change the priority of the Debian Package. By default, it is set to `optional`. Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra`",
"type": [
"string",
"null"
]
},
"files": {
"description": "List of custom files to add to the deb package. Maps a dir/file to a dir/file inside the debian package.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"packageName": {
"description": "Name to use for the `Package` field in the Debian Control file. Defaults to [`Config::product_name`] converted to kebab-case.",
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"Dependencies": {
"description": "A list of dependencies specified as either a list of Strings or as a path to a file that lists the dependencies, one per line.",
"anyOf": [
{
"description": "The list of dependencies provided directly as a vector of Strings.",
"type": "array",
"items": {
"type": "string"
}
},
{
"description": "A path to the file containing the list of dependences, formatted as one per line: ```text libc6 libxcursor1 libdbus-1-3 libasyncns0 ... ```",
"type": "string"
}
]
},
"AppImageConfig": {
"description": "The Linux AppImage configuration.",
"type": "object",
"properties": {
"libs": {
"description": "List of libs that exist in `/usr/lib*` to be include in the final AppImage. The libs will be searched for, using the command `find -L /usr/lib* -name <libname>`",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"bins": {
"description": "List of binary paths to include in the final AppImage. For example, if you want `xdg-open`, you'd specify `/usr/bin/xdg-open`",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"files": {
"description": "List of custom files to add to the appimage package. Maps a dir/file to a dir/file inside the appimage package.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"linuxdeployPlugins": {
"description": "A map of [`linuxdeploy`](https://github.com/linuxdeploy/linuxdeploy) plugin name and its URL to be downloaded and executed while packaing the appimage. For example, if you want to use the [`gtk`](https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh) plugin, you'd specify `gtk` as the key and its url as the value.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"excludedLibs": {
"description": "List of globs of libraries to exclude from the final AppImage. For example, to exclude libnss3.so, you'd specify `libnss3*`",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"PacmanConfig": {
"description": "The Linux pacman configuration.",
"type": "object",
"properties": {
"files": {
"description": "List of custom files to add to the pacman package. Maps a dir/file to a dir/file inside the pacman package.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"depends": {
"description": "List of softwares that must be installed for the app to build and run.\n\nSee : <https://wiki.archlinux.org/title/PKGBUILD#depends>",
"anyOf": [
{
"$ref": "#/definitions/Dependencies"
},
{
"type": "null"
}
]
},
"provides": {
"description": "Additional packages that are provided by this app.\n\nSee : <https://wiki.archlinux.org/title/PKGBUILD#provides>",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"conflicts": {
"description": "Packages that conflict or cause problems with the app. All these packages and packages providing this item will need to be removed\n\nSee : <https://wiki.archlinux.org/title/PKGBUILD#conflicts>",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"replaces": {
"description": "Only use if this app replaces some obsolete packages. For example, if you rename any package.\n\nSee : <https://wiki.archlinux.org/title/PKGBUILD#replaces>",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"source": {
"description": "Source of the package to be stored at PKGBUILD. PKGBUILD is a bash script, so version can be referred as ${pkgver}",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"WixConfig": {
"description": "The wix format configuration",
"type": "object",
"properties": {
"languages": {
"description": "The app languages to build. See <https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables>.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/WixLanguage"
}
},
"template": {
"description": "By default, the packager uses an internal template. This option allows you to define your own wix file.",
"type": [
"string",
"null"
]
},
"mergeModules": {
"description": "List of merge modules to include in your installer. For example, if you want to include [C++ Redis merge modules]\n\n[C++ Redis merge modules]: https://wixtoolset.org/docs/v3/howtos/redistributables_and_install_checks/install_vcredist/",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"fragmentPaths": {
"description": "A list of paths to .wxs files with WiX fragments to use.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"fragments": {
"description": "List of WiX fragments as strings. This is similar to `config.wix.fragments_paths` but is a string so you can define it inline in your config.\n\n```text <?xml version=\"1.0\" encoding=\"utf-8\"?> <Wix xmlns=\"http://schemas.microsoft.com/wix/2006/wi\"> <Fragment> <CustomAction Id=\"OpenNotepad\" Directory=\"INSTALLDIR\" Execute=\"immediate\" ExeCommand=\"cmd.exe /c notepad.exe\" Return=\"check\" /> <InstallExecuteSequence> <Custom Action=\"OpenNotepad\" After=\"InstallInitialize\" /> </InstallExecuteSequence> </Fragment> </Wix> ```",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"componentGroupRefs": {
"description": "The ComponentGroup element ids you want to reference from the fragments.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"componentRefs": {
"description": "The Component element ids you want to reference from the fragments.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"customActionRefs": {
"description": "The CustomAction element ids you want to reference from the fragments.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"featureGroupRefs": {
"description": "The FeatureGroup element ids you want to reference from the fragments.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"featureRefs": {
"description": "The Feature element ids you want to reference from the fragments.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"mergeRefs": {
"description": "The Merge element ids you want to reference from the fragments.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"bannerPath": {
"description": "Path to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer.\n\nThe required dimensions are 493px × 58px.",
"type": [
"string",
"null"
]
},
"dialogImagePath": {
"description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.",
"type": [
"string",
"null"
]
},
"fipsCompliant": {
"description": "Enables FIPS compliant algorithms.",
"default": false,
"type": "boolean"
}
},
"additionalProperties": false
},
"WixLanguage": {
"description": "A wix language.",
"anyOf": [
{
"description": "Built-in wix language identifier.",
"type": "string"
},
{
"description": "Custom wix language.",
"type": "object",
"required": [
"identifier"
],
"properties": {
"identifier": {
"description": "Idenitifier of this language, for example `en-US`",
"type": "string"
},
"path": {
"description": "The path to a locale (`.wxl`) file. See <https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/build_a_localized_version.html>.",
"type": [
"string",
"null"
]
}
}
}
]
},
"NsisConfig": {
"description": "The NSIS format configuration.",
"type": "object",
"properties": {
"compression": {
"description": "Set the compression algorithm used to compress files in the installer.\n\nSee <https://nsis.sourceforge.io/Reference/SetCompressor>",
"anyOf": [
{
"$ref": "#/definitions/NsisCompression"
},
{
"type": "null"
}
]
},
"template": {
"description": "A custom `.nsi` template to use.\n\nSee the default template here <https://github.com/crabnebula-dev/cargo-packager/blob/main/crates/packager/src/package/nsis/installer.nsi>",
"type": [
"string",
"null"
]
},
"preinstallSection": {
"description": "Logic of an NSIS section that will be ran before the install section.\n\nSee the available libraries, dlls and global variables here <https://github.com/crabnebula-dev/cargo-packager/blob/main/crates/packager/src/package/nsis/installer.nsi>\n\n### Example ```toml [package.metadata.packager.nsis] preinstall-section = \"\"\" ; Setup custom messages LangString webview2AbortError ${LANG_ENGLISH} \"Failed to install WebView2! The app can't run without it. Try restarting the installer.\" LangString webview2DownloadError ${LANG_ARABIC} \"خطأ: فشل تنزيل WebView2 - $0\"\n\nSection PreInstall ; <section logic here> SectionEnd\n\nSection AnotherPreInstall ; <section logic here> SectionEnd \"\"\" ```",
"type": [
"string",
"null"
]
},
"headerImage": {
"description": "The path to a bitmap file to display on the header of installers pages.\n\nThe recommended dimensions are 150px x 57px.",
"type": [
"string",
"null"
]
},
"sidebarImage": {
"description": "The path to a bitmap file for the Welcome page and the Finish page.\n\nThe recommended dimensions are 164px x 314px.",
"type": [
"string",
"null"
]
},
"installerIcon": {
"description": "The path to an icon file used as the installer icon.",
"type": [
"string",
"null"
]
},
"installMode": {
"description": "Whether the installation will be for all users or just the current user.",
"default": "currentUser",
"allOf": [
{
"$ref": "#/definitions/NSISInstallerMode"
}
]
},
"languages": {
"description": "A list of installer languages. By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. To allow the user to select the language, set `display_language_selector` to `true`.\n\nSee <https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files> for the complete list of languages.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"customLanguageFiles": {
"description": "An key-value pair where the key is the language and the value is the path to a custom `.nsi` file that holds the translated text for cargo-packager's custom messages.\n\nSee <https://github.com/crabnebula-dev/cargo-packager/blob/main/crates/packager/src/nsis/languages/English.nsh> for an example `.nsi` file.\n\n**Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`]languages array,",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"displayLanguageSelector": {
"description": "Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the `languages` array.",
"default": false,
"type": "boolean"
},
"appdataPaths": {
"description": "List of paths where your app stores data. This options tells the uninstaller to provide the user with an option (disabled by default) whether they want to rmeove your app data or keep it.\n\nThe path should use a constant from <https://nsis.sourceforge.io/Docs/Chapter4.html#varconstant> in addition to `$IDENTIFIER`, `$PUBLISHER` and `$PRODUCTNAME`, for example, if you store your app data in `C:\\\\Users\\\\<user>\\\\AppData\\\\Local\\\\<your-company-name>\\\\<your-product-name>` you'd need to specify ```toml [package.metadata.packager.nsis] appdata-paths = [\"$LOCALAPPDATA/$PUBLISHER/$PRODUCTNAME\"] ```",
"default": null,
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"NsisCompression": {
"description": "Compression algorithms used in the NSIS installer.\n\nSee <https://nsis.sourceforge.io/Reference/SetCompressor>",
"oneOf": [
{
"description": "ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.",
"type": "string",
"enum": [
"zlib"
]
},
{
"description": "BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.",
"type": "string",
"enum": [
"bzip2"
]
},
{
"description": "LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.",
"type": "string",
"enum": [
"lzma"
]
},
{
"description": "Disable compression.",
"type": "string",
"enum": [
"off"
]
}
]
},
"NSISInstallerMode": {
"description": "Install Modes for the NSIS installer.",
"oneOf": [
{
"description": "Default mode for the installer.\n\nInstall the app by default in a directory that doesn't require Administrator access.\n\nInstaller metadata will be saved under the `HKCU` registry path.",
"type": "string",
"enum": [
"currentUser"
]
},
{
"description": "Install the app by default in the `Program Files` folder directory requires Administrator access for the installation.\n\nInstaller metadata will be saved under the `HKLM` registry path.",
"type": "string",
"enum": [
"perMachine"
]
},
{
"description": "Combines both modes and allows the user to choose at install time whether to install for the current user or per machine. Note that this mode will require Administrator access even if the user wants to install it for the current user only.\n\nInstaller metadata will be saved under the `HKLM` or `HKCU` registry path based on the user's choice.",
"type": "string",
"enum": [
"both"
]
}
]
},
"DmgConfig": {
"description": "The Apple Disk Image (.dmg) configuration.",
"type": "object",
"properties": {
"background": {
"description": "Image to use as the background in dmg file. Accepted formats: `png`/`jpg`/`gif`.",
"type": [
"string",
"null"
]
},
"windowPosition": {
"description": "Position of volume window on screen.",
"anyOf": [
{
"$ref": "#/definitions/Position"
},
{
"type": "null"
}
]
},
"windowSize": {
"description": "Size of volume window.",
"anyOf": [
{
"$ref": "#/definitions/Size"
},
{
"type": "null"
}
]
},
"appPosition": {
"description": "Position of application file on window.",
"anyOf": [
{
"$ref": "#/definitions/Position"
},
{
"type": "null"
}
]
},
"appFolderPosition": {
"description": "Position of application folder on window.",
"anyOf": [
{
"$ref": "#/definitions/Position"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"Position": {
"description": "Position coordinates struct.",
"type": "object",
"required": [
"x",
"y"
],
"properties": {
"x": {
"description": "X coordinate.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"y": {
"description": "Y coordinate.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"additionalProperties": false
},
"Size": {
"description": "Size struct.",
"type": "object",
"required": [
"height",
"width"
],
"properties": {
"width": {
"description": "Width.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"height": {
"description": "Height.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"additionalProperties": false
}
}
}
================================================
FILE: bindings/packager/nodejs/src/lib.rs
================================================
use napi::{Error, Result, Status};
#[napi_derive::napi]
pub fn cli(args: Vec<String>, bin_name: Option<String>) -> Result<()> {
cargo_packager::cli::try_run(args, bin_name)
.map_err(|e| Error::new(Status::GenericFailure, e.to_string()))
}
#[napi_derive::napi]
pub fn package_app(config: String) -> Result<()> {
let config = serde_json::from_str(&config)
.map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?;
cargo_packager::package(&config)
.map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?;
Ok(())
}
#[napi_derive::napi]
pub fn package_and_sign_app(config: String, signing_config: String) -> Result<()> {
let config = serde_json::from_str(&config)
.map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?;
let signing_config = serde_json::from_str(&signing_config)
.map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?;
cargo_packager::package_and_sign(&config, &signing_config)
.map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?;
Ok(())
}
#[napi_derive::napi]
pub fn init_tracing_subscriber(verbosity: u8) {
cargo_packager::init_tracing_subscriber(verbosity);
}
#[napi_derive::napi]
pub fn log_error(error: String) {
tracing::error!("{}", error);
}
================================================
FILE: bindings/packager/nodejs/src-ts/config.d.ts
================================================
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Describes a shell command to be executed when a CLI hook is triggered.
*/
export type HookCommand =
| string
| {
/**
* The script to execute.
*/
script: string;
/**
* The working directory.
*/
dir?: string | null;
[k: string]: unknown;
};
/**
* An enum representing the available verbosity levels of the logger.
*/
export type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
/**
* Types of supported packages by [`cargo-packager`](https://docs.rs/cargo-packager).
*/
export type PackageFormat = "all" | "default" | "app" | "dmg" | "wix" | "nsis" | "deb" | "appimage" | "pacman";
/**
* The possible app categories. Corresponds to `LSApplicationCategoryType` on macOS and the GNOME desktop categories on Debian.
*/
export type AppCategory =
| "Business"
| "DeveloperTool"
| "Education"
| "Entertainment"
| "Finance"
| "Game"
| "ActionGame"
| "AdventureGame"
| "ArcadeGame"
| "BoardGame"
| "CardGame"
| "CasinoGame"
| "DiceGame"
| "EducationalGame"
| "FamilyGame"
| "KidsGame"
| "MusicGame"
| "PuzzleGame"
| "RacingGame"
| "RolePlayingGame"
| "SimulationGame"
| "SportsGame"
| "StrategyGame"
| "TriviaGame"
| "WordGame"
| "GraphicsAndDesign"
| "HealthcareAndFitness"
| "Lifestyle"
| "Medical"
| "Music"
| "News"
| "Photography"
| "Productivity"
| "Reference"
| "SocialNetworking"
| "Sports"
| "Travel"
| "Utility"
| "Video"
| "Weather";
/**
* *macOS-only**. Corresponds to CFBundleTypeRole
*/
export type BundleTypeRole = "editor" | "viewer" | "shell" | "qLGenerator" | "none";
/**
* A path to a resource (with optional glob pattern) or an object of `src` and `target` paths.
*/
export type Resource =
| string
| {
/**
* The src file or directory, supports glob patterns.
*/
src: string;
/**
* A relative path from the root of the final package.
*
* If `src` is a glob, this will always be treated as a directory where all globbed files will be placed under.
*/
target: string;
[k: string]: unknown;
};
/**
* A list of dependencies specified as either a list of Strings or as a path to a file that lists the dependencies, one per line.
*/
export type Dependencies = string[] | string;
/**
* A wix language.
*/
export type WixLanguage =
| string
| {
/**
* Idenitifier of this language, for example `en-US`
*/
identifier: string;
/**
* The path to a locale (`.wxl`) file. See <https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/build_a_localized_version.html>.
*/
path?: string | null;
[k: string]: unknown;
};
/**
* Compression algorithms used in the NSIS installer.
*
* See <https://nsis.sourceforge.io/Reference/SetCompressor>
*/
export type NsisCompression = "zlib" | "bzip2" | "lzma" | "off";
/**
* Install Modes for the NSIS installer.
*/
export type NSISInstallerMode = "currentUser" | "perMachine" | "both";
/**
* The packaging config.
*/
export interface Config {
/**
* The JSON schema for the config.
*
* Setting this field has no effect, this just exists so we can parse the JSON correctly when it has `$schema` field set.
*/
$schema?: string | null;
/**
* The app name, this is just an identifier that could be used to filter which app to package using `--packages` cli arg when there is multiple apps in the workspace or in the same config.
*
* This field resembles, the `name` field in `Cargo.toml` or `package.json`
*
* If `unset`, the CLI will try to auto-detect it from `Cargo.toml` or `package.json` otherwise, it will keep it unset.
*/
name?: string | null;
/**
* Whether this config is enabled or not. Defaults to `true`.
*/
enabled?: boolean;
/**
* The package's product name, for example "My Awesome App".
*/
productName?: string;
/**
* The package's version.
*/
version?: string;
/**
* The binaries to package.
*/
binaries?: Binary[];
/**
* The application identifier in reverse domain name notation (e.g. `com.packager.example`). This string must be unique across applications since it is used in some system configurations. This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-), and periods (.).
*/
identifier?: string | null;
/**
* The command to run before starting to package an application.
*
* This runs only once.
*/
beforePackagingCommand?: HookCommand | null;
/**
* The command to run before packaging each format for an application.
*
* This will run multiple times depending on the formats specifed.
*/
beforeEachPackageCommand?: HookCommand | null;
/**
* The logging level.
*/
logLevel?: LogLevel | null;
/**
* The packaging formats to create, if not present, [`PackageFormat::platform_default`] is used.
*/
formats?: PackageFormat[] | null;
/**
* The directory where the generated packages will be placed.
*
* If [`Config::binaries_dir`] is not set, this is also where the [`Config::binaries`] exist.
*/
outDir?: string;
/**
* The directory where the [`Config::binaries`] exist.
*
* Defaults to [`Config::out_dir`].
*/
binariesDir?: string | null;
/**
* The target triple we are packaging for.
*
* Defaults to the current OS target triple.
*/
targetTriple?: string | null;
/**
* The package's description.
*/
description?: string | null;
/**
* The app's long description.
*/
longDescription?: string | null;
/**
* The package's homepage.
*/
homepage?: string | null;
/**
* The package's authors.
*/
authors?: string[] | null;
/**
* The app's publisher. Defaults to the second element in [`Config::identifier`](Config::identifier) string. Currently maps to the Manufacturer property of the Windows Installer.
*/
publisher?: string | null;
/**
* A path to the license file.
*/
licenseFile?: string | null;
/**
* The app's copyright.
*/
copyright?: string | null;
/**
* The app's category.
*/
category?: AppCategory | null;
/**
* The app's icon list. Supports glob patterns.
*/
icons?: string[] | null;
/**
* The file associations
*/
fileAssociations?: FileAssociation[] | null;
/**
* Deep-link protocols.
*/
deepLinkProtocols?: DeepLinkProtocol[] | null;
/**
* The app's resources to package. This a list of either a glob pattern, path to a file, path to a directory or an object of `src` and `target` paths. In the case of using an object, the `src` could be either a glob pattern, path to a file, path to a directory, and the `target` is a path inside the final resources folder in the installed package.
*
* ## Format-specific:
*
* - **[PackageFormat::Nsis] / [PackageFormat::Wix]**: The resources are placed next to the executable in the root of the packager. - **[PackageFormat::Deb]**: The resources are placed in `usr/lib` of the package.
*/
resources?: Resource[] | null;
/**
* Paths to external binaries to add to the package.
*
* The path specified should not include `-<target-triple><.exe>` suffix, it will be auto-added when by the packager when reading these paths, so the actual binary name should have the target platform's target triple appended, as well as `.exe` for Windows.
*
* For example, if you're packaging an external binary called `sqlite3`, the packager expects a binary named `sqlite3-x86_64-unknown-linux-gnu` on linux, and `sqlite3-x86_64-pc-windows-gnu.exe` on windows.
*
* If you are building a universal binary for MacOS, the packager expects your external binary to also be universal, and named after the target triple, e.g. `sqlite3-universal-apple-darwin`. See <https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary>
*/
externalBinaries?: string[] | null;
/**
* Windows-specific configuration.
*/
windows?: WindowsConfig | null;
/**
* MacOS-specific configuration.
*/
macos?: MacOsConfig | null;
/**
* Linux-specific configuration
*/
linux?: LinuxConfig | null;
/**
* Debian-specific configuration.
*/
deb?: DebianConfig | null;
/**
* AppImage configuration.
*/
appimage?: AppImageConfig | null;
/**
* Pacman configuration.
*/
pacman?: PacmanConfig | null;
/**
* WiX configuration.
*/
wix?: WixConfig | null;
/**
* Nsis configuration.
*/
nsis?: NsisConfig | null;
/**
* Dmg configuration.
*/
dmg?: DmgConfig | null;
}
/**
* A binary to package within the final package.
*/
export interface Binary {
/**
* Path to the binary (without `.exe` on Windows). If it's relative, it will be resolved from [`Config::out_dir`].
*/
path: string;
/**
* Whether this is the main binary or not
*/
main?: boolean;
}
/**
* A file association configuration.
*/
export interface FileAssociation {
/**
* File extensions to associate with this app. e.g. 'png'
*/
extensions: string[];
/**
* The mime-type e.g. 'image/png' or 'text/plain'. **Linux-only**.
*/
mimeType?: string | null;
/**
* The association description. **Windows-only**. It is displayed on the `Type` column on Windows Explorer.
*/
description?: string | null;
/**
* The name. Maps to `CFBundleTypeName` on macOS. Defaults to the first item in `ext`
*/
name?: string | null;
/**
* The app's role with respect to the type. Maps to `CFBundleTypeRole` on macOS. Defaults to [`BundleTypeRole::Editor`]
*/
role?: BundleTypeRole & string;
}
/**
* Deep link protocol
*/
export interface DeepLinkProtocol {
/**
* URL schemes to associate with this app without `://`. For example `my-app`
*/
schemes: string[];
/**
* The protocol name. **macOS-only** and maps to `CFBundleTypeName`. Defaults to `<bundle-id>.<schemes[0]>`
*/
name?: string | null;
/**
* The app's role for these schemes. **macOS-only** and maps to `CFBundleTypeRole`.
*/
role?: BundleTypeRole & string;
}
/**
* The Windows configuration.
*/
export interface WindowsConfig {
/**
* The file digest algorithm to use for creating file signatures. Required for code signing. SHA-256 is recommended.
*/
digestAlgorithm?: string | null;
/**
* The SHA1 hash of the signing certificate.
*/
certificateThumbprint?: string | null;
/**
* Whether to use Time-Stamp Protocol (TSP, a.k.a. RFC 3161) for the timestamp server. Your code signing provider may use a TSP timestamp server, like e.g. SSL.com does. If so, enable TSP by setting to true.
*/
tsp?: boolean;
/**
* Server to use during timestamping.
*/
timestampUrl?: string | null;
/**
* Whether to validate a second app installation, blocking the user from installing an older version if set to `false`.
*
* For instance, if `1.2.1` is installed, the user won't be able to install app version `1.2.0` or `1.1.5`.
*
* The default value of this flag is `true`.
*/
allowDowngrades?: boolean;
/**
* Specify a custom command to sign the binaries. This command needs to have a `%1` in it which is just a placeholder for the binary path, which we will detect and replace before calling the command.
*
* By Default we use `signtool.exe` which can be found only on Windows so if you are on another platform and want to cross-compile and sign you will need to use another tool like `osslsigncode`.
*/
signCommand?: string | null;
}
/**
* The macOS configuration.
*/
export interface MacOsConfig {
/**
* MacOS frameworks that need to be packaged with the app.
*
* Each string can either be the name of a framework (without the `.framework` extension, e.g. `"SDL2"`), in which case we will search for that framework in the standard install locations (`~/Library/Frameworks/`, `/Library/Frameworks/`, and `/Network/Library/Frameworks/`), or a path to a specific framework bundle (e.g. `./data/frameworks/SDL2.framework`). Note that this setting just makes cargo-packager copy the specified frameworks into the OS X app bundle (under `Foobar.app/Contents/Frameworks/`); you are still responsible for:
*
* - arranging for the compiled binary to link against those frameworks (e.g. by emitting lines like `cargo:rustc-link-lib=framework=SDL2` from your `build.rs` script)
*
* - embedding the correct rpath in your binary (e.g. by running `install_name_tool -add_rpath "@executable_path/../Frameworks" path/to/binary` after compiling)
*/
frameworks?: string[] | null;
/**
* A version string indicating the minimum MacOS version that the packaged app supports (e.g. `"10.11"`). If you are using this config field, you may also want have your `build.rs` script emit `cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.11`.
*/
minimumSystemVersion?: string | null;
/**
* The exception domain to use on the macOS .app package.
*
* This allows communication to the outside world e.g. a web server you're shipping.
*/
exceptionDomain?: string | null;
/**
* Code signing identity.
*
* This is typically of the form: `"Developer ID Application: TEAM_NAME (TEAM_ID)"`.
*/
signingIdentity?: string | null;
/**
* Provider short name for notarization.
*/
providerShortName?: string | null;
/**
* Path to the entitlements.plist file.
*/
entitlements?: string | null;
/**
* Path to the Info.plist file for the package.
*/
infoPlistPath?: string | null;
/**
* Path to the embedded.provisionprofile file for the package.
*/
embeddedProvisionprofilePath?: string | null;
/**
* Apps that need to be packaged within the app.
*/
embeddedApps?: string[] | null;
/**
* Whether this is a background application. If true, the app will not appear in the Dock.
*
* Sets the `LSUIElement` flag in the macOS plist file.
*/
backgroundApp?: boolean;
}
/**
* Linux configuration
*/
export interface LinuxConfig {
/**
* Flag to indicate if desktop entry should be generated.
*/
generateDesktopEntry?: boolean;
}
/**
* The Linux Debian configuration.
*/
export interface DebianConfig {
/**
* The list of Debian dependencies.
*/
depends?: Dependencies | null;
/**
* Path to a custom desktop file Handlebars template.
*
* Available variables: `categories`, `comment` (optional), `exec`, `icon` and `name`.
*
* Default file contents: ```text [Desktop Entry] Categories={{categories}} {{#if comment}} Comment={{comment}} {{/if}} Exec={{exec}} {{exec_arg}} Icon={{icon}} Name={{name}} Terminal=false Type=Application {{#if mime_type}} MimeType={{mime_type}} {{/if}} ```
*
* The `{{exec_arg}}` will be set to: * "%F", if at least one [Config::file_associations] was specified but no deep link protocols were given. * The "%F" arg means that your application can be invoked with multiple file paths. * "%U", if at least one [Config::deep_link_protocols] was specified. * The "%U" arg means that your application can be invoked with multiple URLs. * If both [Config::file_associations] and [Config::deep_link_protocols] were specified, the "%U" arg will be used, causing the file paths to be passed to your app as `file://` URLs. * An empty string "" (nothing) if neither are given. * This means that your application will never be invoked with any URLs or file paths.
*
* To specify a custom `exec_arg`, just use plaintext directly instead of `{{exec_arg}}`: ```text Exec={{exec}} %u ```
*
* See more here: <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables>.
*/
desktopTemplate?: string | null;
/**
* Define the section in Debian Control file. See : <https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections>
*/
section?: string | null;
/**
* Change the priority of the Debian Package. By default, it is set to `optional`. Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra`
*/
priority?: string | null;
/**
* List of custom files to add to the deb package. Maps a dir/file to a dir/file inside the debian package.
*/
files?: {
[k: string]: string;
} | null;
/**
* Name to use for the `Package` field in the Debian Control file. Defaults to [`Config::product_name`] converted to kebab-case.
*/
packageName?: string | null;
}
/**
* The Linux AppImage configuration.
*/
export interface AppImageConfig {
/**
* List of libs that exist in `/usr/lib*` to be include in the final AppImage. The libs will be searched for, using the command `find -L /usr/lib* -name <libname>`
*/
libs?: string[] | null;
/**
* List of binary paths to include in the final AppImage. For example, if you want `xdg-open`, you'd specify `/usr/bin/xdg-open`
*/
bins?: string[] | null;
/**
* List of custom files to add to the appimage package. Maps a dir/file to a dir/file inside the appimage package.
*/
files?: {
[k: string]: string;
} | null;
/**
* A map of [`linuxdeploy`](https://github.com/linuxdeploy/linuxdeploy) plugin name and its URL to be downloaded and executed while packaing the appimage. For example, if you want to use the [`gtk`](https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh) plugin, you'd specify `gtk` as the key and its url as the value.
*/
linuxdeployPlugins?: {
[k: string]: string;
} | null;
/**
* List of globs of libraries to exclude from the final AppImage. For example, to exclude libnss3.so, you'd specify `libnss3*`
*/
excludedLibs?: string[] | null;
}
/**
* The Linux pacman configuration.
*/
export interface PacmanConfig {
/**
* List of custom files to add to the pacman package. Maps a dir/file to a dir/file inside the pacman package.
*/
files?: {
[k: string]: string;
} | null;
/**
* List of softwares that must be installed for the app to build and run.
*
* See : <https://wiki.archlinux.org/title/PKGBUILD#depends>
*/
depends?: Dependencies | null;
/**
* Additional packages that are provided by this app.
*
* See : <https://wiki.archlinux.org/title/PKGBUILD#provides>
*/
provides?: string[] | null;
/**
* Packages that conflict or cause problems with the app. All these packages and packages providing this item will need to be removed
*
* See : <https://wiki.archlinux.org/title/PKGBUILD#conflicts>
*/
conflicts?: string[] | null;
/**
* Only use if this app replaces some obsolete packages. For example, if you rename any package.
*
* See : <https://wiki.archlinux.org/title/PKGBUILD#replaces>
*/
replaces?: string[] | null;
/**
* Source of the package to be stored at PKGBUILD. PKGBUILD is a bash script, so version can be referred as ${pkgver}
*/
source?: string[] | null;
}
/**
* The wix format configuration
*/
export interface WixConfig {
/**
* The app languages to build. See <https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables>.
*/
languages?: WixLanguage[] | null;
/**
* By default, the packager uses an internal template. This option allows you to define your own wix file.
*/
template?: string | null;
/**
* List of merge modules to include in your installer. For example, if you want to include [C++ Redis merge modules]
*
* [C++ Redis merge modules]: https://wixtoolset.org/docs/v3/howtos/redistributables_and_install_checks/install_vcredist/
*/
mergeModules?: string[] | null;
/**
* A list of paths to .wxs files with WiX fragments to use.
*/
fragmentPaths?: string[] | null;
/**
* List of WiX fragments as strings. This is similar to `config.wix.fragments_paths` but is a string so you can define it inline in your config.
*
* ```text <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <CustomAction Id="OpenNotepad" Directory="INSTALLDIR" Execute="immediate" ExeCommand="cmd.exe /c notepad.exe" Return="check" /> <InstallExecuteSequence> <Custom Action="OpenNotepad" After="InstallInitialize" /> </InstallExecuteSequence> </Fragment> </Wix> ```
*/
fragments?: string[] | null;
/**
* The ComponentGroup element ids you want to reference from the fragments.
*/
componentGroupRefs?: string[] | null;
/**
* The Component element ids you want to reference from the fragments.
*/
componentRefs?: string[] | null;
/**
* The CustomAction element ids you want to reference from the fragments.
*/
customActionRefs?: string[] | null;
/**
* The FeatureGroup element ids you want to reference from the fragments.
*/
featureGroupRefs?: string[] | null;
/**
* The Feature element ids you want to reference from the fragments.
*/
featureRefs?: string[] | null;
/**
* The Merge element ids you want to reference from the fragments.
*/
mergeRefs?: string[] | null;
/**
* Path to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer.
*
* The required dimensions are 493px × 58px.
*/
bannerPath?: string | null;
/**
* Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.
*/
dialogImagePath?: string | null;
/**
* Enables FIPS compliant algorithms.
*/
fipsCompliant?: boolean;
}
/**
* The NSIS format configuration.
*/
export interface NsisConfig {
/**
* Set the compression algorithm used to compress files in the installer.
*
* See <https://nsis.sourceforge.io/Reference/SetCompressor>
*/
compression?: NsisCompression | null;
/**
* A custom `.nsi` template to use.
*
* See the default template here <https://github.com/crabnebula-dev/cargo-packager/blob/main/crates/packager/src/package/nsis/installer.nsi>
*/
template?: string | null;
/**
* Logic of an NSIS section that will be ran before the install section.
*
* See the available libraries, dlls and global variables here <https://github.com/crabnebula-dev/cargo-packager/blob/main/crates/packager/src/package/nsis/installer.nsi>
*
* ### Example ```toml [package.metadata.packager.nsis] preinstall-section = """ ; Setup custom messages LangString webview2AbortError ${LANG_ENGLISH} "Failed to install WebView2! The app can't run without it. Try restarting the installer." LangString webview2DownloadError ${LANG_ARABIC} "خطأ: فشل تنزيل WebView2 - $0"
*
* Section PreInstall ; <section logic here> SectionEnd
*
* Section AnotherPreInstall ; <section logic here> SectionEnd """ ```
*/
preinstallSection?: string | null;
/**
* The path to a bitmap file to display on the header of installers pages.
*
* The recommended dimensions are 150px x 57px.
*/
headerImage?: string | null;
/**
* The path to a bitmap file for the Welcome page and the Finish page.
*
* The recommended dimensions are 164px x 314px.
*/
sidebarImage?: string | null;
/**
* The path to an icon file used as the installer icon.
*/
installerIcon?: string | null;
/**
* Whether the installation will be for all users or just the current user.
*/
installMode?: NSISInstallerMode & string;
/**
* A list of installer languages. By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. To allow the user to select the language, set `display_language_selector` to `true`.
*
* See <https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files> for the complete list of languages.
*/
languages?: string[] | null;
/**
* An key-value pair where the key is the language and the value is the path to a custom `.nsi` file that holds the translated text for cargo-packager's custom messages.
*
* See <https://github.com/crabnebula-dev/cargo-packager/blob/main/crates/packager/src/nsis/languages/English.nsh> for an example `.nsi` file.
*
* **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`]languages array,
*/
customLanguageFiles?: {
[k: string]: string;
} | null;
/**
* Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the `languages` array.
*/
displayLanguageSelector?: boolean;
/**
* List of paths where your app stores data. This options tells the uninstaller to provide the user with an option (disabled by default) whether they want to rmeove your app data or keep it.
*
* The path should use a constant from <https://nsis.sourceforge.io/Docs/Chapter4.html#varconstant> in addition to `$IDENTIFIER`, `$PUBLISHER` and `$PRODUCTNAME`, for example, if you store your app data in `C:\\Users\\<user>\\AppData\\Local\\<your-company-name>\\<your-product-name>` you'd need to specify ```toml [package.metadata.packager.nsis] appdata-paths = ["$LOCALAPPDATA/$PUBLISHER/$PRODUCTNAME"] ```
*/
appdataPaths?: string[] | null;
}
/**
* The Apple Disk Image (.dmg) configuration.
*/
export interface DmgConfig {
/**
* Image to use as the background in dmg file. Accepted formats: `png`/`jpg`/`gif`.
*/
background?: string | null;
/**
* Position of volume window on screen.
*/
windowPosition?: Position | null;
/**
* Size of volume window.
*/
windowSize?: Size | null;
/**
* Position of application file on window.
*/
appPosition?: Position | null;
/**
* Position of application folder on window.
*/
appFolderPosition?: Position | null;
}
/**
* Position coordinates struct.
*/
export interface Position {
/**
* X coordinate.
*/
x: number;
/**
* Y coordinate.
*/
y: number;
}
/**
* Size struct.
*/
export interface Size {
/**
* Width.
*/
width: number;
/**
* Height.
*/
height: number;
}
================================================
FILE: bindings/packager/nodejs/src-ts/index.ts
================================================
import cargoPackager from "../index";
import runPlugins from "./plugins";
import merge from "deepmerge";
import type { Config } from "./config";
let tracingEnabled = false;
export interface Options {
verbosity?: number;
}
export interface SigningConfig {
/** The private key to use for signing. */
privateKey: string;
/**
* The private key password.
*
* If `null`, user will be prompted to write a password.
* You can skip the prompt by specifying an empty string.
*/
password?: string;
}
async function packageApp(config: Config = {}, options?: Options) {
const conf = await runPlugins();
let packagerConfig = config;
if (conf) {
packagerConfig = merge(conf, config);
}
if (!tracingEnabled) {
cargoPackager.initTracingSubscriber(options?.verbosity ?? 0);
tracingEnabled = true;
}
cargoPackager.packageApp(JSON.stringify(packagerConfig));
}
async function packageAndSignApp(
config: Config = {},
signingConfig: SigningConfig,
options?: Options,
) {
const conf = await runPlugins();
let packagerConfig = config;
if (conf) {
packagerConfig = merge(conf, con
gitextract_z80xgfak/ ├── .changes/ │ ├── config.json │ └── readme.md ├── .github/ │ └── workflows/ │ ├── audit.yml │ ├── build-examples.yml │ ├── check-nodejs-bindings.yml │ ├── check.yml │ ├── covector-status.yml │ ├── covector-version-or-publish.yml │ ├── integration-tests.yml │ ├── publish-packager-nodejs.yml │ ├── publish-packager-resource-resolver-nodejs.yml │ └── publish-updater-nodejs.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── Cargo.toml ├── LICENSE.spdx ├── LICENSE_APACHE-2.0 ├── LICENSE_MIT ├── README.md ├── SECURITY.md ├── bindings/ │ ├── packager/ │ │ └── nodejs/ │ │ ├── .cargo/ │ │ │ └── config.toml │ │ ├── .npmignore │ │ ├── .npmrc │ │ ├── CHANGELOG.md │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── __test__/ │ │ │ └── index.spec.mjs │ │ ├── build.rs │ │ ├── generate-config-type.js │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── npm/ │ │ │ ├── darwin-arm64/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── darwin-x64/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-arm-gnueabihf/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-arm64-gnu/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-arm64-musl/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-x64-gnu/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-x64-musl/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── win32-arm64-msvc/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── win32-ia32-msvc/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ └── win32-x64-msvc/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── package.json │ │ ├── packager.js │ │ ├── schema.json │ │ ├── src/ │ │ │ └── lib.rs │ │ ├── src-ts/ │ │ │ ├── config.d.ts │ │ │ ├── index.ts │ │ │ └── plugins/ │ │ │ ├── electron/ │ │ │ │ ├── index.ts │ │ │ │ └── prune.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── resource-resolver/ │ │ └── nodejs/ │ │ ├── .cargo/ │ │ │ └── config.toml │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── __test__/ │ │ │ └── index.spec.mjs │ │ ├── build.rs │ │ ├── fix-types.js │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── npm/ │ │ │ ├── darwin-arm64/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── darwin-x64/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-arm-gnueabihf/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-arm64-gnu/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-arm64-musl/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-x64-gnu/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── linux-x64-musl/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── win32-arm64-msvc/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ ├── win32-ia32-msvc/ │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ └── win32-x64-msvc/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── package.json │ │ └── src/ │ │ └── lib.rs │ └── updater/ │ └── nodejs/ │ ├── .cargo/ │ │ └── config.toml │ ├── .npmignore │ ├── CHANGELOG.md │ ├── Cargo.toml │ ├── README.md │ ├── __test__/ │ │ ├── app/ │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── package.json │ │ │ └── preload.js │ │ └── index.spec.mjs │ ├── build.rs │ ├── index.d.ts │ ├── index.js │ ├── npm/ │ │ ├── darwin-arm64/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── darwin-x64/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── linux-arm-gnueabihf/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── linux-arm64-gnu/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── linux-arm64-musl/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── linux-x64-gnu/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── linux-x64-musl/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── win32-arm64-msvc/ │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── win32-ia32-msvc/ │ │ │ ├── README.md │ │ │ └── package.json │ │ └── win32-x64-msvc/ │ │ ├── README.md │ │ └── package.json │ ├── package.json │ └── src/ │ ├── from_impls.rs │ └── lib.rs ├── crates/ │ ├── config-schema-generator/ │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src/ │ │ └── main.rs │ ├── packager/ │ │ ├── CHANGELOG.md │ │ ├── Cargo.toml │ │ ├── LICENSE_APACHE-2.0 │ │ ├── LICENSE_MIT │ │ ├── README.md │ │ ├── schema.json │ │ └── src/ │ │ ├── bin/ │ │ │ └── cargo-packager.rs │ │ ├── cli/ │ │ │ ├── config.rs │ │ │ ├── error.rs │ │ │ ├── mod.rs │ │ │ └── signer/ │ │ │ ├── generate.rs │ │ │ ├── mod.rs │ │ │ └── sign.rs │ │ ├── codesign/ │ │ │ ├── macos.rs │ │ │ ├── mod.rs │ │ │ └── windows.rs │ │ ├── config/ │ │ │ ├── builder.rs │ │ │ ├── category.rs │ │ │ └── mod.rs │ │ ├── error.rs │ │ ├── lib.rs │ │ ├── package/ │ │ │ ├── app/ │ │ │ │ └── mod.rs │ │ │ ├── appimage/ │ │ │ │ ├── appimage │ │ │ │ └── mod.rs │ │ │ ├── context.rs │ │ │ ├── deb/ │ │ │ │ ├── main.desktop │ │ │ │ └── mod.rs │ │ │ ├── dmg/ │ │ │ │ ├── eula-resources-template.xml │ │ │ │ ├── mod.rs │ │ │ │ └── template.applescript │ │ │ ├── mod.rs │ │ │ ├── nsis/ │ │ │ │ ├── FileAssociation.nsh │ │ │ │ ├── installer.nsi │ │ │ │ ├── languages/ │ │ │ │ │ ├── Arabic.nsh │ │ │ │ │ ├── Bulgarian.nsh │ │ │ │ │ ├── Dutch.nsh │ │ │ │ │ ├── English.nsh │ │ │ │ │ ├── French.nsh │ │ │ │ │ ├── Japanese.nsh │ │ │ │ │ ├── Korean.nsh │ │ │ │ │ ├── Persian.nsh │ │ │ │ │ ├── PortugueseBR.nsh │ │ │ │ │ ├── SimpChinese.nsh │ │ │ │ │ ├── Spanish.nsh │ │ │ │ │ ├── SpanishInternational.nsh │ │ │ │ │ ├── Swedish.nsh │ │ │ │ │ ├── TradChinese.nsh │ │ │ │ │ └── Turkish.nsh │ │ │ │ └── mod.rs │ │ │ ├── pacman/ │ │ │ │ └── mod.rs │ │ │ └── wix/ │ │ │ ├── default-locale-strings.xml │ │ │ ├── languages.json │ │ │ ├── main.wxs │ │ │ └── mod.rs │ │ ├── shell.rs │ │ ├── sign.rs │ │ └── util.rs │ ├── resource-resolver/ │ │ ├── CHANGELOG.md │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── error.rs │ │ └── lib.rs │ ├── updater/ │ │ ├── CHANGELOG.md │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src/ │ │ │ ├── custom_serialization.rs │ │ │ ├── error.rs │ │ │ └── lib.rs │ │ └── tests/ │ │ ├── app/ │ │ │ ├── Cargo.toml │ │ │ └── src/ │ │ │ └── main.rs │ │ ├── dummy.key │ │ ├── dummy.pub.key │ │ └── update.rs │ └── utils/ │ ├── CHANGELOG.md │ ├── Cargo.toml │ ├── README.md │ └── src/ │ ├── current_exe.rs │ └── lib.rs ├── deny.toml ├── examples/ │ ├── deno/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── deno-example.js │ │ └── packager.json │ ├── dioxus/ │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ └── main.rs │ ├── egui/ │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ └── main.rs │ ├── electron/ │ │ ├── .gitignore │ │ ├── index.html │ │ ├── main.js │ │ ├── package.json │ │ └── preload.js │ ├── slint/ │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── build.rs │ │ ├── src/ │ │ │ └── main.rs │ │ └── ui/ │ │ └── appwindow.slint │ ├── tauri/ │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── build.rs │ │ ├── capabilities/ │ │ │ └── base.json │ │ ├── dummy.key │ │ ├── dummy.pub.key │ │ ├── icons/ │ │ │ └── icon.icns │ │ ├── src/ │ │ │ └── main.rs │ │ ├── src-ui/ │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── styles.css │ │ └── tauri.conf.json │ ├── wails/ │ │ ├── .gitignore │ │ ├── Packager.toml │ │ ├── README.md │ │ ├── app.go │ │ ├── build.sh │ │ ├── frontend/ │ │ │ ├── app.css │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── style.css │ │ │ └── wailsjs/ │ │ │ ├── go/ │ │ │ │ └── main/ │ │ │ │ ├── App.d.ts │ │ │ │ └── App.js │ │ │ └── runtime/ │ │ │ ├── package.json │ │ │ ├── runtime.d.ts │ │ │ └── runtime.js │ │ ├── go.mod │ │ ├── go.sum │ │ ├── main.go │ │ └── wails.json │ └── wry/ │ ├── .gitignore │ ├── Cargo.toml │ ├── README.md │ └── src/ │ └── main.rs ├── package.json ├── pnpm-workspace.yaml └── renovate.json
SYMBOL INDEX (645 symbols across 68 files)
FILE: bindings/packager/nodejs/build.rs
function main (line 3) | fn main() {
FILE: bindings/packager/nodejs/index.js
function isMusl (line 16) | function isMusl() {
FILE: bindings/packager/nodejs/src-ts/config.d.ts
type HookCommand (line 11) | type HookCommand =
type LogLevel (line 27) | type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
type PackageFormat (line 31) | type PackageFormat = "all" | "default" | "app" | "dmg" | "wix" | "nsis" ...
type AppCategory (line 35) | type AppCategory =
type BundleTypeRole (line 79) | type BundleTypeRole = "editor" | "viewer" | "shell" | "qLGenerator" | "n...
type Resource (line 83) | type Resource =
type Dependencies (line 101) | type Dependencies = string[] | string;
type WixLanguage (line 105) | type WixLanguage =
type NsisCompression (line 123) | type NsisCompression = "zlib" | "bzip2" | "lzma" | "off";
type NSISInstallerMode (line 127) | type NSISInstallerMode = "currentUser" | "perMachine" | "both";
type Config (line 132) | interface Config {
type Binary (line 307) | interface Binary {
type FileAssociation (line 320) | interface FileAssociation {
type DeepLinkProtocol (line 345) | interface DeepLinkProtocol {
type WindowsConfig (line 362) | interface WindowsConfig {
type MacOsConfig (line 397) | interface MacOsConfig {
type LinuxConfig (line 454) | interface LinuxConfig {
type DebianConfig (line 463) | interface DebianConfig {
type AppImageConfig (line 504) | interface AppImageConfig {
type PacmanConfig (line 533) | interface PacmanConfig {
type WixConfig (line 572) | interface WixConfig {
type NsisConfig (line 639) | interface NsisConfig {
type DmgConfig (line 714) | interface DmgConfig {
type Position (line 739) | interface Position {
type Size (line 752) | interface Size {
FILE: bindings/packager/nodejs/src-ts/index.ts
type Options (line 8) | interface Options {
type SigningConfig (line 12) | interface SigningConfig {
function packageApp (line 24) | async function packageApp(config: Config = {}, options?: Options) {
function packageAndSignApp (line 40) | async function packageAndSignApp(
function cli (line 63) | async function cli(args: string[], binName: string) {
function logError (line 72) | function logError(error: string) {
FILE: bindings/packager/nodejs/src-ts/plugins/electron/index.ts
function run (line 10) | async function run(
function binaryScript (line 218) | function binaryScript(binaryName: string): string {
FILE: bindings/packager/nodejs/src-ts/plugins/electron/prune.ts
constant ELECTRON_MODULES (line 7) | const ELECTRON_MODULES = [
function normalizePath (line 14) | function normalizePath(path: string): string {
class Pruner (line 18) | class Pruner {
method constructor (line 25) | constructor(dir: string, quiet: boolean) {
method setModules (line 36) | setModules(moduleMap: ModuleMap) {
method pruneModule (line 44) | async pruneModule(name: string) {
method shouldKeepModule (line 56) | shouldKeepModule(module: Module, isDevDep: boolean) {
method isProductionModule (line 72) | isProductionModule(name: string): boolean {
function isNodeModuleFolder (line 77) | function isNodeModuleFolder(pathToCheck: string) {
function isModule (line 86) | async function isModule(pathToCheck: string) {
FILE: bindings/packager/nodejs/src-ts/plugins/index.ts
type PackageJson (line 7) | interface PackageJson {
function getPackageJsonPath (line 14) | function getPackageJsonPath(): string | null {
function run (line 29) | async function run(): Promise<Partial<Config> | null> {
FILE: bindings/packager/nodejs/src/lib.rs
function cli (line 4) | pub fn cli(args: Vec<String>, bin_name: Option<String>) -> Result<()> {
function package_app (line 10) | pub fn package_app(config: String) -> Result<()> {
function package_and_sign_app (line 19) | pub fn package_and_sign_app(config: String, signing_config: String) -> R...
function init_tracing_subscriber (line 30) | pub fn init_tracing_subscriber(verbosity: u8) {
function log_error (line 35) | pub fn log_error(error: String) {
FILE: bindings/resource-resolver/nodejs/build.rs
function main (line 3) | fn main() {
FILE: bindings/resource-resolver/nodejs/index.d.ts
type PackageFormat (line 7) | const enum PackageFormat {
FILE: bindings/resource-resolver/nodejs/index.js
function isMusl (line 16) | function isMusl() {
FILE: bindings/resource-resolver/nodejs/src/lib.rs
type PackageFormat (line 8) | pub enum PackageFormat {
method from (line 24) | fn from(value: PackageFormat) -> Self {
function resources_dir (line 38) | pub fn resources_dir(package_format: PackageFormat) -> Result<String> {
FILE: bindings/updater/nodejs/__test__/app/main.js
constant UPDATER_PUB_KEY (line 5) | const UPDATER_PUB_KEY =
constant CURRENT_VERSION (line 8) | const CURRENT_VERSION = "{{version}}";
FILE: bindings/updater/nodejs/build.rs
function main (line 3) | fn main() {
FILE: bindings/updater/nodejs/index.d.ts
type WindowsUpdateInstallMode (line 6) | const enum WindowsUpdateInstallMode {
type UpdaterWindowsOptions (line 17) | interface UpdaterWindowsOptions {
type Options (line 23) | interface Options {
type UpdateFormat (line 40) | const enum UpdateFormat {
class Update (line 51) | class Update {
FILE: bindings/updater/nodejs/index.js
function isMusl (line 16) | function isMusl() {
FILE: bindings/updater/nodejs/src/from_impls.rs
function from (line 4) | fn from(value: WindowsUpdateInstallMode) -> Self {
method from (line 14) | fn from(value: cargo_packager_updater::WindowsUpdateInstallMode) -> Self {
method from (line 24) | fn from(value: cargo_packager_updater::WindowsConfig) -> Self {
function from (line 32) | fn from(value: UpdaterWindowsOptions) -> Self {
function from (line 41) | fn from(value: Options) -> Self {
method from (line 55) | fn from(value: cargo_packager_updater::UpdateFormat) -> Self {
function from (line 65) | fn from(value: UpdateFormat) -> Self {
method from (line 76) | fn from(value: cargo_packager_updater::Update) -> Self {
FILE: bindings/updater/nodejs/src/lib.rs
type WindowsUpdateInstallMode (line 18) | pub enum WindowsUpdateInstallMode {
type UpdaterWindowsOptions (line 31) | pub struct UpdaterWindowsOptions {
type Options (line 39) | pub struct Options {
method into_updater (line 57) | fn into_updater(mut self, current_version: Version) -> Result<Updater> {
type UpdateFormat (line 96) | pub enum UpdateFormat {
type Update (line 108) | pub struct Update {
method create_update (line 138) | fn create_update(&self) -> Result<cargo_packager_updater::Update> {
method download (line 336) | pub fn download(
method install (line 345) | pub fn install(&self, bytes: JsArrayBuffer) -> Result<AsyncTask<Instal...
method download_and_install (line 355) | pub fn download_and_install(
type TaskCallbackFunction (line 182) | type TaskCallbackFunction<T> = Option<ThreadsafeFunction<T, ErrorStrateg...
type DownloadTask (line 184) | pub struct DownloadTask {
method create (line 191) | pub fn create(
type Output (line 205) | type Output = Vec<u8>;
type JsValue (line 206) | type JsValue = JsArrayBuffer;
method compute (line 208) | fn compute(&mut self) -> Result<Self::Output> {
method resolve (line 229) | fn resolve(&mut self, env: Env, output: Self::Output) -> Result<Self::Js...
type InstallTask (line 237) | pub struct InstallTask {
method create (line 243) | pub fn create(update: &Update, bytes: Vec<u8>) -> Result<Self> {
type Output (line 252) | type Output = ();
type JsValue (line 253) | type JsValue = ();
method compute (line 255) | fn compute(&mut self) -> Result<Self::Output> {
method resolve (line 261) | fn resolve(&mut self, _env: Env, _output: Self::Output) -> Result<Self::...
type DownloadAndInstallTask (line 266) | pub struct DownloadAndInstallTask {
method new (line 271) | pub fn new(download_task: DownloadTask) -> Self {
type Output (line 277) | type Output = ();
type JsValue (line 278) | type JsValue = ();
method compute (line 280) | fn compute(&mut self) -> Result<Self::Output> {
method resolve (line 288) | fn resolve(&mut self, _env: Env, _output: Self::Output) -> Result<Self::...
type CheckUpdateTask (line 293) | pub struct CheckUpdateTask {
method create (line 298) | pub fn create(current_version: String, options: Options) -> Result<Sel...
type Output (line 313) | type Output = Option<cargo_packager_updater::Update>;
type JsValue (line 314) | type JsValue = Option<Update>;
method compute (line 316) | fn compute(&mut self) -> Result<Self::Output> {
method resolve (line 325) | fn resolve(&mut self, _env: Env, output: Self::Output) -> Result<Self::J...
function check_update (line 366) | pub fn check_update(
FILE: crates/config-schema-generator/build.rs
function main (line 13) | pub fn main() -> Result<(), Box<dyn Error>> {
FILE: crates/config-schema-generator/src/main.rs
function main (line 5) | fn main() {}
FILE: crates/packager/src/bin/cargo-packager.rs
function main (line 7) | fn main() {
FILE: crates/packager/src/cli/config.rs
method name (line 15) | pub(crate) fn name(&self) -> &str {
method should_pacakge (line 20) | pub(crate) fn should_pacakge(&self, cli: &super::Cli) -> bool {
function find_nearset_pkg_name (line 32) | fn find_nearset_pkg_name(path: &Path) -> Result<Option<String>> {
function parse_config_file (line 63) | fn parse_config_file<P: AsRef<Path> + Debug>(path: P) -> Result<Vec<(Opt...
function find_config_files (line 109) | fn find_config_files() -> crate::Result<Vec<PathBuf>> {
function load_configs_from_cargo_workspace (line 127) | fn load_configs_from_cargo_workspace(cli: &super::Cli) -> Result<Vec<(Op...
function detect_configs (line 230) | pub fn detect_configs(cli: &super::Cli) -> Result<Vec<(Option<PathBuf>, ...
FILE: crates/packager/src/cli/error.rs
type Error (line 13) | pub enum Error {
type Result (line 59) | pub type Result<T> = std::result::Result<T, Error>;
FILE: crates/packager/src/cli/mod.rs
type Commands (line 23) | enum Commands {
type Cli (line 36) | pub(crate) struct Cli {
function run_cli (line 94) | fn run_cli(cli: Cli) -> Result<()> {
function run (line 229) | pub fn run<I, A>(args: I, bin_name: Option<String>)
function try_run (line 241) | pub fn try_run<I, A>(args: I, bin_name: Option<String>) -> Result<()>
FILE: crates/packager/src/cli/signer/generate.rs
type Options (line 14) | pub struct Options {
function command (line 29) | pub fn command(mut options: Options) -> Result<()> {
FILE: crates/packager/src/cli/signer/mod.rs
type Commands (line 13) | enum Commands {
type Options (line 20) | pub struct Options {
function command (line 25) | pub fn command(options: Options) -> Result<()> {
FILE: crates/packager/src/cli/signer/sign.rs
type Options (line 14) | pub struct Options {
function command (line 25) | pub fn command(options: Options) -> Result<()> {
FILE: crates/packager/src/codesign/macos.rs
constant KEYCHAIN_ID (line 19) | const KEYCHAIN_ID: &str = "cargo-packager.keychain";
constant KEYCHAIN_PWD (line 20) | const KEYCHAIN_PWD: &str = "cargo-packager";
function setup_keychain (line 29) | pub fn setup_keychain(
function delete_keychain (line 139) | pub fn delete_keychain() {
type SignTarget (line 148) | pub struct SignTarget {
method cmp (line 154) | fn cmp(&self, other: &Self) -> Ordering {
method partial_cmp (line 165) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
function try_sign (line 171) | pub fn try_sign(targets: Vec<SignTarget>, identity: &str, config: &Confi...
function sign (line 212) | fn sign(
type NotarytoolSubmitOutput (line 254) | struct NotarytoolSubmitOutput {
function notarize (line 261) | pub fn notarize(
function staple_app (line 361) | fn staple_app(app_bundle_path: PathBuf) -> crate::Result<()> {
type NotarytoolCmdExt (line 381) | pub trait NotarytoolCmdExt {
method notarytool_args (line 382) | fn notarytool_args(&mut self, auth: &MacOsNotarizationCredentials) -> ...
method notarytool_args (line 386) | fn notarytool_args(&mut self, auth: &MacOsNotarizationCredentials) -> ...
function notarize_auth (line 421) | pub fn notarize_auth() -> crate::Result<MacOsNotarizationCredentials> {
function find_api_key (line 491) | fn find_api_key(folder: PathBuf, file_name: &OsString) -> Option<PathBuf> {
FILE: crates/packager/src/codesign/windows.rs
type SignParams (line 20) | pub struct SignParams {
method can_sign (line 30) | pub(crate) fn can_sign(&self) -> bool {
method custom_sign_command (line 37) | pub(crate) fn custom_sign_command(&self) -> bool {
method sign_params (line 43) | pub(crate) fn sign_params(&self) -> SignParams {
constant INSTALLED_ROOTS_REGKEY_PATH (line 65) | const INSTALLED_ROOTS_REGKEY_PATH: &str = r"SOFTWARE\Microsoft\Windows K...
constant KITS_ROOT_REGVALUE_NAME (line 66) | const KITS_ROOT_REGVALUE_NAME: &str = r"KitsRoot10";
function signtool (line 125) | fn signtool() -> Option<PathBuf> {
function sign_command_custom (line 130) | pub fn sign_command_custom<P: AsRef<Path> + Debug>(
function sign_command_default (line 155) | pub fn sign_command_default<P: AsRef<Path> + Debug>(
function sign_command (line 182) | pub fn sign_command<P: AsRef<Path> + Debug>(
function sign_custom (line 198) | pub fn sign_custom<P: AsRef<Path> + Debug>(path: P, custom_command: &str...
function sign_default (line 220) | pub fn sign_default<P: AsRef<Path> + Debug>(path: P, params: &SignParams...
function sign (line 242) | pub fn sign<P: AsRef<Path> + Debug>(path: P, params: &SignParams) -> cra...
function try_sign (line 255) | pub fn try_sign(
FILE: crates/packager/src/config/builder.rs
type ConfigBuilder (line 12) | pub struct ConfigBuilder(Config);
method new (line 16) | pub fn new() -> Self {
method config (line 21) | pub fn config(&self) -> &Config {
method product_name (line 26) | pub fn product_name<S: Into<String>>(mut self, product_name: S) -> Self {
method version (line 32) | pub fn version<S: Into<String>>(mut self, version: S) -> Self {
method binaries (line 38) | pub fn binaries<I: IntoIterator<Item = Binary>>(mut self, binaries: I)...
method identifier (line 44) | pub fn identifier<S: Into<String>>(mut self, identifier: S) -> Self {
method before_packaging_command (line 50) | pub fn before_packaging_command(mut self, command: HookCommand) -> Self {
method before_each_package_command (line 56) | pub fn before_each_package_command(mut self, command: HookCommand) -> ...
method log_level (line 62) | pub fn log_level(mut self, level: LogLevel) -> Self {
method formats (line 68) | pub fn formats<I: IntoIterator<Item = PackageFormat>>(mut self, format...
method out_dir (line 74) | pub fn out_dir<P: Into<PathBuf>>(mut self, path: P) -> Self {
method target_triple (line 80) | pub fn target_triple<S: Into<String>>(mut self, target_triple: S) -> S...
method description (line 86) | pub fn description<S: Into<String>>(mut self, description: S) -> Self {
method long_description (line 92) | pub fn long_description<S: Into<String>>(mut self, long_description: S...
method homepage (line 98) | pub fn homepage<S: Into<String>>(mut self, homepage: S) -> Self {
method authors (line 104) | pub fn authors<I, S>(mut self, authors: I) -> Self
method publisher (line 116) | pub fn publisher<S: Into<String>>(mut self, publisher: S) -> Self {
method license_file (line 122) | pub fn license_file<P: Into<PathBuf>>(mut self, license_file: P) -> Se...
method copyright (line 128) | pub fn copyright<S: Into<String>>(mut self, copyright: S) -> Self {
method icons (line 134) | pub fn icons<I, S>(mut self, icons: I) -> Self
method file_associations (line 146) | pub fn file_associations<I: IntoIterator<Item = FileAssociation>>(
method resources (line 157) | pub fn resources<I: IntoIterator<Item = Resource>>(mut self, resources...
method external_binaries (line 163) | pub fn external_binaries<I, P>(mut self, external_binaries: I) -> Self
method windows (line 175) | pub fn windows(mut self, windows: WindowsConfig) -> Self {
method macos (line 181) | pub fn macos(mut self, macos: MacOsConfig) -> Self {
method wix (line 187) | pub fn wix(mut self, wix: WixConfig) -> Self {
method nsis (line 193) | pub fn nsis(mut self, nsis: NsisConfig) -> Self {
method deb (line 199) | pub fn deb(mut self, deb: DebianConfig) -> Self {
method appimage (line 205) | pub fn appimage(mut self, appimage: AppImageConfig) -> Self {
method pacman (line 211) | pub fn pacman(mut self, pacman: PacmanConfig) -> Self {
FILE: crates/packager/src/config/category.rs
constant CONFIDENCE_THRESHOLD (line 11) | const CONFIDENCE_THRESHOLD: f64 = 0.8;
constant MACOS_APP_CATEGORY_PREFIX (line 13) | const MACOS_APP_CATEGORY_PREFIX: &str = "public.app-category.";
type AppCategory (line 21) | pub enum AppCategory {
method canonical (line 101) | fn canonical(self) -> &'static str {
method gnome_desktop_categories (line 148) | pub fn gnome_desktop_categories(self) -> &'static str {
method macos_application_category_type (line 195) | pub fn macos_application_category_type(self) -> &'static str {
method deserialize (line 242) | fn deserialize<D: serde::Deserializer<'d>>(deserializer: D) -> Result<...
type Err (line 65) | type Err = Option<&'static str>;
method from_str (line 69) | fn from_str(input: &str) -> Result<AppCategory, Self::Err> {
type AppCategoryVisitor (line 247) | struct AppCategoryVisitor {
type Value (line 252) | type Value = AppCategory;
method expecting (line 254) | fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
method visit_str (line 264) | fn visit_str<E: serde::de::Error>(mut self, value: &str) -> Result<App...
constant CATEGORY_STRINGS (line 276) | const CATEGORY_STRINGS: &[(&str, AppCategory)] = &[
function category_from_string_ok (line 358) | fn category_from_string_ok() {
function category_from_string_did_you_mean (line 403) | fn category_from_string_did_you_mean() {
function category_from_string_totally_wrong (line 413) | fn category_from_string_totally_wrong() {
function ls_application_category_type_round_trip (line 419) | fn ls_application_category_type_round_trip() {
FILE: crates/packager/src/config/mod.rs
type BundleTypeRole (line 33) | pub enum BundleTypeRole {
method fmt (line 48) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type FileAssociation (line 64) | pub struct FileAssociation {
method new (line 82) | pub fn new<I, S>(extensions: I) -> Self
method extensions (line 97) | pub fn extensions<I, S>(mut self, extensions: I) -> Self
method mime_type (line 107) | pub fn mime_type<S: Into<String>>(mut self, mime_type: S) -> Self {
method description (line 113) | pub fn description<S: Into<String>>(mut self, description: S) -> Self {
method name (line 119) | pub fn name<S: Into<String>>(mut self, name: S) -> Self {
method role (line 126) | pub fn role(mut self, role: BundleTypeRole) -> Self {
type DeepLinkProtocol (line 137) | pub struct DeepLinkProtocol {
method new (line 149) | pub fn new<I, S>(schemes: I) -> Self
method name (line 162) | pub fn name<S: Into<String>>(mut self, name: S) -> Self {
method role (line 169) | pub fn role(mut self, role: BundleTypeRole) -> Self {
type DebianConfig (line 180) | pub struct DebianConfig {
method new (line 238) | pub fn new() -> Self {
method depends (line 243) | pub fn depends<I, S>(mut self, depends: I) -> Self
method depends_path (line 256) | pub fn depends_path<P>(mut self, path: P) -> Self
method desktop_template (line 284) | pub fn desktop_template<P: Into<PathBuf>>(mut self, desktop_template: ...
method section (line 290) | pub fn section<S: Into<String>>(mut self, section: S) -> Self {
method priority (line 297) | pub fn priority<S: Into<String>>(mut self, priority: S) -> Self {
method files (line 304) | pub fn files<I, S, T>(mut self, files: I) -> Self
type Dependencies (line 326) | pub enum Dependencies {
method to_list (line 341) | pub fn to_list(&self) -> crate::Result<Vec<String>> {
type AppImageConfig (line 368) | pub struct AppImageConfig {
method new (line 394) | pub fn new() -> Self {
method libs (line 401) | pub fn libs<I, S>(mut self, libs: I) -> Self
method bins (line 413) | pub fn bins<I, S>(mut self, bins: I) -> Self
method files (line 425) | pub fn files<I, S, T>(mut self, files: I) -> Self
method linuxdeploy_plugins (line 445) | pub fn linuxdeploy_plugins<I, S, T>(mut self, linuxdeploy_plugins: I) ...
type PacmanConfig (line 466) | pub struct PacmanConfig {
method new (line 495) | pub fn new() -> Self {
method files (line 500) | pub fn files<I, S, T>(mut self, files: I) -> Self
method depends (line 516) | pub fn depends<I, S>(mut self, depends: I) -> Self
method depends_path (line 529) | pub fn depends_path<P>(mut self, path: P) -> Self
method provides (line 538) | pub fn provides<I, S>(mut self, provides: I) -> Self
method conflicts (line 548) | pub fn conflicts<I, S>(mut self, conflicts: I) -> Self
method replaces (line 558) | pub fn replaces<I, S>(mut self, replaces: I) -> Self
method source (line 568) | pub fn source<I, S>(mut self, source: I) -> Self
type Position (line 583) | pub struct Position {
type Size (line 594) | pub struct Size {
type DmgConfig (line 606) | pub struct DmgConfig {
method new (line 627) | pub fn new() -> Self {
method background (line 632) | pub fn background<P: Into<PathBuf>>(mut self, path: P) -> Self {
method window_position (line 638) | pub fn window_position(mut self, position: Position) -> Self {
method window_size (line 644) | pub fn window_size(mut self, size: Size) -> Self {
method app_position (line 650) | pub fn app_position(mut self, position: Position) -> Self {
method app_folder_position (line 656) | pub fn app_folder_position(mut self, position: Position) -> Self {
type MacOsNotarizationCredentials (line 664) | pub enum MacOsNotarizationCredentials {
type MacOsConfig (line 701) | pub struct MacOsConfig {
method new (line 768) | pub fn new() -> Self {
method frameworks (line 782) | pub fn frameworks<I, S>(mut self, frameworks: I) -> Self
method minimum_system_version (line 794) | pub fn minimum_system_version<S: Into<String>>(mut self, minimum_syste...
method exception_domain (line 803) | pub fn exception_domain<S: Into<String>>(mut self, exception_domain: S...
method signing_identity (line 809) | pub fn signing_identity<S: Into<String>>(mut self, signing_identity: S...
method provider_short_name (line 815) | pub fn provider_short_name<S: Into<String>>(mut self, provider_short_n...
method entitlements (line 821) | pub fn entitlements<S: Into<String>>(mut self, entitlements: S) -> Self {
method info_plist_path (line 827) | pub fn info_plist_path<S: Into<PathBuf>>(mut self, info_plist_path: S)...
method embedded_provisionprofile_path (line 833) | pub fn embedded_provisionprofile_path<S: Into<PathBuf>>(
method embedded_apps (line 843) | pub fn embedded_apps<I, S>(mut self, embedded_apps: I) -> Self
type LinuxConfig (line 859) | pub struct LinuxConfig {
type WixLanguage (line 874) | pub enum WixLanguage {
method default (line 887) | fn default() -> Self {
type WixConfig (line 897) | pub struct WixConfig {
method new (line 963) | pub fn new() -> Self {
method languages (line 968) | pub fn languages<I: IntoIterator<Item = WixLanguage>>(mut self, langua...
method template (line 975) | pub fn template<P: Into<PathBuf>>(mut self, template: P) -> Self {
method merge_modules (line 984) | pub fn merge_modules<I, P>(mut self, merge_modules: I) -> Self
method fragment_paths (line 995) | pub fn fragment_paths<I, S>(mut self, fragment_paths: I) -> Self
method fragments (line 1019) | pub fn fragments<I, S>(mut self, fragments: I) -> Self
method component_group_refs (line 1030) | pub fn component_group_refs<I, S>(mut self, component_group_refs: I) -...
method component_refs (line 1041) | pub fn component_refs<I, S>(mut self, component_refs: I) -> Self
method custom_action_refs (line 1052) | pub fn custom_action_refs<I, S>(mut self, custom_action_refs: I) -> Self
method feature_group_refs (line 1063) | pub fn feature_group_refs<I, S>(mut self, feature_group_refs: I) -> Self
method feature_refs (line 1074) | pub fn feature_refs<I, S>(mut self, feature_refs: I) -> Self
method merge_refs (line 1085) | pub fn merge_refs<I, S>(mut self, merge_refs: I) -> Self
method banner_path (line 1099) | pub fn banner_path<P: Into<PathBuf>>(mut self, path: P) -> Self {
method dialog_image_path (line 1107) | pub fn dialog_image_path<P: Into<PathBuf>>(mut self, path: P) -> Self {
method fips_compliant (line 1113) | pub fn fips_compliant(mut self, fips_compliant: bool) -> Self {
type NSISInstallerMode (line 1125) | pub enum NSISInstallerMode {
type NsisCompression (line 1153) | pub enum NsisCompression {
type NsisConfig (line 1169) | pub struct NsisConfig {
method new (line 1259) | pub fn new() -> Self {
method compression (line 1266) | pub fn compression(mut self, compression: NsisCompression) -> Self {
method template (line 1275) | pub fn template<P: Into<PathBuf>>(mut self, template: P) -> Self {
method preinstall_section (line 1302) | pub fn preinstall_section<S: Into<String>>(mut self, preinstall_sectio...
method header_image (line 1310) | pub fn header_image<P: Into<PathBuf>>(mut self, header_image: P) -> Se...
method sidebar_image (line 1318) | pub fn sidebar_image<P: Into<PathBuf>>(mut self, sidebar_image: P) -> ...
method installer_icon (line 1324) | pub fn installer_icon<P: Into<PathBuf>>(mut self, installer_icon: P) -...
method install_mode (line 1330) | pub fn install_mode(mut self, install_mode: NSISInstallerMode) -> Self {
method languages (line 1340) | pub fn languages<I, S>(mut self, languages: I) -> Self
method custom_language_files (line 1356) | pub fn custom_language_files<I, S, P>(mut self, custom_language_files:...
method display_language_selector (line 1373) | pub fn display_language_selector(mut self, display: bool) -> Self {
method appdata_paths (line 1390) | pub fn appdata_paths<I, S>(mut self, appdata_paths: I) -> Self
type WindowsConfig (line 1406) | pub struct WindowsConfig {
method new (line 1458) | pub fn new() -> Self {
method digest_algorithm (line 1463) | pub fn digest_algorithm<S: Into<String>>(mut self, digest_algorithm: S...
method certificate_thumbprint (line 1469) | pub fn certificate_thumbprint<S: Into<String>>(mut self, certificate_t...
method tsp (line 1477) | pub fn tsp(mut self, tsp: bool) -> Self {
method timestamp_url (line 1483) | pub fn timestamp_url<S: Into<String>>(mut self, timestamp_url: S) -> S...
method allow_downgrades (line 1493) | pub fn allow_downgrades(mut self, allow: bool) -> Self {
method default (line 1444) | fn default() -> Self {
type LogLevel (line 1506) | pub enum LogLevel {
type Binary (line 1535) | pub struct Binary {
method new (line 1547) | pub fn new<P: Into<PathBuf>>(path: P) -> Self {
method path (line 1555) | pub fn path<P: Into<PathBuf>>(mut self, path: P) -> Self {
method main (line 1561) | pub fn main(mut self, main: bool) -> Self {
type Resource (line 1573) | pub enum Resource {
type HookCommand (line 1594) | pub enum HookCommand {
type Config (line 1610) | pub struct Config {
method builder (line 1754) | pub fn builder() -> ConfigBuilder {
method windows (line 1759) | pub fn windows(&self) -> Option<&WindowsConfig> {
method macos (line 1764) | pub fn macos(&self) -> Option<&MacOsConfig> {
method linux (line 1769) | pub fn linux(&self) -> Option<&LinuxConfig> {
method nsis (line 1774) | pub fn nsis(&self) -> Option<&NsisConfig> {
method wix (line 1779) | pub fn wix(&self) -> Option<&WixConfig> {
method deb (line 1784) | pub fn deb(&self) -> Option<&DebianConfig> {
method appimage (line 1789) | pub fn appimage(&self) -> Option<&AppImageConfig> {
method pacman (line 1794) | pub fn pacman(&self) -> Option<&PacmanConfig> {
method dmg (line 1799) | pub fn dmg(&self) -> Option<&DmgConfig> {
method target_triple (line 1804) | pub fn target_triple(&self) -> String {
method target_arch (line 1811) | pub fn target_arch(&self) -> crate::Result<&str> {
method binary_path (line 1829) | pub fn binary_path(&self, binary: &Binary) -> PathBuf {
method identifier (line 1838) | pub fn identifier(&self) -> &str {
method publisher (line 1844) | pub fn publisher(&self) -> String {
method out_dir (line 1855) | pub fn out_dir(&self) -> PathBuf {
method binaries_dir (line 1867) | pub fn binaries_dir(&self) -> PathBuf {
method main_binary (line 1876) | pub fn main_binary(&self) -> crate::Result<&Binary> {
method main_binary_mut (line 1884) | pub fn main_binary_mut(&mut self) -> crate::Result<&mut Binary> {
method main_binary_name (line 1892) | pub fn main_binary_name(&self) -> crate::Result<String> {
method icons (line 1901) | pub fn icons(&self) -> crate::Result<Option<Vec<PathBuf>>> {
method resources_from_dir (line 1923) | pub(crate) fn resources_from_dir(
method resources_from_glob (line 1946) | pub(crate) fn resources_from_glob(glob: &str) -> crate::Result<Vec<Res...
method resources (line 1957) | pub(crate) fn resources(&self) -> crate::Result<Vec<ResolvedResource>> {
method find_ico (line 2002) | pub(crate) fn find_ico(&self) -> crate::Result<Option<PathBuf>> {
method copy_resources (line 2021) | pub(crate) fn copy_resources(&self, path: &Path) -> crate::Result<()> {
method copy_external_binaries (line 2035) | pub(crate) fn copy_external_binaries(&self, path: &Path) -> crate::Res...
type ResolvedResource (line 1916) | pub(crate) struct ResolvedResource {
function sanitize_path (line 2062) | fn sanitize_path<P: AsRef<Path>>(path: P) -> PathBuf {
function default_true (line 2072) | fn default_true() -> bool {
FILE: crates/packager/src/error.rs
type Error (line 13) | pub enum Error {
type Result (line 256) | pub type Result<T> = std::result::Result<T, Error>;
FILE: crates/packager/src/lib.rs
function parse_log_level (line 102) | fn parse_log_level(verbose: u8) -> tracing::Level {
function init_tracing_subscriber (line 117) | pub fn init_tracing_subscriber(verbosity: u8) {
type TracingFormatter (line 149) | enum TracingFormatter {
method format_event (line 182) | fn format_event(
type ShellFieldVisitor (line 157) | struct ShellFieldVisitor {
method record_str (line 163) | fn record_str(&mut self, field: &tracing::field::Field, value: &str) {
method record_debug (line 169) | fn record_debug(&mut self, field: &tracing::field::Field, value: &dyn ...
function sign_outputs (line 208) | pub fn sign_outputs(
function package_and_sign (line 242) | pub fn package_and_sign(
FILE: crates/packager/src/package/app/mod.rs
function package (line 21) | pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
function create_info_plist (line 188) | fn create_info_plist(
function copy_dir (line 364) | fn copy_dir(from: &Path, to: &Path) -> crate::Result<()> {
function copy_framework_from (line 414) | fn copy_framework_from(dest_dir: &Path, framework: &str, src_dir: &Path)...
function copy_frameworks_to_bundle (line 427) | fn copy_frameworks_to_bundle(
function remove_extra_attr (line 491) | fn remove_extra_attr(app_bundle_path: &Path) -> crate::Result<()> {
function copy_embedded_provisionprofile_file (line 501) | fn copy_embedded_provisionprofile_file(
function copy_embedded_apps (line 531) | fn copy_embedded_apps(contents_directory: &Path, config: &Config) -> cra...
FILE: crates/packager/src/package/appimage/mod.rs
function donwload_dependencies (line 20) | fn donwload_dependencies(
function package (line 72) | pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
FILE: crates/packager/src/package/context.rs
type Context (line 11) | pub struct Context {
method new (line 22) | pub fn new(config: &Config) -> crate::Result<Self> {
FILE: crates/packager/src/package/deb/mod.rs
type DebIcon (line 32) | pub struct DebIcon {
function generate_icon_files (line 41) | fn generate_icon_files(config: &Config, data_dir: &Path) -> crate::Resul...
function generate_desktop_file (line 94) | fn generate_desktop_file(config: &Config, data_dir: &Path) -> crate::Res...
function generate_data (line 188) | pub fn generate_data(config: &Config, data_dir: &Path) -> crate::Result<...
function get_size (line 223) | pub fn get_size<P: AsRef<Path>>(path: P) -> crate::Result<u64> {
function copy_custom_files (line 249) | pub fn copy_custom_files(files: &HashMap<String, String>, data_dir: &Pat...
function generate_control_file (line 295) | fn generate_control_file(
function generate_md5sums (line 364) | fn generate_md5sums(control_dir: &Path, data_dir: &Path) -> crate::Resul...
function create_tar_from_dir (line 389) | fn create_tar_from_dir<P: AsRef<Path>, W: Write>(src_dir: P, dest_file: ...
function tar_and_gzip_dir (line 420) | pub fn tar_and_gzip_dir<P: AsRef<Path>>(src_dir: P) -> crate::Result<Pat...
function create_archive (line 433) | fn create_archive(srcs: Vec<PathBuf>, dest: &Path) -> crate::Result<()> {
function package (line 443) | pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
FILE: crates/packager/src/package/dmg/mod.rs
constant CREATE_DMG_URL (line 16) | const CREATE_DMG_URL: &str =
function package (line 20) | pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
FILE: crates/packager/src/package/mod.rs
type PackageOutput (line 47) | pub struct PackageOutput {
method new (line 59) | pub fn new(format: PackageFormat, paths: Vec<PathBuf>) -> Self {
function package (line 66) | pub fn package(config: &Config) -> crate::Result<Vec<PackageOutput>> {
function run_before_each_packaging_command_hook (line 191) | fn run_before_each_packaging_command_hook(
function run_before_packaging_command_hook (line 236) | fn run_before_packaging_command_hook(
FILE: crates/packager/src/package/nsis/mod.rs
constant NSIS_URL (line 30) | const NSIS_URL: &str =
constant NSIS_SHA1 (line 33) | const NSIS_SHA1: &str = "586855a743a6e0ade203d8758af303a48ee0716b";
constant NSIS_APPLICATIONID_URL (line 34) | const NSIS_APPLICATIONID_URL: &str = "https://github.com/tauri-apps/bina...
constant NSIS_TAURI_UTILS_URL (line 35) | const NSIS_TAURI_UTILS_URL: &str =
constant NSIS_TAURI_UTILS_SHA1 (line 37) | const NSIS_TAURI_UTILS_SHA1: &str = "53A7CFAEB6A4A9653D6D5FBFF02A3C3B872...
constant NSIS_REQUIRED_FILES (line 40) | const NSIS_REQUIRED_FILES: &[&str] = &[
constant NSIS_REQUIRED_FILES (line 54) | const NSIS_REQUIRED_FILES: &[&str] = &[
constant NSIS_REQUIRED_FILES_HASH (line 59) | const NSIS_REQUIRED_FILES_HASH: &[(&str, &str, &str, HashAlgorithm)] = &[(
type DirectoriesSet (line 66) | type DirectoriesSet = BTreeSet<PathBuf>;
type ResourcesMap (line 67) | type ResourcesMap = BTreeMap<PathBuf, PathBuf>;
function normalize_resource_path (line 70) | fn normalize_resource_path<P: AsRef<Path>>(path: P) -> PathBuf {
function normalize_resource_path (line 76) | fn normalize_resource_path<P: AsRef<Path>>(path: P) -> PathBuf {
function generate_resource_data (line 85) | fn generate_resource_data(config: &Config) -> crate::Result<(Directories...
type BinariesMap (line 105) | type BinariesMap = BTreeMap<PathBuf, String>;
function generate_binaries_data (line 107) | fn generate_binaries_data(config: &Config) -> crate::Result<BinariesMap> {
function get_lang_data (line 143) | fn get_lang_data(
function write_ut16_le_with_bom (line 177) | fn write_ut16_le_with_bom<P: AsRef<Path> + Debug>(path: P, content: &str...
function handlebars_or (line 193) | fn handlebars_or(
function association_description (line 211) | fn association_description(
function unescape_newlines (line 229) | fn unescape_newlines(
function unescape_dollar_sign (line 241) | fn unescape_dollar_sign(
function add_build_number_if_needed (line 253) | fn add_build_number_if_needed(version_str: &str) -> crate::Result<String> {
function file_len (line 273) | fn file_len<P: AsRef<Path>>(p: P) -> crate::Result<u64> {
function generate_estimated_size (line 279) | fn generate_estimated_size<I, P, P2>(main: P, other_files: I) -> crate::...
function get_and_extract_nsis (line 297) | fn get_and_extract_nsis(
function build_nsis_app_installer (line 338) | fn build_nsis_app_installer(ctx: &Context, nsis_path: &Path) -> crate::R...
function package (line 612) | pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
FILE: crates/packager/src/package/pacman/mod.rs
function package (line 16) | pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
function generate_pkgbuild_file (line 64) | fn generate_pkgbuild_file(
FILE: crates/packager/src/package/wix/mod.rs
constant WIX_URL (line 28) | pub const WIX_URL: &str =
constant WIX_SHA256 (line 30) | pub const WIX_SHA256: &str = "2c1888d5d1dba377fc7fa14444cf556963747ff9a0...
constant WIX_REQUIRED_FILES (line 32) | const WIX_REQUIRED_FILES: &[&str] = &[
constant UUID_NAMESPACE (line 47) | const UUID_NAMESPACE: [u8; 16] = [
type LanguageMetadata (line 52) | struct LanguageMetadata {
function generate_guid (line 60) | fn generate_guid(key: &[u8]) -> Uuid {
function generate_package_guid (line 66) | fn generate_package_guid(config: &Config) -> Uuid {
function convert_version (line 71) | pub fn convert_version(version_str: &str) -> crate::Result<String> {
type Binary (line 124) | struct Binary {
function generate_binaries_data (line 135) | fn generate_binaries_data(config: &Config) -> crate::Result<Vec<Binary>> {
type ResourceFile (line 196) | struct ResourceFile {
type ResourceDirectory (line 208) | struct ResourceDirectory {
method add_file (line 221) | fn add_file(&mut self, file: ResourceFile) {
method get_wix_data (line 226) | fn get_wix_data(self) -> (String, Vec<String>) {
type ResourceMap (line 265) | type ResourceMap = BTreeMap<String, ResourceDirectory>;
function generate_resource_data (line 269) | fn generate_resource_data(config: &Config) -> crate::Result<ResourceMap> {
type MergeModule (line 341) | struct MergeModule<'a> {
function clear_env_for_wix (line 346) | fn clear_env_for_wix(cmd: &mut Command) {
function run_candle (line 359) | fn run_candle(
function run_light (line 408) | fn run_light(
function get_and_extract_wix (line 445) | fn get_and_extract_wix(path: &Path) -> crate::Result<()> {
function build_wix_app_installer (line 457) | fn build_wix_app_installer(ctx: &Context, wix_path: &Path) -> crate::Res...
function package (line 779) | pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
FILE: crates/packager/src/shell.rs
type CommandExt (line 13) | pub trait CommandExt {
method output_ok (line 14) | fn output_ok(&mut self) -> std::io::Result<Output>;
method output_ok_info (line 15) | fn output_ok_info(&mut self) -> std::io::Result<Output>;
method output_ok_inner (line 16) | fn output_ok_inner(&mut self, level: tracing::Level) -> std::io::Resul...
method output_ok (line 20) | fn output_ok(&mut self) -> std::io::Result<Output> {
method output_ok_info (line 24) | fn output_ok_info(&mut self) -> std::io::Result<Output> {
method output_ok_inner (line 28) | fn output_ok_inner(&mut self, level: tracing::Level) -> std::io::Resul...
function log (line 96) | fn log(level: tracing::Level, shell: &str, msg: Cow<'_, str>) {
FILE: crates/packager/src/sign.rs
type KeyPair (line 27) | pub struct KeyPair {
function generate_key (line 38) | pub fn generate_key(password: Option<String>) -> crate::Result<KeyPair> {
function decode_base64 (line 53) | fn decode_base64(base64_key: &str) -> crate::Result<String> {
function decode_private_key (line 60) | pub fn decode_private_key(
function save_keypair (line 72) | pub fn save_keypair<P: AsRef<Path> + Debug>(
type SigningConfig (line 112) | pub struct SigningConfig {
method new (line 124) | pub fn new() -> Self {
method private_key (line 129) | pub fn private_key<S: Into<String>>(mut self, private_key: S) -> Self {
method password (line 135) | pub fn password<S: Into<String>>(mut self, password: S) -> Self {
function sign_file (line 144) | pub fn sign_file<P: AsRef<Path> + Debug>(
function sign_file_with_secret_key (line 154) | pub fn sign_file_with_secret_key<P: AsRef<Path> + Debug>(
FILE: crates/packager/src/util.rs
function cross_command (line 21) | pub(crate) fn cross_command(script: &str) -> Command {
function display_path (line 35) | pub fn display_path<P: AsRef<Path>>(p: P) -> String {
function create_clean_dir (line 44) | pub fn create_clean_dir<P: AsRef<Path>>(path: P) -> crate::Result<()> {
function create_file (line 54) | pub(crate) fn create_file(path: &Path) -> crate::Result<std::io::BufWrit...
type RustCfg (line 63) | struct RustCfg {
function parse_rust_cfg (line 67) | fn parse_rust_cfg(cfg: String) -> RustCfg {
function target_triple (line 86) | pub fn target_triple() -> crate::Result<String> {
function download (line 142) | pub(crate) fn download(url: &str) -> crate::Result<Vec<u8>> {
type HashAlgorithm (line 164) | pub(crate) enum HashAlgorithm {
function download_and_verify (line 171) | pub(crate) fn download_and_verify<P: AsRef<Path>>(
function verify_hash (line 183) | pub(crate) fn verify_hash(
function verify_data_with_hasher (line 201) | fn verify_data_with_hasher(data: &[u8], hash: &str, mut hasher: impl Dig...
function verify_file_hash (line 213) | pub(crate) fn verify_file_hash<P: AsRef<Path>>(
function extract_zip (line 223) | pub(crate) fn extract_zip(data: &[u8], path: &Path) -> crate::Result<()> {
type Bitness (line 260) | pub(crate) enum Bitness {
function os_bitness (line 267) | pub(crate) fn os_bitness() -> crate::Result<Bitness> {
function is_retina (line 289) | pub(crate) fn is_retina<P: AsRef<Path>>(path: P) -> bool {
function create_icns_file (line 300) | pub fn create_icns_file(out_dir: &Path, config: &crate::Config) -> crate...
function make_icns_image (line 394) | fn make_icns_image(img: image::DynamicImage) -> std::io::Result<icns::Im...
function create_tar_from_dir (line 425) | pub fn create_tar_from_dir<P: AsRef<Path>, W: Write>(src_dir: P, dest_fi...
type PathExt (line 436) | pub trait PathExt {
method with_additional_extension (line 437) | fn with_additional_extension(&self, extension: impl AsRef<OsStr>) -> P...
method with_additional_extension (line 441) | fn with_additional_extension(&self, extension: impl AsRef<OsStr>) -> P...
function it_appends_ext (line 459) | fn it_appends_ext() {
FILE: crates/resource-resolver/src/error.rs
type Result (line 8) | pub type Result<T> = std::result::Result<T, Error>;
type Error (line 13) | pub enum Error {
FILE: crates/resource-resolver/src/lib.rs
function current_format (line 50) | pub fn current_format() -> crate::Result<PackageFormat> {
function resources_dir (line 76) | pub fn resources_dir(package_format: PackageFormat) -> Result<PathBuf> {
FILE: crates/updater/src/custom_serialization.rs
function parse_version (line 15) | fn parse_version<'de, D>(deserializer: D) -> std::result::Result<Version...
method deserialize (line 24) | fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
method deserialize (line 46) | fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
FILE: crates/updater/src/error.rs
type Error (line 11) | pub enum Error {
type Result (line 72) | pub type Result<T> = std::result::Result<T, Error>;
FILE: crates/updater/src/lib.rs
type WindowsUpdateInstallMode (line 174) | pub enum WindowsUpdateInstallMode {
method msiexec_args (line 187) | pub fn msiexec_args(&self) -> &'static [&'static str] {
method nsis_args (line 196) | pub fn nsis_args(&self) -> &'static [&'static str] {
type WindowsConfig (line 208) | pub struct WindowsConfig {
type Config (line 218) | pub struct Config {
type UpdateFormat (line 236) | pub enum UpdateFormat {
method fmt (line 248) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ReleaseManifestPlatform (line 264) | pub struct ReleaseManifestPlatform {
type RemoteReleaseData (line 276) | pub enum RemoteReleaseData {
type RemoteRelease (line 290) | pub struct RemoteRelease {
method download_url (line 303) | pub fn download_url(&self, target: &str) -> Result<&Url> {
method signature (line 315) | pub fn signature(&self, target: &str) -> Result<&String> {
method format (line 327) | pub fn format(&self, target: &str) -> Result<UpdateFormat> {
type UpdaterBuilder (line 340) | pub struct UpdaterBuilder {
method new (line 352) | pub fn new(current_version: Version, config: crate::Config) -> Self {
method version_comparator (line 365) | pub fn version_comparator<F: Fn(Version, RemoteRelease) -> bool + Send...
method pub_key (line 374) | pub fn pub_key(mut self, pub_key: impl Into<String>) -> Self {
method target (line 380) | pub fn target(mut self, target: impl Into<String>) -> Self {
method endpoints (line 386) | pub fn endpoints(mut self, endpoints: Vec<Url>) -> Self {
method executable_path (line 392) | pub fn executable_path<P: AsRef<Path>>(mut self, p: P) -> Self {
method header (line 398) | pub fn header<K, V>(mut self, key: K, value: V) -> Result<Self>
method timeout (line 414) | pub fn timeout(mut self, timeout: Duration) -> Self {
method installer_args (line 420) | pub fn installer_args<I, S>(mut self, args: I) -> Self
method build (line 438) | pub fn build(self) -> Result<Updater> {
type Updater (line 486) | pub struct Updater {
method check (line 502) | pub fn check(&self) -> Result<Option<Update>> {
type Update (line 636) | pub struct Update {
method download (line 667) | pub fn download(&self) -> Result<Vec<u8>> {
method download_extended (line 680) | pub fn download_extended<C: Fn(usize, Option<u64>), D: FnOnce()>(
method download_extended_inner (line 688) | fn download_extended_inner<C: Fn(usize, Option<u64>), D: FnOnce()>(
method install (line 765) | pub fn install(&self, bytes: Vec<u8>) -> Result<()> {
method download_and_install (line 770) | pub fn download_and_install(&self) -> Result<()> {
method download_and_install_extended (line 779) | pub fn download_and_install_extended<C: Fn(usize, Option<u64>), D: FnO...
method install_inner (line 795) | fn install_inner(&self, bytes: Vec<u8>) -> Result<()> {
method install_inner (line 951) | fn install_inner(&self, bytes: Vec<u8>) -> Result<()> {
method install_inner (line 1014) | fn install_inner(&self, bytes: Vec<u8>) -> Result<()> {
function check_update (line 1107) | pub fn check_update(current_version: Version, config: crate::Config) -> ...
function target (line 1115) | pub fn target() -> Option<String> {
function get_updater_target (line 1123) | pub(crate) fn get_updater_target() -> Option<&'static str> {
function get_updater_arch (line 1135) | pub(crate) fn get_updater_arch() -> Option<&'static str> {
function extract_path_from_executable (line 1152) | fn extract_path_from_executable(executable_path: &Path) -> Result<PathBu...
function verify_signature (line 1187) | fn verify_signature<R>(
function base64_to_string (line 1210) | fn base64_to_string(base64_string: &str) -> Result<String> {
FILE: crates/updater/tests/app/src/main.rs
function main (line 6) | fn main() {
FILE: crates/updater/tests/update.rs
constant UPDATER_PRIVATE_KEY (line 17) | const UPDATER_PRIVATE_KEY: &str = include_str!("./dummy.key");
type PlatformUpdate (line 20) | struct PlatformUpdate {
type Update (line 27) | struct Update {
function build_app (line 33) | fn build_app(cwd: &Path, root_dir: &Path, version: &str, target: &[Updat...
type UpdaterFormat (line 63) | enum UpdaterFormat {
method name (line 73) | fn name(self) -> &'static str {
method default (line 82) | fn default() -> &'static [Self] {
function update_app (line 94) | fn update_app() {
FILE: crates/utils/src/current_exe.rs
function current_exe (line 78) | pub fn current_exe() -> std::io::Result<PathBuf> {
type StartingBinary (line 94) | struct StartingBinary(std::io::Result<PathBuf>);
method new (line 98) | fn new() -> Self {
method cloned (line 120) | pub(super) fn cloned(&self) -> Result<PathBuf> {
method has_symlink (line 134) | fn has_symlink(_: &Path) -> Option<&Path> {
method has_symlink (line 143) | fn has_symlink(path: &Path) -> Option<&Path> {
FILE: crates/utils/src/lib.rs
type PackageFormat (line 23) | pub enum PackageFormat {
method from_short_name (line 59) | pub fn from_short_name(name: &str) -> Option<PackageFormat> {
method short_name (line 73) | pub fn short_name(&self) -> &'static str {
method platform_all (line 94) | pub fn platform_all() -> &'static [PackageFormat] {
method platform_default (line 136) | pub fn platform_default() -> &'static [PackageFormat] {
method priority (line 177) | pub fn priority(&self) -> u32 {
method fmt (line 51) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: examples/dioxus/src/main.rs
function main (line 8) | fn main() {
function App (line 14) | fn App() -> Element {
FILE: examples/egui/src/main.rs
function main (line 5) | fn main() -> Result<(), eframe::Error> {
type MyApp (line 13) | struct MyApp {
method update (line 28) | fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
method default (line 19) | fn default() -> Self {
FILE: examples/slint/build.rs
function main (line 1) | fn main() {
FILE: examples/slint/src/main.rs
function main (line 6) | fn main() -> Result<(), slint::PlatformError> {
FILE: examples/tauri/build.rs
function main (line 1) | fn main() {
FILE: examples/tauri/src-ui/main.js
method setup (line 12) | setup() {
FILE: examples/tauri/src/main.rs
function greet (line 9) | fn greet(name: &str) -> String {
function version (line 14) | fn version() -> &'static str {
constant UPDATER_PUB_KEY (line 18) | const UPDATER_PUB_KEY: &str = include_str!("../dummy.pub.key");
constant UPDATER_ENDPOINT (line 19) | const UPDATER_ENDPOINT: &str = "http://localhost:2342";
function check_update (line 22) | fn check_update<R: Runtime>(app: AppHandle<R>) -> Result<(bool, Option<S...
type UpdateBytes (line 57) | struct UpdateBytes(Vec<u8>);
type ProgressPayload (line 60) | struct ProgressPayload {
function download_update (line 65) | fn download_update<R: Runtime>(app: AppHandle<R>) -> Result<(), ()> {
function install_update (line 90) | fn install_update<R: Runtime>(app: AppHandle<R>) -> Result<(), ()> {
function main (line 97) | fn main() {
FILE: examples/wails/app.go
type App (line 9) | type App struct
method startup (line 20) | func (a *App) startup(ctx context.Context) {
method Greet (line 25) | func (a *App) Greet(name string) string {
function NewApp (line 14) | func NewApp() *App {
FILE: examples/wails/frontend/wailsjs/go/main/App.js
function Greet (line 5) | function Greet(arg1) {
FILE: examples/wails/frontend/wailsjs/runtime/runtime.d.ts
type Position (line 11) | interface Position {
type Size (line 16) | interface Size {
type Screen (line 21) | interface Screen {
type EnvironmentInfo (line 29) | interface EnvironmentInfo {
FILE: examples/wails/frontend/wailsjs/runtime/runtime.js
function LogPrint (line 11) | function LogPrint(message) {
function LogTrace (line 15) | function LogTrace(message) {
function LogDebug (line 19) | function LogDebug(message) {
function LogInfo (line 23) | function LogInfo(message) {
function LogWarning (line 27) | function LogWarning(message) {
function LogError (line 31) | function LogError(message) {
function LogFatal (line 35) | function LogFatal(message) {
function EventsOnMultiple (line 39) | function EventsOnMultiple(eventName, callback, maxCallbacks) {
function EventsOn (line 43) | function EventsOn(eventName, callback) {
function EventsOff (line 47) | function EventsOff(eventName, ...additionalEventNames) {
function EventsOnce (line 51) | function EventsOnce(eventName, callback) {
function EventsEmit (line 55) | function EventsEmit(eventName) {
function WindowReload (line 60) | function WindowReload() {
function WindowReloadApp (line 64) | function WindowReloadApp() {
function WindowSetAlwaysOnTop (line 68) | function WindowSetAlwaysOnTop(b) {
function WindowSetSystemDefaultTheme (line 72) | function WindowSetSystemDefaultTheme() {
function WindowSetLightTheme (line 76) | function WindowSetLightTheme() {
function WindowSetDarkTheme (line 80) | function WindowSetDarkTheme() {
function WindowCenter (line 84) | function WindowCenter() {
function WindowSetTitle (line 88) | function WindowSetTitle(title) {
function WindowFullscreen (line 92) | function WindowFullscreen() {
function WindowUnfullscreen (line 96) | function WindowUnfullscreen() {
function WindowIsFullscreen (line 100) | function WindowIsFullscreen() {
function WindowGetSize (line 104) | function WindowGetSize() {
function WindowSetSize (line 108) | function WindowSetSize(width, height) {
function WindowSetMaxSize (line 112) | function WindowSetMaxSize(width, height) {
function WindowSetMinSize (line 116) | function WindowSetMinSize(width, height) {
function WindowSetPosition (line 120) | function WindowSetPosition(x, y) {
function WindowGetPosition (line 124) | function WindowGetPosition() {
function WindowHide (line 128) | function WindowHide() {
function WindowShow (line 132) | function WindowShow() {
function WindowMaximise (line 136) | function WindowMaximise() {
function WindowToggleMaximise (line 140) | function WindowToggleMaximise() {
function WindowUnmaximise (line 144) | function WindowUnmaximise() {
function WindowIsMaximised (line 148) | function WindowIsMaximised() {
function WindowMinimise (line 152) | function WindowMinimise() {
function WindowUnminimise (line 156) | function WindowUnminimise() {
function WindowSetBackgroundColour (line 160) | function WindowSetBackgroundColour(R, G, B, A) {
function ScreenGetAll (line 164) | function ScreenGetAll() {
function WindowIsMinimised (line 168) | function WindowIsMinimised() {
function WindowIsNormal (line 172) | function WindowIsNormal() {
function BrowserOpenURL (line 176) | function BrowserOpenURL(url) {
function Environment (line 180) | function Environment() {
function Quit (line 184) | function Quit() {
function Hide (line 188) | function Hide() {
function Show (line 192) | function Show() {
function ClipboardGetText (line 196) | function ClipboardGetText() {
function ClipboardSetText (line 200) | function ClipboardSetText(text) {
FILE: examples/wails/main.go
function main (line 14) | func main() {
FILE: examples/wry/src/main.rs
function main (line 3) | fn main() -> Result<(), Box<dyn std::error::Error>> {
Condensed preview — 273 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (987K chars).
[
{
"path": ".changes/config.json",
"chars": 4397,
"preview": "{\n \"gitSiteUrl\": \"https://www.github.com/crabnebula-dev/cargo-packager\",\n \"timeout\": 3600000,\n \"pkgManagers\": {\n \""
},
{
"path": ".changes/readme.md",
"chars": 1584,
"preview": "# Changes\n\n##### via https://github.com/jbolda/covector\n\nAs you create PRs and make changes that require a version bump,"
},
{
"path": ".github/workflows/audit.yml",
"chars": 626,
"preview": "name: Audit Rust\n\non:\n workflow_dispatch:\n schedule:\n - cron: \"0 0 * * *\"\n push:\n branches:\n - main\n pa"
},
{
"path": ".github/workflows/build-examples.yml",
"chars": 1366,
"preview": "name: Package examples\n\non:\n pull_request:\n branches:\n - main\n paths:\n - \".github/workflows/build-examp"
},
{
"path": ".github/workflows/check-nodejs-bindings.yml",
"chars": 1181,
"preview": "name: Check Node.js bindings\n\non:\n push:\n branches:\n - main\n paths:\n - \".github/workflows/check-nodejs-"
},
{
"path": ".github/workflows/check.yml",
"chars": 2341,
"preview": "name: Check\n\non:\n push:\n branches:\n - main\n paths:\n - \".github/workflows/check.yml\"\n - \"**/*.rs\"\n "
},
{
"path": ".github/workflows/covector-status.yml",
"chars": 380,
"preview": "name: Covector Status\non: [pull_request]\n\njobs:\n covector:\n if: ${{ !startsWith(github.head_ref, 'renovate/') }}\n "
},
{
"path": ".github/workflows/covector-version-or-publish.yml",
"chars": 3155,
"preview": "name: Covector Version or Publish\n\non:\n push:\n branches:\n - main\n\njobs:\n version-or-publish:\n if: ${{ !star"
},
{
"path": ".github/workflows/integration-tests.yml",
"chars": 1686,
"preview": "name: integration tests\n\non:\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n\nconcurrency:"
},
{
"path": ".github/workflows/publish-packager-nodejs.yml",
"chars": 14816,
"preview": "name: Publish `@crabnebula/packager`\n\nenv:\n DEBUG: napi:*\n APP_NAME: packager\n MACOSX_DEPLOYMENT_TARGET: \"10.13\"\n\nper"
},
{
"path": ".github/workflows/publish-packager-resource-resolver-nodejs.yml",
"chars": 14703,
"preview": "name: Publish `@crabnebula/packager-resource-resolver`\n\nenv:\n DEBUG: napi:*\n APP_NAME: packager-resource-resolver\n MA"
},
{
"path": ".github/workflows/publish-updater-nodejs.yml",
"chars": 14751,
"preview": "name: Publish `@crabnebula/updater`\n\nenv:\n DEBUG: napi:*\n APP_NAME: updater\n MACOSX_DEPLOYMENT_TARGET: \"10.13\"\n\npermi"
},
{
"path": ".gitignore",
"chars": 317,
"preview": "logs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\nnode_modules/\n\n*.tgz\n\n.yarn-integrity\n\n.env\n"
},
{
"path": ".npmrc",
"chars": 93,
"preview": "enable-pre-post-scripts=true\nupdate-notifier=false\nengine-strict=true\nresolution-mode=highest"
},
{
"path": ".prettierignore",
"chars": 266,
"preview": "dist\nbuild\n\n*.wxs\n*.nsi\n*.nsh\n*.sh\n*.desktop\n*.xml\n*.md\n\npnpm-lock.yaml\n\nschema.json\nbindings/updater/nodejs/index.js\nbi"
},
{
"path": "Cargo.toml",
"chars": 911,
"preview": "[workspace]\nmembers = [\n \"crates/*\",\n \"examples/*\",\n \"bindings/*/nodejs\",\n \"crates/updater/tests/app\",\n]\nexc"
},
{
"path": "LICENSE.spdx",
"chars": 947,
"preview": "SPDXVersion: SPDX-2.1\nDataLicense: CC0-1.0\nPackageName: cargo-packager\nDataFormat: SPDXRef-1\nPackageSupplier: Organizati"
},
{
"path": "LICENSE_APACHE-2.0",
"chars": 10174,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "LICENSE_MIT",
"chars": 1082,
"preview": "MIT License\n\nCopyright (c) 2023 - Present CrabNebula Ltd.\n\nPermission is hereby granted, free of charge, to any person o"
},
{
"path": "README.md",
"chars": 3546,
"preview": "# cargo-packager\n\n<img src=\"https://raw.githubusercontent.com/crabnebula-dev/cargo-packager/main/.github/splash.png\" alt"
},
{
"path": "SECURITY.md",
"chars": 1376,
"preview": "# Security Policy\n\n**Do not report security vulnerabilities through public GitHub issues.**\n\n**Please use the [Private V"
},
{
"path": "bindings/packager/nodejs/.cargo/config.toml",
"chars": 260,
"preview": "[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"\n[target.aarch64-unknown-linux-musl]\nlinker = \"aarch6"
},
{
"path": "bindings/packager/nodejs/.npmignore",
"chars": 122,
"preview": "target\nCargo.lock\n.cargo\n.github\nnpm\n.eslintrc\n.prettierignore\nrustfmt.toml\nyarn.lock\n*.node\n.yarn\n__test__\nrenovate.jso"
},
{
"path": "bindings/packager/nodejs/.npmrc",
"chars": 29,
"preview": "enable-pre-post-scripts=true\n"
},
{
"path": "bindings/packager/nodejs/CHANGELOG.md",
"chars": 13457,
"preview": "# Changelog\n\n## \\[0.11.8]\n\n- [`6e6a10c`](https://www.github.com/crabnebula-dev/cargo-packager/commit/6e6a10cc16929732939"
},
{
"path": "bindings/packager/nodejs/Cargo.toml",
"chars": 774,
"preview": "[package]\nname = \"crabnebula_packager\"\nversion = \"0.0.0\"\npublish = false\nedition = { workspace = true }\nlicense = { work"
},
{
"path": "bindings/packager/nodejs/README.md",
"chars": 2005,
"preview": "# @crabnebula/packager\n\nExecutable packager, bundler and updater. A cli tool and library to generate installers or app b"
},
{
"path": "bindings/packager/nodejs/__test__/index.spec.mjs",
"chars": 498,
"preview": "import test from \"ava\";\nimport process from \"process\";\nimport { execSync } from \"child_process\";\n\nimport { packageApp } "
},
{
"path": "bindings/packager/nodejs/build.rs",
"chars": 65,
"preview": "extern crate napi_build;\n\nfn main() {\n napi_build::setup();\n}\n"
},
{
"path": "bindings/packager/nodejs/generate-config-type.js",
"chars": 404,
"preview": "const { compileFromFile } = require(\"json-schema-to-typescript\");\nconst fs = require(\"fs\");\nconst path = require(\"path\")"
},
{
"path": "bindings/packager/nodejs/index.d.ts",
"chars": 397,
"preview": "/* tslint:disable */\n/* eslint-disable */\n\n/* auto-generated by NAPI-RS */\n\nexport function cli(args: Array<string>, bin"
},
{
"path": "bindings/packager/nodejs/index.js",
"chars": 9059,
"preview": "/* tslint:disable */\n/* eslint-disable */\n/* prettier-ignore */\n\n/* auto-generated by NAPI-RS */\n\nconst { existsSync, re"
},
{
"path": "bindings/packager/nodejs/npm/darwin-arm64/README.md",
"chars": 110,
"preview": "# `@crabnebula/packager-darwin-arm64`\n\nThis is the **aarch64-apple-darwin** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/darwin-arm64/package.json",
"chars": 279,
"preview": "{\n \"name\": \"@crabnebula/packager-darwin-arm64\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"darwin\"\n ],\n \"cpu\": [\n \"arm64"
},
{
"path": "bindings/packager/nodejs/npm/darwin-x64/README.md",
"chars": 107,
"preview": "# `@crabnebula/packager-darwin-x64`\n\nThis is the **x86_64-apple-darwin** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/darwin-x64/package.json",
"chars": 271,
"preview": "{\n \"name\": \"@crabnebula/packager-darwin-x64\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"darwin\"\n ],\n \"cpu\": [\n \"x64\"\n "
},
{
"path": "bindings/packager/nodejs/npm/linux-arm-gnueabihf/README.md",
"chars": 126,
"preview": "# `@crabnebula/packager-linux-arm-gnueabihf`\n\nThis is the **armv7-unknown-linux-gnueabihf** binary for `@crabnebula/pack"
},
{
"path": "bindings/packager/nodejs/npm/linux-arm-gnueabihf/package.json",
"chars": 297,
"preview": "{\n \"name\": \"@crabnebula/packager-linux-arm-gnueabihf\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n "
},
{
"path": "bindings/packager/nodejs/npm/linux-arm64-gnu/README.md",
"chars": 118,
"preview": "# `@crabnebula/packager-linux-arm64-gnu`\n\nThis is the **aarch64-unknown-linux-gnu** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/linux-arm64-gnu/package.json",
"chars": 316,
"preview": "{\n \"name\": \"@crabnebula/packager-linux-arm64-gnu\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \"arm"
},
{
"path": "bindings/packager/nodejs/npm/linux-arm64-musl/README.md",
"chars": 120,
"preview": "# `@crabnebula/packager-linux-arm64-musl`\n\nThis is the **aarch64-unknown-linux-musl** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/linux-arm64-musl/package.json",
"chars": 318,
"preview": "{\n \"name\": \"@crabnebula/packager-linux-arm64-musl\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \"ar"
},
{
"path": "bindings/packager/nodejs/npm/linux-x64-gnu/README.md",
"chars": 115,
"preview": "# `@crabnebula/packager-linux-x64-gnu`\n\nThis is the **x86_64-unknown-linux-gnu** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/linux-x64-gnu/package.json",
"chars": 308,
"preview": "{\n \"name\": \"@crabnebula/packager-linux-x64-gnu\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \"x64\"\n"
},
{
"path": "bindings/packager/nodejs/npm/linux-x64-musl/README.md",
"chars": 117,
"preview": "# `@crabnebula/packager-linux-x64-musl`\n\nThis is the **x86_64-unknown-linux-musl** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/linux-x64-musl/package.json",
"chars": 310,
"preview": "{\n \"name\": \"@crabnebula/packager-linux-x64-musl\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \"x64\""
},
{
"path": "bindings/packager/nodejs/npm/win32-arm64-msvc/README.md",
"chars": 117,
"preview": "# `@crabnebula/packager-win32-arm64-msvc`\n\nThis is the **aarch64-pc-windows-msvc** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/win32-arm64-msvc/package.json",
"chars": 290,
"preview": "{\n \"name\": \"@crabnebula/packager-win32-arm64-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n \"cpu\": [\n \"ar"
},
{
"path": "bindings/packager/nodejs/npm/win32-ia32-msvc/README.md",
"chars": 113,
"preview": "# `@crabnebula/packager-win32-ia32-msvc`\n\nThis is the **i686-pc-windows-msvc** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/win32-ia32-msvc/package.json",
"chars": 286,
"preview": "{\n \"name\": \"@crabnebula/packager-win32-ia32-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n \"cpu\": [\n \"ia3"
},
{
"path": "bindings/packager/nodejs/npm/win32-x64-msvc/README.md",
"chars": 114,
"preview": "# `@crabnebula/packager-win32-x64-msvc`\n\nThis is the **x86_64-pc-windows-msvc** binary for `@crabnebula/packager`\n"
},
{
"path": "bindings/packager/nodejs/npm/win32-x64-msvc/package.json",
"chars": 282,
"preview": "{\n \"name\": \"@crabnebula/packager-win32-x64-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n \"cpu\": [\n \"x64\""
},
{
"path": "bindings/packager/nodejs/package.json",
"chars": 1598,
"preview": "{\n \"name\": \"@crabnebula/packager\",\n \"version\": \"0.11.8\",\n \"main\": \"build/index.js\",\n \"module\": \"build/index.js\",\n \""
},
{
"path": "bindings/packager/nodejs/packager.js",
"chars": 1749,
"preview": "#!/usr/bin/env node\n\nconst cli = require(\"./build\");\nconst path = require(\"path\");\n\nconst [bin, script, ...args] = proce"
},
{
"path": "bindings/packager/nodejs/schema.json",
"chars": 48419,
"preview": "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"title\": \"Config\",\n \"description\": \"The packaging config.\","
},
{
"path": "bindings/packager/nodejs/src/lib.rs",
"chars": 1304,
"preview": "use napi::{Error, Result, Status};\n\n#[napi_derive::napi]\npub fn cli(args: Vec<String>, bin_name: Option<String>) -> Resu"
},
{
"path": "bindings/packager/nodejs/src-ts/config.d.ts",
"chars": 26426,
"preview": "/* eslint-disable */\n/**\n * This file was automatically generated by json-schema-to-typescript.\n * DO NOT MODIFY IT BY H"
},
{
"path": "bindings/packager/nodejs/src-ts/index.ts",
"chars": 1723,
"preview": "import cargoPackager from \"../index\";\nimport runPlugins from \"./plugins\";\nimport merge from \"deepmerge\";\nimport type { C"
},
{
"path": "bindings/packager/nodejs/src-ts/plugins/electron/index.ts",
"chars": 5876,
"preview": "import type { Config, Resource } from \"../../config\";\nimport type { PackageJson } from \"..\";\nimport fs from \"fs-extra\";\n"
},
{
"path": "bindings/packager/nodejs/src-ts/plugins/electron/prune.ts",
"chars": 2409,
"preview": "// from https://github.com/electron/electron-packager/blob/741f3c349e7f9e11e5ae14593a3efa79d312dc4d/src/prune.js\n\nimport"
},
{
"path": "bindings/packager/nodejs/src-ts/plugins/index.ts",
"chars": 1325,
"preview": "import path from \"path\";\nimport fs from \"fs-extra\";\nimport type { Config } from \"../config\";\nimport electron from \"./ele"
},
{
"path": "bindings/packager/nodejs/tsconfig.json",
"chars": 520,
"preview": "{\n \"compilerOptions\": {\n \"target\": \"es2016\",\n \"lib\": [\"es6\"],\n \"module\": \"commonjs\",\n \"rootDir\": \"src-ts\",\n"
},
{
"path": "bindings/resource-resolver/nodejs/.cargo/config.toml",
"chars": 118,
"preview": "[target.aarch64-unknown-linux-musl]\nlinker = \"aarch64-linux-musl-gcc\"\nrustflags = [\"-C\", \"target-feature=-crt-static\"]"
},
{
"path": "bindings/resource-resolver/nodejs/.npmignore",
"chars": 122,
"preview": "target\nCargo.lock\n.cargo\n.github\nnpm\n.eslintrc\n.prettierignore\nrustfmt.toml\nyarn.lock\n*.node\n.yarn\n__test__\nrenovate.jso"
},
{
"path": "bindings/resource-resolver/nodejs/CHANGELOG.md",
"chars": 493,
"preview": "# Changelog\n\n## \\[0.1.2]\n\n### Dependencies\n\n- Upgraded to `cargo-packager-resource-resolver@0.1.2`\n- Upgraded to `cargo-"
},
{
"path": "bindings/resource-resolver/nodejs/Cargo.toml",
"chars": 574,
"preview": "[package]\nname = \"crabnebula_packager_resource_resolver\"\nversion = \"0.0.0\"\npublish = false\nedition = { workspace = true "
},
{
"path": "bindings/resource-resolver/nodejs/README.md",
"chars": 607,
"preview": "# @crabnebula/packager-resource-resolver\n\nResource resolver for apps that was packaged by [`@crabnebula/packager`](https"
},
{
"path": "bindings/resource-resolver/nodejs/__test__/index.spec.mjs",
"chars": 217,
"preview": "import test from \"ava\";\n\nimport { resourcesDir, PackageFormat } from \"../index.js\";\n\ntest(\"resolve resource directory\", "
},
{
"path": "bindings/resource-resolver/nodejs/build.rs",
"chars": 65,
"preview": "extern crate napi_build;\n\nfn main() {\n napi_build::setup();\n}\n"
},
{
"path": "bindings/resource-resolver/nodejs/fix-types.js",
"chars": 1410,
"preview": "// Due to a NAPI-rs bug? still unconfirmed\n// index.d.ts will contain a duplicate definition of `PackageFromat` enum\n// "
},
{
"path": "bindings/resource-resolver/nodejs/index.d.ts",
"chars": 756,
"preview": "/* tslint:disable */\n/* eslint-disable */\n\n/* auto-generated by NAPI-RS */\n\n/** Types of supported packages by [`@crabne"
},
{
"path": "bindings/resource-resolver/nodejs/index.js",
"chars": 8550,
"preview": "/* tslint:disable */\n/* eslint-disable */\n/* prettier-ignore */\n\n/* auto-generated by NAPI-RS */\n\nconst { existsSync, re"
},
{
"path": "bindings/resource-resolver/nodejs/npm/darwin-arm64/README.md",
"chars": 146,
"preview": "# `@crabnebula/packager-resource-resolver-darwin-arm64`\n\nThis is the **aarch64-apple-darwin** binary for `@crabnebula/pa"
},
{
"path": "bindings/resource-resolver/nodejs/npm/darwin-arm64/package.json",
"chars": 333,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-darwin-arm64\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"darwin\"\n ],\n \""
},
{
"path": "bindings/resource-resolver/nodejs/npm/darwin-x64/README.md",
"chars": 143,
"preview": "# `@crabnebula/packager-resource-resolver-darwin-x64`\n\nThis is the **x86_64-apple-darwin** binary for `@crabnebula/packa"
},
{
"path": "bindings/resource-resolver/nodejs/npm/darwin-x64/package.json",
"chars": 325,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-darwin-x64\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"darwin\"\n ],\n \"cp"
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-arm-gnueabihf/README.md",
"chars": 162,
"preview": "# `@crabnebula/packager-resource-resolver-linux-arm-gnueabihf`\n\nThis is the **armv7-unknown-linux-gnueabihf** binary for"
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-arm-gnueabihf/package.json",
"chars": 351,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-linux-arm-gnueabihf\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n "
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-arm64-gnu/README.md",
"chars": 154,
"preview": "# `@crabnebula/packager-resource-resolver-linux-arm64-gnu`\n\nThis is the **aarch64-unknown-linux-gnu** binary for `@crabn"
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-arm64-gnu/package.json",
"chars": 370,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-linux-arm64-gnu\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n "
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-arm64-musl/README.md",
"chars": 156,
"preview": "# `@crabnebula/packager-resource-resolver-linux-arm64-musl`\n\nThis is the **aarch64-unknown-linux-musl** binary for `@cra"
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-arm64-musl/package.json",
"chars": 372,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-linux-arm64-musl\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n"
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-x64-gnu/README.md",
"chars": 151,
"preview": "# `@crabnebula/packager-resource-resolver-linux-x64-gnu`\n\nThis is the **x86_64-unknown-linux-gnu** binary for `@crabnebu"
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-x64-gnu/package.json",
"chars": 362,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-linux-x64-gnu\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \""
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-x64-musl/README.md",
"chars": 153,
"preview": "# `@crabnebula/packager-resource-resolver-linux-x64-musl`\n\nThis is the **x86_64-unknown-linux-musl** binary for `@crabne"
},
{
"path": "bindings/resource-resolver/nodejs/npm/linux-x64-musl/package.json",
"chars": 364,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-linux-x64-musl\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n "
},
{
"path": "bindings/resource-resolver/nodejs/npm/win32-arm64-msvc/README.md",
"chars": 153,
"preview": "# `@crabnebula/packager-resource-resolver-win32-arm64-msvc`\n\nThis is the **aarch64-pc-windows-msvc** binary for `@crabne"
},
{
"path": "bindings/resource-resolver/nodejs/npm/win32-arm64-msvc/package.json",
"chars": 344,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-win32-arm64-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n"
},
{
"path": "bindings/resource-resolver/nodejs/npm/win32-ia32-msvc/README.md",
"chars": 149,
"preview": "# `@crabnebula/packager-resource-resolver-win32-ia32-msvc`\n\nThis is the **i686-pc-windows-msvc** binary for `@crabnebula"
},
{
"path": "bindings/resource-resolver/nodejs/npm/win32-ia32-msvc/package.json",
"chars": 340,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-win32-ia32-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n "
},
{
"path": "bindings/resource-resolver/nodejs/npm/win32-x64-msvc/README.md",
"chars": 150,
"preview": "# `@crabnebula/packager-resource-resolver-win32-x64-msvc`\n\nThis is the **x86_64-pc-windows-msvc** binary for `@crabnebul"
},
{
"path": "bindings/resource-resolver/nodejs/npm/win32-x64-msvc/package.json",
"chars": 336,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver-win32-x64-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n "
},
{
"path": "bindings/resource-resolver/nodejs/package.json",
"chars": 1101,
"preview": "{\n \"name\": \"@crabnebula/packager-resource-resolver\",\n \"version\": \"0.1.2\",\n \"main\": \"./index.js\",\n \"types\": \"./index."
},
{
"path": "bindings/resource-resolver/nodejs/src/lib.rs",
"chars": 1564,
"preview": "use napi::{Result, Status};\n\nuse cargo_packager_resource_resolver::PackageFormat as ResolverPackageFormat;\n\n/// Types of"
},
{
"path": "bindings/updater/nodejs/.cargo/config.toml",
"chars": 118,
"preview": "[target.aarch64-unknown-linux-musl]\nlinker = \"aarch64-linux-musl-gcc\"\nrustflags = [\"-C\", \"target-feature=-crt-static\"]"
},
{
"path": "bindings/updater/nodejs/.npmignore",
"chars": 122,
"preview": "target\nCargo.lock\n.cargo\n.github\nnpm\n.eslintrc\n.prettierignore\nrustfmt.toml\nyarn.lock\n*.node\n.yarn\n__test__\nrenovate.jso"
},
{
"path": "bindings/updater/nodejs/CHANGELOG.md",
"chars": 2352,
"preview": "# Changelog\n\n## \\[0.2.3]\n\n- [`d861f1a`](https://www.github.com/crabnebula-dev/cargo-packager/commit/d861f1a6b1dfe585014e"
},
{
"path": "bindings/updater/nodejs/Cargo.toml",
"chars": 869,
"preview": "[package]\nname = \"crabnebula_updater\"\nversion = \"0.0.0\"\npublish = false\nedition = { workspace = true }\nlicense = { works"
},
{
"path": "bindings/updater/nodejs/README.md",
"chars": 5404,
"preview": "# @crabnebula/updater\n\nUpdater for apps that was packaged by [`@crabnebula/packager`](https://www.npmjs.com/package/@cra"
},
{
"path": "bindings/updater/nodejs/__test__/app/index.html",
"chars": 498,
"preview": "<!doctype html>\n<html>\n <head>\n <meta charset=\"UTF-8\" />\n <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/"
},
{
"path": "bindings/updater/nodejs/__test__/app/main.js",
"chars": 1702,
"preview": "const { app } = require(\"electron\");\nconst { join } = require(\"node:path\");\nconst { checkUpdate } = require(\"@crabnebula"
},
{
"path": "bindings/updater/nodejs/__test__/app/package.json",
"chars": 702,
"preview": "{\n \"name\": \"electron-app\",\n \"productName\": \"ElectronApp\",\n \"version\": \"1.0.0\",\n \"description\": \"Hello World!\",\n \"ma"
},
{
"path": "bindings/updater/nodejs/__test__/app/preload.js",
"chars": 341,
"preview": "window.addEventListener(\"DOMContentLoaded\", () => {\n const replaceText = (selector, text) => {\n const element = docu"
},
{
"path": "bindings/updater/nodejs/__test__/index.spec.mjs",
"chars": 6480,
"preview": "import test from \"ava\";\nimport * as fs from \"fs/promises\";\nimport { existsSync } from \"fs\";\nimport * as path from \"path\""
},
{
"path": "bindings/updater/nodejs/build.rs",
"chars": 65,
"preview": "extern crate napi_build;\n\nfn main() {\n napi_build::setup();\n}\n"
},
{
"path": "bindings/updater/nodejs/index.d.ts",
"chars": 2694,
"preview": "/* tslint:disable */\n/* eslint-disable */\n\n/* auto-generated by NAPI-RS */\n\nexport const enum WindowsUpdateInstallMode {"
},
{
"path": "bindings/updater/nodejs/index.js",
"chars": 7624,
"preview": "/* tslint:disable */\n/* eslint-disable */\n/* prettier-ignore */\n\n/* auto-generated by NAPI-RS */\n\nconst { existsSync, re"
},
{
"path": "bindings/updater/nodejs/npm/darwin-arm64/README.md",
"chars": 108,
"preview": "# `@crabnebula/updater-darwin-arm64`\n\nThis is the **aarch64-apple-darwin** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/darwin-arm64/package.json",
"chars": 276,
"preview": "{\n \"name\": \"@crabnebula/updater-darwin-arm64\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"darwin\"\n ],\n \"cpu\": [\n \"arm64\""
},
{
"path": "bindings/updater/nodejs/npm/darwin-x64/README.md",
"chars": 105,
"preview": "# `@crabnebula/updater-darwin-x64`\n\nThis is the **x86_64-apple-darwin** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/darwin-x64/package.json",
"chars": 268,
"preview": "{\n \"name\": \"@crabnebula/updater-darwin-x64\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"darwin\"\n ],\n \"cpu\": [\n \"x64\"\n ]"
},
{
"path": "bindings/updater/nodejs/npm/linux-arm-gnueabihf/README.md",
"chars": 124,
"preview": "# `@crabnebula/updater-linux-arm-gnueabihf`\n\nThis is the **armv7-unknown-linux-gnueabihf** binary for `@crabnebula/updat"
},
{
"path": "bindings/updater/nodejs/npm/linux-arm-gnueabihf/package.json",
"chars": 294,
"preview": "{\n \"name\": \"@crabnebula/updater-linux-arm-gnueabihf\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \""
},
{
"path": "bindings/updater/nodejs/npm/linux-arm64-gnu/README.md",
"chars": 116,
"preview": "# `@crabnebula/updater-linux-arm64-gnu`\n\nThis is the **aarch64-unknown-linux-gnu** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/linux-arm64-gnu/package.json",
"chars": 313,
"preview": "{\n \"name\": \"@crabnebula/updater-linux-arm64-gnu\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \"arm6"
},
{
"path": "bindings/updater/nodejs/npm/linux-arm64-musl/README.md",
"chars": 118,
"preview": "# `@crabnebula/updater-linux-arm64-musl`\n\nThis is the **aarch64-unknown-linux-musl** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/linux-arm64-musl/package.json",
"chars": 315,
"preview": "{\n \"name\": \"@crabnebula/updater-linux-arm64-musl\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \"arm"
},
{
"path": "bindings/updater/nodejs/npm/linux-x64-gnu/README.md",
"chars": 113,
"preview": "# `@crabnebula/updater-linux-x64-gnu`\n\nThis is the **x86_64-unknown-linux-gnu** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/linux-x64-gnu/package.json",
"chars": 305,
"preview": "{\n \"name\": \"@crabnebula/updater-linux-x64-gnu\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \"x64\"\n "
},
{
"path": "bindings/updater/nodejs/npm/linux-x64-musl/README.md",
"chars": 115,
"preview": "# `@crabnebula/updater-linux-x64-musl`\n\nThis is the **x86_64-unknown-linux-musl** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/linux-x64-musl/package.json",
"chars": 307,
"preview": "{\n \"name\": \"@crabnebula/updater-linux-x64-musl\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"linux\"\n ],\n \"cpu\": [\n \"x64\"\n"
},
{
"path": "bindings/updater/nodejs/npm/win32-arm64-msvc/README.md",
"chars": 115,
"preview": "# `@crabnebula/updater-win32-arm64-msvc`\n\nThis is the **aarch64-pc-windows-msvc** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/win32-arm64-msvc/package.json",
"chars": 287,
"preview": "{\n \"name\": \"@crabnebula/updater-win32-arm64-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n \"cpu\": [\n \"arm"
},
{
"path": "bindings/updater/nodejs/npm/win32-ia32-msvc/README.md",
"chars": 111,
"preview": "# `@crabnebula/updater-win32-ia32-msvc`\n\nThis is the **i686-pc-windows-msvc** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/win32-ia32-msvc/package.json",
"chars": 283,
"preview": "{\n \"name\": \"@crabnebula/updater-win32-ia32-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n \"cpu\": [\n \"ia32"
},
{
"path": "bindings/updater/nodejs/npm/win32-x64-msvc/README.md",
"chars": 112,
"preview": "# `@crabnebula/updater-win32-x64-msvc`\n\nThis is the **x86_64-pc-windows-msvc** binary for `@crabnebula/updater`\n"
},
{
"path": "bindings/updater/nodejs/npm/win32-x64-msvc/package.json",
"chars": 279,
"preview": "{\n \"name\": \"@crabnebula/updater-win32-x64-msvc\",\n \"version\": \"0.0.0\",\n \"os\": [\n \"win32\"\n ],\n \"cpu\": [\n \"x64\"\n"
},
{
"path": "bindings/updater/nodejs/package.json",
"chars": 1119,
"preview": "{\n \"name\": \"@crabnebula/updater\",\n \"version\": \"0.2.3\",\n \"main\": \"./index.js\",\n \"types\": \"./index.d.ts\",\n \"napi\": {\n"
},
{
"path": "bindings/updater/nodejs/src/from_impls.rs",
"chars": 3860,
"preview": "use crate::{Options, Update, UpdateFormat, UpdaterWindowsOptions, WindowsUpdateInstallMode};\n\nimpl From<WindowsUpdateIns"
},
{
"path": "bindings/updater/nodejs/src/lib.rs",
"chars": 11826,
"preview": "use std::{collections::HashMap, str::FromStr, time::Duration};\n\nuse cargo_packager_updater::{\n http::{HeaderMap, Head"
},
{
"path": "crates/config-schema-generator/Cargo.toml",
"chars": 348,
"preview": "[package]\nname = \"cargo-packager-config-schema-generator\"\nversion = \"0.0.0\"\npublish = false\nauthors.workspace = true\nedi"
},
{
"path": "crates/config-schema-generator/build.rs",
"chars": 893,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nuse std::"
},
{
"path": "crates/config-schema-generator/src/main.rs",
"chars": 124,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nfn main()"
},
{
"path": "crates/packager/CHANGELOG.md",
"chars": 18529,
"preview": "# Changelog\n\n## \\[0.11.8]\n\n- [`6e6a10c`](https://www.github.com/crabnebula-dev/cargo-packager/commit/6e6a10cc16929732939"
},
{
"path": "crates/packager/Cargo.toml",
"chars": 3039,
"preview": "[package]\nname = \"cargo-packager\"\nversion = \"0.11.8\"\ndescription = \"Executable packager and bundler distributed as a CLI"
},
{
"path": "crates/packager/LICENSE_APACHE-2.0",
"chars": 10174,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "crates/packager/LICENSE_MIT",
"chars": 1205,
"preview": "MIT License\n\nCopyright (c) 2023 - Present CrabNebula Ltd.\nCopyright (c) 2019 - 2023 Tauri Programme within The Commons C"
},
{
"path": "crates/packager/README.md",
"chars": 2757,
"preview": "# cargo-packager\n\n<img src=\".github/splash.png\" alt=\"cargo-packager splash\" />\n\nExecutable packager, bundler and updater"
},
{
"path": "crates/packager/schema.json",
"chars": 48419,
"preview": "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"title\": \"Config\",\n \"description\": \"The packaging config.\","
},
{
"path": "crates/packager/src/bin/cargo-packager.rs",
"chars": 951,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nuse std::"
},
{
"path": "crates/packager/src/cli/config.rs",
"chars": 9244,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nuse std::"
},
{
"path": "crates/packager/src/cli/error.rs",
"chars": 2131,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/cli/mod.rs",
"chars": 8226,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\n//! The c"
},
{
"path": "crates/packager/src/cli/signer/generate.rs",
"chars": 1826,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/cli/signer/mod.rs",
"chars": 682,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nuse clap:"
},
{
"path": "crates/packager/src/cli/signer/sign.rs",
"chars": 1493,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/codesign/macos.rs",
"chars": 15505,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/codesign/mod.rs",
"chars": 172,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\n#[cfg(tar"
},
{
"path": "crates/packager/src/codesign/windows.rs",
"chars": 8001,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/config/builder.rs",
"chars": 6267,
"preview": "use std::path::PathBuf;\n\nuse crate::{Config, PackageFormat};\n\nuse super::{\n AppImageConfig, Binary, DebianConfig, Fil"
},
{
"path": "crates/packager/src/config/category.rs",
"chars": 19620,
"preview": "// Copyright 2016-2019 Cargo-Bundle developers <https://github.com/burtonageo/cargo-bundle>\n// Copyright 2019-2023 Tauri"
},
{
"path": "crates/packager/src/config/mod.rs",
"chars": 80641,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\n//! Confi"
},
{
"path": "crates/packager/src/error.rs",
"chars": 10101,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/lib.rs",
"chars": 8447,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\n//! [![ca"
},
{
"path": "crates/packager/src/package/app/mod.rs",
"chars": 20231,
"preview": "// Copyright 2016-2019 Cargo-Bundle developers <https://github.com/burtonageo/cargo-bundle>\n// Copyright 2019-2023 Tauri"
},
{
"path": "crates/packager/src/package/appimage/appimage",
"chars": 1580,
"preview": "#!/usr/bin/env bash\n\n# Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n# Copyright 2023-2023 CrabNebu"
},
{
"path": "crates/packager/src/package/appimage/mod.rs",
"chars": 7455,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/package/context.rs",
"chars": 1122,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nuse std::"
},
{
"path": "crates/packager/src/package/deb/main.desktop",
"chars": 222,
"preview": "[Desktop Entry]\nCategories={{categories}}\n{{#if comment}}\nComment={{comment}}\n{{/if}}\nExec={{exec}} {{exec_arg}}\nIcon={{"
},
{
"path": "crates/packager/src/package/deb/mod.rs",
"chars": 17903,
"preview": "// Copyright 2016-2019 Cargo-Bundle developers <https://github.com/burtonageo/cargo-bundle>\n// Copyright 2019-2023 Tauri"
},
{
"path": "crates/packager/src/package/dmg/eula-resources-template.xml",
"chars": 2376,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "crates/packager/src/package/dmg/mod.rs",
"chars": 6666,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/package/dmg/template.applescript",
"chars": 1828,
"preview": "on run (volumeName)\n\ttell application \"Finder\"\n\t\ttell disk (volumeName as string)\n\t\t\topen\n\n\t\t\tset theXOrigin to WINX\n\t\t\t"
},
{
"path": "crates/packager/src/package/mod.rs",
"chars": 8129,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nuse std::"
},
{
"path": "crates/packager/src/package/nsis/FileAssociation.nsh",
"chars": 5378,
"preview": "; from https://gist.github.com/nikku/281d0ef126dbc215dd58bfd5b3a5cd5b\n; fileassoc.nsh\n; File association helper macros\n;"
},
{
"path": "crates/packager/src/package/nsis/installer.nsi",
"chars": 21221,
"preview": "; Set the compression algorithm.\n!if \"{{compression}}\" == \"\"\n SetCompressor /SOLID lzma\n!else\n SetCompressor /SOLID \"{"
},
{
"path": "crates/packager/src/package/nsis/languages/Arabic.nsh",
"chars": 2061,
"preview": "LangString addOrReinstall ${LANG_ARABIC} \"إضافة أو إزالة المكونات\"\nLangString alreadyInstalled ${LANG_ARABIC} \"التطبيق م"
},
{
"path": "crates/packager/src/package/nsis/languages/Bulgarian.nsh",
"chars": 2477,
"preview": "LangString addOrReinstall ${LANG_BULGARIAN} \"Добавяне/Преинсталиране на компоненти\"\nLangString alreadyInstalled ${LANG_B"
},
{
"path": "crates/packager/src/package/nsis/languages/Dutch.nsh",
"chars": 2396,
"preview": "LangString addOrReinstall ${LANG_DUTCH} \"(Her)installeer componenten\"\nLangString alreadyInstalled ${LANG_DUTCH} \"Al geïn"
},
{
"path": "crates/packager/src/package/nsis/languages/English.nsh",
"chars": 2296,
"preview": "LangString addOrReinstall ${LANG_ENGLISH} \"Add/Reinstall components\"\nLangString alreadyInstalled ${LANG_ENGLISH} \"Alread"
},
{
"path": "crates/packager/src/package/nsis/languages/French.nsh",
"chars": 2634,
"preview": "LangString addOrReinstall ${LANG_FRENCH} \"Ajouter/Réinstaller un composant.\"\nLangString alreadyInstalled ${LANG_FRENCH} "
},
{
"path": "crates/packager/src/package/nsis/languages/Japanese.nsh",
"chars": 1873,
"preview": "LangString addOrReinstall ${LANG_JAPANESE} \"コンポーネントの追加・再インストール\"\nLangString alreadyInstalled ${LANG_JAPANESE} \"既にインストールされ"
},
{
"path": "crates/packager/src/package/nsis/languages/Korean.nsh",
"chars": 1745,
"preview": "LangString addOrReinstall ${LANG_KOREAN} \"컴포넌트 추가 및 재설치\"\nLangString alreadyInstalled ${LANG_KOREAN} \"이미 설치되어 있습니다\"\nLangS"
},
{
"path": "crates/packager/src/package/nsis/languages/Persian.nsh",
"chars": 2062,
"preview": "LangString addOrReinstall ${LANG_PERSIAN} \"اضافه کردن/نصب مجدد کامپونتت\"\nLangString alreadyInstalled ${LANG_PERSIAN} \"قب"
},
{
"path": "crates/packager/src/package/nsis/languages/PortugueseBR.nsh",
"chars": 2498,
"preview": "LangString addOrReinstall ${LANG_PORTUGUESEBR} \"Adicionar/Reinstalar componentes\"\nLangString alreadyInstalled ${LANG_POR"
},
{
"path": "crates/packager/src/package/nsis/languages/SimpChinese.nsh",
"chars": 1558,
"preview": "LangString addOrReinstall ${LANG_SIMPCHINESE} \"添加/重新安装组件\"\nLangString alreadyInstalled ${LANG_SIMPCHINESE} \"已安装\"\nLangStri"
},
{
"path": "crates/packager/src/package/nsis/languages/Spanish.nsh",
"chars": 2441,
"preview": "LangString addOrReinstall ${LANG_SPANISH} \"Añadir o reinstalar componentes\"\nLangString alreadyInstalled ${LANG_SPANISH} "
},
{
"path": "crates/packager/src/package/nsis/languages/SpanishInternational.nsh",
"chars": 2441,
"preview": "LangString addOrReinstall ${LANG_SPANISH} \"Añadir o reinstalar componentes\"\nLangString alreadyInstalled ${LANG_SPANISH} "
},
{
"path": "crates/packager/src/package/nsis/languages/Swedish.nsh",
"chars": 2319,
"preview": "LangString addOrReinstall ${LANG_SWEDISH} \"Lägg till/Installera om komponenter\"\nLangString alreadyInstalled ${LANG_SWEDI"
},
{
"path": "crates/packager/src/package/nsis/languages/TradChinese.nsh",
"chars": 1565,
"preview": "LangString addOrReinstall ${LANG_TRADCHINESE} \"增加或重新安裝元件\"\nLangString alreadyInstalled ${LANG_TRADCHINESE} \"已安裝\"\nLangStri"
},
{
"path": "crates/packager/src/package/nsis/languages/Turkish.nsh",
"chars": 2498,
"preview": "LangString addOrReinstall ${LANG_TURKISH} \"Bileşen Ekle/Yeniden Yükle\"\nLangString alreadyInstalled ${LANG_TURKISH} \"Daha"
},
{
"path": "crates/packager/src/package/nsis/mod.rs",
"chars": 23352,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/package/pacman/mod.rs",
"chars": 4493,
"preview": "// Copyright 2024-2024 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nuse super"
},
{
"path": "crates/packager/src/package/wix/default-locale-strings.xml",
"chars": 550,
"preview": "<String Id=\"CargoPackagerLanguage\">__language__</String>\n<String Id=\"CargoPackagerCodepage\">__codepage__</String>\n<Strin"
},
{
"path": "crates/packager/src/package/wix/languages.json",
"chars": 2283,
"preview": "{\n \"ar-SA\": {\n \"langId\": 1025,\n \"asciiCode\": 1256\n },\n \"ca-ES\": {\n \"langId\": 1027,\n \"asciiCode\": 1252\n }"
},
{
"path": "crates/packager/src/package/wix/main.wxs",
"chars": 13561,
"preview": "<?if $(sys.BUILDARCH)=\"x86\"?>\n <?define Win64 = \"no\" ?>\n <?define PlatformProgramFilesFolder = \"ProgramFilesFolder"
},
{
"path": "crates/packager/src/package/wix/mod.rs",
"chars": 27625,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/shell.rs",
"chars": 3290,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/sign.rs",
"chars": 6013,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/packager/src/util.rs",
"chars": 15765,
"preview": "// Copyright 2016-2019 Cargo-Bundle developers <https://github.com/burtonageo/cargo-bundle>\n// Copyright 2019-2023 Tauri"
},
{
"path": "crates/resource-resolver/CHANGELOG.md",
"chars": 814,
"preview": "# Changelog\n\n## \\[0.1.2]\n\n- [`2b6dd55`](https://www.github.com/crabnebula-dev/cargo-packager/commit/2b6dd55eac6733715a4f"
},
{
"path": "crates/resource-resolver/Cargo.toml",
"chars": 634,
"preview": "[package]\nname = \"cargo-packager-resource-resolver\"\ndescription = \"Cargo packager resource resolver\"\nversion = \"0.1.2\"\na"
},
{
"path": "crates/resource-resolver/README.md",
"chars": 1190,
"preview": "# cargo-packager-resource-resolver\n\nResource resolver for apps that was packaged by [`cargo-packager`](https://docs.rs/c"
},
{
"path": "crates/resource-resolver/src/error.rs",
"chars": 1170,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\nuse std::"
},
{
"path": "crates/resource-resolver/src/lib.rs",
"chars": 4917,
"preview": "// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n\n//! # car"
},
{
"path": "crates/updater/CHANGELOG.md",
"chars": 2395,
"preview": "# Changelog\n\n## \\[0.2.3]\n\n- [`d861f1a`](https://www.github.com/crabnebula-dev/cargo-packager/commit/d861f1a6b1dfe585014e"
},
{
"path": "crates/updater/Cargo.toml",
"chars": 1327,
"preview": "[package]\nname = \"cargo-packager-updater\"\nversion = \"0.2.3\"\ndescription = \"Rust executable updater.\"\nauthors = [\"CrabNeb"
},
{
"path": "crates/updater/README.md",
"chars": 6075,
"preview": "# cargo-packager-updater\n\nUpdater for apps that was packaged by [`cargo-packager`](https://docs.rs/cargo-packager).\n\n## "
},
{
"path": "crates/updater/src/custom_serialization.rs",
"chars": 3414,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
},
{
"path": "crates/updater/src/error.rs",
"chars": 2902,
"preview": "// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// Copyright 2023-2023 CrabNebula Ltd.\n// SPDX-Lic"
}
]
// ... and 73 more files (download for full content)
About this extraction
This page contains the full source code of the crabnebula-dev/cargo-packager GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 273 files (896.3 KB), approximately 242.3k tokens, and a symbol index with 645 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.