tauri/cli/tauri-bundler
Jacob Bolda 40ac52971e
feat: create-tauri-app wiring (#1442)
* chore(deps) Update Tauri JS CLI (#1319)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Tauri Core (#1318)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Tauri API (#1316)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Rust crate serde_json to 1.0.64 (#1315)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Rust crate once_cell to 1.7.2 (#1314)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Rust crate image to 0.23.14 (#1313)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* feat(cli/build): improve no distDir error message (#1306)

* feat(cli/build): improve no distDir error message

* chore: use Path's Display impl

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* chore(deps) Update Tauri API Definitions (#1317)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* feat(bundler/wix): install webview2 runtime (#1329)

* feat(bundler/wix): install webview2 runtime

* add changefile

* chore(deps) Update Tauri API Definitions (major) (#1290)

* chore(deps) Update Tauri API Definitions

* chore: update to husky v5

* chore: remove husky script

* chore: recreate lock file

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* chore(deps) Update Tauri JS CLI (#1291)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* refactor(core): app hooks (#1332)

* fix(api/window): rename manager export to appWindow (#1342)

* feat(api/shell): allow open command to open files (#1341)

* chore(deps) Update Tauri API Definitions (#1344)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Rust crate tokio to 1.3 (#1343)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Rust crate open to 1.6.0 (#1348)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix(core): wrong usage of wry RPC on event API (#1351)

* copy cli config definition window visibility defaults (#1353)

* feat(core): add file drop handler (#1352)

* fix: get correct resource dir in AppImge (fix #1308) (#1333)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* feat: build without proc macros (#1226)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* chore(deps) Update Tauri JS CLI (#1346)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* refactor(core): use Mutex in std to reduce async usage (#1350)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* fix(examples): build error (#1354)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* API example new ui (#1310)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* chore(deps): remove `winres` from template (#1357)

* refactor(core): add `unlisten`, `once` APIs to the event system (#1359)

* fix(cli): use correct arg in `_blanks` links polyfill (#1362)

* fix(api/http): correct types (#1360)

* fix(api/http): correct types

* Add changes

* Update correct-http-api-types.md

* chore(deps) Update Tauri JS CLI (#1364)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Tauri API Definitions (#1363)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix(tauri/webview): Use different user_data_path for Windows (#1365) (#1366)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* fix(config): serde_json::Value::Object takes a Map instead of HashMap (#1371)

* fix(config): serde_json::Value::Object takes a Map instead of HashMap

* fix: fmt

* fix(tauri.js): init command properly building with manifests (#1374)

* fix(tauri.js): init command properly building with manifests

* fix: tests

* feat(bundler): add visual c++ redistributable files with MSM (#1368)

* refactor(core): reduce usage on arc and mutex (#1361)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* feat(config): allow setting product name and version on tauri.conf.json (#1358)

* feat: add current working directory to path api module (#1375)

* refactor(core): move bundle script to /tauri crate (#1377)

* refactor(core): move bundle script to /tauri crate

* fix(cli): clippy

* fix(core): tests

* refactor(core): custom protocol URL uses the app identifier (#1376)

* refactor(core): custom protocol URL uses the app identifier

* fix: clippy

* fix(tauri-api): remove .exe from app_name on windows (#1379)

* chore(deps) Update Tauri API Definitions (#1384)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Rust crate tokio to 1.4 (#1383)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix(cli): prmpt user before install deps in init (#1381)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* chore(deps) Update dependency rollup to v2.42.4 (#1386)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* refactor(cli): rewrite init command in Rust (#1382)

Co-authored-by: nothingismagick <denjell@mailscript.com>

* refactor(bundler): specific settings on dedicated structs, update README (#1380)

* replace lazy_static uses with once_cell (#1391)

* chore(deps) Update Tauri JS CLI (#1385)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* refactor(cli): rewrite info in Rust (#1389)

* refactor(core): remove async from app hooks, add InvokeMessage type (#1392)

* fix(cli): disable custom-protocol feature on dev command (#1393)

* Fix extremely slow dev builds caused by embedding + compressing assets at compile time (#1395)

* feat(bundler) code signing (#473)

Co-authored-by: Rajiv Shah <rajivshah1@icloud.com>
Co-authored-by: David Lemarier <david@lemarier.ca>

* feat(cli): run beforeDev and beforeBuild in a shell, closes #1295 (#1399)

* update to sharp 0.28.0 for cpu arm (m1) (#1404)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>

* feat(cli): propagate args passed after `dev --`, closes #1406 (#1407)

* refactor(api): use secure RNG, closes #1356 (#1398)

* chore(deps) Update Tauri API Definitions (#1411)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Rust crate rfd to 0.2.2 (#1410)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Tauri CLI (#1413)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Tauri Bundler (#1412)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* refactor(core): rewrite shell execute API, closes #1229 (#1408)

* chore(deps) Update dependency @rollup/plugin-commonjs to v18 (#1415)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps) Update Tauri JS CLI (#1414)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix: asset resolution on debug mode

* fix(core): ignore query string on custom protocol asset resolver (#1420)

* wire up existing and adjust recipe configuration

* merge dev

* fix default app name

* clean up vanillajs and proper pass args

* use scaffe to copy the react templates

* fix(api): remove cjs, rename .mjs to .js

* chore: tauri.js dead code elim (#1422)

* remove templates, only used it CTA

* help command is empty, remove

* delete files that aren't imported / required

* set files array to ignore src and config files

* remove unused deps

* add arch notes for future ref

* change file

* allow specifying a binary

* resolve last bits to reach scaffe

* adjust vanilla js template dir path

Co-authored-by: Sanket Chaudhari <chaudharisanket2000@gmail.com>

* fix up cra scaffolding

* remove none and rely on vanillajs

* log shell commands

* remove no recipe question branch

* shift react template for better overwrite copying

* update deps

* simple readme

* implement dep manager

* pretty

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Noah Klayman <noahklayman@gmail.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Co-authored-by: Lucas Fernandes Nogueira <lucasfernandesnog@gmail.com>
Co-authored-by: chip <chip@chip.sh>
Co-authored-by: Gabe Cohen <gcc3.14@gmail.com>
Co-authored-by: Ngo Iok Ui (Wu Yu Wei) <wusyong9104@gmail.com>
Co-authored-by: Alve Larsson <larsalvelarsson@gmail.com>
Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>
Co-authored-by: Kid <44045911+kidonng@users.noreply.github.com>
Co-authored-by: david <david@lemarier.ca>
Co-authored-by: nothingismagick <denjell@mailscript.com>
Co-authored-by: William <william@venner.io>
Co-authored-by: Rajiv Shah <rajivshah1@icloud.com>
Co-authored-by: Mehdi Rezaei <mehdiraized@gmail.com>
Co-authored-by: Sanket Chaudhari <chaudharisanket2000@gmail.com>
2021-04-11 04:22:07 -05:00
..
src feat: create-tauri-app wiring (#1442) 2021-04-11 04:22:07 -05:00
.gitignore chore(bundler) rename tauri-cli crate to tauri-bundler (#401) 2020-02-08 12:51:48 -03:00
Cargo.lock feat: create-tauri-app wiring (#1442) 2021-04-11 04:22:07 -05:00
Cargo.toml feat: create-tauri-app wiring (#1442) 2021-04-11 04:22:07 -05:00
CHANGELOG.md Apply Version Updates From Current Changes (#1075) 2020-11-10 08:04:39 -06:00
License_Apache.md chore(bundler) rename tauri-cli crate to tauri-bundler (#401) 2020-02-08 12:51:48 -03:00
License_MIT.md chore(bundler) rename tauri-cli crate to tauri-bundler (#401) 2020-02-08 12:51:48 -03:00
README.md feat: create-tauri-app wiring (#1442) 2021-04-11 04:22:07 -05:00
rustfmt.toml chore(fmt): merge imports (#1216) 2021-02-11 03:22:42 -03:00

Tauri Bundler

Wrap Rust executables in OS-specific app bundles.

About

This is a fork of the awesome cargo-bundle, turned into a library used by the Tauri CLI.

Configuration

Tauri automatically loads configurations from the tauri.conf.json > tauri > bundle object, but this library doesn't rely on it and can be used by non-Tauri apps.

General settings

These settings apply to bundles for all (or most) OSes.

  • name: The name of the built application. If this is not present, then it will use the name value from your Cargo.toml file.
  • identifier: [REQUIRED] A string that uniquely identifies your application, in reverse-DNS form (for example, "com.example.appname" or "io.github.username.project"). For OS X and iOS, this is used as the bundle's CFBundleIdentifier value; for Windows, this is hashed to create an application GUID.
  • icon: [OPTIONAL] The icons used for your application. This should be an array of file paths or globs (with images in various sizes/formats); tauri-bundler will automatically convert between image formats as necessary for different platforms. Supported formats include ICNS, ICO, PNG, and anything else that can be decoded by the image crate. Icons intended for high-resolution (e.g. Retina) displays should have a filename with @2x just before the extension (see example below).
  • version: [OPTIONAL] The version of the application. If this is not present, then it will use the version value from your Cargo.toml file.
  • resources: [OPTIONAL] List of files or directories which will be copied to the resources section of the bundle. Globs are supported.
  • copyright: [OPTIONAL] This contains a copyright string associated with your application.
  • category: [OPTIONAL] What kind of application this is. This can be a human-readable string (e.g. "Puzzle game"), or a Mac OS X LSApplicationCategoryType value (e.g. "public.app-category.puzzle-games"), or a GNOME desktop file category name (e.g. "LogicGame"), and tauri-bundler will automatically convert as needed for different platforms.
  • short_description: [OPTIONAL] A short, one-line description of the application. If this is not present, then it will use the description value from your Cargo.toml file.
  • long_description: [OPTIONAL] A longer, multi-line description of the application.

Debian-specific settings

These settings are used only when bundling deb packages.

  • depends: A list of strings indicating other packages (e.g. shared libraries) that this package depends on to be installed. If present, this forms the Depends: field of the deb package control file.
  • use_bootstrapper: Enables the bootstrapper script, which allows access to the environment variables.

Mac OS X-specific settings

These settings are used only when bundling app and dmg packages.

  • frameworks: A list of strings indicating any Mac OS X frameworks that need to be bundled with the app. Each string can either be the name of a framework (without the .framework extension, e.g. "SDL2"), in which case tauri-bundler 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 tauri-bundler copy the specified frameworks into the OS X app bundle (under Foobar.app/Contents/Frameworks/); you are still responsible for (1) 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), and (2) embedding the correct rpath in your binary (e.g. by running install_name_tool -add_rpath "@executable_path/../Frameworks" path/to/binary after compiling).
  • minimum_system_version: A version string indicating the minimum Mac OS X version that the bundled 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 (or whatever version number you want) to ensure that the compiled binary has the same minimum version.
  • license: Path to the license file for the DMG bundle.
  • exception_domain: The exception domain to use on the macOS .app bundle. Allows communication to the outside world e.g. a web server you're shipping.
  • use_bootstrapper: Enables the bootstrapper script, which allows access to the environment variables.

Example tauri.conf.json:

{
  "package": {
    "productName": "Your Awesome App",
    "version": "0.1.0"
  },
  "tauri": {
    "bundle": {
      "active": true,
      "identifier": "com.my.app",
      "shortDescription": "",
      "longDescription": "",
      "copyright": "Copyright (c) You 2021. All rights reserved.",
      "icon": [
        "icons/32x32.png",
        "icons/128x128.png",
        "icons/128x128@2x.png",
        "icons/icon.icns",
        "icons/icon.ico"
      ],
      "resources": ["./assets/**/*.png"],
      "deb": {
        "depends": ["debian-dependency1", "debian-dependency2"],
        "useBootstrapper": true
      },
      "macOS": {
        "frameworks": [],
        "minimumSystemVersion": "10.11",
        "license": "./LICENSE",
        "useBootstrapper": true
      },
      "externalBin": ["./sidecar-app"]
    }
  }
}

License

(c) 2017 - present, George Burton, Tauri-Apps Organization

This program is licensed either under the terms of the Apache Software License, or the MIT License.

-> note, for bundle_dmg we have included a BSD 3 licenced binary seticon. https://github.com/sveinbjornt/osxiconutils/blob/master/seticon.m tools/rust/cargo-tauri-bundle/src/bundle/templates/seticon