mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-22 05:35: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
|
- uses: Swatinem/rust-cache@v1
|
||||||
- run: |
|
- run: |
|
||||||
choco install -qy llvm
|
choco install -qy llvm
|
||||||
cargo build --all-features --release
|
cargo build --features tolk --features tts/tolk --release
|
||||||
move target windows
|
move target windows
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -7,14 +7,10 @@ edition = "2018"
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["staticlib", "cdylib"]
|
crate-type = ["staticlib", "cdylib"]
|
||||||
|
|
||||||
[features]
|
|
||||||
|
|
||||||
use_tolk = ["tolk", "tts/use_tolk"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
env_logger = "0.8"
|
env_logger = "0.8"
|
||||||
gdnative = "0.9"
|
gdnative = "0.9"
|
||||||
tts = "0.13"
|
tts = "0.14"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
tolk = { version = "0.3", optional = true }
|
tolk = { version = "0.3", optional = true }
|
||||||
|
|
|
@ -127,13 +127,13 @@ impl TTS {
|
||||||
.done();
|
.done();
|
||||||
builder
|
builder
|
||||||
.add_property("can_detect_screen_reader")
|
.add_property("can_detect_screen_reader")
|
||||||
.with_getter(|_: &TTS, _| cfg!(all(windows, features = "use_tolk")))
|
.with_getter(|_: &TTS, _| cfg!(all(windows, features = "tolk")))
|
||||||
.done();
|
.done();
|
||||||
#[allow(unreachable_code)]
|
#[allow(unreachable_code)]
|
||||||
builder
|
builder
|
||||||
.add_property("has_screen_reader")
|
.add_property("has_screen_reader")
|
||||||
.with_getter(|_: &TTS, _| {
|
.with_getter(|_: &TTS, _| {
|
||||||
#[cfg(all(windows, features = "use_tolk"))]
|
#[cfg(all(windows, features = "tolk"))]
|
||||||
{
|
{
|
||||||
let tolk = tolk::Tolk::new();
|
let tolk = tolk::Tolk::new();
|
||||||
return tolk.detect_screen_reader().is_some();
|
return tolk.detect_screen_reader().is_some();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user