11 Commits

Author SHA1 Message Date
Burak Goncu
fd670fa0e9 Check a release's signature with the key the app carries
The release script checked the feed and the disk image against the key
they had just been signed with, which says the signing worked and nothing
about whether any copy of the app will accept the result. A copy checks
with the public key in its own Info.plist. Had SPARKLE_KEY named some
other key, the release would have passed every check here and been
turned down by every copy, with nothing to show for it but updates that
never arrive.

The disk image's signature is now verified once more with nothing but
the public key from the app that was just built, and the release stops
if that fails. 1.3.0 was checked this way by hand before it was
published.
2026-11-24 02:44:17 +03:00
Burak Goncu
d0a99d5076 Try an update for real before it is published
It is the version people have that does the updating, so a release cannot
fix a way of updating that does not work: by then it is out. The only
look at what an update will do on everyone's Mac is to have a copy of
the older version take the new one, and scripts/update-trial.sh does
that on the Mac at hand. It then offers the older version a feed with no
signature, a feed changed after it was signed and a download changed
after it was signed, and reports whether each was turned down and what
Sparkle said about it.

What it takes to do this without touching the app that is installed was
found out the hard way. A folder of its own for the data and a home of
its own were not enough: preferences are found by bundle identifier
whatever a process calls home, and a first run wrote Sparkle's into the
installed app's. The trial therefore runs copies under another
identifier, trusting a key made for the occasion, and the copy of the
newer build names its own environment in its Info.plist, because Sparkle
opens it again through the system and nothing of the first run's reaches
it. It checks at the end that the installed app's preferences were not
written to.

A hidden app presents no sheet, and it was with the update's sheet up
that the app would not quit. With --shown the copy's window is on screen
while it updates, and the trial says whether the sheet was up.
2026-11-24 02:24:29 +03:00
Burak Goncu
2256719bf5 Sign the disk image, and write the feed that updates are found by
A Mac release is now three files. Beside the disk image and its checksum
there is appcast.xml, the feed that installed copies of the app read from
the newest release on GitHub. The release script writes it with Sparkle's
own tool, with what the change log says about the version in it, and
signs it and the disk image with the update key, which SPARKLE_KEY names.
It stops if the app's copy of the change log is stale, if the change log
says nothing about the version, or if either signature is missing: a feed
without them is one no copy of the app would act on, and none would say
why.

The disk image itself is signed with the Developer ID and notarised, as
the app in it always was. macOS can then tell what it is before anything
in it is opened, and it is what Sparkle falls back on for a project that
has lost its update key: a disk image signed by the same developer.

scripts/publish-mac.sh makes the release on GitHub, and will not make one
without the feed or with a feed that is about another version.
2026-11-24 02:24:16 +03:00
Burak Goncu
1d26d4d051 Let the Mac app update itself, and say what is new afterwards
The Mac app looks at the project's releases on GitHub when it is first
opened and once a day after that, and when there is a newer one says so
at the top of the library, with what is in it. One choice there
downloads it, has it checked, installs it and opens the app again.
Settings has a pane for it, and the app menu has Check for Updates.

Sparkle does what must not be got wrong: reading the feed, downloading,
checking the signatures, putting the app in place. The feed has to be
signed with the project's key and so does the download, which is checked
before it is unpacked. None of what is shown is Sparkle's. It hands each
step to an UpdateModel, which knows nothing of Sparkle and holds the
rules:

- What the user asked about is shown at once. What was found in the
  background is shown at once only when no session is open; beside a
  session it waits in the notice.
- An update that was chosen is installed when it is ready, without a
  second question, unless a session has been opened in the meantime.
- The sheet is closed before the app is asked to quit. An app with a
  sheet up does not quit when the system asks it to, which is how
  Sparkle asks: tried with the update's own sheet up, the app stayed
  where it was with the update unpacked beside it, and installed it only
  when it was quit by hand. Should the app still be running a moment
  after it was asked, it is asked again with any sheet out of the way,
  and after that the notice says to quit it.
- A check that is asked for while Sparkle is in the middle of one of its
  own is not dropped, as Sparkle would drop it: the user sees that the
  app is looking, and Sparkle is asked when it can be.

On every platform the first launch after an update says what changed,
from a copy of the change log that the app carries.
scripts/sync-changelog.sh makes the copy, and a test fails while it is
stale.

Two environment variables are there for trying an update out: one names
another feed to read, the other has the app answer for itself. Neither
gets anything installed that the app would not have taken anyway, since
the feed and the download still have to be signed with the key the app
trusts.
2026-11-24 02:24:05 +03:00
Burak Goncu
28c33db7ae Draw the icon in layers, for the system to light
The icon was a set of bitmaps drawn by a script, with its own shadow and
its own highlights, and looked the same whatever the Mac or iPhone was set
to. On macOS 26 and iOS 26 an icon is layers the system renders as glass,
in the light, dark, tinted and clear appearances the user chooses between.

It is now an Icon Composer document: three SVG layers, a screen behind, a
screen in front and a pointer, with fills for each appearance. In the dark
the colour moves from the background to the screen in front. The shapes
are larger than they were, the pointer most of all, so that the icon reads
at the sizes a list shows it in.

The script that drew the bitmaps is gone. The one in its place has the
tool that comes with Xcode render the icon for the read-me.
2026-11-24 00:59:45 +03:00
Burak Goncu
7feb201c33 Make a Mac release with the Developer ID certificate in the keychain
An App Store Connect API key could not make the Mac release: Xcode signs
for a key with a cloud-managed certificate only, which the key has to be
given access to, and an export with a certificate in the keychain stopped
because the profile Xcode manages did not include it.

With DEVELOPER_ID_PROFILE naming a Developer ID provisioning profile that
is installed and includes the certificate, the script signs by hand with
the certificate on this Mac and has notarytool send the app to the notary
service, so the key is asked for nothing but that.
2026-11-23 23:20:22 +03:00
Burak Goncu
465d3dbf82 Add a lab of real VNC servers to test against
The tests so far connect to the server that comes with the project, which
shows that the two agree with each other. What a session does with the
servers people actually run was not tested anywhere.

scripts/compat-lab starts TigerVNC, x11vnc and wayvnc in a container, in
twelve setups between them: a VNC password, TLS with a certificate nobody
signed, a user name, RSA-AES in its four forms, no sign-in at all, and
wayvnc as Raspberry Pi OS configures it. The tests open a session to each
and check inside the container what was typed, where the pointer went,
what reached the clipboard, that the desktop took the size it was asked
for and went back, and how a certificate or key is asked about, refused
and noticed to have changed.

It needs Docker, so it is run by hand and not by CI.
2026-11-23 22:51:50 +03:00
Burak Goncu
1d38970474 Let a release be made with an App Store Connect API key
The release scripts signed and uploaded through the Apple ID that Xcode
is signed in with, and Xcode had forgotten its account in the middle of
a release: the archive was made and could not be sent. Named in the
environment, an API key and its issuer are now handed to xcodebuild in
the Apple ID's place. Version 1.1.1 for iPhone and iPad went to
TestFlight that way.

The Mac's disk image needs a Developer ID certificate, which a key may
use only with access to cloud-managed distribution certificates; the
script says so where it says how.
2026-11-11 13:26:23 +03:00
Burak Goncu
f966c1cdaf Let a scripted launch open the editor for the first computer 2026-11-11 02:21:08 +03:00
Burak Goncu
237c01f791 Add the README, project documents, CI and release scripts
The README says what the app does, how to install and build it, and how a
session is protected in each mode. docs/ARCHITECTURE.md walks through the
code; docs/apple-screen-sharing-notes.md records what was measured about
Apple's protocol while building the keyboard.

CI runs the package and engine tests and builds both apps. The release
scripts archive, sign and notarise the Mac app into a disk image and
upload the iPhone and iPad app to App Store Connect.
2026-11-11 01:55:04 +03:00
Burak Goncu
727fffdad0 Add the library, session controller and Mac app
OpenScreensCore holds the model: saved computers and groups, per-computer
connection settings, the on-disk library with merge-friendly records,
keychain-backed credentials, key and shortcut tables, and the viewport
maths shared by both platforms.

OpenScreensUI adds the session controller on top of the engine, the
AppKit remote canvas with pointer, scroll, zoom and keyboard handling,
and the SwiftUI interface: library, computer editor, quick connect,
session window with toolbar and menu commands, and settings.

The Mac app target is a thin shell around the package.
2026-11-10 22:47:24 +03:00