Skip to content

Commit bf6459e

Browse files
committed
Update: Using newest version of redub with a bunch of bug fixes
1 parent 59b8c86 commit bf6459e

File tree

6 files changed

+20
-74
lines changed

6 files changed

+20
-74
lines changed

tools/hbuild/dub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"copyright": "Copyright © 2023, Hipreme",
66
"dependencies": {
77
"arsd-official:terminal": "~>11.5.0",
8-
"redub": "~>1.24.13",
8+
"redub": "~>1.26.7",
99
"handy-httpd": "~>8.4.3",
1010
"archive": "~>0.7.1",
1111
"my-ip": "~>0.2.0"

tools/hbuild/dub.selections.json

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,27 @@
22
"fileVersion": 1,
33
"versions": {
44
"archive": "0.7.1",
5-
"arsd-official:minigui": "11.5.3",
6-
"arsd-official:simpledisplay": "11.5.3",
7-
"arsd-official:color_base": "11.5.3",
8-
"arsd-official:core": "11.5.3",
9-
"arsd-official:textlayouter": "11.5.3",
10-
"arsd-official:terminal": "11.5.3",
5+
"arsd-official": "11.5.3",
116
"handy-httpd": "8.4.5",
127
"httparsed": "1.2.2",
138
"path-matcher": "1.2.0",
149
"slf4d": "3.0.1",
1510
"streams": "3.6.0",
1611
"my-ip": "0.2.0",
17-
"redub": "1.24.14",
18-
"adv_diff": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\dub\\packages\\redub\\1.24.14\\redub\\adv_diff"},
19-
"hipjson": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\dub\\packages\\redub\\1.24.14\\redub\\hipjson"},
20-
"d-segmented-hashmap": "1.0.5",
21-
"colorize": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\dub\\packages\\redub\\1.24.14\\redub\\colorize"},
22-
"d_dependencies": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\dub\\packages\\redub\\1.24.14\\redub\\d_dependencies"},
23-
"dub_sdl_to_json": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\dub\\packages\\redub\\1.24.14\\redub\\dub_sdl_to_json"},
24-
"sdlite": "1.3.3",
12+
"redub": "1.26.7",
13+
"adv_diff": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\.dub\\packages\\redub\\1.26.7\\redub\\adv_diff"},
14+
"hipjson": "1.1.1",
15+
"d-segmented-hashmap": "1.1.0",
16+
"murmurhash-d": "1.0.0",
17+
"intel-intrinsics": "1.12.3",
18+
"colorize": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\.dub\\packages\\redub\\1.26.7\\redub\\colorize"},
19+
"d_dependencies": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\.dub\\packages\\redub\\1.26.7\\redub\\d_dependencies"},
20+
"d_downloader": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\.dub\\packages\\redub\\1.26.7\\redub\\d_downloader"},
21+
"dub_sdl_to_json": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\.dub\\packages\\redub\\1.26.7\\redub\\dub_sdl_to_json"},
22+
"sdlite": "1.3.4",
2523
"taggedalgebraic": "1.0.1",
26-
"package_suppliers": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\dub\\packages\\redub\\1.24.14\\redub\\package_suppliers"},
27-
"semver": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\dub\\packages\\redub\\1.24.14\\redub\\semver"},
28-
"xxhash3": "0.0.5",
29-
"wasm-sourcemaps": "69e6c80",
30-
"wasm-reader": "0.0.6"
24+
"package_suppliers": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\.dub\\packages\\redub\\1.26.7\\redub\\package_suppliers"},
25+
"semver": {"path": "..\\..\\..\\..\\..\\AppData\\Local\\.dub\\packages\\redub\\1.26.7\\redub\\semver"},
26+
"xxhash3": "0.0.5"
3127
}
3228
}

tools/hbuild/source/app.d

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ struct EngineVariables
106106
string dmdPath;
107107
@("The current DMD path is treated as version")
108108
string dmdVersion;
109-
110-
@("Which dub will be used to compile. Useful for dub development test. Automatically inferred from LDC")
111-
string dubPath;
112109
}
113110
@Section("LDC")
114111
{
@@ -388,8 +385,6 @@ void main(string[] args)
388385
return;
389386
}
390387
}
391-
if(!("DUB" in environment))
392-
environment["DUB"] = getDubPath();
393388
Choice[] choices;
394389
version(Windows)
395390
{

tools/hbuild/source/commons.d

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -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

913907
bool 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

10391006
int 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

11071063
int waitAndPrint(ref Terminal t, Pid pid)

tools/hbuild/source/features/ldc.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ bool installLdc(ref Terminal t, ref RealTimeConsoleInput input, TargetVersion ve
3333
version(Windows) rdmd = rdmd.setExtension("exe");
3434
configs["ldcVersion"] = ver.toString;
3535
configs["ldcPath"] = ldcPath;
36-
configs["dubPath"] = binPath;
3736
updateConfigFile();
3837

3938

tools/hbuild/source/targets/windows.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ ChoiceResult prepareWindows(Choice* c, ref Terminal t, ref RealTimeConsoleInput
114114

115115
// waitOperations([{
116116
std.file.chdir(configs["gamePath"].str);
117-
if(timed(t, waitDub(t, DubArguments().command("build").configuration("script").opts(cOpts)) != 0))
117+
if(timed(t, waitRedub(t, DubArguments().command("build").configuration("script").opts(cOpts)) != 0))
118118
return ChoiceResult.Error;
119119
// return false;
120120
// return true;
@@ -123,7 +123,7 @@ ChoiceResult prepareWindows(Choice* c, ref Terminal t, ref RealTimeConsoleInput
123123
if(!c.scriptOnly)
124124
{
125125
std.file.chdir(getHipPath);
126-
if(timed(t, waitDub(t, DubArguments().command("build").configuration("script").opts(cOpts))) != 0)
126+
if(timed(t, waitRedub(t, DubArguments().command("build").configuration("script").opts(cOpts))) != 0)
127127
return ChoiceResult.Error;
128128
}
129129
// return true;

0 commit comments

Comments
 (0)