mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-25 05:45:57 +00:00
Refactor to tolk feature.
This commit is contained in:
parent
5c1cf59d98
commit
b43b4fe19b
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
|||
- uses: Swatinem/rust-cache@v1
|
||||
- run: |
|
||||
choco install -qy llvm
|
||||
cargo build --all-features --release
|
||||
cargo build --features tolk --features tts/tolk --release
|
||||
move target windows
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
|
|
|
@ -7,14 +7,10 @@ edition = "2018"
|
|||
[lib]
|
||||
crate-type = ["staticlib", "cdylib"]
|
||||
|
||||
[features]
|
||||
|
||||
use_tolk = ["tolk", "tts/use_tolk"]
|
||||
|
||||
[dependencies]
|
||||
env_logger = "0.8"
|
||||
gdnative = "0.9"
|
||||
tts = "0.13"
|
||||
tts = "0.14"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
tolk = { version = "0.3", optional = true }
|
||||
|
|
|
@ -127,13 +127,13 @@ impl TTS {
|
|||
.done();
|
||||
builder
|
||||
.add_property("can_detect_screen_reader")
|
||||
.with_getter(|_: &TTS, _| cfg!(all(windows, features = "use_tolk")))
|
||||
.with_getter(|_: &TTS, _| cfg!(all(windows, features = "tolk")))
|
||||
.done();
|
||||
#[allow(unreachable_code)]
|
||||
builder
|
||||
.add_property("has_screen_reader")
|
||||
.with_getter(|_: &TTS, _| {
|
||||
#[cfg(all(windows, features = "use_tolk"))]
|
||||
#[cfg(all(windows, features = "tolk"))]
|
||||
{
|
||||
let tolk = tolk::Tolk::new();
|
||||
return tolk.detect_screen_reader().is_some();
|
||||
|
|
Loading…
Reference in New Issue
Block a user