Scratch Link is a helper application which allows Scratch 3.0 to communicate with hardware peripherals. Scratch Link replaces the Scratch Device Manager and Scratch Device Plug-in.
System Requirements:
Minimum | |
---|---|
macOS | 10.10 "Yosemite" |
Windows 10 | Version 1709 (build 16299) "Fall Creators Update" or newer |
To use Scratch Link with Scratch 3.0:
+
at the bottom of the block categories list)The general network protocol and all supported hardware protocols are documented in Markdown files in the
Documentation
subdirectory. Please note that network protocol stability and compatibility are high priorities for
this project. Changes to the protocol are unlikely to be accepted without very strong justification combined with
thorough documentation.
Please use markdownlint to check documentation changes before submitting a pull request.
Previous versions of Scratch Link used Secure WebSockets (wss://
) to communicate with Scratch. This is no longer the
case: new versions of Scratch Link use regular WebSockets (ws://
). It is no longer necessary to prepare an SSL
certificate for Scratch Link.
This change causes an incompatibility with some browsers, including Safari. An upcoming version of Scratch Link will resolve this incompatibility.
The macOS version of this project is in the macOS
subdirectory. It uses Swift 5.2 and the Swift Package Manager.
Developer prerequisites on macOS, most of which are available through Homebrew:
xcode-select --install
The build is primarily controlled through make
:
make
, which will automatically:
swift build
dist/Scratch Link.app
make dist
, which runs both of these:
make dist-mas
make dist-devid
Scratch Link
bundle in the dist
directory"dist/Scratch Link.app/Contents/MacOS/scratch-link"
open "dist/Scratch Link.app"
in a terminalmake xcodeproj
The Windows version of this project is in the Windows
subdirectory.
Prerequisites:
Optional:
Build, run, and debug by opening the Solution (*.sln
) file in Visual Studio.
This section applies to Scratch Team members only.
To build and sign the ScratchLinkSetup
installer (MSI), you must install the appropriate signing certificate.
Contact another Scratch Team member to obtain the certificate, then install it with these steps:
Personal Information Exchange (*.pfx;*.p12)
.You can verify that you've installed the correct certificate by comparing the thumbprint in the Certificate Manager to
the one listed in the post-build event in the ScratchLinkSetup
project.
ScratchLinkSetup
project may fail with a System.IO.DirectoryNotFoundException
if the Windows case
sensitivity flag is enabled on any directory in the path to the Scratch Link project files. This flag can become
enabled when WSL is used to create or manipulate directories.
fsutil file queryCaseSensitiveInfo myDirName
to check if myDirName
has its case sensitivity
flag set. If so, use fsutil file setCaseSensitiveInfo myDirName disable
to clear the flag.make
step may fail if the path to the Scratch Link directory contains whitespace.