초기 커밋: Phase 1 — 레지스트리 기반 컨텍스트 메뉴 + 핵심 변환 파이프라인
- Provider 추상화(IConverterProvider + ProviderCapability) — Available/RequiresExternal/ComingSoon 1급 시민 - 변환 구현: Magick(이미지·RAW·GIF·TIFF), HEIC/HEIF(libheif decode→Magick encode), PDF(PDFium), DOCX(Word COM 또는 LibreOffice 자동 감지) - ComingSoon 스텁: HTML, HWP/HWPX (UI 노출, 컨텍스트 메뉴 등록 자동 제외) - WPF + WPF-UI 4.3 Fluent 2 UI: 메인 창(드래그&드롭, Provider 카드), 변환 창(썸네일·옵션·진행률), 빠른 변환 진행 창, 진단 창 - 단일 EXE에 verb 라우팅: quick / dialog / register / unregister / diagnose / help - HKCU SystemFileAssociations 기반 컨텍스트 메뉴 등록 (Win11 "추가 옵션 표시"에 노출) - README, packaging/ Phase 2 placeholder 포함 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
8fa4a613d7
37 changed files with 2727 additions and 0 deletions
51
src/EverythingToJpeg.Core/Converters/ExternalToolDetector.cs
Normal file
51
src/EverythingToJpeg.Core/Converters/ExternalToolDetector.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace EverythingToJpeg.Core.Converters;
|
||||
|
||||
internal static class ExternalToolDetector
|
||||
{
|
||||
public static bool TryFindLibreOfficeSoffice(out string sofficePath)
|
||||
{
|
||||
sofficePath = "";
|
||||
var candidates = new List<string>();
|
||||
|
||||
var pf = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
var pfx86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
|
||||
foreach (var root in new[] { pf, pfx86 })
|
||||
{
|
||||
if (string.IsNullOrEmpty(root)) continue;
|
||||
candidates.Add(Path.Combine(root, "LibreOffice", "program", "soffice.com"));
|
||||
candidates.Add(Path.Combine(root, "LibreOffice", "program", "soffice.exe"));
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\LibreOffice\UNO\InstallPath");
|
||||
if (key?.GetValue(null) is string installPath)
|
||||
{
|
||||
candidates.Add(Path.Combine(installPath, "soffice.com"));
|
||||
candidates.Add(Path.Combine(installPath, "soffice.exe"));
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
foreach (var path in candidates.Distinct())
|
||||
{
|
||||
if (File.Exists(path)) { sofficePath = path; return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool IsWordComAvailable()
|
||||
{
|
||||
try
|
||||
{
|
||||
using var key = Registry.ClassesRoot.OpenSubKey("Word.Application");
|
||||
return key is not null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue