tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[feat] Bundler to include pdb file as a resource in windows builds

Open dam5h opened this issue 1 year ago • 2 comments

Describe the problem

I am making a windows bundler and I would like to include the pdb file, but this file is not available until after the build.

The copy_resources function happens early before this file is available and will early exit from the build process.

There are a couple PR's that will help with this as pointed out on discord:

This one probably would help too but less automatic than 2 ig https://github.com/tauri-apps/tauri/pull/9734 And this would break 2 https://github.com/tauri-apps/tauri/pull/9710

Describe the solution you'd like

I would like to allow post build resources in the resources bundle configuration, ie files that don't exist yet.

Alternatives considered

I could write my own nsis template, which I may end up doing, but this is overkill for such a simple matter it seems.

Additional context

I use the following in my .cargo/config.toml file to have rustc make a local pdb file.

[target.x86_64-pc-windows-msvc]
# By default, the executable embeds absolute path to PDB.
# But that would mean a path on a build machine.
# Instead, we supply a relative path (just the name of the PDB file,
# because we assume it's in the current directory).
rustflags = ["-C", "link-args=/PDBALTPATH:%_PDB%"]

dam5h avatar May 14 '24 18:05 dam5h

I could write my own nsis template, which I may end up doing, but this is overkill for such a simple matter it seems.

Soon you won't need to write a full nsis template, after this PR https://github.com/tauri-apps/tauri/pull/9731, just a hook file is enough

amrbashir avatar May 14 '24 22:05 amrbashir

Is this closed now?

lucasfernog avatar May 25 '24 13:05 lucasfernog

I would consider this closed tbh since users can just use the new hooks to include their needed files. If more people requesting adding the pdb files, we will reconsider.

amrbashir avatar May 27 '24 17:05 amrbashir