8774a4843e
PyInstaller onedir/onefile specs, Inno Setup script, and GitHub Actions workflow to produce JUC500-Setup-win64.exe and portable builds. Co-authored-by: Cursor <cursoragent@cursor.com>
64 lines
2.1 KiB
PowerShell
64 lines
2.1 KiB
PowerShell
# JUC500 Windows 64-bit 설치 (Inno Setup 없이)
|
|
# PowerShell -ExecutionPolicy Bypass -File install.ps1
|
|
|
|
param(
|
|
[string]$SourceDir = "",
|
|
[string]$InstallDir = "$env:LOCALAPPDATA\Programs\JUC500"
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
if (-not $SourceDir) {
|
|
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$candidates = @(
|
|
(Join-Path $here "..\..\dist\JUC500"),
|
|
(Join-Path $here "JUC500"),
|
|
(Join-Path (Get-Location) "JUC500"),
|
|
(Join-Path (Get-Location) "dist\JUC500"),
|
|
$here
|
|
)
|
|
foreach ($c in $candidates) {
|
|
$exe = Join-Path $c "JUC500.exe"
|
|
if (Test-Path $exe) { $SourceDir = (Resolve-Path $c).Path; break }
|
|
}
|
|
}
|
|
|
|
if (-not $SourceDir -or -not (Test-Path (Join-Path $SourceDir "JUC500.exe"))) {
|
|
Write-Host "JUC500.exe 를 찾을 수 없습니다. SourceDir=$SourceDir" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
Write-Host "==> 설치: $SourceDir -> $InstallDir"
|
|
New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
|
|
|
|
Get-Process -Name "JUC500","JUC500-portable" -ErrorAction SilentlyContinue |
|
|
Stop-Process -Force -ErrorAction SilentlyContinue
|
|
Start-Sleep -Milliseconds 400
|
|
|
|
Copy-Item -Path (Join-Path $SourceDir "*") -Destination $InstallDir -Recurse -Force
|
|
|
|
$exe = Join-Path $InstallDir "JUC500.exe"
|
|
|
|
$startMenu = Join-Path $env:APPDATA "Microsoft\Windows\Start Menu\Programs\JUC500"
|
|
New-Item -ItemType Directory -Force -Path $startMenu | Out-Null
|
|
$wsh = New-Object -ComObject WScript.Shell
|
|
$lnk = $wsh.CreateShortcut((Join-Path $startMenu "JUC500.lnk"))
|
|
$lnk.TargetPath = $exe
|
|
$lnk.WorkingDirectory = $InstallDir
|
|
$lnk.Description = "JUC500 Smart Data Link 파일 전송"
|
|
$lnk.Save()
|
|
|
|
$desk = [Environment]::GetFolderPath("Desktop")
|
|
$dlnk = $wsh.CreateShortcut((Join-Path $desk "JUC500.lnk"))
|
|
$dlnk.TargetPath = $exe
|
|
$dlnk.WorkingDirectory = $InstallDir
|
|
$dlnk.Save()
|
|
|
|
Write-Host ""
|
|
Write-Host "설치 완료: $InstallDir" -ForegroundColor Green
|
|
Write-Host "WinUSB(Zadig) 설정이 필요하면 packaging\windows\README-WIN.txt 를 보세요."
|
|
$launch = Read-Host "지금 실행할까요? (Y/N)"
|
|
if ($launch -match '^[Yy]') {
|
|
Start-Process $exe
|
|
}
|