Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hl setup #1421

Merged
merged 2 commits into from Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions tools/platforms/WindowsPlatform.hx
Expand Up @@ -204,6 +204,16 @@ class WindowsPlatform extends PlatformTarget
{
ProjectHelper.copyLibrary(project, ndll, "Windows" + (is64 ? "64" : ""), "", ".hdll", applicationDirectory, project.debug,
targetSuffix);

if (!project.environment.exists("HL_PATH"))
{
var command = #if lime "lime" #else "hxp" #end;

Log.info("You must define HL_PATH to copy HL dependencies: '" + command + " setup hl' first");

}else{
System.copyFile(project.environment.get("HL_PATH") + '/ssl.hdll', applicationDirectory + '/ssl.hdll');
}
}
else
{
Expand Down
28 changes: 27 additions & 1 deletion tools/utils/PlatformSetup.hx
Expand Up @@ -24,6 +24,7 @@ class PlatformSetup
private static var linuxPacman32Packages = "multilib-devel mesa mesa-libgl glu";
private static var linuxPacman64Packages = "multilib-devel lib32-mesa lib32-mesa-libgl lib32-glu";
private static var visualStudioURL = "https://www.visualstudio.com/downloads/";
private static var hashlinkURL = "https://github.com/HaxeFoundation/hashlink/releases";
private static var triedSudo:Bool = false;
private static var userDefines:Map<String, Dynamic>;
private static var targetFlags:Map<String, Dynamic>;
Expand Down Expand Up @@ -410,8 +411,11 @@ class PlatformSetup
setupWindows();
}

case "neko", "hl", "hashlink", "cs", "uwp", "winjs", "nodejs", "java":
case "neko", "cs", "uwp", "winjs", "nodejs", "java":
Log.println("\x1b[0;3mNo additional configuration is required.\x1b[0m");

case "hl", "hashlink":
setupHL();

case "lime":
setupLime();
Expand Down Expand Up @@ -1179,6 +1183,28 @@ class PlatformSetup
System.openURL(visualStudioURL);
}
}

public static function setupHL():Void
{
Log.println("\x1b[1mIn order to build HashLink executables you must have");
Log.println("HashLink binaries installed.");
Log.println("We recommend using version \"1.10.0\"");
Log.println("available as a free download from Github.\x1b[0m");



var answer = CLIHelper.ask("Would you like to visit the download page now?");

if (answer == YES || answer == ALWAYS)
{
System.openURL(hashlinkURL);

}

getDefineValue("HL_PATH", "Path to Hashlink binaries.");
Log.println("");
Log.println("Setup completed");
}

private static function throwPermissionsError()
{
Expand Down