#59 - Rollscan installs in one command on Linux and Windows #60

Open
eliott wants to merge 3 commits from feat/59-install-scripts into main
Owner

On Linux and Windows, Rollscan now installs with one command, and running it again updates it:

  • Linux: curl -fsSL https://scan.roll-note.com/install.sh | sh
  • Windows, in PowerShell: irm https://scan.roll-note.com/install.ps1 | iex

The download page shows the command on each card, and the installation docs and the README explain it. macOS gets nothing yet: there is no Mac build to download, so on a Mac the script says so and points to building from source.

Closes #59

How it works

  • packaging/install.sh (POSIX sh): on Debian, Ubuntu and their derivatives (apt-get and dpkg present) it installs the .deb, which brings gphoto2 and the serial port rule. On any other Linux it puts the AppImage at ~/.local/bin/rollscan, adds a menu entry and icon, installs gphoto2 with pacman, dnf, zypper or xbps-install, and installs 60-rollscan.rules from the release's tag. It prints every command it runs as root before running it; package managers run non-interactively because the script's stdin is the pipe, and sudo still asks for the password on the terminal. x86_64 only.
  • packaging/windows/install.ps1: downloads the newest -setup.exe to the temp folder and runs it with /S (current user, no admin prompt). If Rollscan is open it stops and asks to quit it, rather than closing it mid-scan. It runs inside a script block, so an error never closes the PowerShell window it was pasted into.
  • Both pick the newest release that has their file, since a release can have none (v0.10.0).
  • The site copies both scripts to its root at build time (site/scripts/sync.mjs). nginx serves them as text/plain, so irm hands PowerShell a string, with no-cache.

Tested

  • shellcheck on install.sh: clean.
  • In containers, piped into sh as the one-liner does:
    • Debian 13: the .deb installs; rollscan and the udev rule are in place.
    • Arch, as a normal user with sudo: gphoto2, the AppImage, the menu entry, the icon and the rule are installed. A second run skips what is already there.
    • Fedora: the same through dnf.
    • With uname faked to Darwin: it prints the "no Mac build" message and exits.
  • install.ps1 in PowerShell 7 on Linux, with the installer run replaced by a stand-in: finds and downloads Rollscan_0.11.0_x64-setup.exe (15.8 MB), deletes it afterwards, and leaves the shell open.
  • Site: pnpm build, pnpm check and pnpm lint pass; the download page checked in a browser.

Not tested

  • install.ps1 has never run on Windows. The docs, the README and the download page say so.
  • install.sh hasn't run on a real desktop with the scanner plugged in. In the bare Arch container the AppImage couldn't start because a system library (libfribidi) was missing; a desktop has it.
  • macOS: nothing to install.

Changes in behaviour

  • None for existing installs. After this is released, the website needs rebuilding before scan.roll-note.com/install.sh and install.ps1 exist.
On Linux and Windows, Rollscan now installs with one command, and running it again updates it: - Linux: `curl -fsSL https://scan.roll-note.com/install.sh | sh` - Windows, in PowerShell: `irm https://scan.roll-note.com/install.ps1 | iex` The download page shows the command on each card, and the installation docs and the README explain it. macOS gets nothing yet: there is no Mac build to download, so on a Mac the script says so and points to building from source. Closes #59 ## How it works - `packaging/install.sh` (POSIX sh): on Debian, Ubuntu and their derivatives (`apt-get` and `dpkg` present) it installs the `.deb`, which brings gphoto2 and the serial port rule. On any other Linux it puts the AppImage at `~/.local/bin/rollscan`, adds a menu entry and icon, installs gphoto2 with pacman, dnf, zypper or xbps-install, and installs `60-rollscan.rules` from the release's tag. It prints every command it runs as root before running it; package managers run non-interactively because the script's stdin is the pipe, and sudo still asks for the password on the terminal. x86_64 only. - `packaging/windows/install.ps1`: downloads the newest `-setup.exe` to the temp folder and runs it with `/S` (current user, no admin prompt). If Rollscan is open it stops and asks to quit it, rather than closing it mid-scan. It runs inside a script block, so an error never closes the PowerShell window it was pasted into. - Both pick the newest release that has their file, since a release can have none (v0.10.0). - The site copies both scripts to its root at build time (`site/scripts/sync.mjs`). nginx serves them as `text/plain`, so `irm` hands PowerShell a string, with `no-cache`. ## Tested - shellcheck on `install.sh`: clean. - In containers, piped into `sh` as the one-liner does: - Debian 13: the `.deb` installs; `rollscan` and the udev rule are in place. - Arch, as a normal user with sudo: gphoto2, the AppImage, the menu entry, the icon and the rule are installed. A second run skips what is already there. - Fedora: the same through dnf. - With `uname` faked to Darwin: it prints the "no Mac build" message and exits. - `install.ps1` in PowerShell 7 on Linux, with the installer run replaced by a stand-in: finds and downloads `Rollscan_0.11.0_x64-setup.exe` (15.8 MB), deletes it afterwards, and leaves the shell open. - Site: `pnpm build`, `pnpm check` and `pnpm lint` pass; the download page checked in a browser. ## Not tested - `install.ps1` has never run on Windows. The docs, the README and the download page say so. - `install.sh` hasn't run on a real desktop with the scanner plugged in. In the bare Arch container the AppImage couldn't start because a system library (`libfribidi`) was missing; a desktop has it. - macOS: nothing to install. ## Changes in behaviour - None for existing installs. After this is released, the website needs rebuilding before `scan.roll-note.com/install.sh` and `install.ps1` exist.
- packaging/install.sh: the .deb on Debian, Ubuntu and their derivatives; on any other
  Linux the AppImage in ~/.local/bin with a menu entry, gphoto2 and the serial port rule.
  Each command run as root is announced first. Stops on macOS: there is no Mac build.
- packaging/windows/install.ps1: downloads the newest -setup.exe and runs it silently.
- Both pick the newest release that has their file.
chore(release): 0.12.0
Some checks failed
app / linux (pull_request) Successful in 6m9s
app / windows (pull_request) Successful in 3m2s
parity / parity (pull_request) Has been cancelled
website / build (pull_request) Has been cancelled
a51841eda9
eliott force-pushed feat/59-install-scripts from a51841eda9
Some checks failed
app / linux (pull_request) Successful in 6m9s
app / windows (pull_request) Successful in 3m2s
parity / parity (pull_request) Has been cancelled
website / build (pull_request) Has been cancelled
to 5b37834105
Some checks are pending
app / windows (pull_request) Waiting to run
parity / parity (pull_request) Waiting to run
website / build (pull_request) Waiting to run
app / linux (pull_request) Has started running
2026-11-23 19:30:14 +01:00
Compare
Some checks are pending
app / windows (pull_request) Waiting to run
parity / parity (pull_request) Waiting to run
website / build (pull_request) Waiting to run
app / linux (pull_request) Has started running
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'feat/59-install-scripts:feat/59-install-scripts'
git switch 'feat/59-install-scripts'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RollNote/rollscan!60
No description provided.