Skip to content

Commit

Permalink
Fixed: Make first iOS build always clean
Browse files Browse the repository at this point in the history
  • Loading branch information
MrcSnm committed Dec 7, 2023
1 parent addeccc commit bc70435
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/user/build_selector/source/targets/appleos.d
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ChoiceResult prepareAppleOS(Choice* c, ref Terminal t, ref RealTimeConsoleInput
t.writelnError("Could not build for AppleOS.");
return ChoiceResult.Error;
}

runEngineDScript(t, "copylinkerfiles.d",
"\"--recipe="~buildPath(getBuildTarget, "dub.json")~"\"",
getHipPath("build", "appleos", XCodeDFolder, "libs")
Expand Down
14 changes: 14 additions & 0 deletions tools/user/build_selector/source/targets/ios.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ ChoiceResult prepareiOS(Choice* c, ref Terminal t, ref RealTimeConsoleInput inpu
string out_extraLinkerFlags;
setupPerCompiler(t, "ldc2", "ios-"~arch, out_extraLinkerFlags);
injectLinkerFlagsOnXcode(t, input, out_extraLinkerFlags);
if(!("lastUser" in configs))
{
configs["lastUser"] = environment["USERNAME"];
configs["firstiOSRun"] = true;
}
if(environment["USERNAME"] != configs["lastUser"].str)
configs["firstiOSRun"] = true;

appleClean = configs["firstiOSRun"].boolean;

cached(() => timed(() => outputTemplateForTarget(t, buildTarget)));
string codeSignCommand = getCodeSignCommand(t);
Expand Down Expand Up @@ -53,5 +62,10 @@ ChoiceResult prepareiOS(Choice* c, ref Terminal t, ref RealTimeConsoleInput inpu
);
}
}
if(configs["firstiOSRun"].boolean)
{
configs["firstiOSRun"] = false;
updateConfigFile();
}
return ChoiceResult.Continue;
}

0 comments on commit bc70435

Please sign in to comment.