diff --git a/CHANGELOG.md b/CHANGELOG.md index a5b1c7e..3cb38a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ### 21.3.7 +* Make things work with vshaxe 2.23.0 +* Update Kha + +### 21.3.7 + * Pimp macOS support * Update Kha diff --git a/Kha b/Kha index ab3d47a..a4f3181 160000 --- a/Kha +++ b/Kha @@ -1 +1 @@ -Subproject commit ab3d47a10cec17ee6f0c8e1c822d7f0e6e8e2d0a +Subproject commit a4f3181b9ff325383d9d4569e4a51c7c262d9663 diff --git a/extension.js b/extension.js index 6f059db..45c8d9d 100644 --- a/extension.js +++ b/extension.js @@ -91,6 +91,18 @@ function compile(target, silent) { }); } +let KhaHaxeInstallationProvider = { + activate: (provideInstallation) => { + provideInstallation({ + haxeExecutable: path.join(findKha(), 'Tools', 'haxe', 'haxe' + sys()), + haxelibExecutable: null, + standardLibraryPath: path.join(findKha(), 'Tools', 'haxe', 'std') + }); + }, + + deactivate: () => {} +} + let KhaDisplayArgumentsProvider = { init: (api, activationChangedCallback) => { this.api = api; @@ -139,15 +151,6 @@ function sys() { } } -function updateHaxe(vshaxe) { - vshaxe.haxeExecutable.configuration.executable = path.join(findKha(), 'Tools', 'haxe', 'haxe' + sys()); - vshaxe.haxeExecutable.configuration.isCommand = false; - vshaxe.haxeExecutable.configuration.env = { - 'HAXE_STD_PATH': path.join(findKha(), 'Tools', 'haxe', 'std') - }; - vshaxe.haxeExecutable._onDidChangeConfiguration.fire(vshaxe.haxeExecutable.configuration); -} - function configureVsHaxe(rootPath) { let vshaxe = vscode.extensions.getExtension('nadako.vshaxe').exports; KhaDisplayArgumentsProvider.init(vshaxe, (active) => { @@ -155,17 +158,15 @@ function configureVsHaxe(rootPath) { const hxmlPath = path.join(rootPath, 'build', 'project-debug-html5.hxml'); if (fs.existsSync(hxmlPath)) { - updateHaxe(vshaxe); updateHaxeArguments(rootPath, hxmlPath); } else { compile('debug-html5', true).then(() => { - updateHaxe(vshaxe); updateHaxeArguments(rootPath, hxmlPath); }); } }); - updateHaxe(vshaxe); + vshaxe.registerHaxeInstallationProvider('Kha', KhaHaxeInstallationProvider); vshaxe.registerDisplayArgumentsProvider('Kha', KhaDisplayArgumentsProvider); } diff --git a/package.json b/package.json index b2cd7c5..bbf2f9d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "kha", "displayName": "Kha", "description": "Kha support", - "version": "21.3.7", + "version": "21.3.8", "publisher": "kodetech", "engines": { "vscode": "^1.31.0"