tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] Unable to add files to dmg interface

Open huifer opened this issue 1 year ago • 1 comments

Describe the bug

The dmg interface now only has application and appicon. How to add additional content?

Reproduction

No response

Expected behavior

No response

Full tauri info output

> [email protected] tauri
> tauri info


[✔] Environment
    - OS: Mac OS 15.0.1 x86_64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: 1.81-x86_64-apple-darwin (default)
    - node: 20.11.1
    - pnpm: 8.6.11
    - yarn: 1.22.22
    - npm: 10.2.4

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - @tauri-apps/api : 2.1.1
    - @tauri-apps/cli : 2.1.0

[-] Plugins
    - tauri-plugin-fs 🦀: 2.1.0
    - @tauri-apps/plugin-fs : not installed!
    - tauri-plugin-dialog 🦀: 2.0.4
    - @tauri-apps/plugin-dialog : 2.0.1
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : 2.0.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

No response

huifer avatar Dec 07 '24 01:12 huifer

I think you can append such a configuration information to the tauri.conf.json file bundle=>macOS=>dmg

        "files": [
          {
            "name": "",
            "path": "",
            "x": "",
            "y": ""
          }
        ]

https://github.com/tauri-apps/tauri/blob/b37741da6a2d3dad71490c910a64eeedda2ba9ca/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs#L65C1-L68C39

It may be necessary to make modifications here to change the contents of the bundle_dmg file.

@FabianLars

huifer avatar Dec 09 '24 03:12 huifer