Skip to content

Commit

Permalink
Windows hl fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RblSb committed May 15, 2020
1 parent 54682cb commit a50fb75
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/runci/targets/Hl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import runci.Config.*;

class Hl {
static var hlSrc = switch [ci, systemName] {
case [AppVeyor | AzurePipelines, "Windows"]: "C:\\hashlink";
case [AppVeyor | AzurePipelines | GithubActions, "Windows"]: "C:\\hashlink";
case _: Path.join([Sys.getEnv("HOME"), "hashlink"]);
};
static var hlBuild = switch [ci, systemName] {
case [AppVeyor | AzurePipelines, "Windows"]: "C:\\hashlink_build";
case [AppVeyor | AzurePipelines | GithubActions, "Windows"]: "C:\\hashlink_build";
case _: Path.join([Sys.getEnv("HOME"), "hashlink_build"]);
};
static var hlBinDir = switch [ci, systemName] {
case [AppVeyor | AzurePipelines, "Windows"]: "C:\\hashlink_build\\bin";
case [AppVeyor | AzurePipelines | GithubActions, "Windows"]: "C:\\hashlink_build\\bin";
case _: Path.join([Sys.getEnv("HOME"), "hashlink_build", "bin"]);
};
static var hlBinary = switch [ci, systemName] {
case [AppVeyor | AzurePipelines, "Windows"]: "C:\\hashlink_build\\bin\\hl.exe";
case [AppVeyor | AzurePipelines | GithubActions, "Windows"]: "C:\\hashlink_build\\bin\\hl.exe";
case _: Path.join([Sys.getEnv("HOME"), "hashlink_build", "bin", "hl"]);
};

Expand All @@ -28,7 +28,9 @@ class Hl {
infoMsg('hl has already been installed.');
return;
}
runCommand("git", ["clone", "https://github.com/HaxeFoundation/hashlink.git", hlSrc]);
if (!FileSystem.exists(hlSrc)) {
runCommand("git", ["clone", "https://github.com/HaxeFoundation/hashlink.git", hlSrc]);
} else infoMsg("Reusing hashlink repository");

switch (systemName) {
case "Linux":
Expand Down Expand Up @@ -77,4 +79,4 @@ class Hl {
runCommand("haxe", ["compile-hl.hxml"].concat(args));
runCommand(hlBinary, ["bin/hl/sys.hl"]);
}
}
}

0 comments on commit a50fb75

Please sign in to comment.