tauri/tooling/bundler
Lucas Fernandes Nogueira a50f24b2bd
Merge remote-tracking branch 'origin/dev' into next (#7067)
Co-authored-by: wusyong <wusyong@users.noreply.github.com>
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Co-authored-by: Simon Hyll <hyllsimon@gmail.com>
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.studio>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: chip <chip@chip.sh>
Co-authored-by: Raphii <iam@raphii.co>
Co-authored-by: Ronie Martinez <ronmarti18@gmail.com>
Co-authored-by: hanaTsuk1 <101488209+hanaTsuk1@users.noreply.github.com>
Co-authored-by: nathan-fall <39990940+nathan-fall@users.noreply.github.com>
Co-authored-by: Akshay <nerdy@peppe.rs>
Co-authored-by: KurikoMoe <kurikomoe@gmail.com>
Co-authored-by: Guilherme Oenning <me@goenning.net>
Co-authored-by: Pierre Cashon <biaocy91@gmail.com>
Co-authored-by: Jack Wills <32690432+mrjackwills@users.noreply.github.com>
Co-authored-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Co-authored-by: Risto Stevcev <me@risto.codes>
Co-authored-by: Soumt <rltks1305@naver.com>
Co-authored-by: yutotnh <57719497+yutotnh@users.noreply.github.com>
Co-authored-by: Gökçe Merdun <agmmnn@gmail.com>
Co-authored-by: Nathanael Rea <Nathan@NathanaelRea.com>
Co-authored-by: Usman Rajab <usman.rajab@gmail.com>
Co-authored-by: Francis The Basilisk <36006338+snorkysnark@users.noreply.github.com>
Co-authored-by: Lej77 <31554212+Lej77@users.noreply.github.com>
Co-authored-by: Tomáš Diblík <dibla.tomas@post.cz>
Co-authored-by: Jonas Kruckenberg <iterpre@protonmail.com>
Co-authored-by: Pascal Sommer <Pascal-So@users.noreply.github.com>
Co-authored-by: Bo <bertonzh@gmail.com>
Co-authored-by: Kevin Yue <k3vinyue@gmail.com>
fixed grammar and typos (#6937)
Fix api.js docs pipeline with updated typedoc dependencies (#6945)
closes #6887 (#6922)
fix(core): Fix `WindowBuilder::on_navigation` handler never registerd, closes #6865 (#6921)
fix(core): Fix `WindowBuilder::on_navigation` handler never registerd, closes #6865
fix broken symlinks in license files (#6336)
fix(cli): fix cli connection timeout to dev server (fix #6045) (#6046)
fix(bundler): ensure that there are no duplicate extension arguments when bundling on Windows, fixes #6103 (#6917)
fix(bundler): ensure that there are no duplicate extension arguments during bundling on Windows (fix #6103)
closes #5491 (#6408)
fix(nsis): prefill $INSTDIR with previous install path and respect `/D` flag, closes #6928 (#6935)
fix(nsis): prefill $INSTDIR with previous install path and respect `/D` flag, closes #6928
fix(updater): emit `UPTODATE` when server responds with 204, closes #6934 (#6970)
fix(core): unpin all dependencies, closes #6944 (#6966)
fix(bundler): Add new lang_file option in persian variant. (#6972)
fix(core/ipc): access url through webview native object, closes #6889 (#6976)
fix(core): remove trailing slash in http scope url, closes #5208 (#6974)
fix(core): remove trailing slash in http scope url, closes #5208
fix(cli): find correct binary when `--profile` is used, closes #6954 (#6979)
fix(cli): find correct binary when `--profile` is used, closes #6954
closes #6955 (#6987)
closes #6955
closes #6158 (#6969)
closes #6158
fix(cli): improve vs build tools detection (#6982)
fix: updated appimage script to follow symlinks for /usr/lib* (fix: #6992) (#6996)
fix(cli): correctly remove Cargo features (#7013)
Fix typo (#7012)
fix(cli): revert metadata.json field rename from #6795 (#7029)
closes #6732 (#6736)
fix: add missing file properties on Windows, closes #6676 (#6693)
fix(cli.js): detect node-20 binary (#6667)
fix version-or-publish workflow (#7031)
fix(cli/devserver): inject autoreload into HTML only, closes #6997 (#7032)
fix(bundler/nsis): write installer templates UTF16LE encoded, closes #7036 (#7040)
fix(bundler/nsis): write installer templates UTF16LE encoded, closes #7036
fix(core): rewrite `asset` protocol streaming, closes #6375 (#6390)
closes #5939 (#5960)
fix(core): use `safe_block_on` (#7047)
closes #6859 (#6933)
closes #6955 (#6998)
fix(core): populate webview_attrs from config, closes #6794 (#6797)
closes #5176 (#5180)
fix: sound for notifications on windows (fix #6652) (#6680)
close native window's buttons, closes #2353 (#6665)
fix(bundler/nsis): calculate accurate app size, closes #7056 (#7057)
fix(tests): only download update when it is available (#7061)
closes #6706 (#6712)
fix(doc): correct the doc of `content_protected()` (#7065)
closes #6472 (#6530)
fix(macros): use full path to Result to avoid issues with type aliases (#7071)
2023-05-29 21:29:24 -03:00
..
src Merge remote-tracking branch 'origin/dev' into next (#7067) 2023-05-29 21:29:24 -03:00
.gitignore feat(bundler): allow including custom files on debian package, fix #1428 (#1613) 2021-04-25 01:46:04 -03:00
Cargo.toml Merge remote-tracking branch 'origin/dev' into next (#7067) 2023-05-29 21:29:24 -03:00
CHANGELOG.md Merge remote-tracking branch 'origin/dev' into next (#7067) 2023-05-29 21:29:24 -03:00
License_Apache.md chore: update license headers (#5067) 2022-08-28 15:13:21 -03:00
License_MIT.md fix: prune packages, add license files, closes #1507 (#1769) 2021-05-10 20:28:15 -03:00
README.md docs(various): Improve Readability (#4225) 2022-05-27 10:06:11 +02: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.

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.
  • provider_short_name: If your Apple ID is connected to multiple teams, you have to specify the provider short name of the team you want to use to notarize your app. See Customizing the notarization workflow and search for --list-providers for more information how to obtain your provider short name.

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"]
      },
      "macOS": {
        "frameworks": [],
        "minimumSystemVersion": "10.11",
        "license": "./LICENSE"
      },
      "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 licensed binary seticon. https://github.com/sveinbjornt/osxiconutils/blob/master/seticon.m tools/rust/cargo-tauri-bundle/src/bundle/templates/seticon