#adding pdb file to installer resources on Windows?

9 messages · Page 1 of 1 (latest)

drowsy sail
#

Hello,

I am trying to ship a pdb file with my distribution but it seems the resources defined in the config file are expected to be available prior to building.

Seems to error out on `cargo:rerun-if-changed={path to pdb file that does not exist yet in target/release directory}

Since the bundling of files is done after the build I was hoping to use a resource path that would exist, even if doesn't yet exist.

Seems like as a workaround I could

  1. Use a custom nsis script, seems like overkill
  2. use a before build command create a dummy pdb file in that location, it would get re-written by the proper pdb file.

Any other ideas, or am I missing something? I have cargo setup to put the pdb file in the release directory alongside the exe.

Thanks!

balmy lintel
#

can't think of anything else either 🤔

#

so yeah, not optimal. Please open a feature request on github :)

drowsy sail
#

Thanks Fabian! I think I need to go with #1 above as there is a file lock contention on app.pdb when it exists, as I am getting a OS permission error from windows. Maybe rustc is busy writing to the file? When it doesn't exist it just complains that it doesn't exist.

drowsy sail
#

Thanks for those links, definitely helpful, I think the decoupled bundle will be great to have and should address the issue.

#

I think #9710 may just be enough actually, as it would ignore the pdb file given that the source and target are the same.