diff --git a/.gitignore b/.gitignore index 3820a95..3203332 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,9 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# Windows installer output +/dist/ +*.pfx +*.cer +*.msix diff --git a/README.md b/README.md index 6ec3a6a..170f6e7 100644 --- a/README.md +++ b/README.md @@ -46,14 +46,35 @@ rm -rf ~/.local/lib/imajviewer ~/.local/bin/imajviewer \ ## Windows Kurulum -### Gereksinimler +### Seçenek 1 — Inno Setup Installer (Önerilen) -- [Flutter SDK](https://docs.flutter.dev/get-started/install/windows) (stable channel) -- Visual Studio 2022 (Desktop development with C++ iş yükü) +`dist/imajviewer_setup_1.0.0.exe` dosyasını çift tıklayarak kurun. Yönetici yetkisi ister. -### Derleme +Kurulum şunları yapar: +- Program Files altına kurulum +- Başlat menüsü kısayolu +- İsteğe bağlı masaüstü kısayolu +- Kayıt defterine dosya ilişkilendirmeleri (PNG, JPG, JPEG, WebP, BMP, GIF) +- Kaldırma desteği (Ayarlar > Uygulamalar) -Windows bilgisayarda: +### Seçenek 2 — MSIX Paketi + +`build\windows\x64\runner\Release\imajviewer.msix` dosyasını PowerShell ile kurun: + +```powershell +Add-AppxPackage -Path "build\windows\x64\runner\Release\imajviewer.msix" +``` + +> **Not:** MSIX imzalı değildir. Kurulum için Windows Developer Mode açık olmalıdır +> (Ayarlar > Geliştiriciler için > Geliştirici Modu). + +### Seçenek 3 — Portable (Kendin Derle) + +| Gereksinim | Açıklama | +|---|---| +| [Flutter SDK](https://docs.flutter.dev/get-started/install/windows) | stable channel | +| Visual Studio 2022 Build Tools | "Desktop development with C++" iş yükü | +| Windows Developer Mode | Ayarlar > Geliştiriciler için > Geliştirici Modu | ```powershell git clone https://git.softmediadesign.com/git_alhan/imajviewer.git @@ -62,7 +83,17 @@ flutter pub get flutter build windows --release ``` -Çıktı: `build/windows/x64/runner/Release/` dizini. `imajviewer.exe` ile birlikte tüm DLL'ler burada — dizini taşıyarak başka Windows makinelerde çalıştırabilirsiniz. +Çıktı: `build\windows\x64\runner\Release\` dizini. `imajviewer.exe` ile birlikte tüm DLL'ler burada — taşınabilir, başka makinelere kopyalanabilir. + +### Installer'ı Yeniden Oluşturma + +```powershell +flutter pub get +flutter build windows --release +"C:\Users\pc\AppData\Local\Programs\Inno Setup 6\ISCC.exe" windows\installer.iss +``` + +Çıktı: `dist\imajviewer_setup_1.0.0.exe` ## Geliştirme diff --git a/pubspec.lock b/pubspec.lock index c6ff922..a7146d5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + sha256: a96e8b390886ee8abb49b7bd3ac8df6f451c621619f52a26e815fdcf568959ff + url: "https://pub.dev" + source: hosted + version: "4.0.9" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" async: dependency: transitive description: @@ -25,6 +41,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: "71e43f1976c3eae2d9468a5b4d6600bf8cae61508b87f27fa1799228935d48ab" + url: "https://pub.dev" + source: hosted + version: "0.5.2" clock: dependency: transitive description: @@ -41,6 +65,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" + console: + dependency: transitive + description: + name: console + sha256: e04e7824384c5b39389acdd6dc7d33f3efe6b232f6f16d7626f194f6a01ad69a + url: "https://pub.dev" + source: hosted + version: "4.1.0" cross_file: dependency: transitive description: @@ -112,6 +144,22 @@ packages: description: flutter source: sdk version: "0.0.0" + get_it: + dependency: transitive + description: + name: get_it + sha256: "568d62f0e68666fb5d95519743b3c24a34c7f19d834b0658c46e26d778461f66" + url: "https://pub.dev" + source: hosted + version: "9.2.1" + image: + dependency: transitive + description: + name: image + sha256: "6300175e00616bbc832e2fc91bfa4d776af5402c81c7151bee6905bb08473c52" + url: "https://pub.dev" + source: hosted + version: "4.9.1" json_annotation: dependency: transitive description: @@ -176,6 +224,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" + msix: + dependency: "direct main" + description: + name: msix + sha256: "61415c352e8aea084332b8a5514e6408c961c8cdeca202804fff1040eb555ac7" + url: "https://pub.dev" + source: hosted + version: "3.18.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d + url: "https://pub.dev" + source: hosted + version: "3.0.0" path: dependency: "direct main" description: @@ -184,6 +248,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "91bd59303e9f769f108f8df05e371341b15d59e995e6806aefab827b58336675" + url: "https://pub.dev" + source: hosted + version: "7.0.2" plugin_platform_interface: dependency: transitive description: @@ -192,6 +264,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" + posix: + dependency: transitive + description: + name: posix + sha256: bc1bad54ad2b735816e31f8d4600cfde6c7839975085ddfbca48b6c9f7c4044e + url: "https://pub.dev" + source: hosted + version: "6.5.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" screen_retriever: dependency: transitive description: @@ -333,6 +421,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.3" + xml: + dependency: transitive + description: + name: xml + sha256: "67f0aff7be013d107995e9b75bf4e7f2c3ef2dfdb2c8e68024bba0a7fd5756a4" + url: "https://pub.dev" + source: hosted + version: "7.0.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" sdks: dart: ">=3.12.2 <4.0.0" flutter: ">=3.38.0" diff --git a/pubspec.yaml b/pubspec.yaml index c934376..8002e4c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,16 @@ name: imajviewer -description: "Ultra hafif Linux görüntü izleyici" +description: "Ultra hafif görüntü izleyici" publish_to: 'none' version: 1.0.0+1 +msix_config: + display_name: ImajViewer + publisher_display_name: imajviewer + identity_name: imajviewer.imajviewer + logo_path: C:/projects/imajviewer/windows/runner/resources/app_icon.ico + install_certificate: false + sign_msix: false + environment: sdk: ^3.12.2 @@ -13,6 +21,7 @@ dependencies: file_picker: ^8.0.0 path: ^1.9.0 desktop_drop: ^0.7.1 + msix: ^3.18.0 dev_dependencies: flutter_test: diff --git a/windows/installer.iss b/windows/installer.iss new file mode 100644 index 0000000..fade069 --- /dev/null +++ b/windows/installer.iss @@ -0,0 +1,63 @@ +; ImajViewer Setup Script +; Inno Setup 6 + +#define MyAppName "ImajViewer" +#define MyAppVersion "1.0.0" +#define MyAppPublisher "imajviewer" +#define MyAppURL "https://git.softmediadesign.com/git_alhan/imajviewer" +#define MyAppExeName "imajviewer.exe" + +[Setup] +AppId={{B8F4A3D2-1C5E-4A7B-9D0F-6E2C8A1B3D5F} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +DefaultGroupName={#MyAppName} +DisableProgramGroupPage=yes +OutputDir=..\dist +OutputBaseFilename=imajviewer_setup_{#MyAppVersion} +Compression=lzma +SolidCompression=yes +WizardStyle=modern +PrivilegesRequired=admin +ArchitecturesInstallIn64BitMode=x64compatible + +[Languages] +Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl" +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce + +[Files] +Source: "..\build\windows\x64\runner\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs + +[Icons] +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent + +[Registry] +; Register as default image viewer +Root: HKCR; Subkey: ".png\OpenWithProgids\ImajViewer"; ValueType: string; ValueData: ""; Flags: uninsdeletevalue +Root: HKCR; Subkey: ".jpg\OpenWithProgids\ImajViewer"; ValueType: string; ValueData: ""; Flags: uninsdeletevalue +Root: HKCR; Subkey: ".jpeg\OpenWithProgids\ImajViewer"; ValueType: string; ValueData: ""; Flags: uninsdeletevalue +Root: HKCR; Subkey: ".webp\OpenWithProgids\ImajViewer"; ValueType: string; ValueData: ""; Flags: uninsdeletevalue +Root: HKCR; Subkey: ".bmp\OpenWithProgids\ImajViewer"; ValueType: string; ValueData: ""; Flags: uninsdeletevalue +Root: HKCR; Subkey: ".gif\OpenWithProgids\ImajViewer"; ValueType: string; ValueData: ""; Flags: uninsdeletevalue + +[Code] +procedure CurStepChanged(CurStep: TSetupStep); +begin + if CurStep = ssPostInstall then + begin + // Register application path for OpenWith + RegWriteStringValue(HKEY_CLASSES_ROOT, 'Applications\imajviewer.exe\shell\open\command', '', ExpandConstant('"{app}\imajviewer.exe" "%1"')); + RegWriteStringValue(HKEY_CURRENT_USER, 'Software\RegisteredApplications', 'ImajViewer', ExpandConstant('Software\ImajViewer\Capabilities')); + end; +end;