#34 - Rollscan installs on Windows from one .exe, gphoto2 included, and sets the camera up itself #40
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
RollNote/rollscan!40
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/34-windows-app"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rollscan becomes a real Windows app: one
Rollscan_0.7.0_x64-setup.exe, opened like any installer, without administrator rights. gphoto2 comes inside it, so there is nothing else to install: no WSL2, no Ubuntu, no usbipd, no passing USB devices through by hand. The first time a camera is plugged in, the app says it needs setting up and a Set up the camera button switches it to the WinUSB driver gphoto2 needs (one administrator prompt).Closes #34
How it works
gphoto2.exe, every DLL it and its drivers load (found withntldd), its camera drivers (camlibs) and port drivers (iolibs). They are installed intools\next to the app;process::commandputs that folder first on thePATHand setsCAMLIBS/IOLIBS, and starts every command withCREATE_NO_WINDOW.Get-PnpDevice). Such a camera isn't opened. The page offers Set up the camera, which runswdi-simple(the command-line half of libwdi, the library behind Zadig) with administrator rights, then refreshes. libwdi only publishes Zadig, sopackaging/windows/build.ps1buildswdi-simplefrom the v1.5.1 tag (commit checked), with the WDK 8.0 WinUSB co-installers (SHA-256 checked).packaging/windows/build.ps1(MSYS2 + VS 2022 Build Tools + Rust on a Windows PC) collects gphoto2, builds wdi-simple, thencargo tauri build --config packaging/windows/tauri.conf.json(NSIS, per-user install, WebView2 bootstrapper embedded). That config is only used by the script, socargo build/cargo teston Windows don't need the tools.%APPDATA%\rollscan. Scans go to the Pictures folder'sFilm scans(wherever OneDrive moved it). The folder picker shows plainC:\paths, hides hidden folders and lists the other drives from a drive's top. Explorer shows the scans. Roll and file names with characters Windows refuses are refused before a scan starts.rollscan scan ...typed in a terminal still writes to it. Without--port, the command line now takes the first port that looks like an Arduino (aCOMport on Windows).wslpath, the Windows Pictures folder seen from Linux) and the udev rules that were only there for cameras passed through to WSL2.Tested
packaging/windows/build.ps1installed it; Set up the camera switched the camera to WinUSB; calibration, live view, Check framing, scans and negative conversion worked as on Linux.cargo teston Linux: 302 passed. The new tests cover reading Windows' device list, wdi-simple's arguments and PowerShell quoting, the session's set-up flow (refused, then done and connected), the Arduino port found without--port, and the folder listing.cargo checkandcargo clippy --all-targetsforx86_64-pc-windows-msvc(cross-compiled from Linux): no new warnings.pnpm lint,pnpm checkandpnpm buildinsite/.Not tested
cargo teston Windows.Changes in behaviour
.exereplaces them (it never ran, so nobody should be using it).--portno longer defaults to/dev/ttyACM0. Without it, the first port that looks like an Arduino is used.60-rollscan.rulesno longer opens cameras to every user (that was only for WSL2; gphoto2's own rules already do it on a Linux desktop).\on any system.