Skip to content

Commit

Permalink
Fixed: More clarification when installing D
Browse files Browse the repository at this point in the history
  • Loading branch information
MrcSnm committed Dec 21, 2023
1 parent 2c4eefb commit 16f7845
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/user/build_selector/source/d_getter.d
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ private void overrideLdcConf(ref Terminal t)
std.file.copy(ldc2Conf, buildNormalizedPath(getOutputPath(), "bin", "ldc2.conf"));
}

enum wontAffectMessage = "\n\tThis compiler version is installed locally and won't affect your system D installation.";

bool installD(ref Terminal t, ref RealTimeConsoleInput input)
{
bool existsDmd = ("dmdPath" in configs) !is null;
Expand All @@ -93,9 +95,10 @@ bool installD(ref Terminal t, ref RealTimeConsoleInput input)
if(!isLdcExpectedVersion)
{
if(!existsLdc)
t.writelnHighlighted("No ldcVersion specified, your system will attempt to install LDC2 " ~LdcVersion);
t.writelnHighlighted("No ldcVersion specified, your HipremeEngine will attempt to install locally LDC2 " ~LdcVersion ~
wontAffectMessage);
else
t.writelnError("Different LDC Version. Your system will attempt to install LDC2 " ~LdcVersion);
t.writelnError("Different LDC Version. HipremeEngine will attempt to install locally LDC2 " ~LdcVersion);
t.flush;
if(!installFileTo("Download D cross compiler LDC2 "~LdcVersion, getLdcLink,
getLdcDownloadOutputName, buildNormalizedPath(std.file.getcwd, "D"), t, input))
Expand All @@ -122,9 +125,10 @@ bool installD(ref Terminal t, ref RealTimeConsoleInput input)
if(!isDmdExpectedVersion)
{
if(!existsDmd)
t.writelnHighlighted("No dmdVersion specified, your system will attempt to install DMD " ~DmdVersion);
t.writelnHighlighted("No dmdVersion specified, your HipremeEngine will attempt to install locally DMD " ~DmdVersion ~
wontAffectMessage);
else
t.writelnError("Different DMD Version. Your system will attempt to install DMD " ~DmdVersion);
t.writelnError("Different DMD Version. HipremeEngine will attempt to install locally DMD " ~DmdVersion);
t.flush;
if(!installFileTo("Download D fast iteration compiler DMD "~DmdVersion, getDmdLink,
getDmdDownloadOutputName, buildNormalizedPath(std.file.getcwd, "D"), t, input))
Expand Down

0 comments on commit 16f7845

Please sign in to comment.