Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion source/dub/generators/visuald.d
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,26 @@ class VisualDGenerator : ProjectGenerator {
ret.formattedWrite(" <imppath>%s</imppath>\n", combinedImports);
ret.formattedWrite(" <fileImppath>%s</fileImppath>\n", stringImports);

ret.formattedWrite(" <program>%s</program>\n", "$(DMDInstallDir)windows\\bin\\dmd.exe"); // FIXME: use the actually selected compiler!
ret.formattedWrite(" <program>%s</program>\n", settings.compiler.name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(DMDInstallDir) is a placeholder for VisualD, which makes the program portable across PCs - we probably want to keep using it or use some other variables so that it keeps working even if sharing project folders across different PCs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i get it.
i see these under VisualD
image

so, using these variables according to the case fixes this?

string program;

final switch (settings.compiler.name)
{
case "ldc":
case "ldc2":
program = "$(LDCInstallDir)bin\\ldc2.exe";
break;

case "gdc":
program = "$(GDCInstallDir)bin\\gdc.exe";
break;

case "dmd":
program = "$(DMDInstallDir)windows\\bin\\dmd.exe";
break;
}

ret.formattedWrite(" <program>%s</program>\n", program);
ret.formattedWrite(" <additionalOptions>%s</additionalOptions>\n", getSettings!"dflags"().join(" "));

// Add version identifiers
Expand Down