CyberShadow / Digger

A tool to build D and bisect old D versions
Other
57 stars 9 forks source link

[ae.sys.install.vs] How use system installed VS? #59

Closed PetarKirov closed 1 year ago

PetarKirov commented 7 years ago

I have several VS versions installed on my system. Is there a way to tell digger to use one of those specifically, instead of downloading vs2013community, when building model 32mscoff or 64?

BTW, the way you extract vs2013community's payload is pretty neat. Do you think this can somehow be integrated in the Windows dmd installer? Use case: allow beginners to quickly get started without having to wait for VS 20xx Community edition (or VS Build Tools) to install, which can take up to several hours (even on SSD).

CyberShadow commented 7 years ago

I have several VS versions installed on my system. Is there a way to tell digger to use one of those specifically, instead of downloading vs2013community, when building model 32mscoff or 64?

Not at the moment. Digger (ae.sys.d.manager specifically) makes some assumptions about the structure of the VS installation, such as whether to use the x86 -> x86_64 cross-compilers or native x86_64 compilers. There is also the matter of the Windows SDK.

If you're worried about disk usage, you can run a tool which converts duplicate files to hard links on Digger's dl repository / your VS installation.

Do you think this can somehow be integrated in the Windows dmd installer?

The module (ae.sys.install.vs) should be reusable in stand-alone programs, so I don't think it would be too difficult.

PetarKirov commented 7 years ago

My actual use case for using the system installed version of VS it to test whether dmd can build fine with VS version X. If I understand correctly, this is currently not possible since digger controls too much of this process. On the other hand I wanted to test how compatible would be D's make build system when ran from and arbitrary "x64/x86 VS20XX Native Tools Command Prompt". And also making a setup where a hypothetical make replacement could be tested (assuming it exposes the same make interface, so that an unmodified Digger could use it).

CyberShadow commented 7 years ago

In this case, it's probably easiest to use win64.mak directly. I think it shouldn't be too hard. There is also the VS project and solution files, but I don't know much about them.

PetarKirov commented 7 years ago

I had a very naive bash script for building the repos on linux, but I decided move to something more flexible and save myself some time, so using the win make files is not a problem. Anyway, I think you should consider adding support for this feature in the future, though it's far from something critical.

CyberShadow commented 1 year ago

Because Microsoft is under no obligation to maintain backwards compatibility in its directory structure across VS versions, I think supporting using arbitrary VS versions / installations is impractical and out of scope for Digger. For experimentation, hacking on Digger's source or D's makefiles should be sufficient.