Skip to content

Commit db32ef1

Browse files
authored
Merge pull request #30 from bocoup/remove-windows
Remove support for Windows
2 parents 3cff8e0 + e2bcea0 commit db32ef1

File tree

124 files changed

+120
-4454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+120
-4454
lines changed

.gitattributes

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/node.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,13 @@ jobs:
88

99
strategy:
1010
matrix:
11-
os: [windows-2022, macos-14]
11+
os: [macos-14]
1212
node-version: ['18.x']
1313
test-command:
1414
- npm run test-style
1515
- npm run test-types
1616
- npm run test-unit
1717
- npm run test-macos-key-press
18-
exclude:
19-
# The `test-style` script is platform-independent, so there is no
20-
# value in executing it in multiple operating systems.
21-
- os: macos-14
22-
test-command: npm run test-style
23-
# The `test-types` script is platform-independent, so there is no
24-
# value in executing it in multiple operating systems.
25-
- os: macos-14
26-
test-command: npm run test-types
27-
# The `test-macos-key-press` script exercises macOS platform code,
28-
# making it inappropriate for Windows environments.
29-
- os: windows-2022
30-
test-command: npm run test-macos-key-press
3118

3219
steps:
3320
- uses: actions/checkout@v4

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,7 @@ gallery.xml
202202
project.lock.json
203203

204204
# macOS System Files
205-
.DS_Store
205+
.DS_Store
206+
207+
# npm package archive files (as generated by the command `npm pack`)
208+
bocoup-macos-at-driver-server-*.tgz

packages/macos-at-driver-server/MAINTAINING.md renamed to MAINTAINING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ locally (that is, without publishing it for use by others).
2020
### Instructions
2121

2222
1. Build the Xcode project
23-
1. Select `Open Existing Project...` from Xcode and navigate to `/packages/macos-at-driver-server/MacOSATDriverServer/MacOSATDriverServer.xcodeproj` in your local repository
23+
1. Select `Open Existing Project...` from Xcode and navigate to `src/MacOSATDriverServer/MacOSATDriverServer.xcodeproj` in your local repository
2424
2. With the project open, select `Product>Build` from the top-level menu
2525
2. Execute the following command in a terminal:
2626

@@ -41,7 +41,7 @@ Repository](https://npmjs.org).
4141
### Instructions
4242

4343
1. Build the Xcode project
44-
1. Select `Open Existing Project...` from Xcode and navigate to `/packages/macos-at-driver-server/MacOSATDriverServer/MacOSATDriverServer.xcodeproj` in your local repository
44+
1. Select `Open Existing Project...` from Xcode and navigate to `src/MacOSATDriverServer/MacOSATDriverServer.xcodeproj` in your local repository
4545
2. With the project open, select `Product>Build` from the top-level menu
4646
2. Execute the following command in a terminal:
4747

README.md

Lines changed: 29 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,38 @@
1-
# ARIA-AT Automation Driver
1+
# macOS AT Driver Server
22

3-
A [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
4-
server which allows clients to observe the text enunciated by a screen reader
5-
and to simulate user input
3+
An implementation of the [AT Driver](https://w3c.github.io/at-driver/) remote
4+
end designed to work with screen readers on macOS.
65

76
**[aria-at-automation](https://github.com/w3c/aria-at-automation)** · [aria-at-automation-harness](https://github.com/w3c/aria-at-automation-harness) · aria-at-automation-driver · [aria-at-automation-results-viewer](https://github.com/w3c/aria-at-automation-results-viewer)
87

98
## Requirements
109

11-
- Microsoft Windows
12-
- [Node.js](https://nodejs.org), including "Tools for Native Modules" as
13-
offered by the Node.js installer
14-
- [the Microsoft Visual C++
15-
runtime](https://aka.ms/vs/16/release/vc_redist.x86.exe)
16-
17-
<details>
18-
<summary>note for project maintainers</summary>
19-
20-
"Tools for Native Modules" is required to install the "robotjs" npm module,
21-
which is a dependency of this project.
22-
23-
[The Visual C++ runtime includes
24-
`VCRUNTIME140.dll`](https://answers.microsoft.com/en-us/windows/forum/all/vcruntime140dll/fc4c0470-4db0-4e7b-9537-58ea62f8ac05),
25-
which is required by the automation voice.
26-
27-
</details>
28-
29-
## Terminology
30-
31-
- **message** - a [JSON](https://www.json.org)-formatted string that describes
32-
some occurrence of interest, emitted at the moment it occurred; the message
33-
should be a JSON object value with two string properties: `type` and `data`
34-
- **message type** - one of `"lifecycle"`, `"speech"`, or `"error"`
35-
- `"lifecycle"` - signifies that the message data is an expected lifecycle of
36-
the automation voice (e.g. initialization and destruction)
37-
- `"speech"` - signifies that the message data is text which a screen reader
38-
has requested the operating system annunciate
39-
- `"error"` - signifies that an exceptional circumstances has occurred
40-
- **message data** - information which refines the meaning of the message type
41-
42-
## Protocol
43-
44-
This project implements [AT Driver](https://w3c.github.io/at-driver/), a
45-
protocol published in 2024 as [a W3C Draft Community Group
46-
Report](https://www.w3.org/standards/types/#CG-DRAFT). That document
47-
exhaustively describes the JSON-encoded WebSocket protocol. Please [file a bug
48-
report against this
49-
project](https://github.com/w3c/aria-at-automation-driver/issues/new) if you
50-
observe any discrepencies with AT Driver.
51-
52-
## Architecture
53-
54-
This tool is comprised of two main components: a text-to-speech voice and a
55-
WebSocket server.
56-
57-
### Text-to-speech voice
58-
59-
The text-to-speech voice is written in C++ and integrates with the [Microsoft
60-
Speech API
61-
(SAPI)](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ee125663(v=vs.85)).
62-
Because it interfaces with the Windows operating system (that is: "below" the
63-
screen reader in the metaphorical software stack), it can observe speech from
64-
many screen readers without coupling to any particular screen reader.
65-
66-
The voice has two responsibilities. First, it emits the observed speech data
67-
and related events to a [Windows named
68-
pipe](https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipes). This
69-
allows the second component to present a robust public interface for
70-
programmatic consumption of the data. (The named pipe is an implementation
71-
detail. Neither its content nor its presence is guaranteed, making it
72-
inappropriate for external use.)
73-
74-
Second, the voice annunciates speech data. It does this by forwarding speech
75-
data to the system's default text-to-speech voice. This ensures that a system
76-
configured to use the voice remains accessible to screen reader users.
10+
- macOS version 13 ("Ventura") or later
11+
- Node.js version 18 or later
12+
13+
## Usage
14+
15+
1. Run the `install` sub-command in a terminal:
16+
17+
at-driver install
18+
19+
If prompted for system administration permission, grant permission.
20+
21+
2. Start the server by executing the `serve` sub-command in a terminal:
22+
23+
at-driver serve
24+
25+
The process will write a message to the standard error stream when the
26+
WebSocket server is listening for connections. The `--help` flag will cause
27+
the command to output advanced usage instructions (e.g. `at-driver --help`).
28+
29+
3. Configure any screen reader to use the text-to-speech voice named "Bocoup
30+
Automation Voice."
31+
32+
4. Use any WebSocket client to connect to the server. The protocol is described
33+
below. (The server will print protocol messages to its standard error stream
34+
for diagnostic purposes only. Neither the format nor the availability of
35+
this output is guaranteed, making it inappropriate for external use.)
7736

7837
### WebSocket server
7938

@@ -92,10 +51,6 @@ For details on contributing to this project, please refer to the file named
9251
Licensed under the terms of the MIT Expat License; the complete text is
9352
available in the LICENSE file.
9453

95-
Copyright for portions of AT Driver are held by Microsoft as part of the
96-
"Sample Text-to-Speech Engine and MakeVoice" project. All other copyright for
97-
AT Driver are held by Bocoup.
98-
9954
---
10055

10156
### [aria-at-automation](https://github.com/w3c/aria-at-automation)
File renamed without changes.
File renamed without changes.
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const { loadOsModule } = require('../helpers/load-os-module');
3+
const installation = require('../installation');
44

55
module.exports = /** @type {import('yargs').CommandModule} */ ({
66
command: 'install',
@@ -12,10 +12,6 @@ module.exports = /** @type {import('yargs').CommandModule} */ ({
1212
});
1313
},
1414
async handler({ unattended }) {
15-
const installDelegate = loadOsModule('install', {
16-
darwin: () => require('../install/macos'),
17-
win32: () => require('../install/win32'),
18-
});
19-
await installDelegate.install({ unattended });
15+
await installation.install({ unattended });
2016
},
2117
});
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const fs = require('fs/promises');
55
const createCommandServer = require('../create-command-server');
66
const createVoiceServer = require('../create-voice-server');
77

8-
const WINDOWS_NAMED_PIPE = '\\\\?\\pipe\\my_pipe';
98
const MACOS_SYSTEM_DIR = '/tmp/at_driver_generic';
109
const MACOS_SOCKET_UNIX_PATH = '/tmp/at_driver_generic/driver.socket';
1110
const DEFAULT_PORT = 4382;
@@ -17,18 +16,13 @@ const DEFAULT_PORT = 4382;
1716
const log = (...args) => console.error(new Date().toISOString(), ...args);
1817

1918
const prepareSocketPath = async () => {
20-
if (process.platform === 'win32') {
21-
return WINDOWS_NAMED_PIPE;
22-
} else if (process.platform === 'darwin') {
23-
await fs.mkdir(MACOS_SYSTEM_DIR, { recursive: true });
24-
await fs.unlink(MACOS_SOCKET_UNIX_PATH).catch(error => {
25-
if (!error || error.code !== 'ENOENT') {
26-
throw error;
27-
}
28-
});
29-
return MACOS_SOCKET_UNIX_PATH;
30-
}
31-
throw new Error(`unsupported host platform '${process.platform}'`);
19+
await fs.mkdir(MACOS_SYSTEM_DIR, { recursive: true });
20+
await fs.unlink(MACOS_SOCKET_UNIX_PATH).catch(error => {
21+
if (!error || error.code !== 'ENOENT') {
22+
throw error;
23+
}
24+
});
25+
return MACOS_SOCKET_UNIX_PATH;
3226
};
3327

3428
module.exports = /** @type {import('yargs').CommandModule} */ ({
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
'use strict';
22

3-
const { loadOsModule } = require('../helpers/load-os-module');
3+
const installation = require('../installation');
44

55
module.exports = /** @type {import('yargs').CommandModule} */ ({
66
command: 'uninstall',
77
describe: 'Uninstall text to speech extension and other support',
88
async handler() {
9-
const installDelegate = loadOsModule('install', {
10-
darwin: () => require('../install/macos'),
11-
win32: () => require('../install/win32'),
12-
});
13-
await installDelegate.uninstall();
9+
await installation.uninstall();
1410

1511
console.log('Uninstallation completed successfully.');
1612
},

0 commit comments

Comments
 (0)