Building from Source

The latest sources of Visual D are available from the SVN repository at http://svn.dsource.org/projects/visuald/trunk.

Prerequisites

You need the following tools to build Visual D:

Building Visual D

The Visual D source code has been updated to work with some breaking changes in DMD 2.053, so you should use this release of the compiler when using the latest svn checkout. Finally, no more patches are needed to the compiler!

One issue remains though:

  • Issue 4852: Support to suppress function signature in the profiler window

Compiling Visual D without this patch is still possible, the compiler will detect it and use compatibility code emitting messages to that respect.

The standard build procedure for the release version is to execute "nmake" in the trunk directory. Please check the variable settings at the top of the Makefile and adjust them to the installation directories on your system.

If you want to start developing or debugging, you should execute "nmake sdk" at least once to build the necessary D translations from the Windows and Visual Studio SDK. Afterwards you can use Visual D itself with the solution visuald_vs9.sln or visuald_vs10.sln, respectively.

Deployment

You should debug the plugin within Visual Studio 2008/2010 using a different branch in the registry, so it does not interfere with your working environment.

- VS2008: To create a configuration named "D"

  • Execute from the command line:

<path-to-visual-studio-sdk>\VisualStudioIntegration\Tools\Bin\VSRegEx.exe getorig 9.0 D

  • register the compiled debug plugin with

trunk\nsis\register.bat.

  • The IDE can then be started with the new settings branch via

devenv /RootSuffix D

- VS2010: The mechanism has dramatically changed with VS2010, as the non-standard registry settings are rebuilt on every start of Visual Studio.

  • Put the files from trunk\nsis\extensions into the folder $(APPDATA)\Local\Microsoft\VisualStudio\10.0\Extensions\VisualD
  • in visuald.pkgdef, replace the path "M:\\s\\d\\visuald\\trunk\\bin\\debug\\visuald.dll" with your debug build output path.
  • Start the IDE with the new settings branch via

devenv /RootSuffix D

  • Visual D will now be shown in the Extension Manager where it has to be enabled.

Good luck!

Building earlier versions of Visual D

Earlier versions of Visual D were built with DMD 2.051 or earlier. Unfortunately, there are some patches necessary to DMD and the D runtime library for compilation.

The full patch to the DMD release 2.049 can be found in the patches directory of the svn tree. The dmc compiler is needed to compile dmd and the library.

  • Copy the files buildall.bat, patchd.d and dmd_2_049.patch into the unmodified src directory of the dmd-installation.
  • Check the path settings at the top of buildall.bat. Especially check the DMCPATH that must point to the bin directory of the dmc installation.
  • Running buildall.bat patches dmd, builds the compiler and the runtime library and copies everything into the proper installation directories.
  • The patch file will be renamed to *.applied, so it won't be applied again. You can execute buildall.bat to build dmd and the library again.

Patches

Just for reference, here are some (but not all) of the changes contained in the patch:

  • Issue 4069 std.xml.Document.pretty saves empty elements with spaces and line breaks
  • Issue 4092 broken memory management for COM objects derived from IUnknown

Fixed in DMD 2.047:

  • Issue 3200 std.xml doesn't follow spec for Tag.text

Fixed in DMD 2.046:

  • Issue 4015 forward reference in alias causes error

Fixed in DMD 2.044: