Skip to content

Commit

Permalink
Merge pull request #1421 from loudoweb/hl_setup
Browse files Browse the repository at this point in the history
i will trust you loudo (^_^)
  • Loading branch information
maitag committed Jul 16, 2020
2 parents e3830cc + 391f2ae commit 10d9126
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
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

0 comments on commit 10d9126

Please sign in to comment.