@@ -903,12 +903,6 @@ Choice getBackChoice()
903903}
904904
905905
906- string getDubPath ()
907- {
908- string dub = buildNormalizedPath(configs[" dubPath" ].str, " dub" );
909- version (Windows ) dub = dub.setExtension(" exe" );
910- return dub;
911- }
912906
913907bool writeTemplate (ref Terminal t, string projectPath, string enginePath)
914908{
@@ -1007,33 +1001,6 @@ struct DubArguments
10071001 c = buildNormalizedPath(configs[" dmdPath" ].str, " dmd" .executableExtension);
10081002 return c;
10091003 }
1010-
1011- string getDubRunCommand ()
1012- {
1013- string dub = getDubPath();
1014- string a = command; // /Arguments
1015- compiler = getCompiler();
1016- if (parallel) a~= " --parallel" ;
1017- if (recipe) a~= " --recipe=" ~ recipe;
1018- if (build) a~= " --build=" ~ build;
1019- if (arch) a~= " --arch=" ~ arch;
1020- if (compiler != " " )a~= " --compiler=" ~ compiler;
1021- if (deep) a~= " --deep" ;
1022- if (configuration) a~= " -c " ~ configuration;
1023- if (opts != CompilationOptions.init) a~= opts.getDubOptions();
1024- if (runArgs) a~= " -- " ~ runArgs;
1025-
1026-
1027- version (Windows )
1028- {
1029- if (confirmKey) a~= " && pause" ;
1030- }
1031- else version (Posix )
1032- {
1033- if (confirmKey) a~= " && read -p \" Press any key to continue... \" -n1 -s" ;
1034- }
1035- return preCommands~ dub~ " " ~ a;
1036- }
10371004}
10381005
10391006int waitRedub (ref Terminal t, DubArguments dArgs, out ProjectDetails proj, string copyLinkerFilesTo = null )
@@ -1087,21 +1054,10 @@ void inParallel(scope void delegate()[] args...)
10871054 // }
10881055}
10891056
1090- int waitDub (ref Terminal t, DubArguments dArgs, string copyLinkerFilesTo = null )
1057+ int waitRedub (ref Terminal t, DubArguments dArgs, string copyLinkerFilesTo = null )
10911058{
1092- // /Detects the presence of a template file before executing.
10931059 ProjectDetails d;
1094- if (dArgs._command.length >= 3 && dArgs._command[0 .. 3 ] != " run" ) return waitRedub(t, dArgs, d, copyLinkerFilesTo);
1095- if (execDubBase(t, dArgs) == - 1 ) return - 1 ;
1096- string toExec = dArgs.getDubRunCommand();
1097- t.writeln(toExec);
1098- t.flush;
1099- return t.wait(spawnShell(toExec));
1100- }
1101-
1102- int waitDubTarget (ref Terminal t, string target, DubArguments dArgs, string copyLinkerFilesTo = null )
1103- {
1104- return waitDub (t, dArgs.recipe(buildPath(getBuildTarget(target), " dub.json" )), copyLinkerFilesTo);
1060+ return waitRedub (t, dArgs, d, copyLinkerFilesTo);
11051061}
11061062
11071063int waitAndPrint (ref Terminal t, Pid pid)
0 commit comments