[dmd-beta] D 2.062 beta
Rainer Schuetze
r.sagitario at gmx.de
Sat Feb 9 00:53:26 PST 2013
On 08.02.2013 09:30, Walter Bright wrote:
> http://ftp.digitalmars.com/dmd2beta.zip
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
I'd like to see the installation for Win64 sorted out. The major issue
for that to work seamlessly right now is that the user has to edit
sc.ini to adjust it to his environment. There is also a mixture of COFF
and OMF libraries in the lib folder now that is just asking for trouble.
One problem is how to detect the location of the Microsoft linker, the
MS runtime library and the platform SDK libraries. This is currently
done by hardcoding the location into sc.ini setting the environment
variables VCINSTALLDIR and WindowsSdkDir. But these might also be set by
the user in the environment (e.g. by starting the respective console
window) or can be detected from the registry. A Visual Studio and
Windows SDK directory structure is currently assumed, but it does not
match the Windows 8 SDK, for example.
My suggestion:
- add a new assignment operator "?=" to the ini file handler that just
overwrites environment variables that don't have a value yet.
- add a new special syntax "%@[registry-value]%" to read a registry value
- put Win64 libraries into a separate directory "lib64"
- make use of the [Environment64] block in sc.ini, e.g.
[Environment64]
VCINSTALLDIR?=%@[HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir]
VCINSTALLDIR?=%@[HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VC\ProductDir]
VCINSTALLDIR?=%@[HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\VC\ProductDir]
VCINSTALLDIR?=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
WindowsSdkDir?=%@[HKLM\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\CurrentInstallFolder]
WindowsSdkDir?=%@[HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows
Kits\Installed Roots\KitsRoot]
WindowsSdkDir?=C:\Program Files\Microsoft SDKs\Windows\v6.0A
LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe
LIB=%@P%\..\lib64;%VCINSTALLDIR%\lib\amd64;%WindowsSdkDir%\lib\x64;%WindowsSdkDir%\lib\win8\um\x64
DFLAGS=%DFLAGS -L/nologo
* No need to have a new variable LINKCMD64.
* The fallback to standard paths could also benefit from some mechanism
that checks whether the previous settings points to an existing
directory or file.
* A few more entries might be needed to deal with VS Express versions
* throw out a some hardcoded linker options from link.c
Is this the way to go? To do a pull request for this, it would be good
to also have the installed sc.ini available on github.
More information about the dmd-beta
mailing list