TangJieHao
TangJieHao4w ago

How do I get the compiled code to use the local dlls, instead of trying to copy them to a temp

I keep getting the same errors. I would like to have the executable correctly use the dll available to it. IE raylib.dll Which I am using lino's raylib 5.0 deno bindings
3 Replies
TangJieHao
TangJieHaoOP4w ago
Copying file:///C:/Users/D/AppData/Local/Temp/deno-compile-proto.exe/raylib/blobs/raylib.dll
error: Uncaught (in promise) NotFound: path not found: copy 'C:\Users\D\AppData\Local\Temp\deno-compile-proto.exe\raylib\blobs\raylib.dll' -> 'C:\Users\D\AppData\Local\deno\plug\file\caa6d373d68e4ac28a27fdb15cffd1fec5a18ac382a8624a220ea53eee8d04fd.dll'
await Deno.copyFile(fromFileUrl(url), cacheFilePath);
^
at async Object.copyFile (ext:deno_fs/30_fs.js:145:3)
at async download (https://deno.land/x/plug@1.0.3/download.ts:271:9)
at async dlopen (https://deno.land/x/plug@1.0.3/mod.ts:155:25)
at async file:///C:/Users/D/AppData/Local/Temp/deno-compile-proto.exe/raylib/bindings/bindings.ts:12:20
Copying file:///C:/Users/D/AppData/Local/Temp/deno-compile-proto.exe/raylib/blobs/raylib.dll
error: Uncaught (in promise) NotFound: path not found: copy 'C:\Users\D\AppData\Local\Temp\deno-compile-proto.exe\raylib\blobs\raylib.dll' -> 'C:\Users\D\AppData\Local\deno\plug\file\caa6d373d68e4ac28a27fdb15cffd1fec5a18ac382a8624a220ea53eee8d04fd.dll'
await Deno.copyFile(fromFileUrl(url), cacheFilePath);
^
at async Object.copyFile (ext:deno_fs/30_fs.js:145:3)
at async download (https://deno.land/x/plug@1.0.3/download.ts:271:9)
at async dlopen (https://deno.land/x/plug@1.0.3/mod.ts:155:25)
at async file:///C:/Users/D/AppData/Local/Temp/deno-compile-proto.exe/raylib/bindings/bindings.ts:12:20
one solution i found was having a hard coded path globally added.
export const lib = await dlopen({
name: "raylib",
url: import.meta.resolve("c:/raylib/blobs"),
export const lib = await dlopen({
name: "raylib",
url: import.meta.resolve("c:/raylib/blobs"),
instead of ../blobs/
jeff.hykin
jeff.hykin2w ago
I believe Another way is to have the path be dynamic for no reason. Ex: Math.random()>0.5?"../thing.dll":"../thing.dll" (Yeah its a useless operation but it defeats the inlining system)
TangJieHao
TangJieHaoOP2w ago
That's the compiler doing a temp folder. I'm not even sure I can control that

Did you find this page helpful?