Unofficial DVM Windows Beta

Nick Sabalausky a at a.a
Sat Jun 4 18:42:18 PDT 2011


"Nick Sabalausky" <a at a.a> wrote in message 
news:isekt3$2e96$1 at digitalmars.com...
> "Nick Sabalausky" <a at a.a> wrote in message 
> news:ise6jf$1pfj$1 at digitalmars.com...
>> "Jacob Carlborg" <doob at me.com> wrote in message 
>> news:isdk4u$t7p$1 at digitalmars.com...
>>>
>>> I'm interested in knowing how the "use" command works. I've quickly 
>>> skimmed through your code and noticed some references to the registry 
>>> that I suspect has something to do with it. This was the biggest 
>>> obstacle for me to implement a Windows version.
>>>
>
> All the technical details you should need to know are up on the Wiki now:
> https://bitbucket.org/Abscissa256/dvm/wiki/Home
>
> Let me know if anything's missing or you're unclear on something (or have 
> any other questions).
>

Just as a quick summary of the "use" command:

Setting the default compiler with "--default" works by setting the user's 
environment vars in the registry. That's just simply how they're stored on 
Windows. (Then it broadcasts the change so you don't have to logout and back 
in again.)

Setting the current compiler (ie not the default one) works pretty much like 
the Linux version: A shell wrapper actually runs the DVM binary, which 
writes a "result" script. The shell wrapper then runs the result script, 
which invokes one of the "dvm/env/..." scripts, which sets the current cmd 
line session's path via "SET var=...blah...". Some of the details are 
slightly different, though. For instance, instead of being a shell function, 
the DVM shell wrapper is just an ordinary batch file.




More information about the Digitalmars-d-announce mailing list