Default hlc target directory is not the same as hl

This commit is contained in:
Josh Tynjala
2024-10-07 09:40:22 -07:00
parent dd79e5852a
commit 895ce877d9
3 changed files with 21 additions and 3 deletions

View File

@@ -160,7 +160,13 @@ class LinuxPlatform extends PlatformTarget
targetType = "cpp";
}
targetDirectory = Path.combine(project.app.path, project.config.getString("linux.output-directory", targetType == "cpp" ? "linux" : targetType));
var defaultTargetDirectory = switch (targetType)
{
case "cpp": "linux";
case "hl": project.targetFlags.exists("hlc") ? "hlc" : targetType;
default: targetType;
}
targetDirectory = Path.combine(project.app.path, project.config.getString("linux.output-directory", defaultTargetDirectory));
targetDirectory = StringTools.replace(targetDirectory, "arch64", is64 ? "64" : "");
applicationDirectory = targetDirectory + "/bin/";
executablePath = Path.combine(applicationDirectory, project.app.file);

View File

@@ -147,7 +147,13 @@ class MacPlatform extends PlatformTarget
targetType = "cpp";
}
targetDirectory = Path.combine(project.app.path, project.config.getString("mac.output-directory", targetType == "cpp" ? "macos" : targetType));
var defaultTargetDirectory = switch (targetType)
{
case "cpp": "macos";
case "hl": project.targetFlags.exists("hlc") ? "hlc" : targetType;
default: targetType;
}
targetDirectory = Path.combine(project.app.path, project.config.getString("mac.output-directory", defaultTargetDirectory));
targetDirectory = StringTools.replace(targetDirectory, "arch64", dirSuffix);
applicationDirectory = targetDirectory + "/bin/" + project.app.file + ".app";
contentDirectory = applicationDirectory + "/Contents/Resources";

View File

@@ -203,7 +203,13 @@ class WindowsPlatform extends PlatformTarget
}
}
targetDirectory = Path.combine(project.app.path, project.config.getString("windows.output-directory", targetType == "cpp" ? "windows" : targetType));
var defaultTargetDirectory = switch (targetType)
{
case "cpp": "windows";
case "hl": project.targetFlags.exists("hlc") ? "hlc" : targetType;
default: targetType;
}
targetDirectory = Path.combine(project.app.path, project.config.getString("windows.output-directory", defaultTargetDirectory));
targetDirectory = StringTools.replace(targetDirectory, "arch64", is64 ? "64" : "");
if (targetType == "winjs")