Commit 96bf5ad
committed
fix: PDFium lookup finds the DLL in its actual bundled location
Windows user report from v0.3.x: "Error loading file: Failed to locate
Pdfium library. Tried: .../resources/pdfium.dll ... LoadLibraryError
(OS error 126)". The DLL IS in the installer, just not where the
runtime was looking.
Root cause: tauri.windows.conf.json declares resources as the array
form `["pdfium/pdfium.dll"]`, which preserves the relative path — the
DLL gets bundled at `<resource_dir>/pdfium/pdfium.dll`. But
pdfium_candidate_paths() in fs.rs only probed `<resource_dir>/pdfium.dll`
(no subdir), so the file was present but invisible to the loader.
Fix: probe both the `pdfium/` subdir and the root in resource_dir AND
in every exe-relative fallback location, for all three platforms. The
subdir form is listed first since that matches the current bundle
config; root forms stay as belt-and-suspenders in case a future config
flattens them.
macOS was unaffected because tauri.macos.conf.json uses
`bundle.macOS.frameworks` which places the dylib in
Contents/Frameworks/ directly (already covered by an exe-relative
probe). Linux had the same subdir gap as Windows and is also covered.1 parent 9771021 commit 96bf5ad
1 file changed
Lines changed: 37 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
168 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
169 | 182 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
176 | 187 | | |
177 | 188 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | | - | |
| 211 | + | |
211 | 212 | | |
| 213 | + | |
212 | 214 | | |
| 215 | + | |
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
220 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
221 | 228 | | |
| 229 | + | |
222 | 230 | | |
223 | 231 | | |
| 232 | + | |
224 | 233 | | |
225 | 234 | | |
226 | 235 | | |
227 | 236 | | |
228 | 237 | | |
| 238 | + | |
229 | 239 | | |
| 240 | + | |
230 | 241 | | |
231 | 242 | | |
232 | 243 | | |
| |||
0 commit comments