Skip to content

Commit

Permalink
Fixed: Ignoring DS_Store and dub.selections.json; Engine getter is no…
Browse files Browse the repository at this point in the history
…w going to try into more paths
  • Loading branch information
MrcSnm committed Dec 21, 2023
1 parent c208473 commit 22309b4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ build/.cache
build/android/project/app/src/main/assets/**
build/android/project/app/build
build/android/project/app/release/*
build/targets/**/dub.json
building/openal-soft-1.20.1-bin
build/android/project/app/src/main/jniLibs/**/libhipreme_engine.so
dependencies/**/*.lib
Expand Down
1 change: 1 addition & 0 deletions tools/user/build_selector/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ string updateSelectedCompiler()

ChoiceResult exitFn(Choice* c, ref Terminal t, ref RealTimeConsoleInput input, in CompilationOptions cOpts)
{
t.showCursor();
configs["selectedChoice"] = 0;
updateConfigFile();
return ChoiceResult.Continue;
Expand Down
23 changes: 20 additions & 3 deletions tools/user/build_selector/source/engine_getter.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,27 @@ bool setupEngine(ref Terminal t, ref RealTimeConsoleInput input)
}
else
{
if(std.file.exists(buildNormalizedPath(std.file.getcwd(), "..", "..", "..", "HipremeEngine.code-workspace")))
///Check for existing Hipreme Engine
import core.runtime;
string[] directories =
[
".",
buildNormalizedPath(std.file.getcwd(), "..", "..", ".."),
dirName(Runtime.args[0]),
buildNormalizedPath(dirName(Runtime.args[0]), "..", "..", ".."),
];
foreach(dir; directories)
{
hipremeEnginePath = buildNormalizedPath(std.file.getcwd(), "..", "..", "..");
t.writelnHighlighted("Using engine path found at parent directory. ("~hipremeEnginePath~");");
if(isValidEnginePath(dir))
{
hipremeEnginePath = dir;
break;
}
}

if(hipremeEnginePath.length)
{
t.writelnHighlighted("Using engine path found at directory '"~hipremeEnginePath~"'");
}
else
{
Expand Down

0 comments on commit 22309b4

Please sign in to comment.