From 784167ccff3549b8b59a21e5def37c61bafaa44d Mon Sep 17 00:00:00 2001 From: Yun Chan Date: Wed, 6 May 2026 19:36:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20P4-P8=20=ED=95=9C=EB=B0=A9=20=EB=A7=88?= =?UTF-8?q?=EB=AC=B4=EB=A6=AC=20=E2=80=94=20=EC=9E=90=EC=B2=B4=EC=84=9C?= =?UTF-8?q?=EB=AA=85=20MSIX,=20=EC=98=81=EA=B5=AC=EC=A0=80=EC=9E=A5,=20?= =?UTF-8?q?=EB=8B=A8=EC=B6=95=ED=82=A4,=20capability=20=EC=95=8C=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P4 — 자체 서명 MSIX 자동화 - packaging/BuildAndSign.ps1: 인증서 생성→PFX export→MSIX 빌드→서명을 한 스크립트로 일관 처리. 기존 인증서 있으면 재사용. - Install-EverythingToJpeg.ps1: 기본 비밀번호 'EverythingToJpegDev' 자동 사용 (사용자 5대 PC 본인 사용 한정). - 검증: 53MB 서명된 MSIX 산출, signtool 정상 통과(DigiCert TimeStamp 박힘). P6 — Past Results 영구 저장 - HistoryStorage.cs: %LocalAppData%\EverythingToJpeg\history.jsonl 에 변환 결과 append. 시작 시 로드해서 _pastResults에 채움. - 첫 실행에만 데모 시드, 이후엔 실데이터만 표시. - Past Results의 Clear All은 영구 파일도 함께 삭제 (확인 다이얼로그 추가). P7 — 정리 + 단축키 - 사용 안 하는 ConvertWindow.xaml/.cs 폐기 (코드 600줄 제거). - KeyBinding 4개: Ctrl+O 파일 추가, Ctrl+Enter 변환, Esc 닫기, F5 새로고침. - RelayCommand 헬퍼 클래스로 단축키 ICommand 패턴 구현. P8 — Capability 자동 안내 - 시작 시 RequiresExternal Provider들의 가용성 비동기 체크. - 외부 도구 미설치 형식이 있으면 사이드바 footer에 "⚠ N개 형식이 외부 도구를 기다립니다 (Diagnose 참조)" 한 줄 표시. README — Phase 1~8 전체 진척, 단축키 표 정리. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 20 +- packaging/BuildAndSign.ps1 | 68 ++++ packaging/Install-EverythingToJpeg.ps1 | 5 +- .../Views/ConvertWindow.xaml | 323 --------------- .../Views/ConvertWindow.xaml.cs | 376 ------------------ .../Views/MainWindow.xaml | 22 +- .../Views/MainWindow.xaml.cs | 103 ++++- src/EverythingToJpeg.Core/HistoryStorage.cs | 68 ++++ 8 files changed, 276 insertions(+), 709 deletions(-) create mode 100644 packaging/BuildAndSign.ps1 delete mode 100644 src/EverythingToJpeg.App/Views/ConvertWindow.xaml delete mode 100644 src/EverythingToJpeg.App/Views/ConvertWindow.xaml.cs create mode 100644 src/EverythingToJpeg.Core/HistoryStorage.cs diff --git a/README.md b/README.md index f72f957..4c9d5f0 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,25 @@ dotnet publish src\EverythingToJpeg.App\EverythingToJpeg.App.csproj ` | 단계 | 상태 | 내용 | |---|---|---| -| Phase 1 | ✅ | 레지스트리 컨텍스트 메뉴 (Win11 "추가 옵션 표시"), 핵심 변환(이미지·HEIC·RAW·PDF·DOCX), Fluent UI | -| Phase 2 | ✅ | C++ IExplorerCommand DLL, MSIX 패키징, 자체 서명 인증서, GitHub Releases 자동화 — `packaging/README.md` 참조 | +| Phase 1 | ✅ | 레지스트리 컨텍스트 메뉴 (Win11 "추가 옵션 표시"), 핵심 변환, Fluent UI | +| Phase 2 | ✅ | C++ IExplorerCommand DLL + MSIX Sparse Package | | Phase 3 | ✅ | HTML(WebView2), HWP/HWPX(LibreOffice + H2Orestart) 실구현 | +| Phase 4 | ✅ | **자체 서명 MSIX 자동화** — `packaging/BuildAndSign.ps1` 한 방으로 인증서 생성 + 서명 + 패키지 | +| Phase 5 | ✅ | GitHub 리모트 + Actions 릴리즈 워크플로 | +| Phase 6 | ✅ | Past Results 영구 저장 (`%LocalAppData%\EverythingToJpeg\history.jsonl`) | +| Phase 7 | ✅ | 단축키 (Ctrl+O 추가, Ctrl+Enter 변환, Esc 닫기, F5 새로고침), 코드 정리 | +| Phase 8 | ✅ | 시작 시 Provider 가용성 자동 체크, 사이드바에 외부 도구 필요 안내 | + +## 키보드 단축키 + +| 키 | 동작 | +|---|---| +| Ctrl+O | 파일 추가 | +| Ctrl+Enter | Process Queue (변환 시작) | +| Esc | 창 닫기 | +| F5 | 통계 새로고침 | +| Active Queue 행 클릭 | 우측 Preview에 즉시 표시 | +| Past Results 행 클릭 | 원본 파일이 있으면 Preview 표시 | ## 두 가지 사용 방식 diff --git a/packaging/BuildAndSign.ps1 b/packaging/BuildAndSign.ps1 new file mode 100644 index 0000000..2440418 --- /dev/null +++ b/packaging/BuildAndSign.ps1 @@ -0,0 +1,68 @@ +#Requires -Version 5.1 +# 한방에 빌드+자체서명: 인증서 자동 생성 → MSIX 빌드 → 서명까지 일관 처리. +# 산출: +# - packaging/dist/EverythingToJpeg-x64.msix (서명됨) +# - packaging/EverythingToJpeg-DevCert.pfx (5대 PC 신뢰 등록용) + +[CmdletBinding()] +param( + [string]$Subject = 'CN=EverythingToJpegDev', + [string]$Password = 'EverythingToJpegDev', + [string]$Configuration = 'Release', + [string]$Platform = 'x64' +) + +$ErrorActionPreference = 'Stop' +$packagingDir = $PSScriptRoot +$pfxPath = Join-Path $packagingDir 'EverythingToJpeg-DevCert.pfx' +$securePassword = ConvertTo-SecureString -String $Password -AsPlainText -Force + +# ---- 1) 인증서 ---- +$existing = Get-ChildItem -Path 'Cert:\CurrentUser\My' -ErrorAction SilentlyContinue | + Where-Object { $_.Subject -eq $Subject } | + Sort-Object NotAfter -Descending | + Select-Object -First 1 + +if (-not $existing) { + Write-Host "[1/3] 자체 서명 인증서 생성: $Subject" + $existing = New-SelfSignedCertificate ` + -Type CodeSigningCert ` + -Subject $Subject ` + -KeyAlgorithm RSA ` + -KeyLength 3072 ` + -Provider 'Microsoft Enhanced RSA and AES Cryptographic Provider' ` + -KeyExportPolicy Exportable ` + -KeyUsage DigitalSignature ` + -CertStoreLocation 'Cert:\CurrentUser\My' ` + -HashAlgorithm SHA256 ` + -NotAfter (Get-Date).AddYears(5) ` + -FriendlyName 'EverythingToJpeg Dev' +} +else { + Write-Host "[1/3] 기존 인증서 재사용 (Thumbprint $($existing.Thumbprint))" +} + +if (-not (Test-Path $pfxPath)) { + Export-PfxCertificate -Cert $existing -FilePath $pfxPath -Password $securePassword | Out-Null + Write-Host " PFX 내보냄: $pfxPath" +} + +# ---- 2) MSIX 빌드 + 서명 ---- +Write-Host "[2/3] MSIX 빌드 + 서명" +& (Join-Path $packagingDir 'BuildMsix.ps1') ` + -Configuration $Configuration ` + -Platform $Platform ` + -Sign ` + -CertThumbprint $existing.Thumbprint + +# ---- 3) 안내 ---- +Write-Host '' +Write-Host '[3/3] 완료. 다음 단계:' +Write-Host ' 1. PFX 파일을 5대 PC 각각에 복사:' +Write-Host " $pfxPath" +Write-Host ' 2. 각 PC에서 관리자 PowerShell:' +Write-Host ' cd packaging' +Write-Host " .\Install-EverythingToJpeg.ps1 -PfxPath .\EverythingToJpeg-DevCert.pfx -MsixPath .\dist\EverythingToJpeg-x64.msix" +Write-Host ' PFX 비밀번호:' $Password +Write-Host '' +Write-Host ' 3. 우클릭 → JPEG로 빠른 변환 / JPEG로 변환… 이 메인 메뉴에 노출됨.' diff --git a/packaging/Install-EverythingToJpeg.ps1 b/packaging/Install-EverythingToJpeg.ps1 index 74518c8..df2e633 100644 --- a/packaging/Install-EverythingToJpeg.ps1 +++ b/packaging/Install-EverythingToJpeg.ps1 @@ -8,7 +8,8 @@ param( [Parameter(Mandatory)] [string]$PfxPath, [Parameter(Mandatory)] [string]$MsixPath, - [securestring]$PfxPassword + [securestring]$PfxPassword, + [string]$Password = 'EverythingToJpegDev' ) $ErrorActionPreference = 'Stop' @@ -17,7 +18,7 @@ if (-not (Test-Path $PfxPath)) { throw "PFX 파일을 찾을 수 없습니다: $ if (-not (Test-Path $MsixPath)) { throw "MSIX 파일을 찾을 수 없습니다: $MsixPath" } if (-not $PfxPassword) { - $PfxPassword = Read-Host -AsSecureString -Prompt 'PFX 비밀번호' + $PfxPassword = ConvertTo-SecureString -String $Password -AsPlainText -Force } Write-Host '[1/3] 인증서를 LocalMachine\TrustedPeople에 임포트…' diff --git a/src/EverythingToJpeg.App/Views/ConvertWindow.xaml b/src/EverythingToJpeg.App/Views/ConvertWindow.xaml deleted file mode 100644 index 8e776b4..0000000 --- a/src/EverythingToJpeg.App/Views/ConvertWindow.xaml +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -