fix(claude): добавлена поддержка пакетного приложения
- Зачем: - Claude Proxy не запускался при установке Claude из Microsoft Store. - Что: - сохранён прежний запуск обычного claude.exe. - добавлена активация пакетного приложения по AUMID с параметрами прокси. - генератор ярлыка получил поддержку значка из пакета Claude. - Проверка: - обе ветки запуска завершились с кодом 0. - сетевой процесс Claude подключился к 127.0.0.1:12334.
This commit is contained in:
1 parent
559c1caf75
commit
0e283daad8
3 files changed
+154
-17
No files matched your search
@@ -24,8 +24,40 @@ if (Test-Path -LiteralPath $PwshAliasPath) {
|
||||
|
||||
$Arguments = "-NoLogo -NoProfile -ExecutionPolicy Bypass -File `"$LauncherPath`""
|
||||
$WorkingDirectory = $env:USERPROFILE
|
||||
$ClaudeExecutable = Join-Path $env:LOCALAPPDATA 'AnthropicClaude\claude.exe'
|
||||
if (Test-Path -LiteralPath $ClaudeExecutable) {
|
||||
|
||||
function Get-ClaudeIconExecutable {
|
||||
$LegacyExecutable = Join-Path $env:LOCALAPPDATA 'AnthropicClaude\claude.exe'
|
||||
if (Test-Path -LiteralPath $LegacyExecutable) {
|
||||
return $LegacyExecutable
|
||||
}
|
||||
|
||||
$Package = Get-AppxPackage -Name 'Claude' -ErrorAction SilentlyContinue |
|
||||
Select-Object -First 1
|
||||
if ($null -eq $Package) {
|
||||
return $null
|
||||
}
|
||||
|
||||
try {
|
||||
$Manifest = Get-AppxPackageManifest $Package
|
||||
$Application = @($Manifest.Package.Applications.Application) | Select-Object -First 1
|
||||
if ($null -eq $Application -or [string]::IsNullOrWhiteSpace($Application.Executable)) {
|
||||
return $null
|
||||
}
|
||||
|
||||
$Executable = Join-Path $Package.InstallLocation ([string]$Application.Executable)
|
||||
if (Test-Path -LiteralPath $Executable) {
|
||||
return $Executable
|
||||
}
|
||||
}
|
||||
catch {
|
||||
return $null
|
||||
}
|
||||
|
||||
return $null
|
||||
}
|
||||
|
||||
$ClaudeExecutable = Get-ClaudeIconExecutable
|
||||
if ($null -ne $ClaudeExecutable) {
|
||||
$IconLocation = "$ClaudeExecutable,0"
|
||||
} else {
|
||||
$IconLocation = "$TargetPath,0"
|
||||
|
||||
Reference in new issue
Block a user