dvm icon indicating copy to clipboard operation
dvm copied to clipboard

Allow binaries to be installed in an arbitrary location

Open MetaLang opened this issue 11 years ago • 10 comments

I'm on Windows, so dvm currently installs the compiler binaries in C:\Users\AppData\Roaming\dvm\compilers. It'd be nice for me to keep my current D directory layout while still having dvm manage installed compilers for me.

MetaLang avatar Jan 05 '14 00:01 MetaLang

Where would you like it to install the compilers?

jacob-carlborg avatar Jan 05 '14 09:01 jacob-carlborg

Anywhere I tell it to. I currently have DMD installed in a folder in the root directory, and using DVM means I'll have to go change any scripts/tools that rely on it being installed there.

MetaLang avatar Jan 05 '14 22:01 MetaLang

I can see what I can do. It still need to follow a certain directory structure, otherwise it would become quite complicated.

jacob-carlborg avatar Jan 06 '14 09:01 jacob-carlborg

I don't know what tools or scripts you have that rely on the location of DMD. But the idea with DVM is that any scrips or tools should not use the full path to DMD. Then you invoke dvm use <compiler> before running the script/tool and it will pick up the correct version of DMD.

jacob-carlborg avatar Jan 06 '14 09:01 jacob-carlborg

I just tried to use dvm to compile a project with dub, and it failed with not being able to find dmd, even though dmd is found in the shell. I'm not sure if this is a dmd bug, or if dub is looking in the wrong (hardcoded) place, so I figured I'd mention it here :)

vuaru avatar Oct 15 '14 17:10 vuaru

@vuaru it works fine for me. Did you run $ dvm use <compiler-version> before invoking Dub?

jacob-carlborg avatar Oct 15 '14 18:10 jacob-carlborg

Yeah. (Also made it default).

dub 0.9.22
dmd 2.066.0
Ubuntu 14.04.1 LTS

Error executing command run: Failed to invoke the compiler dmd to determine the build platform: /bin/bash: dmd: command not found

vuaru avatar Oct 15 '14 19:10 vuaru

Hmm, what does $ type dvm | head -n 1 return?

jacob-carlborg avatar Oct 15 '14 19:10 jacob-carlborg

dvm is a function :)

vuaru avatar Oct 15 '14 20:10 vuaru

That is correct. I would like to blame Dub in this case :smiley:. You can try also running Dub with --vverbose and see if it gives you an clues.

jacob-carlborg avatar Oct 16 '14 19:10 jacob-carlborg