Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dam5h opened this issue May 14, 2024 · 3 comments
Closed

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

dam5h opened this issue May 14, 2024 · 3 comments

Comments

@dam5h
Copy link

dam5h commented May 14, 2024

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 #9734
And this would break 2 #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%"]
@amrbashir
Copy link
Member

amrbashir commented May 14, 2024

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 #9731, just a hook file is enough

@lucasfernog
Copy link
Member

Is this closed now?

@amrbashir
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants