Fix unsolicited radial menu activation by retiring global drag detection
This commit is contained in:
1 parent
569f0324d6
commit
e3c9581f3e
19 files changed
+112
-88
No files matched your search
@@ -29,7 +29,7 @@ Compression includes an optional target size and an output-size estimate. Transp
|
||||
2. Press **Ctrl + Space** for conversion or **Alt + Space** for editing tools.
|
||||
3. Pick an action. Output files are saved beside the originals without overwriting existing files.
|
||||
|
||||
Use number keys to choose radial-menu actions and **Esc** to close the menu.
|
||||
Use number keys to choose radial-menu actions and **Esc** to close the menu. The menu opens only through a shortcut or the **Open radial menu** button. Dragging files into the app window adds them without opening the menu.
|
||||
|
||||
Closing the window keeps FileBow in the system tray by default, so the shortcuts remain available for selected Explorer files. Enable **Start with Windows** to launch it automatically, or choose **Quit** from the tray menu to exit.
|
||||
|
||||
@@ -43,11 +43,11 @@ File processing happens on your PC. FileBow has no account requirement, telemetr
|
||||
|
||||
## Availability
|
||||
|
||||
Download the [Windows x64 portable ZIP](https://git.nordik.dev/nordik/FileBow/releases/tag/v1.0.1) from the releases page. Extract the entire archive and run `FileBow.exe` from the extracted folder. No installer, administrator access or Microsoft Store account is required. Keep the application files together.
|
||||
Download the [Windows x64 portable ZIP](https://git.nordik.dev/nordik/FileBow/releases/tag/v1.0.2) from the releases page. Extract the entire archive and run `FileBow.exe` from the extracted folder. No installer, administrator access or Microsoft Store account is required. Keep the application files together.
|
||||
|
||||
The portable download is not Authenticode-signed. Release notes include known limitations, and a SHA-256 checksum accompanies the ZIP. The Microsoft Store release is still in preparation. See the [build guide](docs/DEVELOPMENT.md) and [release checklist](store/RELEASE.md).
|
||||
|
||||
Document conversion extracts text rather than preserving page layout. Scanned PDFs require an existing text layer; legacy DOC and PPT files must first be saved as DOCX or PPTX. Image editing uses the first frame of animated files. Target file sizes are estimates, and some Explorer drag and multi-display scenarios still need validation.
|
||||
Document conversion extracts text rather than preserving page layout. Scanned PDFs require an existing text layer; legacy DOC and PPT files must first be saved as DOCX or PPTX. Image editing uses the first frame of animated files. Target file sizes are estimates, and additional multi-display scenarios still need validation.
|
||||
|
||||
## Built with
|
||||
|
||||
|
||||
+10
-6
@@ -32,8 +32,8 @@ pnpm build:store
|
||||
```
|
||||
|
||||
- `out/FileBow-win32-x64/FileBow.exe`: portable build; keep its entire directory together.
|
||||
- `out/msix/FileBow_1.0.1.0_x64_Development.msix`: signed with a local development certificate.
|
||||
- `out/msix/FileBow_1.0.1.0_x64_Store.msix`: unsigned Store submission package using `store/identity.store.json`.
|
||||
- `out/msix/FileBow_1.0.2.0_x64_Development.msix`: signed with a local development certificate.
|
||||
- `out/msix/FileBow_1.0.2.0_x64_Store.msix`: unsigned Store submission package using `store/identity.store.json`.
|
||||
|
||||
For a separate portable test build while the normal build is running, set `FILEBOW_BUILD_OUT=out/tab-fix` before `pnpm build`. To package that build, run `powershell -NoProfile -File scripts/build-msix.ps1 -Channel Store -AppDirectory out/tab-fix/FileBow-win32-x64`. Packaging rejects a version mismatch between the app and the MSIX identity.
|
||||
|
||||
@@ -41,7 +41,7 @@ To install the development package in a Windows test environment, run `scripts/i
|
||||
|
||||
## Verify
|
||||
|
||||
For a portable release, build the app, commit the intended source revision, then run `.venv/Scripts/python.exe scripts/build-release.py --tag v1.0.1`. The script creates a ZIP, startup notes, a source revision record and SHA-256 checksums under `out/releases`. Publish these as release assets rather than committing generated binaries to Git.
|
||||
For a portable release, build the app, commit the intended source revision, then run `.venv/Scripts/python.exe scripts/build-release.py --tag v1.0.2`. The script creates a ZIP, startup notes, a source revision record and SHA-256 checksums under `out/releases`. Publish these as release assets rather than committing generated binaries to Git.
|
||||
|
||||
```powershell
|
||||
pnpm test
|
||||
@@ -51,12 +51,12 @@ $env:FILEBOW_PACKAGED_ENGINE = (Resolve-Path vendor/engine/FileBowEngine.exe).Pa
|
||||
pnpm test:ui
|
||||
$env:FILEBOW_EXECUTABLE = (Resolve-Path out/FileBow-win32-x64/FileBow.exe).Path
|
||||
pnpm test:ui
|
||||
.venv/Scripts/python.exe scripts/verify-msix.py out/msix/FileBow_1.0.1.0_x64_Store.msix --allow-unsigned --identity store/identity.store.json
|
||||
.venv/Scripts/python.exe scripts/verify-msix.py out/msix/FileBow_1.0.2.0_x64_Store.msix --allow-unsigned --identity store/identity.store.json
|
||||
node scripts/capture-store.cjs
|
||||
node scripts/capture-wheel.cjs
|
||||
```
|
||||
|
||||
The worker tests check real conversions, encryption, image transparency, estimates, filename collisions and unchanged originals. UI checks use an isolated profile with global shortcuts and drag monitoring disabled. Screenshot capture uses sample files only. Local logs are in `test-results`.
|
||||
The worker tests check real conversions, encryption, image transparency, estimates, filename collisions and unchanged originals. UI checks use an isolated profile with global shortcuts disabled. Screenshot capture uses sample files only. Local logs are in `test-results`.
|
||||
|
||||
### Explorer tab selection
|
||||
|
||||
@@ -72,7 +72,7 @@ The helper matches the active tab's shell-browser window handle, since tabs shar
|
||||
| `src/renderer` | Main interface, editors and radial menu |
|
||||
| `src/preload` | Narrow IPC bridges for isolated renderers |
|
||||
| `engine/filebow_engine.py` | Local conversion worker and JSON-lines protocol |
|
||||
| `native/Program.cs`, `native/ExplorerSelection.cs` | Explorer selection, drag detection and Windows startup integration |
|
||||
| `native/Program.cs`, `native/ExplorerSelection.cs` | Explorer selection and Windows startup integration |
|
||||
| `scripts` | Runtime, application, package and screenshot builds |
|
||||
| `store` | Store identity, listing drafts, assets and submission checklist |
|
||||
|
||||
@@ -89,3 +89,7 @@ native dependency rebuild instructions. To regenerate the release ZIPs from a
|
||||
verified collection, run `python scripts/build-source-bundles.py out/sources/1.0.1
|
||||
--output out/releases/v1.0.1` on one line. The archives are ordinary independent
|
||||
ZIPs, each below 900 MiB. Publish all parts, the manifest and checksums together.
|
||||
|
||||
For FileBow 1.0.2, third-party binaries and their source collection are unchanged
|
||||
from 1.0.1. Use the v1.0.1 checkout when regenerating those dependency ZIPs;
|
||||
publish the changed application and helper sources with the v1.0.2 release.
|
||||
@@ -0,0 +1,20 @@
|
||||
# FileBow 1.0.2
|
||||
|
||||
Fixes the radial menu opening unexpectedly during ordinary mouse actions.
|
||||
|
||||
The previous global drag detector treated mouse movement with the left button held down as a file drag when Explorer had selected files. This heuristic has been removed, together with its setting. Existing profiles cannot reactivate it.
|
||||
|
||||
Open the radial menu with **Ctrl + Space**, **Alt + Space**, or **Open radial menu** in FileBow. Dragging files into the app window still works. Mouse movement, selection gestures and window dragging no longer activate the radial menu.
|
||||
|
||||
## Downloads
|
||||
|
||||
- **FileBow-1.0.2-win-x64.zip**: extract the whole archive and run `FileBow.exe`. Quit any older FileBow instance from its tray menu first. The portable build is not Authenticode-signed.
|
||||
- **FileBow_1.0.2.0_x64_Store.msix**: unsigned Partner Center submission package; Microsoft signs the distributed Store app.
|
||||
- **FileBow-1.0.2-source.zip**: application source for this release.
|
||||
- **SHA256SUMS.txt**: download checksums.
|
||||
|
||||
Third-party binaries are unchanged from 1.0.1. The same [dependency source downloads, patches and build instructions](https://git.nordik.dev/nordik/FileBow/releases/tag/v1.0.1) apply. FileBow's changed Windows helper is built from the source in this release.
|
||||
|
||||
Regression tests cover ignored legacy drag messages, upgraded settings and explicit menu activation. Packaged UI and MSIX validation are run for this update. WACK and Store certification must be performed for the new package; earlier reports do not certify it.
|
||||
|
||||
Missing a feature or found a bug? [Email filebow@nordik.dev](mailto:filebow@nordik.dev).
|
||||
+4
-2
@@ -44,8 +44,10 @@ their presence does not mean that they are linked into FileBow.
|
||||
Archive hashes and version/build evidence were checked. The native libraries
|
||||
were not all rebuilt from source, and the collection does not mirror the
|
||||
entire Chromium checkout or an offline toolchain. Its build guide identifies
|
||||
the relevant pinned sources and these verification limits. Earlier RC ZIPs
|
||||
and MSIX files are unchanged; use the 1.0.1 artifacts with this collection.
|
||||
the relevant pinned sources and these verification limits. The third-party binaries in FileBow 1.0.2 are unchanged from 1.0.1, so the
|
||||
same dependency source collection applies to both releases. The changed
|
||||
FileBow Windows helper is included in the 1.0.2 application source archive.
|
||||
Earlier release binaries are unchanged.
|
||||
|
||||
For the Store submission, provide the GNU GPL as the application license and
|
||||
link the corresponding source. Do not add application terms that restrict
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!doctype html><html lang="en"><meta charset="utf-8"><title>FileBow – License notices</title><style>body{font:15px system-ui;max-width:960px;margin:40px auto;padding:24px;line-height:1.6;color:#20232a}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px monospace}summary{cursor:pointer}a{color:#9a4518}</style><h1>FileBow – Third-party components</h1><p>The following components are distributed under their respective licenses. These notices do not change any rights granted by those licenses.</p><h2>FFmpeg</h2><p>FileBow uses FFmpeg libraries under the GNU LGPL version 3. FFmpeg runs as a separate process. The shared libraries are included unmodified. Version: n9.0.2-36-g6882969ce9, BtbN LGPL shared x64. Source downloads and build instructions are linked below.</p>
|
||||
<h2>FileBow</h2><p>Copyright (C) 2026 Nordik.dev. Licensed under GPL-3.0-or-later. You may redistribute and modify FileBow under the GNU GPL; there is no warranty. <a href="https://git.nordik.dev/nordik/FileBow">Source code</a>.</p><h2>HEIF codecs</h2><p>The pillow-heif wheel contains GPL-covered x265, as well as LGPL-covered libheif and libde265. Its BSD wrapper license does not cover the whole binary wheel. See the preserved upstream notices below.</p><p><a href="https://git.nordik.dev/nordik/FileBow/releases/tag/v1.0.1">Download FileBow 1.0.1 and third-party sources</a>. Source archives, Windows build recipes, patches and checksums are provided separately. See <a href="https://git.nordik.dev/nordik/FileBow/src/tag/v1.0.1/licenses/sources/BUILDING.md">build instructions and coverage</a>.</p>
|
||||
<h2>FileBow</h2><p>Copyright (C) 2026 Nordik.dev. Licensed under GPL-3.0-or-later. You may redistribute and modify FileBow under the GNU GPL; there is no warranty. <a href="https://git.nordik.dev/nordik/FileBow">Source code</a>.</p><h2>HEIF codecs</h2><p>The pillow-heif wheel contains GPL-covered x265, as well as LGPL-covered libheif and libde265. Its BSD wrapper license does not cover the whole binary wheel. See the preserved upstream notices below.</p><p><a href="https://git.nordik.dev/nordik/FileBow/releases/tag/v1.0.1">Third-party source downloads (unchanged since FileBow 1.0.1)</a>. Source archives, Windows build recipes, patches and checksums are provided separately. See <a href="https://git.nordik.dev/nordik/FileBow/src/tag/v1.0.1/licenses/sources/BUILDING.md">build instructions and coverage</a>.</p>
|
||||
<details><summary>Dotnet-MIT.txt</summary><pre>The MIT License (MIT)
|
||||
|
||||
Copyright (c) .NET Foundation and Contributors
|
||||
|
||||
@@ -5,8 +5,6 @@ using Windows.ApplicationModel;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
[DllImport("user32.dll")] static extern short GetAsyncKeyState(int key);
|
||||
[DllImport("user32.dll")] static extern bool GetCursorPos(out Point point);
|
||||
[DllImport("user32.dll")] static extern bool SetProcessDpiAwarenessContext(IntPtr context);
|
||||
static readonly object OutputLock = new();
|
||||
static void Write(object data) { lock (OutputLock) { Console.WriteLine(JsonSerializer.Serialize(data)); Console.Out.Flush(); } }
|
||||
@@ -18,30 +16,6 @@ internal static class Program
|
||||
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
||||
using var dispatch = new Control();
|
||||
dispatch.CreateControl();
|
||||
var timer = new System.Windows.Forms.Timer { Interval = 35 };
|
||||
bool monitor = false, wasDown = false, dragging = false;
|
||||
Point origin = default;
|
||||
string[] dragFiles = [];
|
||||
timer.Tick += (_, _) => {
|
||||
bool down = (GetAsyncKeyState(1) & 0x8000) != 0;
|
||||
GetCursorPos(out var point);
|
||||
if (monitor && down && !wasDown) { origin = point; dragFiles = Selection(); }
|
||||
if (monitor && down && !dragging &&
|
||||
Math.Abs(point.X - origin.X) + Math.Abs(point.Y - origin.Y) > 24) {
|
||||
var currentSelection = Selection();
|
||||
if (currentSelection.Length > 0) dragFiles = currentSelection;
|
||||
if (dragFiles.Length == 0) { wasDown = down; return; }
|
||||
dragging = true;
|
||||
Write(new { type = "drag", phase = "start", x = point.X, y = point.Y, files = dragFiles,
|
||||
tools = (GetAsyncKeyState(18) & 0x8000) != 0 });
|
||||
}
|
||||
if (!down && wasDown && dragging) {
|
||||
Write(new { type = "drag", phase = "drop", x = point.X, y = point.Y, files = dragFiles });
|
||||
dragging = false; dragFiles = [];
|
||||
}
|
||||
wasDown = down;
|
||||
};
|
||||
timer.Start();
|
||||
_ = Task.Run(() => {
|
||||
string? line;
|
||||
while ((line = Console.ReadLine()) != null) {
|
||||
@@ -56,7 +30,6 @@ internal static class Program
|
||||
object result;
|
||||
switch (command) {
|
||||
case "selection": result = Selection(); break;
|
||||
case "monitor": monitor = value.GetProperty("enabled").GetBoolean(); result = monitor; break;
|
||||
case "identity":
|
||||
try { result = new { packaged = true, family = Package.Current.Id.FamilyName }; }
|
||||
catch { result = new { packaged = false, family = "" }; }
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "filebow",
|
||||
"productName": "FileBow",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "Local radial file conversion and editing for Windows",
|
||||
"private": true,
|
||||
"author": "Nordik.dev",
|
||||
|
||||
@@ -37,7 +37,7 @@ for name in ['LICENSE','LICENSES.chromium.html']:
|
||||
(out/'components.json').write_text(json.dumps(records,indent=2,ensure_ascii=False),encoding='utf-8')
|
||||
(out/'FileBow-LICENSE.txt').write_text((root/'COPYRIGHT.md').read_text(encoding='utf-8')+'\n\n'+(root/'LICENSE').read_text(encoding='utf-8'),encoding='utf-8')
|
||||
parts=['<!doctype html><html lang="en"><meta charset="utf-8"><title>FileBow – License notices</title><style>body{font:15px system-ui;max-width:960px;margin:40px auto;padding:24px;line-height:1.6;color:#20232a}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px monospace}summary{cursor:pointer}a{color:#9a4518}</style><h1>FileBow – Third-party components</h1><p>The following components are distributed under their respective licenses. These notices do not change any rights granted by those licenses.</p><h2>FFmpeg</h2><p>FileBow uses FFmpeg libraries under the GNU LGPL version 3. FFmpeg runs as a separate process. The shared libraries are included unmodified. Version: n9.0.2-36-g6882969ce9, BtbN LGPL shared x64. Source downloads and build instructions are linked below.</p>']
|
||||
parts.append('<h2>FileBow</h2><p>Copyright (C) 2026 Nordik.dev. Licensed under GPL-3.0-or-later. You may redistribute and modify FileBow under the GNU GPL; there is no warranty. <a href="https://git.nordik.dev/nordik/FileBow">Source code</a>.</p><h2>HEIF codecs</h2><p>The pillow-heif wheel contains GPL-covered x265, as well as LGPL-covered libheif and libde265. Its BSD wrapper license does not cover the whole binary wheel. See the preserved upstream notices below.</p><p><a href="https://git.nordik.dev/nordik/FileBow/releases/tag/v1.0.1">Download FileBow 1.0.1 and third-party sources</a>. Source archives, Windows build recipes, patches and checksums are provided separately. See <a href="https://git.nordik.dev/nordik/FileBow/src/tag/v1.0.1/licenses/sources/BUILDING.md">build instructions and coverage</a>.</p>')
|
||||
parts.append('<h2>FileBow</h2><p>Copyright (C) 2026 Nordik.dev. Licensed under GPL-3.0-or-later. You may redistribute and modify FileBow under the GNU GPL; there is no warranty. <a href="https://git.nordik.dev/nordik/FileBow">Source code</a>.</p><h2>HEIF codecs</h2><p>The pillow-heif wheel contains GPL-covered x265, as well as LGPL-covered libheif and libde265. Its BSD wrapper license does not cover the whole binary wheel. See the preserved upstream notices below.</p><p><a href="https://git.nordik.dev/nordik/FileBow/releases/tag/v1.0.1">Third-party source downloads (unchanged since FileBow 1.0.1)</a>. Source archives, Windows build recipes, patches and checksums are provided separately. See <a href="https://git.nordik.dev/nordik/FileBow/src/tag/v1.0.1/licenses/sources/BUILDING.md">build instructions and coverage</a>.</p>')
|
||||
for file in sorted(out.glob('*.txt')) + sorted((out/'upstream').glob('*.txt')):
|
||||
parts.append(f'<details><summary>{html.escape(file.name)}</summary><pre>{html.escape(file.read_text(encoding="utf-8",errors="replace"))}</pre></details>')
|
||||
parts.append('<h2>Supplemental notices</h2><p><a href="Native-NOTICES.html">Native library and source notices</a> · <a href="Rust-NOTICES.html">Rust dependency notices</a></p>')
|
||||
|
||||
+7
-22
@@ -16,12 +16,14 @@ const dataPath = app.getPath('userData');
|
||||
const configFile = path.join(dataPath, 'settings.json');
|
||||
const historyFile = path.join(dataPath, 'history.json');
|
||||
function readJSON(file, fallback) { try { return JSON.parse(fs.readFileSync(file, 'utf8')); } catch { return fallback; } }
|
||||
let settings = { theme: 'dark', autoStart: false, dragWheel: true, shortcuts: true,
|
||||
let settings = { theme: 'dark', autoStart: false, shortcuts: true,
|
||||
closeToTray: true, rememberHistory: true, hardwareAcceleration: true, ...readJSON(configFile, {}) };
|
||||
// Retire the mouse-movement heuristic, including profiles created before 1.0.2.
|
||||
delete settings.dragWheel;
|
||||
if (!settings.hardwareAcceleration) app.disableHardwareAcceleration();
|
||||
let history = settings.rememberHistory ? readJSON(historyFile, []).slice(0, 50) : [];
|
||||
let mainWindow, tray, wheel, native, engine, selected = [], activeJob = null;
|
||||
let quitting = false, lastShortcut = 0, controller = null, nativeMonitor = false;
|
||||
let quitting = false, lastShortcut = 0, controller = null;
|
||||
let nativeError = '', shortcutStatus = {}, packageIdentity = { packaged: false };
|
||||
let startupState = 'Disabled';
|
||||
|
||||
@@ -43,7 +45,7 @@ function publicState() {
|
||||
size: (() => { try { return fs.statSync(file).size; } catch { return 0; } })() })),
|
||||
quick: wheelContent(selected, 'quick').options,
|
||||
tools: wheelContent(selected, 'tools').options,
|
||||
history, activeJob, native: { available: !!native, monitoring: nativeMonitor, error: nativeError },
|
||||
history, activeJob, native: { available: !!native, error: nativeError },
|
||||
shortcuts: shortcutStatus, packageIdentity, startupState };
|
||||
}
|
||||
function publish() {
|
||||
@@ -152,23 +154,6 @@ async function configureIntegration() {
|
||||
if (settings.shortcuts && process.env.FILEBOW_TEST !== '1') for (const [mode, accelerator] of [['quick', 'Control+Space'], ['tools', 'Alt+Space']]) {
|
||||
shortcutStatus[mode] = globalShortcut.register(accelerator, () => openWheel(mode).catch(error => notice(error.message, true)));
|
||||
}
|
||||
if (nativeMonitor) { try { await native.stopFileDragMonitor(); } catch {} nativeMonitor = false; }
|
||||
if (settings.dragWheel && native && process.env.FILEBOW_TEST !== '1') {
|
||||
try {
|
||||
await native.startFileDragMonitor(async event => {
|
||||
if (activeJob) return;
|
||||
if (event.phase === 'shortcut') {
|
||||
if (settings.shortcuts) openWheel(event.tools ? 'tools' : 'quick', { x: event.x, y: event.y }).catch(error => notice(error.message, true));
|
||||
return;
|
||||
}
|
||||
if (event.phase === 'end') { if (!wheel.interactive) wheel.hide(); return; }
|
||||
if (event.phase === 'drop') { wheel.dragEnded({ x: event.x, y: event.y }); return; }
|
||||
const files = validFiles(event.files || await native.getExplorerSelection());
|
||||
if (files.length) wheel.show(files, event.tools ? 'tools' : 'quick', screen.screenToDipPoint({ x: event.x, y: event.y }), false).catch(error => notice(error.message, true));
|
||||
});
|
||||
nativeMonitor = true;
|
||||
} catch (error) { nativeError = error.message; }
|
||||
}
|
||||
}
|
||||
function registerIpc() {
|
||||
const handle = (channel, fn) => ipcMain.handle(`orbit:${channel}`, async (event, arg) => {
|
||||
@@ -200,7 +185,7 @@ function registerIpc() {
|
||||
handle('settings', async changes => {
|
||||
if (!changes || typeof changes !== 'object') return;
|
||||
if (['dark', 'light', 'system'].includes(changes.theme)) settings.theme = changes.theme;
|
||||
for (const key of ['autoStart','dragWheel','shortcuts','closeToTray','rememberHistory','hardwareAcceleration']) {
|
||||
for (const key of ['autoStart','shortcuts','closeToTray','rememberHistory','hardwareAcceleration']) {
|
||||
if (typeof changes[key] === 'boolean') settings[key] = changes[key];
|
||||
}
|
||||
theme.setSelectedTheme(settings.theme);
|
||||
@@ -213,7 +198,7 @@ function registerIpc() {
|
||||
}
|
||||
if (!settings.rememberHistory) saveJSON(historyFile, []);
|
||||
saveJSON(configFile, settings);
|
||||
if ('dragWheel' in changes || 'shortcuts' in changes) await configureIntegration();
|
||||
if ('shortcuts' in changes) await configureIntegration();
|
||||
for (const window of BrowserWindow.getAllWindows()) window.webContents.send('filebow-theme:changed', theme.getThemeMode());
|
||||
mainWindow.setBackgroundColor(theme.themeBackgroundColor()); publish();
|
||||
return publicState();
|
||||
|
||||
@@ -59,17 +59,6 @@ class Wheel {
|
||||
if (!option) return;
|
||||
const files = [...this.files]; this.hide(); this.onChoose(files, option);
|
||||
}
|
||||
dragEnded(point) {
|
||||
if (!this.visible) return;
|
||||
point = screen.screenToDipPoint(point);
|
||||
const dx = point.x - this.center.x, dy = point.y - this.center.y, radius = Math.hypot(dx, dy);
|
||||
if (radius < 96) { this.interactive = true; this.publish(); return; }
|
||||
if (radius > 250) { this.hide(); return; }
|
||||
const segment = 360 / this.options.length;
|
||||
const index = ((Math.floor((Math.atan2(dy, dx) * 180 / Math.PI + 90 + segment / 2) / segment) % this.options.length) + this.options.length) % this.options.length;
|
||||
const id = this.options[index]?.id;
|
||||
if (this.visible) this.choose(id);
|
||||
}
|
||||
hide() { clearTimeout(this.timer); this.visible = false; this.window?.hide(); }
|
||||
destroy() { this.hide(); this.window?.destroy(); }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ const { spawn } = require('node:child_process');
|
||||
const path = require('node:path');
|
||||
class WindowsBridge {
|
||||
constructor(root) {
|
||||
this.next = 1; this.pending = new Map(); this.onDrag = () => {};
|
||||
this.next = 1; this.pending = new Map();
|
||||
this.process = spawn(path.join(root, 'vendor/windows/FileBow.Windows.exe'), [], { windowsHide: true, stdio: ['pipe','pipe','pipe'] });
|
||||
let buffer = '';
|
||||
this.ready = new Promise((resolve, reject) => {
|
||||
@@ -14,7 +14,6 @@ class WindowsBridge {
|
||||
for (const line of lines) {
|
||||
let message; try { message = JSON.parse(line); } catch { continue; }
|
||||
if (message.type === 'ready') resolve();
|
||||
else if (message.type === 'drag') this.onDrag(message);
|
||||
else if (this.pending.has(message.id)) {
|
||||
const pending = this.pending.get(message.id); this.pending.delete(message.id); clearTimeout(pending.timer);
|
||||
if (message.error) pending.reject(new Error(message.error)); else pending.resolve(message.result);
|
||||
@@ -39,8 +38,6 @@ class WindowsBridge {
|
||||
});
|
||||
}
|
||||
getExplorerSelection() { return this.request('selection'); }
|
||||
startFileDragMonitor(callback) { this.onDrag = callback; return this.request('monitor', { enabled: true }); }
|
||||
stopFileDragMonitor() { return this.request('monitor', { enabled: false }); }
|
||||
close() { this.process.stdin.end(); }
|
||||
}
|
||||
module.exports = { WindowsBridge };
|
||||
@@ -16,7 +16,6 @@
|
||||
<label class="setting"><span><strong>Appearance</strong><small>App color scheme</small></span><select id="theme"><option value="dark">Dark</option><option value="light">Light</option><option value="system">System</option></select></label>
|
||||
<label class="setting"><span><strong>Start with Windows</strong><small>Start FileBow in the system tray</small></span><input type="checkbox" data-setting="autoStart"></label>
|
||||
<label class="setting"><span><strong>Keyboard shortcuts</strong><small>Ctrl + Space and Alt + Space</small></span><input type="checkbox" data-setting="shortcuts"></label>
|
||||
<label class="setting"><span><strong>Radial menu while dragging</strong><small>Show for selected Explorer files; hold Alt for tools</small></span><input type="checkbox" data-setting="dragWheel"></label>
|
||||
<label class="setting"><span><strong>Keep running in the background</strong><small>Keep FileBow in the system tray when the window closes</small></span><input type="checkbox" data-setting="closeToTray"></label>
|
||||
<label class="setting"><span><strong>Save history</strong><small>Save filenames and output paths locally</small></span><input type="checkbox" data-setting="rememberHistory"></label>
|
||||
<label class="setting"><span><strong>Hardware acceleration</strong><small>Applies to the interface; takes effect after restarting</small></span><input type="checkbox" data-setting="hardwareAcceleration"></label>
|
||||
|
||||
+3
-3
@@ -23,16 +23,16 @@ pnpm build
|
||||
pnpm build:store
|
||||
```
|
||||
|
||||
Upload `out/msix/FileBow_1.0.1.0_x64_Store.msix` to Partner Center. This package uses the reserved identity and is not signed with the local development certificate. Microsoft signs the distributed Store app. Increase the four-part package version for updates and keep its final component at `0` for Store submissions.
|
||||
Upload `out/msix/FileBow_1.0.2.0_x64_Store.msix` to Partner Center. This package uses the reserved identity and is not signed with the local development certificate. Microsoft signs the distributed Store app. Increase the four-part package version for updates and keep its final component at `0` for Store submissions.
|
||||
|
||||
Do not submit `identity.dev.json` or `FileBow-Development.cer`. The private development key stays in the local Windows certificate store and is not exported.
|
||||
|
||||
## Before public release
|
||||
|
||||
- Install, launch, update and uninstall the MSIX on a clean Windows test installation. Package installation has not yet been validated.
|
||||
- Run Windows App Certification Kit (WACK) on the final 1.0.1.0 package. The earlier 1.0.0.0 report does not certify this update. Store certification remains outstanding.
|
||||
- Run Windows App Certification Kit (WACK) on the final 1.0.2.0 package. The earlier 1.0.0.0 report does not certify this update. Store certification remains outstanding.
|
||||
- Verify MSIX startup after sign-out/sign-in, including disabled-by-user and disabled-by-policy states. The StartupTask integration is implemented, but an installed-package sign-in cycle is not yet confirmed.
|
||||
- Validate Explorer dragging with a real mouse, multiple displays and 100/150/200% scaling. Active-tab selection has been checked with two tabs and another Explorer window open, including multiple selected files, no selection and switching back. Keyboard shortcuts have been checked live; automated dragging did not provide a reliable result. Desktop selection is not implemented.
|
||||
- Validate direct file drops and multiple displays at 100/150/200% scaling. Active-tab selection has been checked with two tabs and another Explorer window, including multiple selected files, empty selection and switching back. Keyboard shortcuts have been checked live. In 1.0.2 the global mouse-drag heuristic was removed: only keyboard shortcuts and the app button open the radial menu. Desktop selection is not implemented.
|
||||
- Publish all 1.0.1 dependency source ZIPs, SOURCE-MANIFEST.json, SOURCE-BUNDLES.json and SHA256SUMS.txt alongside the binaries. The collection contains 812 archives including the original FFmpeg cache and native Windows codec sources/recipes. See licenses/sources/BUILDING.md for rebuild instructions and verification limits; the full Chromium checkout and offline toolchains are not mirrored.
|
||||
- FileBow is licensed under GPL-3.0-or-later; see LICENSE and COPYRIGHT.md. The 1.0.1 build includes updated notices and source download links. The earlier RC ZIP and 1.0.0.0 MSIX remain unchanged. Provide the application license and source link in Partner Center.
|
||||
- Review the English screenshots and listing text before uploading them.
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"Publisher": "CN=FileBow Development",
|
||||
"PublisherDisplayName": "FileBow Development",
|
||||
"DisplayName": "FileBow",
|
||||
"Version": "1.0.1.0"
|
||||
"Version": "1.0.2.0"
|
||||
}
|
||||
@@ -3,5 +3,5 @@
|
||||
"Publisher": "CN=B8FFF13C-C292-4FF8-84ED-3DDE06A7E9F2",
|
||||
"PublisherDisplayName": "Nordik.dev",
|
||||
"DisplayName": "FileBow",
|
||||
"Version": "1.0.1.0"
|
||||
"Version": "1.0.2.0"
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
const {WindowsBridge}=require('../src/main/windows.cjs');
|
||||
const fs=require('node:fs'),path=require('node:path');
|
||||
const root=path.resolve(__dirname,'..'),log=path.join(root,'test-results/native-drag.json');
|
||||
(async()=>{const bridge=new WindowsBridge(root);const events=[];await bridge.startFileDragMonitor(event=>{events.push(event);fs.writeFileSync(log,JSON.stringify(events,null,2));});console.log('Monitor ready');setTimeout(()=>bridge.close(),60000);})().catch(error=>{console.error(error);process.exitCode=1;});
|
||||
@@ -0,0 +1,15 @@
|
||||
const assert = require('node:assert/strict');
|
||||
const path = require('node:path');
|
||||
const { WindowsBridge } = require('../src/main/windows.cjs');
|
||||
const root = path.resolve(process.argv[2] || path.join(__dirname, '..'));
|
||||
(async () => {
|
||||
const bridge = new WindowsBridge(root);
|
||||
try {
|
||||
await bridge.ready;
|
||||
await assert.rejects(bridge.request('monitor', { enabled: true }), /Unknown command/);
|
||||
const identity = await bridge.request('identity');
|
||||
assert.equal(typeof identity.packaged, 'boolean');
|
||||
assert.ok(Array.isArray(await bridge.getExplorerSelection()));
|
||||
console.log('Native integration passed: retired monitor rejected, identity and selection available.');
|
||||
} finally { bridge.close(); }
|
||||
})().catch(error => { console.error(error); process.exitCode = 1; });
|
||||
@@ -10,6 +10,8 @@ const root=path.resolve(__dirname,'..'),out=path.join(root,'test-results');
|
||||
(async()=>{
|
||||
await fs.mkdir(out,{recursive:true});
|
||||
const profile=await fs.mkdtemp(path.join(out,'profile-'));
|
||||
// An upgraded profile must not restore the retired automatic drag trigger.
|
||||
await fs.writeFile(path.join(profile,'settings.json'),JSON.stringify({dragWheel:true}));
|
||||
const app=await electron.launch({executablePath:process.env.FILEBOW_EXECUTABLE||require('electron'),args:process.env.FILEBOW_EXECUTABLE?[]:[root],env:{...process.env,FILEBOW_TEST:'1',FILEBOW_USER_DATA:profile},timeout:30000});
|
||||
const errors=[];app.on('window',window=>window.on('pageerror',error=>errors.push(error.message)));
|
||||
app.process().stderr.on('data',data=>{const text=data.toString();if(/Error|Exception/.test(text))process.stderr.write(text);});
|
||||
@@ -19,6 +21,11 @@ const root=path.resolve(__dirname,'..'),out=path.join(root,'test-results');
|
||||
assert.equal(await page.locator('html').getAttribute('lang'),'en');
|
||||
assert.equal(await app.evaluate(({app})=>app.getLocale()),'en-US');
|
||||
const state=await page.evaluate(()=>window.orbit.state());assert.equal(state.name,'FileBow');assert.ok(state.native.available,state.native.error);
|
||||
assert.equal(Object.hasOwn(state.settings,'dragWheel'),false);
|
||||
assert.equal(await page.locator('[data-setting="dragWheel"]').count(),0);
|
||||
const legacySettings=await page.evaluate(()=>window.orbit.settings({dragWheel:true}));
|
||||
assert.equal(Object.hasOwn(legacySettings.settings,'dragWheel'),false);
|
||||
assert.equal(Object.hasOwn(JSON.parse(await fs.readFile(path.join(profile,'settings.json'),'utf8')),'dragWheel'),false);
|
||||
const textFile=path.join(out,'Beispiel.txt');await fs.writeFile(textFile,'FileBow\nGrüße aus Köln.\nLokale Dateikonvertierung.');
|
||||
await page.evaluate(file=>window.orbit.selectFiles([file]),textFile);
|
||||
await page.locator('[data-action="convert-pdf"]').click();
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const { EventEmitter } = require('node:events');
|
||||
const { PassThrough } = require('node:stream');
|
||||
const vm = require('node:vm');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
test('unsolicited legacy drag messages cannot activate the radial menu', async () => {
|
||||
const child = new EventEmitter();
|
||||
child.stdin = new PassThrough();
|
||||
child.stdout = new PassThrough();
|
||||
child.stderr = new PassThrough();
|
||||
const module = { exports: {} };
|
||||
vm.runInNewContext(fs.readFileSync(path.join(__dirname, '../src/main/windows.cjs'), 'utf8'), {
|
||||
module, setTimeout, clearTimeout,
|
||||
require: name => name === 'node:child_process' ? { spawn: () => child } : require(name),
|
||||
});
|
||||
const bridge = new module.exports.WindowsBridge('C:/FileBow');
|
||||
let activations = 0;
|
||||
// Old helpers may still emit these events; the bridge must ignore them.
|
||||
bridge.onDrag = () => { activations++; };
|
||||
child.stdout.write('{"type":"ready"}\n');
|
||||
await bridge.ready;
|
||||
for (const phase of ['start', 'drop', 'shortcut', 'end']) {
|
||||
child.stdout.write(JSON.stringify({ type: 'drag', phase, files: ['C:/selected.png'], x: 500, y: 500 }) + '\n');
|
||||
}
|
||||
assert.equal(activations, 0);
|
||||
// Explicit requests, used by the real keyboard shortcuts, still work.
|
||||
const selection = bridge.getExplorerSelection();
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
const request = JSON.parse(child.stdin.read().toString());
|
||||
assert.equal(request.command, 'selection');
|
||||
child.stdout.write(JSON.stringify({ id: request.id, result: ['C:/selected.png'] }) + '\n');
|
||||
assert.equal((await selection)[0], 'C:/selected.png');
|
||||
bridge.close();
|
||||
});
|
||||
Reference in new issue
Block a user