- Windows PowerShell 5.1이 BOM 없는 UTF-8을 cp949로 읽어 한글 문자열이 깨지는 문제 수정 (5개 ps1 파일에 BOM 추가) - BuildAndSign / Install 스크립트의 안내 메시지를 'JPEG로 빠른 변환' → 'Everything2Everything으로 변환 카스케이드'로 갱신 - Install 스크립트에 Portable EXE 카스케이드 unregister 안내 추가 (MSIX + 레지스트리 둘 다 등록 시 메뉴 중복 방지)
44 lines
1.8 KiB
PowerShell
44 lines
1.8 KiB
PowerShell
#Requires -Version 5.1
|
|
# 자체 서명 코드 사이닝 인증서 생성 + PFX export.
|
|
# Subject가 Package.appxmanifest 의 <Identity Publisher="..."> 와 정확히 일치해야 한다.
|
|
|
|
[CmdletBinding()]
|
|
param(
|
|
[string]$Subject = 'CN=Everything2EverythingDev',
|
|
[string]$OutputPfx = (Join-Path $PSScriptRoot 'Everything2Everything-DevCert.pfx'),
|
|
[securestring]$Password
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
if (-not $Password) {
|
|
Write-Host '인증서 PFX 보호용 비밀번호를 입력하세요. (5대 PC에 설치할 때 필요합니다)'
|
|
$Password = Read-Host -AsSecureString -Prompt '비밀번호'
|
|
}
|
|
|
|
Write-Host "Creating self-signed code-signing certificate: $Subject"
|
|
$cert = 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 'Everything2Everything Dev'
|
|
|
|
Write-Host "Thumbprint: $($cert.Thumbprint)"
|
|
Write-Host "Exporting PFX: $OutputPfx"
|
|
Export-PfxCertificate -Cert $cert -FilePath $OutputPfx -Password $Password | Out-Null
|
|
|
|
Write-Host ''
|
|
Write-Host '--- 다음 단계 ---'
|
|
Write-Host " 1. 이 PFX 파일을 5대 PC 각각에 복사"
|
|
Write-Host " 2. 각 PC에서 관리자 PowerShell로:"
|
|
Write-Host ' Import-PfxCertificate -CertStoreLocation "Cert:\LocalMachine\TrustedPeople" -FilePath <경로>.pfx -Password (Read-Host -AsSecureString)'
|
|
Write-Host ' 3. MSIX 빌드 시 BuildMsix.ps1 -CertThumbprint ' + $cert.Thumbprint
|
|
Write-Host ''
|
|
Write-Host "PFX는 비밀이므로 절대 git에 커밋하지 마세요. (.gitignore에 *.pfx 추가됨)"
|