diff --git a/build.ps1 b/build.ps1
index d07c2ab..47594ce 100644
--- a/build.ps1
+++ b/build.ps1
@@ -112,7 +112,7 @@ if ($Standalone) {
$exeName = "hpl-toolbox-$version.exe"
$exeOut = Join-Path $distDir $exeName
- go build -ldflags="-s -w -H windowsgui" -trimpath -o $exeOut .
+ go build -ldflags="-s -w -H windowsgui -X main.AppVersion=$version" -trimpath -o $exeOut .
if ($LASTEXITCODE -ne 0) { Write-Error "go build failed"; exit 1 }
$summary += [pscustomobject]@{
diff --git a/dist/hpl-toolbox-0.1.4.exe b/dist/hpl-toolbox-0.1.5.exe
similarity index 81%
rename from dist/hpl-toolbox-0.1.4.exe
rename to dist/hpl-toolbox-0.1.5.exe
index 171dd44..697b5a4 100644
Binary files a/dist/hpl-toolbox-0.1.4.exe and b/dist/hpl-toolbox-0.1.5.exe differ
diff --git a/dist/hpl-toolbox-0.1.4.vsix b/dist/hpl-toolbox-0.1.5.vsix
similarity index 80%
rename from dist/hpl-toolbox-0.1.4.vsix
rename to dist/hpl-toolbox-0.1.5.vsix
index 17623c7..0a2fa56 100644
Binary files a/dist/hpl-toolbox-0.1.4.vsix and b/dist/hpl-toolbox-0.1.5.vsix differ
diff --git a/package.json b/package.json
index 3be4e99..7ab14d2 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "hpl-toolbox",
"displayName": "HPL Toolbox",
"description": "Bundled tools: PLEC Upload, AppLovin Demo Upload, Base64 Asset Scanner, Daily Update. Local HTML Host.",
- "version": "0.1.4",
+ "version": "0.1.5",
"publisher": "hesukastro",
"license": "UNLICENSED",
"repository": {
diff --git a/src/extension.ts b/src/extension.ts
index 69b5427..bfbf484 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -13,7 +13,7 @@ export function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('hplToolbox.openBase64Scanner', () => openBase64Scanner(context)),
vscode.commands.registerCommand('hplToolbox.openDailyUpdate', () => openDailyUpdate(context)),
vscode.commands.registerCommand('hplToolbox.openSendToMobile', () => openSendToMobile(context)),
- vscode.window.registerWebviewViewProvider('hplToolbox.launcher', new LauncherViewProvider())
+ vscode.window.registerWebviewViewProvider('hplToolbox.launcher', new LauncherViewProvider(context))
);
}
diff --git a/src/launcherView.ts b/src/launcherView.ts
index 5ccecc0..4de1324 100644
--- a/src/launcherView.ts
+++ b/src/launcherView.ts
@@ -1,9 +1,12 @@
import * as vscode from 'vscode';
export class LauncherViewProvider implements vscode.WebviewViewProvider {
+ constructor(private readonly context: vscode.ExtensionContext) {}
+
resolveWebviewView(view: vscode.WebviewView) {
view.webview.options = { enableScripts: true };
- view.webview.html = getHtml();
+ const version = this.context.extension.packageJSON.version as string;
+ view.webview.html = getHtml(version);
view.webview.onDidReceiveMessage((msg) => {
if (msg?.type === 'open' && typeof msg.command === 'string') {
vscode.commands.executeCommand(msg.command);
@@ -12,7 +15,7 @@ export class LauncherViewProvider implements vscode.WebviewViewProvider {
}
}
-function getHtml(): string {
+function getHtml(version: string): string {
return `
@@ -35,7 +38,7 @@ function getHtml(): string {
- HPL Toolbox
+ HPL Toolbox ${version}