mirror of https://github.com/ndarilek/tts-rs.git
Eliminate separate winrt_bindings crate since it no longer seems necessary for fast builds.
This commit is contained in:
parent
00a16c5dd5
commit
c21d4a6a38
|
@ -23,7 +23,9 @@ env_logger = "0.8"
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
tolk = { version = "0.3", optional = true }
|
tolk = { version = "0.3", optional = true }
|
||||||
windows = "0.4"
|
windows = "0.4"
|
||||||
tts_winrt_bindings = { version = "0.3", path="winrt_bindings" }
|
|
||||||
|
[target.'cfg(windows)'.build-dependencies]
|
||||||
|
windows = "0.4"
|
||||||
|
|
||||||
[target.'cfg(target_os = "linux")'.dependencies]
|
[target.'cfg(target_os = "linux")'.dependencies]
|
||||||
speech-dispatcher = "0.7"
|
speech-dispatcher = "0.7"
|
||||||
|
|
10
build.rs
10
build.rs
|
@ -1,5 +1,13 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
if std::env::var("TARGET").unwrap().contains("-apple") {
|
if std::env::var("TARGET").unwrap().contains("windows") {
|
||||||
|
windows::build!(
|
||||||
|
windows::foundation::{EventRegistrationToken, IAsyncOperation, TypedEventHandler},
|
||||||
|
windows::media::core::MediaSource,
|
||||||
|
windows::media::playback::{MediaPlaybackSession, MediaPlaybackState, MediaPlayer, MediaPlayerAudioCategory},
|
||||||
|
windows::media::speech_synthesis::{SpeechSynthesisStream, SpeechSynthesizer, SpeechSynthesizerOptions},
|
||||||
|
windows::storage::streams::IRandomAccessStream,
|
||||||
|
);
|
||||||
|
} else if std::env::var("TARGET").unwrap().contains("-apple") {
|
||||||
println!("cargo:rustc-link-lib=framework=AVFoundation");
|
println!("cargo:rustc-link-lib=framework=AVFoundation");
|
||||||
if !std::env::var("CARGO_CFG_TARGET_OS")
|
if !std::env::var("CARGO_CFG_TARGET_OS")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
|
@ -5,11 +5,16 @@ use std::sync::Mutex;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use log::{info, trace};
|
use log::{info, trace};
|
||||||
|
|
||||||
use tts_winrt_bindings::windows::media::playback::{
|
mod bindings;
|
||||||
MediaPlaybackState, MediaPlayer, MediaPlayerAudioCategory,
|
|
||||||
|
use bindings::windows::{
|
||||||
|
foundation::TypedEventHandler,
|
||||||
|
media::{
|
||||||
|
core::MediaSource,
|
||||||
|
playback::{MediaPlaybackState, MediaPlayer, MediaPlayerAudioCategory},
|
||||||
|
speech_synthesis::SpeechSynthesizer,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
use tts_winrt_bindings::windows::media::speech_synthesis::SpeechSynthesizer;
|
|
||||||
use tts_winrt_bindings::windows::{foundation::TypedEventHandler, media::core::MediaSource};
|
|
||||||
|
|
||||||
use crate::{Backend, BackendId, Error, Features, UtteranceId, CALLBACKS};
|
use crate::{Backend, BackendId, Error, Features, UtteranceId, CALLBACKS};
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "tts_winrt_bindings"
|
|
||||||
version = "0.3.0"
|
|
||||||
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
|
|
||||||
description = "Internal crate used by `tts`"
|
|
||||||
license = "MIT"
|
|
||||||
edition = "2018"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
windows = "0.4"
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
windows = "0.4"
|
|
|
@ -1,9 +0,0 @@
|
||||||
fn main() {
|
|
||||||
windows::build!(
|
|
||||||
windows::foundation::{EventRegistrationToken, IAsyncOperation, TypedEventHandler},
|
|
||||||
windows::media::core::MediaSource,
|
|
||||||
windows::media::playback::{MediaPlaybackSession, MediaPlaybackState, MediaPlayer, MediaPlayerAudioCategory},
|
|
||||||
windows::media::speech_synthesis::{SpeechSynthesisStream, SpeechSynthesizer, SpeechSynthesizerOptions},
|
|
||||||
windows::storage::streams::IRandomAccessStream,
|
|
||||||
);
|
|
||||||
}
|
|
Loading…
Reference in New Issue