openfl / lime-vscode-extension

Visual Studio Code extension for OpenFL and Lime projects written in Haxe
https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension
MIT License
27 stars 4 forks source link

Extension is not using HL_PATH to find HashLink binary #92

Closed SeiferTim closed 1 year ago

SeiferTim commented 1 year ago

using Lime 8.0.0 lime setup hl asks where HashLink binary path is. When you try to debug HashLink in VSCode, it is still looking for it in C:/HaxeToolkit/haxe/lib/lime/8,0,0/templates/bin/hl/windows/hl.exe

joshtynjala commented 1 year ago

I'm guessing it is probably this code in Main.resolveHLDebugConfiguration() that is always using the bundled HL:

// TODO: figure out a nicer way to do this
config.hl = Path.join([
    limePath,
    "templates/bin/hl",
    switch (Sys.systemName())
    {
        case "Windows":
            "windows/hl.exe";
        case "Linux":
            "linux/hl";
        case "Mac":
            "mac/hl";
        case other:
            throw 'unsupported OS $other';
    }
]);
Apprentice-Alchemist commented 1 year ago

And for Lime 8 those paths are wrong anyway.

joshtynjala commented 1 year ago

This seems to do the trick:

config.hl = Path.join([getProjectDirectory(), outputFile]);

This fix will be included in the next version of the Lime VSCode extension.