feat: Add self-hosted OTA auto-update infrastructure and publish automation
This commit is contained in:
parent
4ef32db388
commit
1f0c0eff67
16 changed files with 855 additions and 115 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -3,8 +3,14 @@ node_modules
|
||||||
target/
|
target/
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
|
dist_server/
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
|
# Secrets & Signing Keys
|
||||||
|
.keys/
|
||||||
|
*.key
|
||||||
|
*.pub
|
||||||
|
|
||||||
# .NET artifacts
|
# .NET artifacts
|
||||||
bin/
|
bin/
|
||||||
obj/
|
obj/
|
||||||
|
|
|
||||||
20
package-lock.json
generated
20
package-lock.json
generated
|
|
@ -10,6 +10,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.2.0",
|
"@tauri-apps/api": "^2.2.0",
|
||||||
"@tauri-apps/plugin-opener": "^2.2.5",
|
"@tauri-apps/plugin-opener": "^2.2.5",
|
||||||
|
"@tauri-apps/plugin-process": "^2.4.0",
|
||||||
|
"@tauri-apps/plugin-updater": "^2.14.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"lucide-react": "^0.468.0",
|
"lucide-react": "^0.468.0",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
|
|
@ -1516,6 +1518,24 @@
|
||||||
"@tauri-apps/api": "^2.12.0"
|
"@tauri-apps/api": "^2.12.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tauri-apps/plugin-process": {
|
||||||
|
"version": "2.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-process/-/plugin-process-2.4.0.tgz",
|
||||||
|
"integrity": "sha512-GddrmsSLAYrLa/yTXlXK/YRDzUgYeeOnUXTbiyvJWkmI424RmDPD3FVLeqcon7rv6O6ZfhBilcrHWnSo7o6hIQ==",
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@tauri-apps/api": "^2.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tauri-apps/plugin-updater": {
|
||||||
|
"version": "2.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-updater/-/plugin-updater-2.14.1.tgz",
|
||||||
|
"integrity": "sha512-Hr7nlBm1wT6xbwzjZ/S36YULazu8MNlj5vvOwMl47fXI7HTa5Bjl1PbDEwVHaZTAKzE1VZsUy35UqnbrQxmYQw==",
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@tauri-apps/api": "^2.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/babel__core": {
|
"node_modules/@types/babel__core": {
|
||||||
"version": "7.20.5",
|
"version": "7.20.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.2.0",
|
"@tauri-apps/api": "^2.2.0",
|
||||||
"@tauri-apps/plugin-opener": "^2.2.5",
|
"@tauri-apps/plugin-opener": "^2.2.5",
|
||||||
|
"@tauri-apps/plugin-process": "^2.4.0",
|
||||||
|
"@tauri-apps/plugin-updater": "^2.14.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"lucide-react": "^0.468.0",
|
"lucide-react": "^0.468.0",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
|
|
|
||||||
9
publish.bat
Normal file
9
publish.bat
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
title LD Uninstaller - Self-Hosted OTA Publisher
|
||||||
|
echo ==========================================================
|
||||||
|
echo LD UNINSTALLER - SELF-HOSTED OTA DAĞITIM VE DERLEME
|
||||||
|
echo ==========================================================
|
||||||
|
echo.
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0publish.ps1" %*
|
||||||
|
pause
|
||||||
196
publish.ps1
Normal file
196
publish.ps1
Normal file
|
|
@ -0,0 +1,196 @@
|
||||||
|
# ==============================================================================
|
||||||
|
# LD Uninstaller v3.0.0 - Self-Hosted OTA Dağıtım ve Yayınlama Scripti
|
||||||
|
# ==============================================================================
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[switch]$UploadOnly,
|
||||||
|
[switch]$SkipUpload,
|
||||||
|
[string]$Notes = "LD Uninstaller v3.0.0: Tauri v2 + Rust mimarisi, Restart Manager tabanlı kilit açıcı (Shredder), 20 katmanlı kalıntı temizliği ve otomatik güncelleme desteği."
|
||||||
|
)
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
$ScriptDir = $PSScriptRoot
|
||||||
|
Set-Location $ScriptDir
|
||||||
|
|
||||||
|
Write-Host "==========================================================" -ForegroundColor Cyan
|
||||||
|
Write-Host " LD UNINSTALLER - SELF-HOSTED OTA DAĞITIM MOTORU" -ForegroundColor Cyan
|
||||||
|
Write-Host "==========================================================" -ForegroundColor Cyan
|
||||||
|
|
||||||
|
# 1. Anahtar ve Yapılandırma Kontrolü
|
||||||
|
$KeyFile = Join-Path $ScriptDir ".keys\app.key"
|
||||||
|
$TauriConfFile = Join-Path $ScriptDir "src-tauri\tauri.conf.json"
|
||||||
|
$DistServerDir = Join-Path $ScriptDir "dist_server"
|
||||||
|
|
||||||
|
if (-not (Test-Path $KeyFile)) {
|
||||||
|
Write-Host "[HATA] Minisign özel anahtarı (.keys\app.key) bulunamadı!" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$TauriConf = Get-Content $TauriConfFile -Raw | ConvertFrom-Json
|
||||||
|
$Version = $TauriConf.version
|
||||||
|
Write-Host "[1/5] Hedef Sürüm: v$Version" -ForegroundColor Green
|
||||||
|
|
||||||
|
if (-not (Test-Path $DistServerDir)) {
|
||||||
|
New-Item -ItemType Directory -Path $DistServerDir -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $UploadOnly) {
|
||||||
|
# 2. Özel İmza Anahtarını Ortam Değişkenine Yükle
|
||||||
|
Write-Host "[2/5] Minisign anahtarı yükleniyor ve derleme başlatılıyor..." -ForegroundColor Yellow
|
||||||
|
$env:TAURI_SIGNING_PRIVATE_KEY_PATH = $KeyFile
|
||||||
|
$env:TAURI_SIGNING_PRIVATE_KEY = (Get-Content $KeyFile -Raw).Trim()
|
||||||
|
|
||||||
|
# Frontend Build
|
||||||
|
Write-Host " -> Frontend derleniyor (tsc & vite build)..." -ForegroundColor Gray
|
||||||
|
npm run build
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "[HATA] Frontend derlemesi başarısız oldu!" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tauri Bundle
|
||||||
|
Write-Host " -> Tauri v2 imzalı kurulum paketi üretiliyor (tauri build)..." -ForegroundColor Gray
|
||||||
|
npx @tauri-apps/cli build
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "[UYARI] Standart tauri build sonlandı, çıktılar kontrol ediliyor..." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
|
||||||
|
# 3. Üretilen Paketleri ve İmzaları Tespit Et
|
||||||
|
Write-Host "[3/5] Kurulum paketleri ve kriptografik imzalar taranıyor..." -ForegroundColor Yellow
|
||||||
|
|
||||||
|
# Olası hedef dizinler: C:\Users\lildosto\ld_target veya src-tauri\target
|
||||||
|
$SearchLocations = @(
|
||||||
|
"C:\Users\lildosto\ld_target\release\bundle\nsis",
|
||||||
|
"$ScriptDir\src-tauri\target\release\bundle\nsis",
|
||||||
|
"C:\Users\lildosto\ld_target\release",
|
||||||
|
"$ScriptDir\src-tauri\target\release"
|
||||||
|
)
|
||||||
|
|
||||||
|
$SetupExe = $null
|
||||||
|
$SigFile = $null
|
||||||
|
|
||||||
|
foreach ($loc in $SearchLocations) {
|
||||||
|
if (Test-Path $loc) {
|
||||||
|
$foundExe = Get-ChildItem -Path $loc -Filter "*setup*.exe" -File -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||||
|
if ($foundExe) {
|
||||||
|
$SetupExe = $foundExe
|
||||||
|
$possibleSig = "$($foundExe.FullName).sig"
|
||||||
|
if (Test-Path $possibleSig) {
|
||||||
|
$SigFile = Get-Item $possibleSig
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Eğer tauri build nsis yerine farklı bir isimle ürettiyse veya ilk derlemede zip/sig formatındaysa
|
||||||
|
if ($SetupExe) {
|
||||||
|
$DestExeName = "LD-Uninstaller_${Version}_x64-setup.exe"
|
||||||
|
$DestExePath = Join-Path $DistServerDir $DestExeName
|
||||||
|
Copy-Item -Path $SetupExe.FullName -Destination $DestExePath -Force
|
||||||
|
Write-Host " -> Kurulum dosyası kopyalandı: $DestExeName" -ForegroundColor Green
|
||||||
|
|
||||||
|
$Signature = ""
|
||||||
|
if ($SigFile -and (Test-Path $SigFile.FullName)) {
|
||||||
|
$Signature = (Get-Content $SigFile.FullName -Raw).Trim()
|
||||||
|
Copy-Item -Path $SigFile.FullName -Destination "$DestExePath.sig" -Force
|
||||||
|
Write-Host " -> Minisign imzası alındı: $($SigFile.Name)" -ForegroundColor Green
|
||||||
|
} else {
|
||||||
|
# Elle imzala
|
||||||
|
Write-Host " -> İmza dosyası aranıyor / oluşturuluyor..." -ForegroundColor Gray
|
||||||
|
$sigOutput = npx @tauri-apps/cli signer sign -k $KeyFile $DestExePath
|
||||||
|
if (Test-Path "$DestExePath.sig") {
|
||||||
|
$Signature = (Get-Content "$DestExePath.sig" -Raw).Trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# SHA256 Hesapla
|
||||||
|
$Hash = (Get-FileHash -Path $DestExePath -Algorithm SHA256).Hash
|
||||||
|
|
||||||
|
# 4. latest.json Oluştur (Tauri v2 OTA Şeması)
|
||||||
|
Write-Host "[4/5] Self-hosted 'latest.json' güncelleme manifesti üretiliyor..." -ForegroundColor Yellow
|
||||||
|
$PubDate = [DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
|
||||||
|
$UpdateUrl = "https://ttmadethat.shop/updates/ld-uninstaller/$DestExeName"
|
||||||
|
|
||||||
|
$LatestManifest = @{
|
||||||
|
version = "v$Version"
|
||||||
|
notes = $Notes
|
||||||
|
pub_date = $PubDate
|
||||||
|
platforms = @{
|
||||||
|
"windows-x86_64" = @{
|
||||||
|
signature = $Signature
|
||||||
|
url = $UpdateUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$JsonContent = $LatestManifest | ConvertTo-Json -Depth 5
|
||||||
|
$LatestJsonPath = Join-Path $DistServerDir "latest.json"
|
||||||
|
[System.IO.File]::WriteAllText($LatestJsonPath, $JsonContent, [System.Text.Encoding]::UTF8)
|
||||||
|
|
||||||
|
# SHA256 Özet Dosyası
|
||||||
|
$ShaSummary = "DOSYA: $DestExeName`nSHA256: $Hash`nTARIH: $PubDate`nURL: $UpdateUrl`n"
|
||||||
|
[System.IO.File]::WriteAllText((Join-Path $DistServerDir "sha256.txt"), $ShaSummary, [System.Text.Encoding]::UTF8)
|
||||||
|
|
||||||
|
Write-Host " -> 'dist_server\latest.json' başarıyla oluşturuldu." -ForegroundColor Green
|
||||||
|
} else {
|
||||||
|
Write-Host "[BİLGİ] Setup dosyası henüz oluşturulmadıysa simüle manifest hazırlandı." -ForegroundColor Gray
|
||||||
|
$DestExeName = "LD-Uninstaller_${Version}_x64-setup.exe"
|
||||||
|
$LatestJsonPath = Join-Path $DistServerDir "latest.json"
|
||||||
|
$LatestManifest = @{
|
||||||
|
version = "v$Version"
|
||||||
|
notes = $Notes
|
||||||
|
pub_date = [DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
|
||||||
|
platforms = @{
|
||||||
|
"windows-x86_64" = @{
|
||||||
|
signature = "TEST_SIGNATURE"
|
||||||
|
url = "https://ttmadethat.shop/updates/ld-uninstaller/$DestExeName"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$JsonContent = $LatestManifest | ConvertTo-Json -Depth 5
|
||||||
|
[System.IO.File]::WriteAllText($LatestJsonPath, $JsonContent, [System.Text.Encoding]::UTF8)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 5. Sunucu Dağıtım Durumu (bağlan.bat Entegrasyonu)
|
||||||
|
Write-Host "[5/5] Sunucu bağlantı ve dağıtım durumu kontrol ediliyor..." -ForegroundColor Yellow
|
||||||
|
|
||||||
|
$ServerIP = "116.202.14.171"
|
||||||
|
$SSHKey = "$env:USERPROFILE\.ssh\id_ed25519"
|
||||||
|
$RemoteDir = "/var/www/ttmadethat.shop/updates/ld-uninstaller"
|
||||||
|
|
||||||
|
if ($SkipUpload) {
|
||||||
|
Write-Host "`n[BİLGİ] -SkipUpload parametresi nedeniyle sunucuya yükleme yapılmadı." -ForegroundColor Cyan
|
||||||
|
Write-Host "Tüm dağıtım paketleri hazır: '$DistServerDir'" -ForegroundColor Green
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host " -> Sunucu ping / erişim kontrolü yapılıyor ($ServerIP)..." -ForegroundColor Gray
|
||||||
|
$ping = Test-Connection -ComputerName $ServerIP -Count 1 -Quiet -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
if (-not $ping) {
|
||||||
|
Write-Host "`n--------------------------------------------------------------------------" -ForegroundColor Yellow
|
||||||
|
Write-Host "[BİLGİ] Sunucunuz şu anda askıda veya çevrimdışı durumda ($ServerIP)." -ForegroundColor Yellow
|
||||||
|
Write-Host "Tüm OTA güncelleme dosyaları, kurulum paketi ve 'latest.json' yerel olarak" -ForegroundColor Yellow
|
||||||
|
Write-Host "'$DistServerDir' klasörüne EKSİKSİZ hazırlandı." -ForegroundColor Yellow
|
||||||
|
Write-Host "`nSunucunuz tekrar aktif hale geldiğinde tek bir komutla yüklemek için:" -ForegroundColor Green
|
||||||
|
Write-Host " .\publish.ps1 -UploadOnly" -ForegroundColor Cyan
|
||||||
|
Write-Host "--------------------------------------------------------------------------" -ForegroundColor Yellow
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sunucu açıksa SCP ile yükle
|
||||||
|
try {
|
||||||
|
Write-Host " -> Sunucuda güncelleme klasörü oluşturuluyor ($RemoteDir)..." -ForegroundColor Gray
|
||||||
|
ssh -i $SSHKey -o ConnectTimeout=5 root@$ServerIP "mkdir -p $RemoteDir"
|
||||||
|
|
||||||
|
Write-Host " -> Dosyalar sunucuya aktarılıyor (SCP)..." -ForegroundColor Gray
|
||||||
|
scp -i $SSHKey -o ConnectTimeout=10 "$DistServerDir\*" root@${ServerIP}:${RemoteDir}/
|
||||||
|
|
||||||
|
Write-Host "`n[BAŞARILI] Sürüm v$Version kendi web sitene başarıyla yayınlandı!" -ForegroundColor Green
|
||||||
|
Write-Host "OTA Manifest URL: https://ttmadethat.shop/updates/ld-uninstaller/latest.json" -ForegroundColor Cyan
|
||||||
|
} catch {
|
||||||
|
Write-Host "`n[UYARI] Sunucuya bağlanırken zaman aşımı oluştu: $_" -ForegroundColor Yellow
|
||||||
|
Write-Host "Dosyalar '$DistServerDir' dizininde korundu. Sunucu açıldığında '.\publish.ps1 -UploadOnly' çalıştırabilirsiniz." -ForegroundColor Cyan
|
||||||
|
}
|
||||||
281
src-tauri/Cargo.lock
generated
281
src-tauri/Cargo.lock
generated
|
|
@ -475,6 +475,12 @@ version = "1.0.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cfg_aliases"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chrono"
|
name = "chrono"
|
||||||
version = "0.4.45"
|
version = "0.4.45"
|
||||||
|
|
@ -508,6 +514,15 @@ dependencies = [
|
||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "constant_time_eq"
|
||||||
|
version = "0.6.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9"
|
||||||
|
dependencies = [
|
||||||
|
"rustversion",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cookie"
|
name = "cookie"
|
||||||
version = "0.18.2"
|
version = "0.18.2"
|
||||||
|
|
@ -1056,6 +1071,16 @@ dependencies = [
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "filetime"
|
||||||
|
version = "0.2.29"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "find-msvc-tools"
|
name = "find-msvc-tools"
|
||||||
version = "0.1.15"
|
version = "0.1.15"
|
||||||
|
|
@ -1359,8 +1384,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
|
"js-sys",
|
||||||
"libc",
|
"libc",
|
||||||
"r-efi 6.0.0",
|
"r-efi 6.0.0",
|
||||||
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2002,6 +2029,36 @@ dependencies = [
|
||||||
"windows-sys 0.45.0",
|
"windows-sys 0.45.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jni"
|
||||||
|
version = "0.22.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"combine",
|
||||||
|
"jni-macros",
|
||||||
|
"jni-sys 0.4.1",
|
||||||
|
"log",
|
||||||
|
"simd_cesu8",
|
||||||
|
"thiserror 2.0.21",
|
||||||
|
"walkdir",
|
||||||
|
"windows-link",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jni-macros"
|
||||||
|
version = "0.22.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"rustc_version",
|
||||||
|
"simd_cesu8",
|
||||||
|
"syn 2.0.119",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jni-sys"
|
name = "jni-sys"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
|
|
@ -2089,6 +2146,8 @@ dependencies = [
|
||||||
"tauri",
|
"tauri",
|
||||||
"tauri-build",
|
"tauri-build",
|
||||||
"tauri-plugin-opener",
|
"tauri-plugin-opener",
|
||||||
|
"tauri-plugin-process",
|
||||||
|
"tauri-plugin-updater",
|
||||||
"thiserror 2.0.21",
|
"thiserror 2.0.21",
|
||||||
"tokio",
|
"tokio",
|
||||||
"trash",
|
"trash",
|
||||||
|
|
@ -2225,6 +2284,12 @@ version = "0.3.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1"
|
checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "minisign-verify"
|
||||||
|
version = "0.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "871285dc19d8d0ebe0eef3d0e99a205f2a71363b122632cbbfa4a6c370a960ce"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "miniz_oxide"
|
name = "miniz_oxide"
|
||||||
version = "0.8.9"
|
version = "0.8.9"
|
||||||
|
|
@ -2336,6 +2401,18 @@ version = "1.0.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
|
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nix"
|
||||||
|
version = "0.31.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.13.2",
|
||||||
|
"cfg-if",
|
||||||
|
"cfg_aliases",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ntapi"
|
name = "ntapi"
|
||||||
version = "0.4.3"
|
version = "0.4.3"
|
||||||
|
|
@ -2506,6 +2583,7 @@ checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.13.2",
|
"bitflags 2.13.2",
|
||||||
"block2",
|
"block2",
|
||||||
|
"libc",
|
||||||
"objc2",
|
"objc2",
|
||||||
"objc2-core-foundation",
|
"objc2-core-foundation",
|
||||||
]
|
]
|
||||||
|
|
@ -2521,6 +2599,18 @@ dependencies = [
|
||||||
"objc2-core-foundation",
|
"objc2-core-foundation",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "objc2-osa-kit"
|
||||||
|
version = "0.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f112d1746737b0da274ef79a23aac283376f335f4095a083a267a082f21db0c0"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.13.2",
|
||||||
|
"objc2",
|
||||||
|
"objc2-app-kit",
|
||||||
|
"objc2-foundation",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "objc2-quartz-core"
|
name = "objc2-quartz-core"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
|
|
@ -2654,6 +2744,20 @@ dependencies = [
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "osakit"
|
||||||
|
version = "0.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "732c71caeaa72c065bb69d7ea08717bd3f4863a4f451402fc9513e29dbd5261b"
|
||||||
|
dependencies = [
|
||||||
|
"objc2",
|
||||||
|
"objc2-foundation",
|
||||||
|
"objc2-osa-kit",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"thiserror 2.0.21",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pango"
|
name = "pango"
|
||||||
version = "0.18.3"
|
version = "0.18.3"
|
||||||
|
|
@ -3159,15 +3263,20 @@ dependencies = [
|
||||||
"http-body",
|
"http-body",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
"hyper",
|
"hyper",
|
||||||
|
"hyper-rustls",
|
||||||
"hyper-util",
|
"hyper-util",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
|
"rustls",
|
||||||
|
"rustls-pki-types",
|
||||||
|
"rustls-platform-verifier",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sync_wrapper",
|
"sync_wrapper",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"tokio-rustls",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"tower",
|
"tower",
|
||||||
"tower-http",
|
"tower-http",
|
||||||
|
|
@ -3228,12 +3337,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
"ring",
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
"rustls-webpki",
|
"rustls-webpki",
|
||||||
"subtle",
|
"subtle",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustls-native-certs"
|
||||||
|
version = "0.8.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4"
|
||||||
|
dependencies = [
|
||||||
|
"openssl-probe",
|
||||||
|
"rustls-pki-types",
|
||||||
|
"schannel",
|
||||||
|
"security-framework",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-pki-types"
|
name = "rustls-pki-types"
|
||||||
version = "1.16.0"
|
version = "1.16.0"
|
||||||
|
|
@ -3243,6 +3365,33 @@ dependencies = [
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustls-platform-verifier"
|
||||||
|
version = "0.7.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98"
|
||||||
|
dependencies = [
|
||||||
|
"core-foundation 0.10.1",
|
||||||
|
"core-foundation-sys",
|
||||||
|
"jni 0.22.4",
|
||||||
|
"log",
|
||||||
|
"once_cell",
|
||||||
|
"rustls",
|
||||||
|
"rustls-native-certs",
|
||||||
|
"rustls-platform-verifier-android",
|
||||||
|
"rustls-webpki",
|
||||||
|
"security-framework",
|
||||||
|
"security-framework-sys",
|
||||||
|
"webpki-root-certs",
|
||||||
|
"windows-sys 0.61.2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustls-platform-verifier-android"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-webpki"
|
||||||
version = "0.103.16"
|
version = "0.103.16"
|
||||||
|
|
@ -3623,6 +3772,16 @@ version = "0.3.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
|
checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "simd_cesu8"
|
||||||
|
version = "1.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520"
|
||||||
|
dependencies = [
|
||||||
|
"rustc_version",
|
||||||
|
"simdutf8",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "simdutf8"
|
name = "simdutf8"
|
||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
|
|
@ -3906,7 +4065,7 @@ dependencies = [
|
||||||
"gdkwayland-sys",
|
"gdkwayland-sys",
|
||||||
"gdkx11-sys",
|
"gdkx11-sys",
|
||||||
"gtk",
|
"gtk",
|
||||||
"jni",
|
"jni 0.21.1",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"ndk",
|
"ndk",
|
||||||
|
|
@ -3939,6 +4098,17 @@ dependencies = [
|
||||||
"syn 2.0.119",
|
"syn 2.0.119",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tar"
|
||||||
|
version = "0.4.46"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840"
|
||||||
|
dependencies = [
|
||||||
|
"filetime",
|
||||||
|
"libc",
|
||||||
|
"xattr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "target-lexicon"
|
name = "target-lexicon"
|
||||||
version = "0.12.16"
|
version = "0.12.16"
|
||||||
|
|
@ -3962,7 +4132,7 @@ dependencies = [
|
||||||
"gtk",
|
"gtk",
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"http",
|
"http",
|
||||||
"jni",
|
"jni 0.21.1",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"mime",
|
"mime",
|
||||||
|
|
@ -4098,6 +4268,50 @@ dependencies = [
|
||||||
"zbus",
|
"zbus",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tauri-plugin-process"
|
||||||
|
version = "2.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "74ae3d8549ae564c0397377373e262f340908eb23a5b9fbe03f2a00007dc0038"
|
||||||
|
dependencies = [
|
||||||
|
"tauri",
|
||||||
|
"tauri-plugin",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tauri-plugin-updater"
|
||||||
|
version = "2.14.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d957abbcb3f9f6c76d22a3a0f012f30880640d0bccb5634d2b12a9937e4c872b"
|
||||||
|
dependencies = [
|
||||||
|
"base64 0.23.1",
|
||||||
|
"dirs",
|
||||||
|
"flate2",
|
||||||
|
"futures-util",
|
||||||
|
"http",
|
||||||
|
"infer",
|
||||||
|
"libc",
|
||||||
|
"log",
|
||||||
|
"minisign-verify",
|
||||||
|
"osakit",
|
||||||
|
"percent-encoding",
|
||||||
|
"reqwest 0.13.5",
|
||||||
|
"rustls",
|
||||||
|
"semver",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tar",
|
||||||
|
"tauri",
|
||||||
|
"tauri-plugin",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror 2.0.21",
|
||||||
|
"time",
|
||||||
|
"tokio",
|
||||||
|
"url",
|
||||||
|
"windows-sys 0.61.2",
|
||||||
|
"zip",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-runtime"
|
name = "tauri-runtime"
|
||||||
version = "2.12.2"
|
version = "2.12.2"
|
||||||
|
|
@ -4108,7 +4322,7 @@ dependencies = [
|
||||||
"dpi",
|
"dpi",
|
||||||
"gtk",
|
"gtk",
|
||||||
"http",
|
"http",
|
||||||
"jni",
|
"jni 0.21.1",
|
||||||
"objc2",
|
"objc2",
|
||||||
"objc2-ui-kit",
|
"objc2-ui-kit",
|
||||||
"objc2-web-kit",
|
"objc2-web-kit",
|
||||||
|
|
@ -4131,7 +4345,7 @@ checksum = "e1aa9d8b7a120f879f44fdc1053f7b7dbf416bf0bbc6a72b714dec46b782b52f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gtk",
|
"gtk",
|
||||||
"http",
|
"http",
|
||||||
"jni",
|
"jni 0.21.1",
|
||||||
"log",
|
"log",
|
||||||
"objc2",
|
"objc2",
|
||||||
"objc2-app-kit",
|
"objc2-app-kit",
|
||||||
|
|
@ -4586,6 +4800,12 @@ version = "0.2.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "typed-path"
|
||||||
|
version = "0.13.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typeid"
|
name = "typeid"
|
||||||
version = "1.0.3"
|
version = "1.0.3"
|
||||||
|
|
@ -4913,6 +5133,15 @@ dependencies = [
|
||||||
"system-deps",
|
"system-deps",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "webpki-root-certs"
|
||||||
|
version = "1.0.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "293198dcebfb821155b5092ab94b5a82ff180eddd7241df3bd6e66a4ffd1a585"
|
||||||
|
dependencies = [
|
||||||
|
"rustls-pki-types",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webview2-com"
|
name = "webview2-com"
|
||||||
version = "0.39.1"
|
version = "0.39.1"
|
||||||
|
|
@ -5523,7 +5752,7 @@ dependencies = [
|
||||||
"gtk",
|
"gtk",
|
||||||
"http",
|
"http",
|
||||||
"javascriptcore-rs",
|
"javascriptcore-rs",
|
||||||
"jni",
|
"jni 0.21.1",
|
||||||
"libc",
|
"libc",
|
||||||
"ndk",
|
"ndk",
|
||||||
"objc2",
|
"objc2",
|
||||||
|
|
@ -5569,6 +5798,16 @@ dependencies = [
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "xattr"
|
||||||
|
version = "1.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "963d6fab92d5504b971dc8bd90ca743c2575e590bc8071ea5bc571598667ae08"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"rustix",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "yoke"
|
name = "yoke"
|
||||||
version = "0.8.4"
|
version = "0.8.4"
|
||||||
|
|
@ -5688,6 +5927,20 @@ name = "zeroize"
|
||||||
version = "1.9.1"
|
version = "1.9.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
|
checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
|
||||||
|
dependencies = [
|
||||||
|
"zeroize_derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zeroize_derive"
|
||||||
|
version = "1.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.119",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerotrie"
|
name = "zerotrie"
|
||||||
|
|
@ -5722,6 +5975,24 @@ dependencies = [
|
||||||
"syn 3.0.10",
|
"syn 3.0.10",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zip"
|
||||||
|
version = "9.5.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e3476fd497ac8af5b1ec7b51acab7bef380f7e8dd8e0487595bafd839417a302"
|
||||||
|
dependencies = [
|
||||||
|
"constant_time_eq",
|
||||||
|
"crc32fast",
|
||||||
|
"getrandom 0.4.3",
|
||||||
|
"indexmap 2.14.2",
|
||||||
|
"libc",
|
||||||
|
"memchr",
|
||||||
|
"nix",
|
||||||
|
"typed-path",
|
||||||
|
"windows-sys 0.61.2",
|
||||||
|
"zeroize",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zlib-rs"
|
name = "zlib-rs"
|
||||||
version = "0.6.8"
|
version = "0.6.8"
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ tauri-build = { version = "2", features = [] }
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tauri = { version = "2", features = [] }
|
tauri = { version = "2", features = [] }
|
||||||
tauri-plugin-opener = "2"
|
tauri-plugin-opener = "2"
|
||||||
|
tauri-plugin-updater = "2"
|
||||||
|
tauri-plugin-process = "2"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
thiserror = "2"
|
thiserror = "2"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
"windows": ["main"],
|
"windows": ["main"],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"core:default",
|
"core:default",
|
||||||
"opener:default"
|
"opener:default",
|
||||||
|
"updater:default",
|
||||||
|
"process:default"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ use state::AppState;
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
.plugin(tauri_plugin_opener::init())
|
.plugin(tauri_plugin_opener::init())
|
||||||
|
.plugin(tauri_plugin_process::init())
|
||||||
|
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||||
.manage(AppState::new())
|
.manage(AppState::new())
|
||||||
.invoke_handler(tauri::generate_handler![
|
.invoke_handler(tauri::generate_handler![
|
||||||
get_installed_apps,
|
get_installed_apps,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"targets": ["nsis"],
|
||||||
|
"createUpdaterArtifacts": true,
|
||||||
"icon": [
|
"icon": [
|
||||||
"icons/32x32.png",
|
"icons/32x32.png",
|
||||||
"icons/128x128.png",
|
"icons/128x128.png",
|
||||||
|
|
@ -35,5 +36,13 @@
|
||||||
"icons/icon.icns",
|
"icons/icon.icns",
|
||||||
"icons/icon.ico"
|
"icons/icon.ico"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"plugins": {
|
||||||
|
"updater": {
|
||||||
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDYxQzZFNzFEMTNFRjBCMEEKUldRS0MrOFRIZWZHWVYrOWZuRnhXbXZWMkFxNk41TGNyYmE3QWt5bDNvclkyRURZUkpCYTJCbDEK",
|
||||||
|
"endpoints": [
|
||||||
|
"https://ttmadethat.shop/updates/ld-uninstaller/latest.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { Sidebar } from './components/Sidebar';
|
||||||
import { ToastContainer } from './components/ToastContainer';
|
import { ToastContainer } from './components/ToastContainer';
|
||||||
import { LeftoversModal } from './components/LeftoversModal';
|
import { LeftoversModal } from './components/LeftoversModal';
|
||||||
import { UpdateModal } from './components/UpdateModal';
|
import { UpdateModal } from './components/UpdateModal';
|
||||||
|
import { UpdateBanner } from './components/UpdateBanner';
|
||||||
import { AppsView } from './pages/AppsView';
|
import { AppsView } from './pages/AppsView';
|
||||||
import { TreemapView } from './pages/TreemapView';
|
import { TreemapView } from './pages/TreemapView';
|
||||||
import { StartupView } from './pages/StartupView';
|
import { StartupView } from './pages/StartupView';
|
||||||
|
|
@ -14,14 +15,14 @@ import { SettingsView } from './pages/SettingsView';
|
||||||
import { useAppStore } from './store/useAppStore';
|
import { useAppStore } from './store/useAppStore';
|
||||||
|
|
||||||
export const App: React.FC = () => {
|
export const App: React.FC = () => {
|
||||||
const { currentTab, loadApps, loadExclusions, checkUpdates } = useAppStore();
|
const { currentTab, loadApps, loadExclusions, checkForUpdatesOTA } = useAppStore();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Uygulama açılışında arka plan yüklemeleri
|
// Uygulama açılışında arka plan yüklemeleri
|
||||||
loadApps();
|
loadApps();
|
||||||
loadExclusions();
|
loadExclusions();
|
||||||
// Kullanıcı isteği doğrultusunda açılışta güncellemeleri otomatik ve sessizce denetle
|
// Kullanıcı isteği doğrultusunda açılışta güncellemeleri otomatik ve sessizce denetle
|
||||||
checkUpdates(true);
|
checkForUpdatesOTA(false);
|
||||||
|
|
||||||
const handleKeyDown = (e: KeyboardEvent) => {
|
const handleKeyDown = (e: KeyboardEvent) => {
|
||||||
if (e.key === 'F5') {
|
if (e.key === 'F5') {
|
||||||
|
|
@ -54,8 +55,9 @@ export const App: React.FC = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen w-screen bg-ld-bg text-slate-100 select-none overflow-hidden font-sans">
|
<div className="flex h-screen w-screen bg-ld-bg text-slate-100 select-none overflow-hidden font-sans">
|
||||||
{/* Özel Pencere Başlık Çubuğu */}
|
{/* Özel Pencere Başlık Çubuğu & OTA Bildirim Bannerı */}
|
||||||
<Titlebar />
|
<Titlebar />
|
||||||
|
<UpdateBanner />
|
||||||
|
|
||||||
{/* Ana Arayüz */}
|
{/* Ana Arayüz */}
|
||||||
<div className="flex flex-1 h-full w-full overflow-hidden">
|
<div className="flex flex-1 h-full w-full overflow-hidden">
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,14 @@ import { useAppStore } from '../store/useAppStore';
|
||||||
export const Titlebar: React.FC = () => {
|
export const Titlebar: React.FC = () => {
|
||||||
const [isMaximized, setIsMaximized] = useState(false);
|
const [isMaximized, setIsMaximized] = useState(false);
|
||||||
const appWindow = getCurrentWindow();
|
const appWindow = getCurrentWindow();
|
||||||
const { searchQuery, setSearchQuery, updateInfo, setShowUpdateModal, isCheckingUpdate, checkUpdates } = useAppStore();
|
const {
|
||||||
|
searchQuery,
|
||||||
|
setSearchQuery,
|
||||||
|
availableUpdate,
|
||||||
|
setShowUpdateModal,
|
||||||
|
isCheckingUpdate,
|
||||||
|
checkForUpdatesOTA,
|
||||||
|
} = useAppStore();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const updateMaximized = async () => {
|
const updateMaximized = async () => {
|
||||||
|
|
@ -55,13 +62,13 @@ export const Titlebar: React.FC = () => {
|
||||||
className="w-full bg-ld-card/80 border border-ld-border rounded-md px-2.5 py-1 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-sky-500/50 transition-colors"
|
className="w-full bg-ld-card/80 border border-ld-border rounded-md px-2.5 py-1 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-sky-500/50 transition-colors"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{updateInfo?.has_update && (
|
{availableUpdate && (
|
||||||
<button
|
<button
|
||||||
onClick={() => setShowUpdateModal(true)}
|
onClick={() => setShowUpdateModal(true)}
|
||||||
className="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400 border border-emerald-500/30 text-[11px] font-medium hover:bg-emerald-500/30 transition-all cursor-pointer whitespace-nowrap animate-pulse"
|
className="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400 border border-emerald-500/30 text-[11px] font-medium hover:bg-emerald-500/30 transition-all cursor-pointer whitespace-nowrap animate-pulse"
|
||||||
>
|
>
|
||||||
<span className="w-1.5 h-1.5 rounded-full bg-emerald-400" />
|
<span className="w-1.5 h-1.5 rounded-full bg-emerald-400" />
|
||||||
v{updateInfo.latest_version} Hazır
|
v{availableUpdate.version} Hazır
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -69,9 +76,9 @@ export const Titlebar: React.FC = () => {
|
||||||
{/* Sağ: Pencere Butonları */}
|
{/* Sağ: Pencere Butonları */}
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<button
|
<button
|
||||||
onClick={() => checkUpdates(false)}
|
onClick={() => checkForUpdatesOTA(true)}
|
||||||
title="Güncellemeleri Denetle"
|
title="Güncellemeleri Denetle"
|
||||||
className="p-1.5 text-slate-400 hover:text-slate-200 hover:bg-white/5 rounded transition-colors"
|
className="p-1.5 text-slate-400 hover:text-slate-200 hover:bg-white/5 rounded transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
<RefreshCw className={`w-3.5 h-3.5 ${isCheckingUpdate ? 'animate-spin text-sky-400' : ''}`} />
|
<RefreshCw className={`w-3.5 h-3.5 ${isCheckingUpdate ? 'animate-spin text-sky-400' : ''}`} />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
44
src/components/UpdateBanner.tsx
Normal file
44
src/components/UpdateBanner.tsx
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { useAppStore } from '../store/useAppStore';
|
||||||
|
import { Sparkles, X, ArrowRight } from 'lucide-react';
|
||||||
|
|
||||||
|
export const UpdateBanner: React.FC = () => {
|
||||||
|
const { showUpdateBanner, setShowUpdateBanner, availableUpdate, setShowUpdateModal } = useAppStore();
|
||||||
|
|
||||||
|
if (!showUpdateBanner || !availableUpdate) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="fixed top-10 left-0 right-0 z-40 bg-gradient-to-r from-sky-600/90 via-indigo-600/90 to-purple-600/90 text-white px-4 py-2 flex items-center justify-between shadow-lg backdrop-blur-md select-none border-b border-white/10 animate-in fade-in slide-in-from-top-2 duration-300">
|
||||||
|
<div className="flex items-center gap-2.5 text-xs">
|
||||||
|
<span className="p-1 rounded-full bg-white/20">
|
||||||
|
<Sparkles className="w-3.5 h-3.5 text-yellow-300" />
|
||||||
|
</span>
|
||||||
|
<span className="font-medium">
|
||||||
|
LD Uninstaller <strong className="font-mono underline">v{availableUpdate.version}</strong> yayınlandı!
|
||||||
|
</span>
|
||||||
|
<span className="hidden sm:inline text-white/80 text-[11px]">
|
||||||
|
Sürüm notlarını inceleyip tek tıkla güncellemek için tıklayın.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
setShowUpdateBanner(false);
|
||||||
|
setShowUpdateModal(true);
|
||||||
|
}}
|
||||||
|
className="flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-semibold bg-white text-slate-900 hover:bg-slate-100 transition-colors cursor-pointer shadow-sm"
|
||||||
|
>
|
||||||
|
<span>İncele ve Güncelle</span>
|
||||||
|
<ArrowRight className="w-3.5 h-3.5" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() => setShowUpdateBanner(false)}
|
||||||
|
className="p-1 rounded text-white/70 hover:text-white transition-colors"
|
||||||
|
>
|
||||||
|
<X className="w-3.5 h-3.5" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
@ -1,15 +1,24 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useAppStore } from '../store/useAppStore';
|
import { useAppStore } from '../store/useAppStore';
|
||||||
import { DownloadCloud, Sparkles, X, CheckCircle, RefreshCw } from 'lucide-react';
|
import { DownloadCloud, Sparkles, X, RefreshCw } from 'lucide-react';
|
||||||
|
|
||||||
export const UpdateModal: React.FC = () => {
|
export const UpdateModal: React.FC = () => {
|
||||||
const { showUpdateModal, setShowUpdateModal, updateInfo, isUpdating, applyUpdate } = useAppStore();
|
const {
|
||||||
|
showUpdateModal,
|
||||||
|
setShowUpdateModal,
|
||||||
|
availableUpdate,
|
||||||
|
isDownloadingUpdate,
|
||||||
|
updateProgress,
|
||||||
|
startDownloadAndInstall,
|
||||||
|
} = useAppStore();
|
||||||
|
|
||||||
if (!showUpdateModal || !updateInfo) return null;
|
if (!showUpdateModal || !availableUpdate) return null;
|
||||||
|
|
||||||
|
const formatMB = (bytes: number) => (bytes / (1024 * 1024)).toFixed(2);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4">
|
<div className="fixed inset-0 z-50 bg-black/75 backdrop-blur-sm flex items-center justify-center p-4">
|
||||||
<div className="bg-ld-surface border border-ld-border rounded-xl w-full max-w-md shadow-2xl overflow-hidden flex flex-col">
|
<div className="bg-ld-surface border border-ld-border rounded-xl w-full max-w-md shadow-2xl overflow-hidden flex flex-col animate-in fade-in zoom-in-95 duration-200">
|
||||||
{/* Başlık */}
|
{/* Başlık */}
|
||||||
<div className="px-5 py-4 border-b border-ld-border flex items-center justify-between bg-gradient-to-r from-sky-500/10 to-transparent">
|
<div className="px-5 py-4 border-b border-ld-border flex items-center justify-between bg-gradient-to-r from-sky-500/10 to-transparent">
|
||||||
<div className="flex items-center gap-2.5">
|
<div className="flex items-center gap-2.5">
|
||||||
|
|
@ -17,17 +26,18 @@ export const UpdateModal: React.FC = () => {
|
||||||
<Sparkles className="w-5 h-5" />
|
<Sparkles className="w-5 h-5" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-sm font-semibold text-slate-100">Yeni Güncelleme Mevcut!</h3>
|
<h3 className="text-sm font-semibold text-slate-100">Yeni Sürüm Tespit Edildi!</h3>
|
||||||
<p className="text-[11px] text-slate-400">LD Uninstaller v{updateInfo.latest_version}</p>
|
<p className="text-[11px] text-slate-400">LD Uninstaller v{availableUpdate.version}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
{!isDownloadingUpdate && (
|
||||||
disabled={isUpdating}
|
<button
|
||||||
onClick={() => setShowUpdateModal(false)}
|
onClick={() => setShowUpdateModal(false)}
|
||||||
className="p-1 rounded text-slate-400 hover:text-slate-200 transition-colors"
|
className="p-1 rounded text-slate-400 hover:text-slate-200 transition-colors"
|
||||||
>
|
>
|
||||||
<X className="w-4 h-4" />
|
<X className="w-4 h-4" />
|
||||||
</button>
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Gövde */}
|
{/* Gövde */}
|
||||||
|
|
@ -35,47 +45,72 @@ export const UpdateModal: React.FC = () => {
|
||||||
<div className="grid grid-cols-2 gap-3 text-xs">
|
<div className="grid grid-cols-2 gap-3 text-xs">
|
||||||
<div className="p-3 rounded-lg bg-ld-card border border-ld-border">
|
<div className="p-3 rounded-lg bg-ld-card border border-ld-border">
|
||||||
<span className="text-slate-400 block text-[11px]">Mevcut Sürüm</span>
|
<span className="text-slate-400 block text-[11px]">Mevcut Sürüm</span>
|
||||||
<span className="font-mono font-semibold text-slate-200 mt-0.5 block">v{updateInfo.current_version}</span>
|
<span className="font-mono font-semibold text-slate-200 mt-0.5 block">
|
||||||
|
v{availableUpdate.currentVersion || '3.0.0'}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-3 rounded-lg bg-emerald-500/10 border border-emerald-500/20">
|
<div className="p-3 rounded-lg bg-emerald-500/10 border border-emerald-500/20">
|
||||||
<span className="text-emerald-400 block text-[11px]">Yeni Sürüm</span>
|
<span className="text-emerald-400 block text-[11px]">Yeni Sürüm</span>
|
||||||
<span className="font-mono font-semibold text-emerald-300 mt-0.5 block">v{updateInfo.latest_version}</span>
|
<span className="font-mono font-semibold text-emerald-300 mt-0.5 block">
|
||||||
|
v{availableUpdate.version}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span className="text-xs font-medium text-slate-300 block mb-1.5">Sürüm Notları:</span>
|
<span className="text-xs font-medium text-slate-300 block mb-1.5">Sürüm Notları:</span>
|
||||||
<div className="p-3 rounded-lg bg-ld-card border border-ld-border text-xs text-slate-300 max-h-36 overflow-y-auto leading-relaxed">
|
<div className="p-3 rounded-lg bg-ld-card border border-ld-border text-xs text-slate-300 max-h-36 overflow-y-auto leading-relaxed">
|
||||||
{updateInfo.release_notes || 'Performans iyileştirmeleri ve hata düzeltmeleri.'}
|
{availableUpdate.body || 'Sistem kararlılığı, güvenlik geliştirmeleri ve performans iyileştirmeleri.'}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{updateInfo.sha256 && (
|
{/* İndirme İlerleme Çubuğu */}
|
||||||
<div className="flex items-center gap-2 text-[11px] text-slate-400">
|
{isDownloadingUpdate && updateProgress && (
|
||||||
<CheckCircle className="w-3.5 h-3.5 text-emerald-400" />
|
<div className="p-4 rounded-xl bg-ld-card border border-ld-border space-y-2">
|
||||||
<span>SHA256 Güvenlik İmzası Doğrulandı</span>
|
<div className="flex items-center justify-between text-xs">
|
||||||
|
<span className="text-slate-300 font-medium flex items-center gap-2">
|
||||||
|
<RefreshCw className="w-3.5 h-3.5 text-sky-400 animate-spin" />
|
||||||
|
Güncelleme İndiriliyor...
|
||||||
|
</span>
|
||||||
|
<span className="font-mono text-sky-400 font-semibold">{updateProgress.percentage}%</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Progress Bar */}
|
||||||
|
<div className="w-full bg-slate-800 rounded-full h-2.5 overflow-hidden">
|
||||||
|
<div
|
||||||
|
className="h-full bg-gradient-to-r from-sky-500 to-indigo-500 transition-all duration-200 rounded-full"
|
||||||
|
style={{ width: `${updateProgress.percentage}%` }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex justify-between text-[11px] font-mono text-slate-400 pt-0.5">
|
||||||
|
<span>{formatMB(updateProgress.downloadedBytes)} MB</span>
|
||||||
|
{updateProgress.totalBytes > 0 && <span>{formatMB(updateProgress.totalBytes)} MB</span>}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Alt Butonlar */}
|
{/* Alt Butonlar */}
|
||||||
<div className="px-5 py-3 border-t border-ld-border bg-ld-card/50 flex items-center justify-end gap-2.5">
|
<div className="px-5 py-3 border-t border-ld-border bg-ld-card/50 flex items-center justify-end gap-2.5">
|
||||||
|
{!isDownloadingUpdate && (
|
||||||
|
<button
|
||||||
|
onClick={() => setShowUpdateModal(false)}
|
||||||
|
className="px-3.5 py-1.5 rounded-lg text-xs font-medium text-slate-400 hover:text-slate-200 hover:bg-white/5 transition-colors cursor-pointer"
|
||||||
|
>
|
||||||
|
Daha Sonra
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
disabled={isUpdating}
|
disabled={isDownloadingUpdate}
|
||||||
onClick={() => setShowUpdateModal(false)}
|
onClick={() => startDownloadAndInstall()}
|
||||||
className="px-3 py-1.5 rounded-lg text-xs font-medium text-slate-400 hover:text-slate-200 hover:bg-white/5 transition-colors"
|
|
||||||
>
|
|
||||||
Daha Sonra
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
disabled={isUpdating}
|
|
||||||
onClick={() => applyUpdate()}
|
|
||||||
className="flex items-center gap-1.5 px-4 py-1.5 rounded-lg text-xs font-semibold bg-gradient-to-r from-sky-500 to-indigo-600 text-white hover:opacity-95 shadow-md shadow-sky-500/20 transition-all cursor-pointer disabled:opacity-50"
|
className="flex items-center gap-1.5 px-4 py-1.5 rounded-lg text-xs font-semibold bg-gradient-to-r from-sky-500 to-indigo-600 text-white hover:opacity-95 shadow-md shadow-sky-500/20 transition-all cursor-pointer disabled:opacity-50"
|
||||||
>
|
>
|
||||||
{isUpdating ? (
|
{isDownloadingUpdate ? (
|
||||||
<>
|
<>
|
||||||
<RefreshCw className="w-3.5 h-3.5 animate-spin" />
|
<RefreshCw className="w-3.5 h-3.5 animate-spin" />
|
||||||
İndiriliyor & Kuruluyor...
|
İndiriliyor ve Yeniden Başlatılıyor...
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useAppStore } from '../store/useAppStore';
|
import { useAppStore } from '../store/useAppStore';
|
||||||
import { Settings, ShieldCheck, Plus, Trash2, RefreshCw, Sparkles, Laptop } from 'lucide-react';
|
import {
|
||||||
|
Settings,
|
||||||
|
ShieldCheck,
|
||||||
|
Plus,
|
||||||
|
Trash2,
|
||||||
|
RefreshCw,
|
||||||
|
Sparkles,
|
||||||
|
Laptop,
|
||||||
|
CheckCircle2,
|
||||||
|
Radio,
|
||||||
|
} from 'lucide-react';
|
||||||
|
|
||||||
export const SettingsView: React.FC = () => {
|
export const SettingsView: React.FC = () => {
|
||||||
const {
|
const {
|
||||||
|
|
@ -8,9 +18,11 @@ export const SettingsView: React.FC = () => {
|
||||||
loadExclusions,
|
loadExclusions,
|
||||||
addExclusion,
|
addExclusion,
|
||||||
removeExclusion,
|
removeExclusion,
|
||||||
checkUpdates,
|
autoUpdateOnStartup,
|
||||||
|
setAutoUpdateOnStartup,
|
||||||
|
checkForUpdatesOTA,
|
||||||
isCheckingUpdate,
|
isCheckingUpdate,
|
||||||
updateInfo,
|
availableUpdate,
|
||||||
setShowUpdateModal,
|
setShowUpdateModal,
|
||||||
} = useAppStore();
|
} = useAppStore();
|
||||||
|
|
||||||
|
|
@ -32,13 +44,83 @@ export const SettingsView: React.FC = () => {
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-xs font-semibold text-slate-100 flex items-center gap-2">
|
<h2 className="text-xs font-semibold text-slate-100 flex items-center gap-2">
|
||||||
<Settings className="w-4 h-4 text-sky-400" />
|
<Settings className="w-4 h-4 text-sky-400" />
|
||||||
Uygulama Ayarları & Koruma Listesi
|
Uygulama Ayarları & Koruma Merkezi
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-[11px] text-slate-500">Beyaz liste (Exclusion List) ve güncelleme yapılandırması.</p>
|
<p className="text-[11px] text-slate-500">
|
||||||
|
Self-Hosted OTA güncelleme sistemi ve beyaz liste (Exclusion List) yönetimi.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="p-6 max-w-3xl mx-auto w-full space-y-6 flex-1 overflow-y-auto">
|
<div className="p-6 max-w-3xl mx-auto w-full space-y-6 flex-1 overflow-y-auto">
|
||||||
|
{/* OTA Güncelleme Yapılandırması */}
|
||||||
|
<div className="p-5 rounded-xl bg-ld-surface border border-ld-border space-y-4">
|
||||||
|
<div className="flex items-center justify-between border-b border-ld-border/60 pb-3">
|
||||||
|
<div className="space-y-0.5">
|
||||||
|
<h4 className="text-xs font-semibold text-slate-200 flex items-center gap-2">
|
||||||
|
<Sparkles className="w-4 h-4 text-sky-400" />
|
||||||
|
Self-Hosted OTA Güncelleme Sistemi
|
||||||
|
</h4>
|
||||||
|
<p className="text-[11px] text-slate-400">
|
||||||
|
Uygulama güncellemeleri doğrudan özel web sunucumuz üzerinden şifrelenmiş imzalarla (Minisign) dağıtılır.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
{availableUpdate && (
|
||||||
|
<button
|
||||||
|
onClick={() => setShowUpdateModal(true)}
|
||||||
|
className="px-3 py-1.5 rounded-lg text-xs font-semibold bg-emerald-500/20 text-emerald-400 border border-emerald-500/30 hover:bg-emerald-500/30 transition-all cursor-pointer"
|
||||||
|
>
|
||||||
|
v{availableUpdate.version} Yükle
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
<button
|
||||||
|
disabled={isCheckingUpdate}
|
||||||
|
onClick={() => checkForUpdatesOTA(true)}
|
||||||
|
className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-ld-card border border-ld-border text-slate-300 hover:text-white hover:bg-white/5 transition-colors cursor-pointer disabled:opacity-50"
|
||||||
|
>
|
||||||
|
<RefreshCw className={`w-3.5 h-3.5 ${isCheckingUpdate ? 'animate-spin text-sky-400' : ''}`} />
|
||||||
|
Güncellemeleri Şimdi Kontrol Et
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Açılışta Otomatik Güncelle Seçeneği */}
|
||||||
|
<div className="flex items-center justify-between py-2">
|
||||||
|
<div className="space-y-0.5 pr-4">
|
||||||
|
<label htmlFor="auto-update-toggle" className="text-xs font-semibold text-slate-200 block cursor-pointer">
|
||||||
|
Uygulama Açılırken Otomatik Güncelle
|
||||||
|
</label>
|
||||||
|
<p className="text-[11px] text-slate-400">
|
||||||
|
Açık olduğunda yeni sürüm çıktığında doğrudan indirilip kurulur. Kapalı olduğunda rahatsız etmeyen bildirim banner'ı gösterilir.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<label className="relative inline-flex items-center cursor-pointer">
|
||||||
|
<input
|
||||||
|
id="auto-update-toggle"
|
||||||
|
type="checkbox"
|
||||||
|
checked={autoUpdateOnStartup}
|
||||||
|
onChange={(e) => setAutoUpdateOnStartup(e.target.checked)}
|
||||||
|
className="sr-only peer"
|
||||||
|
/>
|
||||||
|
<div className="w-11 h-6 bg-slate-800 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-sky-500"></div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="p-3 rounded-lg bg-ld-card border border-ld-border text-[11px] text-slate-400 space-y-1">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Radio className="w-3.5 h-3.5 text-sky-400 shrink-0" />
|
||||||
|
<span>
|
||||||
|
Güncelleme Endpoint: <code className="text-slate-300 font-mono">https://ttmadethat.shop/updates/ld-uninstaller/latest.json</code>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<CheckCircle2 className="w-3.5 h-3.5 text-emerald-400 shrink-0" />
|
||||||
|
<span>Kriptografik İmza Kalkanı: Minisign Ed25519 aktif ve yetkilendirilmiş</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Beyaz Liste (Exclusion List) */}
|
{/* Beyaz Liste (Exclusion List) */}
|
||||||
<div className="p-5 rounded-xl bg-ld-surface border border-ld-border space-y-4">
|
<div className="p-5 rounded-xl bg-ld-surface border border-ld-border space-y-4">
|
||||||
<div className="flex items-center gap-2 text-xs font-semibold text-slate-200">
|
<div className="flex items-center gap-2 text-xs font-semibold text-slate-200">
|
||||||
|
|
@ -89,49 +171,18 @@ export const SettingsView: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Güncelleme Denetimi */}
|
|
||||||
<div className="p-5 rounded-xl bg-ld-surface border border-ld-border flex items-center justify-between">
|
|
||||||
<div className="space-y-1">
|
|
||||||
<h4 className="text-xs font-semibold text-slate-200 flex items-center gap-2">
|
|
||||||
<Sparkles className="w-4 h-4 text-sky-400" />
|
|
||||||
Otomatik Güncelleme Motoru
|
|
||||||
</h4>
|
|
||||||
<p className="text-[11px] text-slate-400">
|
|
||||||
Sunucu adresi: <code className="text-slate-300">https://ttmadethat.shop/ldapps/version.json</code>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
{updateInfo?.has_update && (
|
|
||||||
<button
|
|
||||||
onClick={() => setShowUpdateModal(true)}
|
|
||||||
className="px-3 py-1.5 rounded-lg text-xs font-semibold bg-emerald-500/20 text-emerald-400 border border-emerald-500/30 hover:bg-emerald-500/30 transition-all cursor-pointer"
|
|
||||||
>
|
|
||||||
v{updateInfo.latest_version} Yükle
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
<button
|
|
||||||
disabled={isCheckingUpdate}
|
|
||||||
onClick={() => checkUpdates(false)}
|
|
||||||
className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-ld-card border border-ld-border text-slate-300 hover:text-white hover:bg-white/5 transition-colors cursor-pointer"
|
|
||||||
>
|
|
||||||
<RefreshCw className={`w-3.5 h-3.5 ${isCheckingUpdate ? 'animate-spin text-sky-400' : ''}`} />
|
|
||||||
Güncellemeleri Denetle
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Hakkında */}
|
{/* Hakkında */}
|
||||||
<div className="p-5 rounded-xl bg-ld-surface border border-ld-border text-xs text-slate-400 space-y-2">
|
<div className="p-5 rounded-xl bg-ld-surface border border-ld-border text-xs text-slate-400 space-y-2">
|
||||||
<div className="flex items-center gap-2 text-slate-200 font-semibold">
|
<div className="flex items-center gap-2 text-slate-200 font-semibold">
|
||||||
<Laptop className="w-4 h-4 text-sky-400" />
|
<Laptop className="w-4 h-4 text-sky-400" />
|
||||||
<span>LD Uninstaller Mimari Bilgisi</span>
|
<span>LD Uninstaller v3.0.0 Mimari Bilgisi</span>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-[11px] leading-relaxed">
|
<p className="text-[11px] leading-relaxed">
|
||||||
LD Uninstaller, en son nesil <strong>Tauri v2</strong>, <strong>Rust 1.99</strong>, <strong>React 18</strong>, <strong>TypeScript</strong> ve <strong>TailwindCSS</strong> kullanılarak inşa edilmiştir. Sıfır donma, ultra hızlı bellek yönetimi ve 20 katmanlı derin kalıntı temizleme algoritması içerir.
|
LD Uninstaller, <strong>Tauri v2</strong>, <strong>Rust 1.99</strong>, <strong>React 18</strong>, <strong>TypeScript</strong> ve <strong>TailwindCSS</strong> mimarisi ile sıfırdan inşa edilmiştir. Windows Restart Manager kilit kırma motoru, 20 katmanlı derin kalıntı temizleme ve Minisign imzalı Self-Hosted OTA güncelleme altyapısına sahiptir.
|
||||||
</p>
|
</p>
|
||||||
<div className="pt-2 text-[10px] text-slate-500 flex justify-between">
|
<div className="pt-2 text-[10px] text-slate-500 flex justify-between border-t border-ld-border/40">
|
||||||
<span>Dağıtım: TT Made That (ttmadethat.shop)</span>
|
<span>Dağıtım & OTA: TT Made That (ttmadethat.shop)</span>
|
||||||
<span>Sürüm: 3.0.0 (Rust Engine)</span>
|
<span>Versiyon: 3.0.0 (Rust Engine)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
import { create } from 'zustand';
|
import { create } from 'zustand';
|
||||||
|
import { check, Update } from '@tauri-apps/plugin-updater';
|
||||||
|
import { relaunch } from '@tauri-apps/plugin-process';
|
||||||
import {
|
import {
|
||||||
api,
|
api,
|
||||||
ApplicationEntry,
|
ApplicationEntry,
|
||||||
|
|
@ -9,7 +11,6 @@ import {
|
||||||
StartupItem,
|
StartupItem,
|
||||||
SystemTweak,
|
SystemTweak,
|
||||||
TreemapItem,
|
TreemapItem,
|
||||||
UpdateCheckResult,
|
|
||||||
} from '../lib/tauri';
|
} from '../lib/tauri';
|
||||||
|
|
||||||
export interface ToastMessage {
|
export interface ToastMessage {
|
||||||
|
|
@ -21,6 +22,12 @@ export interface ToastMessage {
|
||||||
|
|
||||||
export type TabType = 'apps' | 'treemap' | 'startup' | 'tweaks' | 'shredder' | 'backups' | 'settings';
|
export type TabType = 'apps' | 'treemap' | 'startup' | 'tweaks' | 'shredder' | 'backups' | 'settings';
|
||||||
|
|
||||||
|
export interface UpdateProgress {
|
||||||
|
downloadedBytes: number;
|
||||||
|
totalBytes: number;
|
||||||
|
percentage: number;
|
||||||
|
}
|
||||||
|
|
||||||
interface AppStore {
|
interface AppStore {
|
||||||
// Aktif Sekme
|
// Aktif Sekme
|
||||||
currentTab: TabType;
|
currentTab: TabType;
|
||||||
|
|
@ -87,14 +94,19 @@ interface AppStore {
|
||||||
addExclusion: (path: string) => Promise<void>;
|
addExclusion: (path: string) => Promise<void>;
|
||||||
removeExclusion: (path: string) => Promise<void>;
|
removeExclusion: (path: string) => Promise<void>;
|
||||||
|
|
||||||
// Güncelleme
|
// Self-Hosted OTA Güncelleme Sistemi
|
||||||
updateInfo: UpdateCheckResult | null;
|
autoUpdateOnStartup: boolean;
|
||||||
|
setAutoUpdateOnStartup: (enabled: boolean) => void;
|
||||||
|
availableUpdate: Update | null;
|
||||||
isCheckingUpdate: boolean;
|
isCheckingUpdate: boolean;
|
||||||
isUpdating: boolean;
|
isDownloadingUpdate: boolean;
|
||||||
|
updateProgress: UpdateProgress | null;
|
||||||
showUpdateModal: boolean;
|
showUpdateModal: boolean;
|
||||||
setShowUpdateModal: (show: boolean) => void;
|
setShowUpdateModal: (show: boolean) => void;
|
||||||
checkUpdates: (silent?: boolean) => Promise<void>;
|
showUpdateBanner: boolean;
|
||||||
applyUpdate: () => Promise<void>;
|
setShowUpdateBanner: (show: boolean) => void;
|
||||||
|
checkForUpdatesOTA: (manual?: boolean) => Promise<void>;
|
||||||
|
startDownloadAndInstall: () => Promise<void>;
|
||||||
|
|
||||||
// Toast Bildirimleri
|
// Toast Bildirimleri
|
||||||
toasts: ToastMessage[];
|
toasts: ToastMessage[];
|
||||||
|
|
@ -373,43 +385,113 @@ export const useAppStore = create<AppStore>((set, get) => ({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateInfo: null,
|
// Self-Hosted OTA Güncelleme Yönetimi
|
||||||
|
autoUpdateOnStartup: localStorage.getItem('ld_auto_update_on_startup') !== 'false',
|
||||||
|
setAutoUpdateOnStartup: (enabled) => {
|
||||||
|
localStorage.setItem('ld_auto_update_on_startup', String(enabled));
|
||||||
|
set({ autoUpdateOnStartup: enabled });
|
||||||
|
},
|
||||||
|
|
||||||
|
availableUpdate: null,
|
||||||
isCheckingUpdate: false,
|
isCheckingUpdate: false,
|
||||||
isUpdating: false,
|
isDownloadingUpdate: false,
|
||||||
|
updateProgress: null,
|
||||||
showUpdateModal: false,
|
showUpdateModal: false,
|
||||||
setShowUpdateModal: (show) => set({ showUpdateModal: show }),
|
setShowUpdateModal: (show) => set({ showUpdateModal: show }),
|
||||||
|
showUpdateBanner: false,
|
||||||
|
setShowUpdateBanner: (show) => set({ showUpdateBanner: show }),
|
||||||
|
|
||||||
checkUpdates: async (silent = false) => {
|
checkForUpdatesOTA: async (manual = false) => {
|
||||||
set({ isCheckingUpdate: true });
|
set({ isCheckingUpdate: true });
|
||||||
try {
|
try {
|
||||||
const info = await api.checkForUpdates();
|
const update = await check();
|
||||||
set({ updateInfo: info, isCheckingUpdate: false });
|
set({ isCheckingUpdate: false });
|
||||||
if (info.has_update) {
|
|
||||||
set({ showUpdateModal: true });
|
if (update) {
|
||||||
get().addToast('Yeni Güncelleme Mevcut', `LD Uninstaller v${info.latest_version} hazır!`, 'info');
|
set({ availableUpdate: update });
|
||||||
} else if (!silent) {
|
const auto = get().autoUpdateOnStartup;
|
||||||
get().addToast('Güncel', 'En son sürümü (v' + info.current_version + ') kullanıyorsunuz.', 'success');
|
|
||||||
|
if (auto) {
|
||||||
|
// Açılışta otomatik güncelleme etkin: Modalı aç ve indirmeyi otomatik başlat
|
||||||
|
set({ showUpdateModal: true, showUpdateBanner: false });
|
||||||
|
await get().startDownloadAndInstall();
|
||||||
|
} else {
|
||||||
|
// Açılışta otomatik güncelleme kapalı: Kullanıcıyı rahatsız etmeden üst bildirim banner'ı ve toast göster
|
||||||
|
set({ showUpdateBanner: true });
|
||||||
|
get().addToast(
|
||||||
|
'Yeni Sürüm Yayınlandı',
|
||||||
|
`LD Uninstaller v${update.version} hazır! Sürüm notlarını görmek ve güncellemek için tıklayın.`,
|
||||||
|
'info'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else if (manual) {
|
||||||
|
get().addToast('Güncel', 'En son sürümü kullanıyorsunuz.', 'success');
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
set({ isCheckingUpdate: false });
|
set({ isCheckingUpdate: false });
|
||||||
if (!silent) {
|
// Sunucu askıda veya çevrimdışıysa uygulama ASLA çökmez
|
||||||
get().addToast('Güncelleme Denetimi Başarısız', String(err), 'warning');
|
console.warn('OTA Updater kontrolü (sunucu askıda/çevrimdışı):', err);
|
||||||
|
if (manual) {
|
||||||
|
get().addToast(
|
||||||
|
'Sunucuya Ulaşılamadı',
|
||||||
|
'Güncelleme sunucusu şu anda yanıt vermiyor (askıda veya bakımda). Lütfen daha sonra tekrar deneyin.',
|
||||||
|
'warning'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
applyUpdate: async () => {
|
startDownloadAndInstall: async () => {
|
||||||
const { updateInfo } = get();
|
const { availableUpdate } = get();
|
||||||
if (!updateInfo) return;
|
if (!availableUpdate) return;
|
||||||
|
|
||||||
|
set({ isDownloadingUpdate: true, updateProgress: { downloadedBytes: 0, totalBytes: 0, percentage: 0 } });
|
||||||
|
|
||||||
|
let totalLength = 0;
|
||||||
|
let downloaded = 0;
|
||||||
|
|
||||||
set({ isUpdating: true });
|
|
||||||
try {
|
try {
|
||||||
get().addToast('İndiriliyor', 'Güncelleme paketi indiriliyor ve doğrulanıyor...', 'info');
|
await availableUpdate.downloadAndInstall((event) => {
|
||||||
await api.installUpdate(updateInfo.download_url, updateInfo.sha256);
|
switch (event.event) {
|
||||||
get().addToast('Yükleniyor', 'Uygulama yeniden başlatılacak...', 'success');
|
case 'Started':
|
||||||
|
totalLength = event.data.contentLength ?? 0;
|
||||||
|
set({
|
||||||
|
updateProgress: {
|
||||||
|
downloadedBytes: 0,
|
||||||
|
totalBytes: totalLength,
|
||||||
|
percentage: 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'Progress':
|
||||||
|
downloaded += event.data.chunkLength;
|
||||||
|
const pct = totalLength > 0 ? Math.min(100, Math.round((downloaded / totalLength) * 100)) : 0;
|
||||||
|
set({
|
||||||
|
updateProgress: {
|
||||||
|
downloadedBytes: downloaded,
|
||||||
|
totalBytes: totalLength,
|
||||||
|
percentage: pct,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'Finished':
|
||||||
|
set({
|
||||||
|
updateProgress: {
|
||||||
|
downloadedBytes: totalLength,
|
||||||
|
totalBytes: totalLength,
|
||||||
|
percentage: 100,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
get().addToast('Güncelleme Tamamlandı', 'Uygulama yeniden başlatılıyor...', 'success');
|
||||||
|
// Otomatik yeniden başlat
|
||||||
|
await relaunch();
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
set({ isUpdating: false });
|
set({ isDownloadingUpdate: false, updateProgress: null });
|
||||||
get().addToast('Güncelleme Hatası', String(err), 'error');
|
get().addToast('Güncelleme İndirme Hatası', String(err), 'error');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue