Skip to content

Commit

Permalink
Update README instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Dec 30, 2022
1 parent ed10cbc commit 51c04de
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,51 @@

A utility for automatically typing text.

### Building
### Building the project

```sh
#### CLI only (Window and Linux)

To build the CLI only you can just build the Rust portion of the project

```shell
cargo build --release
```

#### MacOS app

For any API changes you need to re-generate the `cbinding/autotyper.h` header by doing

```shell
cd cbinding
cargo install --force cbindgen
cbindgen --config cbindgen.toml --crate cbinding --output autotyper.h
cd ..
cargo build --release
```

Otherwise you can just build the static C library

```shell
cargo build --release
```

Then you can build the app by opening `auto-typer-macos` in XCode and following these steps

1. `Product` -> `Archive`
2. `Distribute App` -> `Copy App` -> `Next`
3. Choose a directory to copy to
4. Copy the app from the output directory to the `Applications` directory
5. `System Settings` -> `Privacy and Security` -> `Accessibility` -> `+`
6. Find the auto-typer app in `Applications`

The application is then ready to use.

_Note_ the application cannot be used properly in a debug build through XCode because you need accessibility permitted for the app.
You can use all features other than the keyboard shortcut.

### Testing the `cbinding` library

```sh
```shell
cd cbinding
cargo build --release --lib
clang -framework CoreFoundation -framework CoreGraphics -L ../target/release -lautotyper test.c -o test.out
Expand Down

0 comments on commit 51c04de

Please sign in to comment.