Add compression estimates, transparent image output and full format selection
This commit is contained in:
1 parent
65cebb31ca
commit
2b897267d1
22 files changed
+220
-30
No files matched your search
@@ -0,0 +1,20 @@
|
|||||||
|
# Funktionsabgleich
|
||||||
|
|
||||||
|
Stand: 27.10.2026. Grundlage sind die lokal untersuchte FileArc-Version 1.0.4 und die FileBow-Tests. Diese Übersicht beschreibt Arbeitsabläufe, keine identischen Encoder-Ergebnisse. FileBow verwendet eigenen Anwendungscode.
|
||||||
|
|
||||||
|
| Bereich | FileBow | Unterschied / Prüfgrenze |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Bilder konvertieren | JPEG, PNG, WebP, GIF, AVIF, TIFF, ICO, BMP, HEIC/HEIF, PDF | Weitere Formate im eigenen Dialog; Bearbeitung verwendet bei Animationen das erste Bild. |
|
||||||
|
| Bildbearbeitung | Zuschneiden per Auswahl, Größe mit Seitenverhältnis, Drehen, Spiegeln | Eigene Oberfläche; keine pixelgleiche Nachbildung. |
|
||||||
|
| Bildkomprimierung | Qualität, optionale Zielgröße, Größenprognose, Transparenz erhalten | PNG zunächst verlustfrei; Zielgröße kann Abmessungen verringern. Andere Algorithmen können andere Größen ergeben. |
|
||||||
|
| Video | MP4, WebM, GIF, MP3, Skalierung, Einzelbild, Komprimierung | OpenH264 statt x264; Vorschau abhängig von Chromium-Codecs, manuelle Zeitangabe verfügbar. |
|
||||||
|
| Audio | MP3, WAV, M4A, FLAC, OGG; Komprimierung | Bitratenbasierte Größenprognose, keine Garantie der Zielgröße. |
|
||||||
|
| PDF | TXT/Markdown/DOCX, Reihenfolge und Zusammenführung, Optimierung, Metadaten, Passwort setzen/entfernen | Textkonvertierung erhält kein Seitenlayout; kein OCR. Entfernen eines Passworts benötigt das bekannte Passwort. |
|
||||||
|
| Office / Text | DOCX, XLS/XLSX, PPTX, EPUB, RTF, HTML und Text nach TXT/Markdown/PDF | Alte DOC/PPT-Binärformate fehlen. Deren tatsächliche Verarbeitung in der Referenz wurde nicht bestätigt. |
|
||||||
|
| Größenprognose | Bilder/PDF: Probeverarbeitung; Medien: Laufzeit/Bitrate | Bei Stapeln erste Datei; Prognose ist keine verbindliche Endgröße. |
|
||||||
|
| Allgemeine Werkzeuge | ZIP, Stapelaufträge, Abbruch, Metadatenentfernung, Verlauf | Unterschiedliche Ergebnisdateien und Fehlerbehandlung sind möglich. |
|
||||||
|
| Explorer | Auswahl, Strg+Leertaste, Alt+Leertaste, Radialmenü, Zieh-Erkennung | Auswahl und Tastenkürzel live geprüft. Ziehen mit echter Maus, mehrere Tabs und DPI-Konfigurationen noch nicht ausreichend geprüft; Desktop-Auswahl nicht implementiert. |
|
||||||
|
| Windows | Infobereich, optionale Autostart-Schnittstelle, MSIX | Paketinstallation und Autostart nach Anmeldung noch separat zu prüfen. |
|
||||||
|
| Lizenzierung | Keine Auftragsgrenze, kein Konto, kein Kaufdialog | Bewusste Abweichung; freiwilliger Ko-fi-Link ohne Funktionsfreischaltung. |
|
||||||
|
|
||||||
|
Die Konvertierungs- und Bearbeitungsfunktionen decken die wesentlichen Referenzabläufe ab. Vollständige Gleichheit einschließlich Explorer-Randfällen ist damit nicht belegt. Ausgeführte Prüfungen und Veröffentlichungsvoraussetzungen: [VALIDATION.md](VALIDATION.md), [Store-Unterlagen](store/RELEASE.md).
|
||||||
@@ -10,6 +10,8 @@ Windows-App zum lokalen Konvertieren, Komprimieren und Bearbeiten von Dateien. D
|
|||||||
|
|
||||||
Das signierte Testpaket liegt unter `out/msix/FileBow_1.0.0.0_x64_Development.msix`. Die Signatur verwendet ein lokales Entwicklungszertifikat. Es wurde nicht systemweit als vertrauenswürdig installiert. Für eine Testinstallation in einer Windows-Testumgebung `scripts/install-development.ps1` in einer administrativen PowerShell ausführen. Dieses Skript vertraut dem beiliegenden Entwicklungszertifikat und installiert das Paket. Es ist kein Store-Installationsskript.
|
Das signierte Testpaket liegt unter `out/msix/FileBow_1.0.0.0_x64_Development.msix`. Die Signatur verwendet ein lokales Entwicklungszertifikat. Es wurde nicht systemweit als vertrauenswürdig installiert. Für eine Testinstallation in einer Windows-Testumgebung `scripts/install-development.ps1` in einer administrativen PowerShell ausführen. Dieses Skript vertraut dem beiliegenden Entwicklungszertifikat und installiert das Paket. Es ist kein Store-Installationsskript.
|
||||||
|
|
||||||
|
Das Paket für Partner Center liegt unter `out/msix/FileBow_1.0.0.0_x64_Store.msix` und verwendet die bestätigte Identität `Nordik.dev.FileBow`. Es ist für den Store-Upload unsigniert; zur lokalen Ausführung die portable App oder das Entwicklungspaket verwenden. Offene Veröffentlichungsschritte stehen in [store/RELEASE.md](store/RELEASE.md).
|
||||||
|
|
||||||
## Bedienung
|
## Bedienung
|
||||||
|
|
||||||
- Dateien im Explorer markieren, dann **Strg + Leertaste** zum Konvertieren oder **Alt + Leertaste** für Werkzeuge drücken.
|
- Dateien im Explorer markieren, dann **Strg + Leertaste** zum Konvertieren oder **Alt + Leertaste** für Werkzeuge drücken.
|
||||||
@@ -30,7 +32,11 @@ Das signierte Testpaket liegt unter `out/msix/FileBow_1.0.0.0_x64_Development.ms
|
|||||||
| Dokumente | TXT, Markdown, HTML, DOCX, XLS/XLSX, PPTX, EPUB, RTF als Text, Markdown oder PDF |
|
| Dokumente | TXT, Markdown, HTML, DOCX, XLS/XLSX, PPTX, EPUB, RTF als Text, Markdown oder PDF |
|
||||||
| Allgemein | ZIP, Stapelverarbeitung, Abbruch, Verlauf, dunkle/helle/Systemdarstellung |
|
| Allgemein | ZIP, Stapelverarbeitung, Abbruch, Verlauf, dunkle/helle/Systemdarstellung |
|
||||||
|
|
||||||
Textbasierte Dokumentkonvertierung erhält keine identische Seitenformatierung. PDF-Scans ohne Textebene werden nicht per OCR erkannt. Alte DOC-/PPT-Binärdateien müssen vorher als DOCX/PPTX gespeichert werden. Eine JPEG-Komprimierung von Bildern entfernt Transparenz. Animationen werden beim Bearbeiten einzelner Bilder auf das erste Bild reduziert. Video-Vorschau hängt von Chromiums unterstützten Codecs ab; die Einzelbildfunktion arbeitet auch mit manuell eingegebenem Zeitpunkt. Eine gewünschte Dateigröße kann nicht bei jedem Inhalt erreicht werden.
|
Alle Bildausgabeformate sind über die direkten Aktionen oder „Weitere Formate“ erreichbar. Beim Komprimieren behalten PNG, WebP und AVIF ihr Format; andere Bilder werden als JPEG gespeichert, bei Transparenz als PNG. Die Größenprognose verwendet bei Bildern und PDFs eine temporäre Probeverarbeitung, bei Video und Audio eine Schätzung aus Laufzeit und Bitrate. Bei Stapeln bezieht sie sich auf die erste Datei. PNG wird verlustfrei optimiert; eine Zielgröße kann zusätzlich die Bildabmessungen verringern.
|
||||||
|
|
||||||
|
Textbasierte Dokumentkonvertierung erhält keine identische Seitenformatierung. PDF-Scans ohne Textebene werden nicht per OCR erkannt. Alte DOC-/PPT-Binärdateien müssen vorher als DOCX/PPTX gespeichert werden. Eine ausdrücklich gewählte JPEG-Ausgabe entfernt Transparenz. Animationen werden beim Bearbeiten einzelner Bilder auf das erste Bild reduziert. Video-Vorschau hängt von Chromiums unterstützten Codecs ab; die Einzelbildfunktion arbeitet auch mit manuell eingegebenem Zeitpunkt. Eine gewünschte Dateigröße kann nicht bei jedem Inhalt erreicht werden.
|
||||||
|
|
||||||
|
Der Abgleich mit der Referenz-App steht in [FEATURE_PARITY.md](FEATURE_PARITY.md).
|
||||||
|
|
||||||
## Entwicklung und Build
|
## Entwicklung und Build
|
||||||
|
|
||||||
|
|||||||
+9
-6
@@ -4,16 +4,19 @@ Getestet auf Windows x64, Build 26300. Dieses Dokument beschreibt die tatsächli
|
|||||||
|
|
||||||
## Bestanden
|
## Bestanden
|
||||||
|
|
||||||
- **10 Integrationstests des Python-Workers**, mit mehr als 40 realen Dateioperationen: JPEG/PNG/WebP/AVIF/TIFF/BMP/GIF/ICO/HEIC/PDF, Bildänderungen, Unicode-PDF und Rückkonvertierung, PDF-Passwort setzen/entfernen, PDF-/Bild-/Text-Zusammenführung, Komprimierung, Metadatenentfernung, MP4/WebM/GIF, Einzelbild, MP3/WAV/M4A/FLAC/OGG, Video-Skalierung, XLSX/PPTX, ZIP, Vorschau, Namenskollisionen und Fehlerisolierung. Originaldateien wurden per SHA-256 auf Unverändertheit geprüft.
|
- **11 Integrationstests des Python-Workers**, mit mehr als 40 realen Dateioperationen: JPEG/PNG/WebP/AVIF/TIFF/BMP/GIF/ICO/HEIC/PDF, Bildänderungen, Unicode-PDF und Rückkonvertierung, PDF-Passwort setzen/entfernen, PDF-/Bild-/Text-Zusammenführung, Komprimierung, Metadatenentfernung, MP4/WebM/GIF, Einzelbild, MP3/WAV/M4A/FLAC/OGG, Video-Skalierung, XLSX/PPTX, ZIP, Vorschau, Namenskollisionen und Fehlerisolierung. Originaldateien wurden per SHA-256 auf Unverändertheit geprüft.
|
||||||
- **Dieselben 10 Tests mit der gebündelten `FileBowEngine.exe`**, einschließlich Umlauten in Dateinamen und Dateiinhalten. Log: `test-results/engine-packaged.log`.
|
- **Dieselben 11 Tests mit der gebündelten `FileBowEngine.exe`**, einschließlich Umlauten in Dateinamen und Dateiinhalten. Log: `test-results/engine-packaged.log`.
|
||||||
- **3 Node-Tests**: Aktionszuordnung, PDF-Passwortaktion und Abbruch eines laufenden Workers mit Prozessbeendigung und Bereinigung temporärer Ergebnisse.
|
- **4 Node-Tests**: Aktionszuordnung einschließlich GIF/weiterer Formate und MP3-Direktaktion, PDF-Passwortaktion und Abbruch eines laufenden Workers mit Prozessbeendigung und Bereinigung temporärer Ergebnisse.
|
||||||
- **Automatisierter Test der gepackten `FileBow.exe`**: Start, Windows-Bridge, Konvertierung, Bildeditor, Komprimierungsdialog, PDF-Passwortdialoge, Zusammenfügen, Radialmenü, Darstellung und Verlauf; keine Renderer-Ausnahmen. Ergebnis: `test-results/ui-result.json`.
|
- **Automatisierter Test der gepackten `FileBow.exe`**: Start, Windows-Bridge, Konvertierung, Bildeditor, Komprimierungsdialog mit Größenprognose, PNG-Ausgabe mit Transparenz, TIFF über „Weitere Formate“, GIF, Ko-fi-Zieladresse (ohne externen Aufruf im Test), PDF-Passwortdialoge, Zusammenfügen, Radialmenü, Darstellung und Verlauf; keine Renderer-Ausnahmen. Ergebnis: `test-results/ui-result.json`.
|
||||||
- **Live-Explorer-Test**: `Beispiel.txt` ausgewählt, Explorer-Auswahl über den eigenen Hilfsprozess korrekt gelesen, Radialmenü über Strg+Leertaste geöffnet und PDF per Zifferntaste erstellt. Erfolgreicher Auftrag in `test-results/native-profile/history.json`.
|
- **Live-Explorer-Test**: `Beispiel.txt` ausgewählt, Explorer-Auswahl über den eigenen Hilfsprozess korrekt gelesen, Radialmenü über Strg+Leertaste geöffnet und PDF per Zifferntaste erstellt. Erfolgreicher Auftrag in `test-results/native-profile/history.json`.
|
||||||
- **MakeAppx-Paketvalidierung und Entwicklungssignatur**. Buildprotokoll: `build/makeappx-Development.log`. Identität und SHA-256: `out/msix/build-Development.json`.
|
- **MakeAppx-Paketvalidierung und Entwicklungssignatur**. Buildprotokoll: `build/makeappx-Development.log`. Identität und SHA-256: `out/msix/build-Development.json`.
|
||||||
- **MSIX-Integrität**: Alle 457 Blockmap-Payloads und vollständigen Dateihashes stimmen. Die CMS-Signatur wurde kryptografisch geprüft, ohne den Vertrauensspeicher zu ändern. Nachweise: `test-results/msix-integrity.json` und `test-results/msix-signature.json`.
|
- **Aktualisiertes Entwicklungs-MSIX**: Alle 459 Blockmap-Payloads und vollständigen Dateihashes stimmen. Die CMS-Signatur wurde kryptografisch geprüft, ohne den Vertrauensspeicher zu ändern. Nachweise: `test-results/msix-integrity.json` und `test-results/msix-signature.json`.
|
||||||
- **Store-Konfigurationsprüfung**: Ein Store-Build mit leeren Partner-Center-Werten wird vor Erstellung abgewiesen.
|
- **Store-MSIX**: MakeAppx-Validierung, alle 459 Blockmap-Payloads und vollständigen Dateihashes sowie die Übereinstimmung von Paketname, Publisher, PublisherDisplayName und Version mit `identity.store.json` geprüft. Das Store-Paket ist absichtlich unsigniert. Nachweis mit SHA-256 und Paketgröße: `store/package-check.json`.
|
||||||
|
- **Store-Konfiguration**: Die vom Herausgeber bestätigte Identität `Nordik.dev.FileBow` ist eingetragen; Store-ID `9N3MJ7558CNZ`. Ein Store-Build mit leeren Partner-Center-Werten wird vor Erstellung abgewiesen.
|
||||||
- Vier echte App-Screenshots mit 1600 × 900 Pixeln in `store/screenshots`.
|
- Vier echte App-Screenshots mit 1600 × 900 Pixeln in `store/screenshots`.
|
||||||
|
|
||||||
|
Zusätzlich geprüft: PNG-Alphakanal einschließlich Palettentransparenz, WebP-Formaterhalt, exakte Probegrößen für Bild/PDF, temporäre Bereinigung nach Prognosen und bitratenbasierte Videoprognose.
|
||||||
|
|
||||||
## Noch nicht bestätigt
|
## Noch nicht bestätigt
|
||||||
|
|
||||||
- Installation/Update/Deinstallation des MSIX auf einer sauberen Windows-Installation.
|
- Installation/Update/Deinstallation des MSIX auf einer sauberen Windows-Installation.
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ def save_output(source, suffix, writer, name=None):
|
|||||||
|
|
||||||
def image_load(file):
|
def image_load(file):
|
||||||
with Image.open(file) as image:
|
with Image.open(file) as image:
|
||||||
return ImageOps.exif_transpose(image).copy()
|
image=ImageOps.exif_transpose(image)
|
||||||
|
if image.mode=='LA' or 'transparency' in image.info: image=image.convert('RGBA')
|
||||||
|
return image.copy()
|
||||||
def image_write(image, out, target, quality=85):
|
def image_write(image, out, target, quality=85):
|
||||||
image.info.clear()
|
image.info.clear()
|
||||||
fmt = FORMATS[target]
|
fmt = FORMATS[target]
|
||||||
@@ -189,17 +191,26 @@ def convert(file,target,options):
|
|||||||
else: text_write(text_read(file),out,target)
|
else: text_write(text_read(file),out,target)
|
||||||
return save_output(file,target,writer,options.get('outputName'))
|
return save_output(file,target,writer,options.get('outputName'))
|
||||||
|
|
||||||
def compress(file,options):
|
def compression_format(file):
|
||||||
|
kind=ext(file)
|
||||||
|
if kind in IMAGE:
|
||||||
|
if kind in {'png','webp','avif'}: return kind
|
||||||
|
with Image.open(file) as image:
|
||||||
|
if 'A' in image.getbands() or 'transparency' in image.info: return 'png'
|
||||||
|
return 'jpg'
|
||||||
|
return 'mp4' if kind in VIDEO else 'mp3' if kind in AUDIO else 'pdf'
|
||||||
|
|
||||||
|
def compress(file,options,estimate=False):
|
||||||
kind=ext(file); quality=int(bounded(options.get('quality'),75,5,95))
|
kind=ext(file); quality=int(bounded(options.get('quality'),75,5,95))
|
||||||
limit=int(bounded(options.get('maxSizeMB'),0,0,100000)*1024*1024)
|
limit=int(bounded(options.get('maxSizeMB'),0,0,100000)*1024*1024)
|
||||||
suffix = ('jpg' if kind in IMAGE else 'mp4' if kind in VIDEO else 'mp3' if kind in AUDIO else 'pdf')
|
suffix = compression_format(file)
|
||||||
def writer(out):
|
def writer(out):
|
||||||
if kind in IMAGE:
|
if kind in IMAGE:
|
||||||
image=image_load(file)
|
image=image_load(file)
|
||||||
suffix_format='jpg'
|
suffix_format=suffix
|
||||||
for q in range(quality,4,-5):
|
for q in range(quality,4,-5):
|
||||||
image_write(image,out,suffix_format,q)
|
image_write(image,out,suffix_format,q)
|
||||||
if not limit or out.stat().st_size <= limit: break
|
if not limit or out.stat().st_size <= limit or suffix=='png': break
|
||||||
for _ in range(8):
|
for _ in range(8):
|
||||||
if not limit or out.stat().st_size <= limit: break
|
if not limit or out.stat().st_size <= limit: break
|
||||||
image.thumbnail((max(1,int(image.width*.8)),max(1,int(image.height*.8))))
|
image.thumbnail((max(1,int(image.width*.8)),max(1,int(image.height*.8))))
|
||||||
@@ -215,10 +226,27 @@ def compress(file,options):
|
|||||||
elif kind=='pdf':
|
elif kind=='pdf':
|
||||||
pdf=PdfWriter(clone_from=reader(file))
|
pdf=PdfWriter(clone_from=reader(file))
|
||||||
for page in pdf.pages: page.compress_content_streams()
|
for page in pdf.pages: page.compress_content_streams()
|
||||||
pdf.compress_identical_objects(remove_identicals=True,remove_orphans=True)
|
pdf.compress_identical_objects(remove_duplicates=True,remove_unreferenced=True)
|
||||||
pdf.write(out)
|
pdf.write(out)
|
||||||
else: raise ValueError('Diese Datei lässt sich nicht komprimieren.')
|
else: raise ValueError('Diese Datei lässt sich nicht komprimieren.')
|
||||||
return {'targetMet':not limit or out.stat().st_size<=limit}
|
return {'targetMet':not limit or out.stat().st_size<=limit}
|
||||||
|
if estimate:
|
||||||
|
original=Path(file).stat().st_size
|
||||||
|
if kind in VIDEO|AUDIO:
|
||||||
|
info=probe(file); duration=max(info['duration'],.1)
|
||||||
|
if kind in VIDEO:
|
||||||
|
bitrate=max(32000,int(limit*8/duration*.88-128000)) if limit else int(300000+quality*40000)
|
||||||
|
size=int(duration*(bitrate+(128000 if info['audio'] else 0))/8*1.03)
|
||||||
|
else:
|
||||||
|
bitrate=max(32,min(320,int(limit*8/duration/1000*.95))) if limit else max(32,int(quality*2.56))
|
||||||
|
size=int(duration*bitrate*1000/8*1.03)
|
||||||
|
exact=False
|
||||||
|
else:
|
||||||
|
with tempfile.TemporaryDirectory(prefix='.filebow-'+os.environ.get('FILEBOW_JOB_ID','local')+'-',dir=Path(file).parent) as folder:
|
||||||
|
emit({'type':'stage','directory':folder})
|
||||||
|
out=Path(folder)/('estimate.'+suffix); writer(out); size=out.stat().st_size
|
||||||
|
exact=True
|
||||||
|
return {'ok':True,'input':str(file),'size':size,'originalSize':original,'format':suffix,'exact':exact,'targetMet':not limit or size<=limit}
|
||||||
return save_output(file,suffix,writer,options.get('outputName'))
|
return save_output(file,suffix,writer,options.get('outputName'))
|
||||||
|
|
||||||
def edit(file,options):
|
def edit(file,options):
|
||||||
@@ -274,6 +302,7 @@ def combined(files,target,options):
|
|||||||
def dispatch(file,op,target,options):
|
def dispatch(file,op,target,options):
|
||||||
if op=='convert': return convert(file,target,options)
|
if op=='convert': return convert(file,target,options)
|
||||||
if op=='compress': return compress(file,options)
|
if op=='compress': return compress(file,options)
|
||||||
|
if op=='estimate-compression': return compress(file,options,estimate=True)
|
||||||
if op=='edit': return edit(file,options)
|
if op=='edit': return edit(file,options)
|
||||||
if op=='strip-metadata': return metadata(file,options)
|
if op=='strip-metadata': return metadata(file,options)
|
||||||
if op=='pdf-password':
|
if op=='pdf-password':
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Local radial file conversion and editing for Windows",
|
"description": "Local radial file conversion and editing for Windows",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": "FileBow",
|
"author": "Nordik.dev",
|
||||||
"main": "src/main.cjs",
|
"main": "src/main.cjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ param(
|
|||||||
[string]$SdkBin
|
[string]$SdkBin
|
||||||
)
|
)
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
|
. (Join-Path $PSScriptRoot 'hash-file.ps1')
|
||||||
$projectRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
|
$projectRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
|
||||||
if (-not $IdentityFile) { $IdentityFile = Join-Path $projectRoot $(if ($Channel -eq 'Store') { 'store\identity.store.json' } else { 'store\identity.dev.json' }) }
|
if (-not $IdentityFile) { $IdentityFile = Join-Path $projectRoot $(if ($Channel -eq 'Store') { 'store\identity.store.json' } else { 'store\identity.dev.json' }) }
|
||||||
$identity = Get-Content -LiteralPath $IdentityFile -Raw | ConvertFrom-Json
|
$identity = Get-Content -LiteralPath $IdentityFile -Raw | ConvertFrom-Json
|
||||||
@@ -70,6 +71,9 @@ $packLog = Join-Path $projectRoot "build\makeappx-$Channel.log"
|
|||||||
if ($LASTEXITCODE -ne 0) { throw 'MakeAppx-Validierung fehlgeschlagen.' }
|
if ($LASTEXITCODE -ne 0) { throw 'MakeAppx-Validierung fehlgeschlagen.' }
|
||||||
$certificatePath = $null
|
$certificatePath = $null
|
||||||
if ($SignDevelopment) {
|
if ($SignDevelopment) {
|
||||||
|
# Load Windows modules explicitly when the parent shell supplies a different PSModulePath.
|
||||||
|
Import-Module (Join-Path $PSHOME 'Modules\Microsoft.PowerShell.Security\Microsoft.PowerShell.Security.psd1') -ErrorAction Stop
|
||||||
|
Import-Module (Join-Path $env:WINDIR 'System32\WindowsPowerShell\v1.0\Modules\PKI\PKI.psd1') -ErrorAction Stop
|
||||||
$certificate = Get-ChildItem Cert:\CurrentUser\My | Where-Object { $_.Subject -eq $identity.Publisher -and $_.FriendlyName -eq 'FileBow local development' -and $_.HasPrivateKey -and $_.NotAfter -gt (Get-Date).AddDays(7) } | Select-Object -First 1
|
$certificate = Get-ChildItem Cert:\CurrentUser\My | Where-Object { $_.Subject -eq $identity.Publisher -and $_.FriendlyName -eq 'FileBow local development' -and $_.HasPrivateKey -and $_.NotAfter -gt (Get-Date).AddDays(7) } | Select-Object -First 1
|
||||||
if (-not $certificate) {
|
if (-not $certificate) {
|
||||||
$certificate = New-SelfSignedCertificate -Type Custom -Subject $identity.Publisher -FriendlyName 'FileBow local development' -CertStoreLocation Cert:\CurrentUser\My -KeyUsage DigitalSignature -KeyExportPolicy NonExportable -TextExtension @('2.5.29.37={text}1.3.6.1.5.5.7.3.3','2.5.29.19={text}') -NotAfter (Get-Date).AddYears(1)
|
$certificate = New-SelfSignedCertificate -Type Custom -Subject $identity.Publisher -FriendlyName 'FileBow local development' -CertStoreLocation Cert:\CurrentUser\My -KeyUsage DigitalSignature -KeyExportPolicy NonExportable -TextExtension @('2.5.29.37={text}1.3.6.1.5.5.7.3.3','2.5.29.19={text}') -NotAfter (Get-Date).AddYears(1)
|
||||||
@@ -79,6 +83,6 @@ if ($SignDevelopment) {
|
|||||||
$certificatePath = Join-Path $outputDir 'FileBow-Development.cer'
|
$certificatePath = Join-Path $outputDir 'FileBow-Development.cer'
|
||||||
Export-Certificate -Cert $certificate -FilePath $certificatePath -Force | Out-Null
|
Export-Certificate -Cert $certificate -FilePath $certificatePath -Force | Out-Null
|
||||||
}
|
}
|
||||||
$record = @{ Channel=$Channel; Package=$package; Stage=$stage; Identity=$identity; Signed=[bool]$SignDevelopment; Certificate=$certificatePath; SHA256=(Get-FileHash $package -Algorithm SHA256).Hash; BuiltAt=(Get-Date).ToUniversalTime().ToString('o') }
|
$record = @{ Channel=$Channel; Package=$package; Stage=$stage; Identity=$identity; Signed=[bool]$SignDevelopment; Certificate=$certificatePath; SHA256=(Get-FileBowSha256 $package); BuiltAt=(Get-Date).ToUniversalTime().ToString('o') }
|
||||||
$record | ConvertTo-Json -Depth 5 | Set-Content (Join-Path $outputDir "build-$Channel.json") -Encoding utf8
|
$record | ConvertTo-Json -Depth 5 | Set-Content (Join-Path $outputDir "build-$Channel.json") -Encoding utf8
|
||||||
Write-Output $package
|
Write-Output $package
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
[CmdletBinding()]param()
|
[CmdletBinding()]param()
|
||||||
$ErrorActionPreference='Stop'
|
$ErrorActionPreference='Stop'
|
||||||
|
. (Join-Path $PSScriptRoot 'hash-file.ps1')
|
||||||
$root=[IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
|
$root=[IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
|
||||||
$download=Join-Path $root 'build\downloads\ffmpeg-lgpl.zip'
|
$download=Join-Path $root 'build\downloads\ffmpeg-lgpl.zip'
|
||||||
$url='https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2026-10-25-13-00/ffmpeg-n9.0.2-36-g6882969ce9-win64-lgpl-shared-9.0.zip'
|
$url='https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2026-10-25-13-00/ffmpeg-n9.0.2-36-g6882969ce9-win64-lgpl-shared-9.0.zip'
|
||||||
$expected='72E3FBAF17F8D5162C3010F9E58872FCB93BA2B03731FD0FFF1CA9AABB616EA6'
|
$expected='72E3FBAF17F8D5162C3010F9E58872FCB93BA2B03731FD0FFF1CA9AABB616EA6'
|
||||||
New-Item -ItemType Directory -Force (Split-Path $download) | Out-Null
|
New-Item -ItemType Directory -Force (Split-Path $download) | Out-Null
|
||||||
if (-not (Test-Path $download)) { Invoke-WebRequest $url -OutFile $download }
|
if (-not (Test-Path $download)) { Invoke-WebRequest $url -OutFile $download }
|
||||||
if ((Get-FileHash $download -Algorithm SHA256).Hash -ne $expected) { throw 'FFmpeg-Prüfsumme stimmt nicht überein.' }
|
if ((Get-FileBowSha256 $download) -ne $expected) { throw 'FFmpeg-Prüfsumme stimmt nicht überein.' }
|
||||||
$unpack=Join-Path $root 'build\downloads\ffmpeg'
|
$unpack=Join-Path $root 'build\downloads\ffmpeg'
|
||||||
Expand-Archive $download $unpack -Force
|
Expand-Archive $download $unpack -Force
|
||||||
$source=Join-Path $unpack 'ffmpeg-n9.0.2-36-g6882969ce9-win64-lgpl-shared-9.0'
|
$source=Join-Path $unpack 'ffmpeg-n9.0.2-36-g6882969ce9-win64-lgpl-shared-9.0'
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
function Get-FileBowSha256([string]$Path) {
|
||||||
|
$stream = [IO.File]::OpenRead([IO.Path]::GetFullPath($Path))
|
||||||
|
$algorithm = [Security.Cryptography.SHA256]::Create()
|
||||||
|
try { return [BitConverter]::ToString($algorithm.ComputeHash($stream)).Replace('-', '') }
|
||||||
|
finally { $algorithm.Dispose(); $stream.Dispose() }
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
# Run explicitly in an elevated PowerShell. Trusts only the FileBow development certificate.
|
# Run explicitly in an elevated PowerShell. Trusts only the FileBow development certificate.
|
||||||
[CmdletBinding()]param()
|
[CmdletBinding()]param()
|
||||||
$ErrorActionPreference='Stop'
|
$ErrorActionPreference='Stop'
|
||||||
|
. (Join-Path $PSScriptRoot 'hash-file.ps1')
|
||||||
$root=[IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
|
$root=[IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
|
||||||
$record=Get-Content (Join-Path $root 'out\msix\build-Development.json') -Raw | ConvertFrom-Json
|
$record=Get-Content (Join-Path $root 'out\msix\build-Development.json') -Raw | ConvertFrom-Json
|
||||||
if (-not $record.Signed) { throw 'Zuerst build-msix.ps1 -SignDevelopment ausführen.' }
|
if (-not $record.Signed) { throw 'Zuerst build-msix.ps1 -SignDevelopment ausführen.' }
|
||||||
if ((Get-FileHash $record.Package -Algorithm SHA256).Hash -ne $record.SHA256) { throw 'Paket-Prüfsumme stimmt nicht überein.' }
|
if ((Get-FileBowSha256 $record.Package) -ne $record.SHA256) { throw 'Paket-Prüfsumme stimmt nicht überein.' }
|
||||||
$cert=[Security.Cryptography.X509Certificates.X509Certificate2]::new($record.Certificate)
|
$cert=[Security.Cryptography.X509Certificates.X509Certificate2]::new($record.Certificate)
|
||||||
if ($cert.Subject -ne 'CN=FileBow Development') { throw 'Unerwartetes Zertifikat.' }
|
if ($cert.Subject -ne 'CN=FileBow Development') { throw 'Unerwartetes Zertifikat.' }
|
||||||
Import-Certificate -FilePath $record.Certificate -CertStoreLocation Cert:\LocalMachine\TrustedPeople | Out-Null
|
Import-Certificate -FilePath $record.Certificate -CertStoreLocation Cert:\LocalMachine\TrustedPeople | Out-Null
|
||||||
|
|||||||
+17
-2
@@ -1,5 +1,6 @@
|
|||||||
"""Verify every uncompressed 64 KiB payload hash in an MSIX block map."""
|
"""Verify every uncompressed 64 KiB payload hash in an MSIX block map."""
|
||||||
import base64
|
import base64
|
||||||
|
import argparse
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -7,7 +8,12 @@ import sys
|
|||||||
import zipfile
|
import zipfile
|
||||||
from xml.etree import ElementTree as ET
|
from xml.etree import ElementTree as ET
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
package=Path(sys.argv[1]);count=0
|
parser=argparse.ArgumentParser()
|
||||||
|
parser.add_argument('package',type=Path)
|
||||||
|
parser.add_argument('--allow-unsigned',action='store_true')
|
||||||
|
parser.add_argument('--identity',type=Path)
|
||||||
|
args=parser.parse_args()
|
||||||
|
package=args.package;count=0
|
||||||
with zipfile.ZipFile(package) as archive:
|
with zipfile.ZipFile(package) as archive:
|
||||||
names={unquote(name):name for name in archive.namelist()}
|
names={unquote(name):name for name in archive.namelist()}
|
||||||
tree=ET.fromstring(archive.read('AppxBlockMap.xml'))
|
tree=ET.fromstring(archive.read('AppxBlockMap.xml'))
|
||||||
@@ -25,6 +31,15 @@ with zipfile.ZipFile(package) as archive:
|
|||||||
assert not payload.read(1),name
|
assert not payload.read(1),name
|
||||||
assert size==int(file.attrib['Size']),name
|
assert size==int(file.attrib['Size']),name
|
||||||
count+=1
|
count+=1
|
||||||
assert 'AppxSignature.p7x' in archive.namelist(),'Development package is unsigned'
|
signed='AppxSignature.p7x' in archive.namelist()
|
||||||
|
assert args.allow_unsigned or signed,'Package is unsigned; use --allow-unsigned for Store packages'
|
||||||
|
manifest=ET.fromstring(archive.read('AppxManifest.xml'))
|
||||||
|
namespace={'m':'http://schemas.microsoft.com/appx/manifest/foundation/windows10'}
|
||||||
|
identity=manifest.find('m:Identity',namespace).attrib
|
||||||
|
if args.identity:
|
||||||
|
expected=json.loads(args.identity.read_text(encoding='utf-8-sig'))
|
||||||
|
for key in ['Name','Publisher','Version']: assert identity[key]==expected[key],f'Identity mismatch: {key}'
|
||||||
|
assert manifest.find('m:Properties/m:PublisherDisplayName',namespace).text==expected['PublisherDisplayName']
|
||||||
print(json.dumps({'package':str(package),'payloads':count,'blockHashesValid':True,
|
print(json.dumps({'package':str(package),'payloads':count,'blockHashesValid':True,
|
||||||
|
'signaturePresent':signed,'identity':identity,
|
||||||
'sha256':hashlib.sha256(package.read_bytes()).hexdigest()},indent=2))
|
'sha256':hashlib.sha256(package.read_bytes()).hexdigest()},indent=2))
|
||||||
+7
-1
@@ -81,7 +81,13 @@ async function runAction(files, option) {
|
|||||||
}
|
}
|
||||||
if (!files.length) throw new Error('Keine passenden Dateien für diese Aktion.');
|
if (!files.length) throw new Error('Keine passenden Dateien für diese Aktion.');
|
||||||
job = { op: option.op, files, target: option.target, options: {} };
|
job = { op: option.op, files, target: option.target, options: {} };
|
||||||
if (option.op === 'compress') {
|
if (option.op === 'choose-format') {
|
||||||
|
files = files.filter(file => categoryOf(file) === 'image');
|
||||||
|
const result = await openDialog(engine, 'format', files);
|
||||||
|
if (!result) return;
|
||||||
|
if (!['jpg','png','webp','gif','avif','tiff','ico','bmp','heic','heif','pdf'].includes(result)) throw new Error('Ungültiges Bildformat.');
|
||||||
|
job = { op: 'convert', files, target: result, options: {} };
|
||||||
|
} else if (option.op === 'compress') {
|
||||||
const result = await openDialog(engine, 'compress', files);
|
const result = await openDialog(engine, 'compress', files);
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
job.options = result;
|
job.options = result;
|
||||||
|
|||||||
@@ -3,6 +3,17 @@ const path = require('node:path');
|
|||||||
const { pathToFileURL } = require('node:url');
|
const { pathToFileURL } = require('node:url');
|
||||||
const theme = require('./theme.cjs');
|
const theme = require('./theme.cjs');
|
||||||
const dialogs = new Map();
|
const dialogs = new Map();
|
||||||
|
ipcMain.handle('filebow-dialog:estimate', async (event, options) => {
|
||||||
|
const dialog = dialogs.get(event.sender.id);
|
||||||
|
if (!dialog || dialog.config.type !== 'compress') throw new Error('Unexpected sender');
|
||||||
|
dialog.estimateController?.abort();
|
||||||
|
const controller = new AbortController(); dialog.estimateController = controller;
|
||||||
|
try {
|
||||||
|
const result = (await dialog.engine.run({ op: 'estimate-compression', files: [dialog.file],
|
||||||
|
options: { quality: options?.quality, maxSizeMB: options?.maxSizeMB } }, undefined, controller.signal))[0];
|
||||||
|
if (!result.ok) throw new Error(result.error); return result;
|
||||||
|
} catch (error) { if (controller.signal.aborted) return null; throw error; }
|
||||||
|
});
|
||||||
ipcMain.handle('filebow-dialog:initialize', event => {
|
ipcMain.handle('filebow-dialog:initialize', event => {
|
||||||
const dialog = dialogs.get(event.sender.id); if (!dialog) throw new Error('Unexpected sender'); return dialog.config;
|
const dialog = dialogs.get(event.sender.id); if (!dialog) throw new Error('Unexpected sender'); return dialog.config;
|
||||||
});
|
});
|
||||||
@@ -28,6 +39,7 @@ async function openDialog(engine, type, files, mode) {
|
|||||||
ipcMain.on('filebow-dialog:submit', submit);
|
ipcMain.on('filebow-dialog:submit', submit);
|
||||||
const windowId = window.webContents.id;
|
const windowId = window.webContents.id;
|
||||||
window.on('closed', () => { ipcMain.off('filebow-dialog:submit', submit);
|
window.on('closed', () => { ipcMain.off('filebow-dialog:submit', submit);
|
||||||
|
dialogs.get(windowId)?.estimateController?.abort();
|
||||||
dialogs.delete(windowId); resolve(result); });
|
dialogs.delete(windowId); resolve(result); });
|
||||||
try { await window.loadFile(path.join(__dirname,'../renderer/dialog/index.html')); window.show(); }
|
try { await window.loadFile(path.join(__dirname,'../renderer/dialog/index.html')); window.show(); }
|
||||||
catch (error) { window.destroy(); reject(error); }
|
catch (error) { window.destroy(); reject(error); }
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ function describeSelection(files) {
|
|||||||
function wheelContent(files, mode = 'quick') {
|
function wheelContent(files, mode = 'quick') {
|
||||||
const kind = dominantCategory(files);
|
const kind = dominantCategory(files);
|
||||||
const formats = {
|
const formats = {
|
||||||
image: ['jpg','png','webp','avif','tiff','ico','pdf'],
|
image: ['jpg','png','webp','gif','avif','pdf'],
|
||||||
video: ['mp4','webm','gif'], audio: ['mp3','wav','m4a','flac','ogg'],
|
video: ['mp4','webm','gif'], audio: ['mp3','wav','m4a','flac','ogg'],
|
||||||
pdf: ['txt','md','docx'], text: ['txt','md','pdf','docx'], office: ['txt','md','pdf'], other: [],
|
pdf: ['txt','md','docx'], text: ['txt','md','pdf','docx'], office: ['txt','md','pdf'], other: [],
|
||||||
};
|
};
|
||||||
@@ -40,6 +40,8 @@ function wheelContent(files, mode = 'quick') {
|
|||||||
text: [combine,zip], office:[combine,zip], other:[zip],
|
text: [combine,zip], office:[combine,zip], other:[zip],
|
||||||
}[kind];
|
}[kind];
|
||||||
} else {
|
} else {
|
||||||
|
if (kind === 'image') options.push(action('more-formats','Weitere Formate','choose-format'));
|
||||||
|
if (kind === 'video') options.push(action('extract-audio','MP3','extract-audio',{target:'mp3'}));
|
||||||
if (kind === 'pdf' && files.length > 1) options.push(combine);
|
if (kind === 'pdf' && files.length > 1) options.push(combine);
|
||||||
if (options.length < 7) options.push(zip);
|
if (options.length < 7) options.push(zip);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ const { contextBridge, ipcRenderer } = require('electron');
|
|||||||
contextBridge.exposeInMainWorld('filebowDialog', {
|
contextBridge.exposeInMainWorld('filebowDialog', {
|
||||||
init: () => ipcRenderer.invoke('filebow-dialog:initialize'),
|
init: () => ipcRenderer.invoke('filebow-dialog:initialize'),
|
||||||
preview: () => ipcRenderer.invoke('filebow-dialog:preview'),
|
preview: () => ipcRenderer.invoke('filebow-dialog:preview'),
|
||||||
|
estimate: options => ipcRenderer.invoke('filebow-dialog:estimate', options),
|
||||||
submit: value => ipcRenderer.send('filebow-dialog:submit', value),
|
submit: value => ipcRenderer.send('filebow-dialog:submit', value),
|
||||||
});
|
});
|
||||||
@@ -20,9 +20,27 @@ async function init(){
|
|||||||
$('#filename').textContent=items.length===1?items[0].name:`${items.length} Dateien`;
|
$('#filename').textContent=items.length===1?items[0].name:`${items.length} Dateien`;
|
||||||
const content=$('#content');
|
const content=$('#content');
|
||||||
if(config.type==='compress'){
|
if(config.type==='compress'){
|
||||||
$('#title').textContent='Komprimieren';content.append(text('Bilder werden als JPEG, Videos als MP4 und Audio als MP3 gespeichert. PDFs behalten ihr Format.'));
|
$('#title').textContent='Komprimieren';content.append(text('PNG, WebP und AVIF behalten ihr Format. Andere Bilder werden als JPEG gespeichert, bei Transparenz als PNG. Videos werden MP4, Audio MP3. PDFs behalten ihr Format.'));
|
||||||
const q=field('Qualität: 75 %','quality','range',75);q.lastChild.min=5;q.lastChild.max=95;q.lastChild.oninput=e=>q.firstChild.textContent=`Qualität: ${e.target.value} %`;content.append(q,field('Maximale Größe pro Datei (MB, optional)','maxSizeMB','number',''));
|
const q=field('Qualität: 75 %','quality','range',75);q.lastChild.min=5;q.lastChild.max=95;q.lastChild.oninput=e=>q.firstChild.textContent=`Qualität: ${e.target.value} %`;content.append(q,field('Maximale Größe pro Datei (MB, optional)','maxSizeMB','number',''));
|
||||||
$('#maxSizeMB').step='.1';content.append(text('Eine Zielgröße ist bei manchen Dateien nicht erreichbar. Das Ergebnis wird dann entsprechend gekennzeichnet.'));
|
$('#maxSizeMB').step='.1';content.append(text('Eine Zielgröße ist bei manchen Dateien nicht erreichbar. Das Ergebnis wird dann entsprechend gekennzeichnet.'));
|
||||||
|
content.append(text('PNG wird verlustfrei optimiert. Eine kleinere Zielgröße kann die Bildabmessungen verringern.'));
|
||||||
|
const estimate=text('Größe wird berechnet …');estimate.id='estimate';estimate.setAttribute('aria-live','polite');content.append(estimate);
|
||||||
|
if(items.length>1)content.append(text(`Die Prognose bezieht sich auf ${items[0].name}. Die Einstellungen gelten für alle ausgewählten Dateien.`));
|
||||||
|
let timer, revision=0;
|
||||||
|
const bytes=value=>value<1024*1024?`${(value/1024).toLocaleString('de-DE',{maximumFractionDigits:1})} KB`:`${(value/1024/1024).toLocaleString('de-DE',{maximumFractionDigits:2})} MB`;
|
||||||
|
const update=()=>{const current=++revision;clearTimeout(timer);estimate.textContent='Größe wird berechnet …';timer=setTimeout(async()=>{try{
|
||||||
|
const result=await api.estimate({quality:Number($('#quality').value),maxSizeMB:Number($('#maxSizeMB').value)});
|
||||||
|
if(current!==revision||!result)return;
|
||||||
|
const change=result.originalSize?Math.round((1-result.size/result.originalSize)*100):0;
|
||||||
|
estimate.textContent=`${result.exact?'Voraussichtliche Größe':'Geschätzte Größe'}: ${bytes(result.size)} (${result.format.toUpperCase()}) · ${change>=0?`${change} % kleiner`:`${-change} % größer`} als ${bytes(result.originalSize)}${result.targetMet?'':' · Zielgröße voraussichtlich nicht erreichbar'}`;
|
||||||
|
}catch(e){if(current===revision)estimate.textContent=`Keine Prognose verfügbar: ${e.message}`;}},500);};
|
||||||
|
$('#quality').addEventListener('input',update);$('#maxSizeMB').addEventListener('input',update);update();
|
||||||
|
}else if(config.type==='format'){
|
||||||
|
$('#title').textContent='Bildformat wählen';
|
||||||
|
const row=document.createElement('label');row.className='field';row.append(document.createTextNode('Ausgabeformat'));
|
||||||
|
const select=document.createElement('select');select.id='format';
|
||||||
|
for(const fmt of ['jpg','png','webp','gif','avif','tiff','ico','bmp','heic','heif','pdf']){const option=document.createElement('option');option.value=fmt;option.textContent=fmt.toUpperCase();select.append(option);}
|
||||||
|
row.append(select);content.append(row);
|
||||||
}else if(config.type==='password'){
|
}else if(config.type==='password'){
|
||||||
$('#title').textContent=config.mode==='add'?'PDF mit Passwort schützen':'PDF-Passwort entfernen';
|
$('#title').textContent=config.mode==='add'?'PDF mit Passwort schützen':'PDF-Passwort entfernen';
|
||||||
content.append(field(config.mode==='add'?'Neues Passwort':'Aktuelles Passwort','password','password'));
|
content.append(field(config.mode==='add'?'Neues Passwort':'Aktuelles Passwort','password','password'));
|
||||||
@@ -45,7 +63,7 @@ async function init(){
|
|||||||
$('#save').disabled=false;
|
$('#save').disabled=false;
|
||||||
}catch(e){error(e.message);}
|
}catch(e){error(e.message);}
|
||||||
}
|
}
|
||||||
if(config.type!=='combine'&&config.type!=='password')content.append(field('Dateiname (optional, ohne Endung)','outputName','text'));
|
if(!['combine','password','format'].includes(config.type))content.append(field('Dateiname (optional, ohne Endung)','outputName','text'));
|
||||||
}
|
}
|
||||||
$('#cancel').onclick=()=>api.submit(null);
|
$('#cancel').onclick=()=>api.submit(null);
|
||||||
$('#save').onclick=()=>{
|
$('#save').onclick=()=>{
|
||||||
@@ -53,6 +71,7 @@ $('#save').onclick=()=>{
|
|||||||
const invalid=[...document.querySelectorAll('input')].find(input=>!input.checkValidity());if(invalid){invalid.reportValidity();return;}
|
const invalid=[...document.querySelectorAll('input')].find(input=>!input.checkValidity());if(invalid){invalid.reportValidity();return;}
|
||||||
if(config.type==='password'){const password=$('#password').value;if(!password)return error('Bitte ein Passwort eingeben.');if(config.mode==='add'&&password!==$('#confirm').value)return error('Die Passwörter stimmen nicht überein.');return api.submit(password);}
|
if(config.type==='password'){const password=$('#password').value;if(!password)return error('Bitte ein Passwort eingeben.');if(config.mode==='add'&&password!==$('#confirm').value)return error('Die Passwörter stimmen nicht überein.');return api.submit(password);}
|
||||||
if(config.type==='combine')return api.submit({files:items.map(x=>x.path),format:$('#format').value});
|
if(config.type==='combine')return api.submit({files:items.map(x=>x.path),format:$('#format').value});
|
||||||
|
if(config.type==='format')return api.submit($('#format').value);
|
||||||
const result={};for(const id of ['quality','maxSizeMB','width','height','rotate','time']){if($('#'+id)&&$('#'+id).value!=='')result[id]=Number($('#'+id).value);}
|
const result={};for(const id of ['quality','maxSizeMB','width','height','rotate','time']){if($('#'+id)&&$('#'+id).value!=='')result[id]=Number($('#'+id).value);}
|
||||||
for(const id of ['flipH','flipV'])if($('#'+id))result[id]=$('#'+id).checked;
|
for(const id of ['flipH','flipV'])if($('#'+id))result[id]=$('#'+id).checked;
|
||||||
if(config.type==='edit'&&config.mode==='crop'){if(!crop||crop.width<2||crop.height<2)return error('Bitte einen Bildbereich auswählen.');result.crop=crop;}
|
if(config.type==='edit'&&config.mode==='crop'){if(!crop||crop.width<2||crop.height<2)return error('Bitte einen Bildbereich auswählen.');result.crop=crop;}
|
||||||
|
|||||||
+3
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Stand
|
## Stand
|
||||||
|
|
||||||
Die Windows-x64-Anwendung und ein mit Entwicklungszertifikat signiertes MSIX sind gebaut. MakeAppx hat das Manifest und den Paketinhalt geprüft. Die portable App und der gebündelte Konverter wurden ausgeführt und getestet. Das ist keine Microsoft-Store-Zertifizierung.
|
Die Windows-x64-Anwendung, das Store-MSIX mit der bestätigten Produktidentität und ein mit Entwicklungszertifikat signiertes MSIX sind gebaut. MakeAppx hat das Manifest und den Paketinhalt geprüft. Die portable App und der gebündelte Konverter wurden ausgeführt und getestet. Das ist keine Microsoft-Store-Zertifizierung.
|
||||||
|
|
||||||
## Noch vom Herausgeber einzutragen
|
## Noch vom Herausgeber einzutragen
|
||||||
|
|
||||||
@@ -39,6 +39,8 @@ Die Dateien `identity.dev.json` und `FileBow-Development.cer` gehören nicht in
|
|||||||
|
|
||||||
## Hinweise für die Zertifizierung
|
## Hinweise für die Zertifizierung
|
||||||
|
|
||||||
|
Unter „Über FileBow“ gibt es einen freiwilligen Ko-fi-Link. Er öffnet ausschließlich die angegebene HTTPS-Seite im Standardbrowser. Es werden keine Funktionen freigeschaltet, keine Auftragsgrenzen aufgehoben und keine Zahlungsdaten durch FileBow verarbeitet. Die externe Zahlungsabwicklung bei der Einreichung in Partner Center angeben; siehe [Store-Richtlinie 10.8](https://learn.microsoft.com/en-us/windows/apps/publish/store-policies#108-financial-transactions).
|
||||||
|
|
||||||
Kein Testkonto und kein Kauf erforderlich. App öffnen, eine PNG/JPEG-Datei auswählen und auf PNG/WebP/JPEG klicken. Ergebnis wird als neue Datei daneben gespeichert. Im Explorer eine Textdatei markieren, Strg+Leertaste drücken und PDF wählen. Alt+Leertaste zeigt Werkzeuge. Unter Einstellungen lassen sich Tastenkürzel und Hintergrundbetrieb abschalten. Zum vollständigen Beenden im Infobereich „Beenden“ wählen.
|
Kein Testkonto und kein Kauf erforderlich. App öffnen, eine PNG/JPEG-Datei auswählen und auf PNG/WebP/JPEG klicken. Ergebnis wird als neue Datei daneben gespeichert. Im Explorer eine Textdatei markieren, Strg+Leertaste drücken und PDF wählen. Alt+Leertaste zeigt Werkzeuge. Unter Einstellungen lassen sich Tastenkürzel und Hintergrundbetrieb abschalten. Zum vollständigen Beenden im Infobereich „Beenden“ wählen.
|
||||||
|
|
||||||
## Primärquellen
|
## Primärquellen
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"package": "FileBow_1.0.0.0_x64_Store.msix",
|
||||||
|
"payloads": 459,
|
||||||
|
"blockHashesValid": true,
|
||||||
|
"signaturePresent": false,
|
||||||
|
"identity": {
|
||||||
|
"Name": "Nordik.dev.FileBow",
|
||||||
|
"Publisher": "CN=B8FFF13C-C292-4FF8-84ED-3DDE06A7E9F2",
|
||||||
|
"Version": "1.0.0.0",
|
||||||
|
"ProcessorArchitecture": "x64"
|
||||||
|
},
|
||||||
|
"sha256": "73a80172dd778cca9f594b53066862e016310dc4c608a39be1196a423c103988",
|
||||||
|
"sizeBytes": 360673544,
|
||||||
|
"storeId": "9N3MJ7558CNZ"
|
||||||
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
@@ -15,3 +15,9 @@ test('all advertised file categories expose valid bounded radial actions',()=>{
|
|||||||
test('PDF password removal stays available without guessing encryption from bytes',()=>{
|
test('PDF password removal stays available without guessing encryption from bytes',()=>{
|
||||||
assert.ok(wheelContent(['encrypted.pdf'],'tools').options.some(x=>x.id==='password-remove'));
|
assert.ok(wheelContent(['encrypted.pdf'],'tools').options.some(x=>x.id==='password-remove'));
|
||||||
});
|
});
|
||||||
|
test('image GIF and further formats, and video audio extraction are reachable',()=>{
|
||||||
|
const images=wheelContent(['photo.png']).options;
|
||||||
|
assert.ok(images.some(x=>x.id==='convert-gif'));
|
||||||
|
assert.ok(images.some(x=>x.id==='more-formats'));
|
||||||
|
assert.ok(wheelContent(['clip.mp4']).options.some(x=>x.id==='extract-audio'));
|
||||||
|
});
|
||||||
@@ -68,6 +68,30 @@ class ConversionTests(unittest.TestCase):
|
|||||||
result=self.run_job('compress',[self.image],quality=65,maxSizeMB=.05)[0];self.assertTrue(result['targetMet'])
|
result=self.run_job('compress',[self.image],quality=65,maxSizeMB=.05)[0];self.assertTrue(result['targetMet'])
|
||||||
pdf=self.output('convert',[self.text],'pdf');self.output('compress',[pdf]);out=self.output('strip-metadata',[pdf]);self.assertFalse(PdfReader(out).metadata)
|
pdf=self.output('convert',[self.text],'pdf');self.output('compress',[pdf]);out=self.output('strip-metadata',[pdf]);self.assertFalse(PdfReader(out).metadata)
|
||||||
self.output('strip-metadata',[self.image]);self.output('strip-metadata',[self.video])
|
self.output('strip-metadata',[self.image]);self.output('strip-metadata',[self.video])
|
||||||
|
def test_compression_estimate_and_transparency(self):
|
||||||
|
before=set(self.root.iterdir())
|
||||||
|
estimate=self.run_job('estimate-compression',[self.image],quality=65)[0]
|
||||||
|
after=set(self.root.iterdir())-({self.root/'job.json'} if os.environ.get('FILEBOW_PACKAGED_ENGINE') else set())
|
||||||
|
self.assertEqual(before-({self.root/'job.json'}),after)
|
||||||
|
result=self.run_job('compress',[self.image],quality=65)[0]
|
||||||
|
self.assertEqual(estimate['size'],result['size']);self.assertTrue(estimate['exact'])
|
||||||
|
self.assertEqual(Path(result['output']).suffix,'.png')
|
||||||
|
with Image.open(result['output']) as image:
|
||||||
|
self.assertEqual(image.convert('RGBA').getpixel((0,0))[3],160)
|
||||||
|
webp=self.output('convert',[self.image],'webp')
|
||||||
|
result=self.run_job('compress',[webp],quality=55)[0]
|
||||||
|
self.assertEqual(Path(result['output']).suffix,'.webp')
|
||||||
|
with Image.open(result['output']) as image:self.assertIn('A',image.getbands())
|
||||||
|
palette=self.root/'Palette.png'
|
||||||
|
image=Image.new('P',(40,30),0);image.putpalette([255,0,0]+[0,0,0]*255);image.save(palette,transparency=0)
|
||||||
|
result=self.run_job('compress',[palette])[0]
|
||||||
|
with Image.open(result['output']) as image:self.assertEqual(image.convert('RGBA').getpixel((0,0))[3],0)
|
||||||
|
video=self.run_job('estimate-compression',[self.video],maxSizeMB=.1)[0]
|
||||||
|
self.assertFalse(video['exact']);self.assertGreater(video['size'],0)
|
||||||
|
pdf=self.output('convert',[self.text],'pdf')
|
||||||
|
estimate=self.run_job('estimate-compression',[pdf])[0]
|
||||||
|
result=self.run_job('compress',[pdf])[0]
|
||||||
|
self.assertEqual(estimate['size'],result['size'])
|
||||||
def test_media(self):
|
def test_media(self):
|
||||||
for fmt in ['mp4','webm','gif']:
|
for fmt in ['mp4','webm','gif']:
|
||||||
with self.subTest(fmt=fmt):self.output('convert',[self.video],fmt)
|
with self.subTest(fmt=fmt):self.output('convert',[self.video],fmt)
|
||||||
|
|||||||
+23
-5
@@ -1,5 +1,11 @@
|
|||||||
const { _electron: electron } = require('playwright');
|
const { _electron: electron } = require('playwright');
|
||||||
const fs=require('node:fs/promises'),path=require('node:path'),assert=require('node:assert/strict');
|
const fs=require('node:fs/promises'),path=require('node:path'),assert=require('node:assert/strict');
|
||||||
|
async function saveDialog(dialog){
|
||||||
|
const closed=dialog.waitForEvent('close');
|
||||||
|
try { await dialog.locator('#save').click({noWaitAfter:true}); }
|
||||||
|
catch(error){ if(!dialog.isClosed() || !String(error.message).includes('has been closed')) throw error; }
|
||||||
|
await closed;
|
||||||
|
}
|
||||||
const root=path.resolve(__dirname,'..'),out=path.join(root,'test-results');
|
const root=path.resolve(__dirname,'..'),out=path.join(root,'test-results');
|
||||||
(async()=>{
|
(async()=>{
|
||||||
await fs.mkdir(out,{recursive:true});
|
await fs.mkdir(out,{recursive:true});
|
||||||
@@ -20,26 +26,38 @@ const root=path.resolve(__dirname,'..'),out=path.join(root,'test-results');
|
|||||||
const pdf=updated.history[0].outputs[0];await page.evaluate(file=>window.orbit.selectFiles([file]),pdf);
|
const pdf=updated.history[0].outputs[0];await page.evaluate(file=>window.orbit.selectFiles([file]),pdf);
|
||||||
await page.locator('#tab-tools').click();
|
await page.locator('#tab-tools').click();
|
||||||
const passwordPromise=app.waitForEvent('window');await page.locator('[data-action="password-add"]').click();const password=await passwordPromise;
|
const passwordPromise=app.waitForEvent('window');await page.locator('[data-action="password-add"]').click();const password=await passwordPromise;
|
||||||
await password.locator('#password').fill('FileBow-Test');await password.locator('#confirm').fill('FileBow-Test');await password.locator('#save').click();
|
await password.locator('#password').fill('FileBow-Test');await password.locator('#confirm').fill('FileBow-Test');await saveDialog(password);
|
||||||
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
||||||
await page.evaluate(file=>window.orbit.selectFiles([file]),updated.history[0].outputs[0]);
|
await page.evaluate(file=>window.orbit.selectFiles([file]),updated.history[0].outputs[0]);
|
||||||
const unlockPromise=app.waitForEvent('window');await page.locator('[data-action="password-remove"]').click();const unlock=await unlockPromise;await unlock.locator('#password').fill('FileBow-Test');await unlock.locator('#save').click();
|
const unlockPromise=app.waitForEvent('window');await page.locator('[data-action="password-remove"]').click();const unlock=await unlockPromise;await unlock.locator('#password').fill('FileBow-Test');await saveDialog(unlock);
|
||||||
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
||||||
await page.evaluate(files=>window.orbit.selectFiles(files),[pdf,updated.history[0].outputs[0]]);
|
await page.evaluate(files=>window.orbit.selectFiles(files),[pdf,updated.history[0].outputs[0]]);
|
||||||
const combinePromise=app.waitForEvent('window');await page.locator('[data-action="combine"]').click();const combine=await combinePromise;await combine.locator('#save').click();
|
const combinePromise=app.waitForEvent('window');await page.locator('[data-action="combine"]').click();const combine=await combinePromise;await saveDialog(combine);
|
||||||
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
||||||
const imageFile=path.join(out,'Beispielbild.png');await fs.copyFile(path.join(root,'assets/icon.png'),imageFile);await page.evaluate(file=>window.orbit.selectFiles([file]),imageFile);
|
const imageFile=path.join(out,'Beispielbild.png');await fs.copyFile(path.join(root,'assets/icon.png'),imageFile);await page.evaluate(file=>window.orbit.selectFiles([file]),imageFile);
|
||||||
await page.locator('#tab-tools').click();
|
await page.locator('#tab-tools').click();
|
||||||
const dialogPromise=app.waitForEvent('window');await page.locator('[data-action="edit-resize"]').click();const edit=await dialogPromise;
|
const dialogPromise=app.waitForEvent('window');await page.locator('[data-action="edit-resize"]').click();const edit=await dialogPromise;
|
||||||
await edit.waitForSelector('#width',{timeout:30000});await edit.locator('#width').fill('96');await edit.screenshot({path:path.join(out,'02-resize.png')});
|
await edit.waitForSelector('#width',{timeout:30000});await edit.locator('#width').fill('96');await edit.screenshot({path:path.join(out,'02-resize.png')});
|
||||||
await edit.locator('#save').click();await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));
|
await saveDialog(edit);await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));
|
||||||
updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
||||||
const compressPromise=app.waitForEvent('window');await page.locator('[data-action="compress"]').click();const compress=await compressPromise;await compress.locator('#quality').fill('65');await compress.locator('#save').click();
|
const compressPromise=app.waitForEvent('window');await page.locator('[data-action="compress"]').click();const compress=await compressPromise;await compress.locator('#quality').fill('65');await compress.waitForFunction(()=>document.querySelector('#estimate').textContent.includes('Voraussichtliche Größe'),null,{timeout:30000});await compress.screenshot({path:path.join(out,'06-compression.png')});await saveDialog(compress);
|
||||||
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
|
||||||
|
assert.ok(updated.history[0].outputs[0].endsWith('.png'));
|
||||||
|
await page.locator('#tab-quick').click();
|
||||||
|
const formatsPromise=app.waitForEvent('window');await page.locator('[data-action="more-formats"]').click();const formats=await formatsPromise;
|
||||||
|
await formats.locator('#format').selectOption('tiff');await saveDialog(formats);
|
||||||
|
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');assert.ok(updated.history[0].outputs[0].endsWith('.tiff'));
|
||||||
|
await page.locator('[data-action="convert-gif"]').click();
|
||||||
|
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');assert.ok(updated.history[0].outputs[0].endsWith('.gif'));
|
||||||
const wheelPromise=app.waitForEvent('window');await page.locator('#wheel-open').click();const wheel=await wheelPromise;
|
const wheelPromise=app.waitForEvent('window');await page.locator('#wheel-open').click();const wheel=await wheelPromise;
|
||||||
await wheel.waitForSelector('.action');await wheel.screenshot({path:path.join(out,'03-wheel.png')});await wheel.keyboard.press('Escape');
|
await wheel.waitForSelector('.action');await wheel.screenshot({path:path.join(out,'03-wheel.png')});await wheel.keyboard.press('Escape');
|
||||||
await page.locator('[data-page="settings"]').click();await page.locator('#theme').selectOption('light');await page.waitForFunction(()=>document.documentElement.dataset.theme==='light');await page.screenshot({path:path.join(out,'04-settings-light.png')});
|
await page.locator('[data-page="settings"]').click();await page.locator('#theme').selectOption('light');await page.waitForFunction(()=>document.documentElement.dataset.theme==='light');await page.screenshot({path:path.join(out,'04-settings-light.png')});
|
||||||
await page.locator('#theme').selectOption('dark');await page.locator('[data-page="history"]').click();await page.screenshot({path:path.join(out,'05-history.png')});
|
await page.locator('#theme').selectOption('dark');await page.locator('[data-page="history"]').click();await page.screenshot({path:path.join(out,'05-history.png')});
|
||||||
|
await page.locator('[data-page="about"]').click();
|
||||||
|
await app.evaluate(({shell})=>{global.__supportUrls=[];shell.openExternal=async url=>{global.__supportUrls.push(url);};});
|
||||||
|
await page.locator('#support').click();
|
||||||
|
assert.deepEqual(await app.evaluate(()=>global.__supportUrls),['https://ko-fi.com/E0Z827VO8I']);
|
||||||
|
await page.screenshot({path:path.join(out,'07-about.png')});
|
||||||
assert.deepEqual(errors,[]);await fs.writeFile(path.join(out,'ui-result.json'),JSON.stringify({passed:true,native:state.native,history:updated.history.map(x=>({label:x.label,status:x.status})),errors},null,2));
|
assert.deepEqual(errors,[]);await fs.writeFile(path.join(out,'ui-result.json'),JSON.stringify({passed:true,native:state.native,history:updated.history.map(x=>({label:x.label,status:x.status})),errors},null,2));
|
||||||
console.log('UI smoke passed: startup, native bridge, conversion, PDF passwords, combining, compression, editor, radial menu, themes, history.');
|
console.log('UI smoke passed: startup, native bridge, conversion, PDF passwords, combining, compression, editor, radial menu, themes, history.');
|
||||||
}finally{await app.close();}
|
}finally{await app.close();}
|
||||||
|
|||||||
Reference in new issue
Block a user