Skip to content

Commit ac4d5c2

Browse files
fix: detect kernel assets by file extension to support renamed Windows/Linux packages (#92)
* refactor: rename BotBrowserConsole to BotBrowserLauncher * feat: add kernel management, proxy management, and setup scripts * fix: enable macOS native Edit menu for Cmd+C/V/X/A keyboard shortcuts * chore: upgrade Neutralino runtime to 6.4.0 * chore: remove Neutralino binaries from repo, download via neu update * fix: improve macOS clipboard support with JS fallback for Cmd+V paste * fix: expand macOS clipboard fallback to Cmd+C/X, auto-download Neutralino via postinstall * chore: upgrade Neutralino to 6.5.0 and simplify setup scripts * fix: fix PowerShell setup script ZIP download corruption * feat: enhance proxy workflow with IP check, quick change, and reusable input component * fix: correct checkbox color override and setup script stdin handling * feat: improve profile deletion with auto-stop, group WebRTC settings, prioritize custom exec path * feat: add port protection toggle, fix kernel auto-update cleanup and UI refresh * fix: detect kernel assets by file extension to support renamed Windows/Linux packages
1 parent c67a433 commit ac4d5c2

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

launcher/src/app/data/kernel.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,9 @@ export function getAssetDate(name: string): string {
8181
}
8282

8383
export function getPlatformFromAssetName(name: string): KernelPlatform | null {
84-
if (name.includes('_win_x86_64')) return 'win_x86_64';
85-
if (name.includes('_mac_arm64')) return 'mac_arm64';
86-
if (name.includes('_mac_x86_64')) return 'mac_x86_64';
87-
if (name.includes('_x86_64.deb')) return 'linux_x86_64';
88-
if (name.includes('_arm64.deb')) return 'linux_arm64';
84+
if (name.endsWith('.7z')) return 'win_x86_64';
85+
if (name.endsWith('.dmg')) return name.includes('arm64') ? 'mac_arm64' : 'mac_x86_64';
86+
if (name.endsWith('.deb')) return name.includes('arm64') ? 'linux_arm64' : 'linux_x86_64';
8987
return null;
9088
}
9189

scripts/install_botbrowser.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if ($Help) {
2525
$ErrorActionPreference = "Stop"
2626
$Repo = "botswin/BotBrowser"
2727
$ApiBase = "https://api.github.com/repos/$Repo/releases"
28-
$AssetPattern = "_win_x86_64.7z"
28+
$AssetPattern = ".7z"
2929

3030
Write-Host "Platform: Windows x86_64"
3131

scripts/install_botbrowser.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ case "$OS" in
5050
;;
5151
Linux)
5252
case "$ARCH" in
53-
x86_64|amd64) ASSET_PATTERN="_x86_64.deb" ;;
54-
aarch64|arm64) ASSET_PATTERN="_arm64.deb" ;;
53+
x86_64|amd64) ASSET_PATTERN="(amd64|x86_64|x64)\.deb" ;;
54+
aarch64|arm64) ASSET_PATTERN="_arm64\.deb" ;;
5555
*) echo "Error: Unsupported architecture: $ARCH"; exit 1 ;;
5656
esac
5757
echo "Platform: Linux ${ARCH}"
@@ -69,15 +69,15 @@ if [ -n "$MAJOR_VERSION" ]; then
6969
ASSET_URL="$(curl -sL "${API_BASE}?per_page=100" \
7070
| grep "browser_download_url" \
7171
| grep "/${MAJOR_VERSION}\." \
72-
| grep "$ASSET_PATTERN" \
72+
| grep -E "$ASSET_PATTERN" \
7373
| cut -d '"' -f 4 \
7474
| sort -t_ -k2 -r \
7575
| head -1)"
7676
else
7777
echo "1. Fetching latest release info..."
7878
ASSET_URL="$(curl -sL "${API_BASE}/latest" \
7979
| grep "browser_download_url" \
80-
| grep "$ASSET_PATTERN" \
80+
| grep -E "$ASSET_PATTERN" \
8181
| cut -d '"' -f 4 \
8282
| sort -t_ -k2 -r \
8383
| head -1)"

0 commit comments

Comments
 (0)