Add Archive Utility-style native file handling#12
Merged
Conversation
Double-clicking a .wpress file now extracts silently next to the source, opens the result folder, and quits. The existing GUI workflow is preserved. Core changes: - Streaming CryptoUtils: new QIODevice-based API eliminates full-entry memory loading for large archives (e.g., 500MB SQL dumps) - QThread extraction: BackupFile::extract() runs on a worker thread, replacing the processEvents() hack. Both GUI and auto-extract use the same ExtractionWorker class - Static BackupFile::checkConfig() consolidates the duplicated config detection pattern across CLI, GUI, and auto-extract paths - AutoExtractor class: handles extraction queue (FIFO), single-instance IPC via QLocalServer, delayed progress window (2s), password dialog, QSystemTrayIcon notifications, and quit-on-completion - QSettings persistence for lastOpenPath, lastExtractPath, windowGeometry - macOS Dock badge progress via NSDockTile - Windows context menu registry verb in Qt IFW installer - Linux MIME type XML and .desktop file association with Actions Closes #1
Covers BackupFile (validation, extraction, abort), CryptoUtils streaming (plain copy, config passthrough, empty content, large files), ExtractionWorker (success, multifile, empty, corrupted, nonexistent, abort, phase signals), and QSettings persistence. Includes fixture generator and 4 .wpress test files (plain, empty, corrupted, multifile).
The qmake variable ${ASSETCATALOG_COMPILER_APPICON_NAME} resolved to
"Traktor.icns" (matching the TARGET name) but the actual icon file is
"traktor.icns" (lowercase). On case-insensitive filesystems this works
locally but can cause icon cache misses. Hardcode the correct filename.
…ype claim - Defer GUI/AutoExtractor decision on macOS: double-clicking a .wpress file sends QEvent::FileOpen after launch (no CLI args). A StartupFilter collects FileOpen events during a 300ms window, then picks auto-extract or GUI mode accordingly. - Fix progress bar invisible on Qt 5 + macOS 26: native QProgressBar rendering is broken. Use stylesheet with palette colors as workaround on macOS, native rendering on Windows/Linux. - Fix progress not updating: cross-thread signal relay from BackupFile to ExtractionWorker was unreliable due to QThread affinity. Progress is now stored in an atomic int by the worker and polled from the main thread via a 50ms QTimer. - Claim .wpress file type on launch via LSSetDefaultRoleHandlerForContentType so Traktor becomes the default handler even if another app (e.g. Keka) was previously associated. - Replace QProgressDialog with explicit QDialog + QProgressBar for reliable cross-platform rendering.
Instead of showing a generic error dialog when decryption fails, show the password dialog again so the user can retry. The user can cancel to skip the file.
The version placeholder replacement used github.ref_name (branch name with slashes) instead of env.VERSION, causing binarycreator to fail with "cannot find path" on branches like feature/foo.
The RegisterFileType operation references file.ico in the install directory but it was never copied there. Without it, .wpress files show a blank icon in Explorer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.wpressfile now extracts silently next to the source, opens the result folder, and quits — Archive Utility styleprocessEvents()hack — both GUI and auto-extract use the same workerNew files
extractionworker.h/cppautoextractor.h/cppdockprogress.h/mmdockprogress_stub.cppwpress.xmltests/Test plan
qmake Qtraktor.pro && makecd tests && qmake tests.pro && make && ./tst_qtraktor(35 pass)./Traktor.app/Contents/MacOS/Traktor /path/to/test.wpressCloses #1