# DBX 알림 빌드 — dist\DBXNotifier.exe 하나를 만든다(.NET SDK 필요, 실행 PC 에는 .NET Framework 4.8 만 있으면 됨). # powershell -ExecutionPolicy Bypass -File desktop\notifier\build.ps1 # 코드 서명(선택, 백신·SmartScreen 경고를 줄이는 가장 확실한 방법): # $env:DBX_SIGN_PFX = 'C:\cert\dbx-codesign.pfx'; $env:DBX_SIGN_PASSWORD = '...' (비밀번호는 저장소에 남기지 않는다) $ErrorActionPreference = 'Stop' $here = Split-Path -Parent $MyInvocation.MyCommand.Path Push-Location $here try { dotnet build -c Release if ($LASTEXITCODE -ne 0) { throw "빌드 실패" } New-Item -ItemType Directory -Force (Join-Path $here 'dist') | Out-Null $exe = Join-Path $here 'dist\DBXNotifier.exe' Copy-Item (Join-Path $here 'bin\Release\net48\DBXNotifier.exe') $exe -Force if ($env:DBX_SIGN_PFX) { $signtool = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\signtool.exe" -ErrorAction SilentlyContinue | Sort-Object FullName -Descending | Select-Object -First 1 if (-not $signtool) { throw "signtool.exe 를 찾을 수 없습니다(Windows SDK 설치 필요)." } & $signtool.FullName sign /fd SHA256 /f $env:DBX_SIGN_PFX /p $env:DBX_SIGN_PASSWORD /tr http://timestamp.digicert.com /td SHA256 $exe if ($LASTEXITCODE -ne 0) { throw "서명 실패" } } $f = Get-Item $exe "{0} {1:N0} KB SHA256 {2}" -f $f.FullName, ($f.Length / 1KB), (Get-FileHash $exe -Algorithm SHA256).Hash } finally { Pop-Location }