DATIS icon indicating copy to clipboard operation
DATIS copied to clipboard

Wine compatibility

Open jonpas opened this issue 1 year ago • 0 comments

I am running DCS and SRS Server inside Wine, which so far works great. However, DATIS fails to find TTS voices, even with Microsoft Speech Runtime Platform and SAPI 4/5 runtimes and voices installed.

I would like to add support for running in Wine, however I am having trouble compiling win-tts for testing:

error[E0433]: failed to resolve: could not find `runtime` in `tokio`
  --> crates\win-tts\src\tts.rs:12:25
   |
12 |         let rt = tokio::runtime::Runtime::new()?;
   |                         ^^^^^^^ could not find `runtime` in `tokio`

error[E0433]: failed to resolve: could not find `LocalSet` in `task`
  --> crates\win-tts\src\tts.rs:14:38
   |
14 |             let local = tokio::task::LocalSet::new();
   |                                      ^^^^^^^^ could not find `LocalSet` in `task`

error[E0425]: cannot find function `spawn_blocking` in module `tokio::task`
  --> crates\win-tts\src\tts.rs:11:28
   |
11 |     let buf = tokio::task::spawn_blocking(move || {
   |                            ^^^^^^^^^^^^^^ not found in `tokio::task`

error[E0425]: cannot find function `spawn_local` in module `task`
  --> crates\win-tts\src\tts.rs:19:27
   |
19 |                     task::spawn_local(async move { tts_local(ssml, voice).await })
   |                           ^^^^^^^^^^^ not found in `task`

Some errors have detailed explanations: E0425, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `win-tts` due to 4 previous errors

Using rustc 1.63.0 and current main branch, compiling on Windows.

Cross-compiling on Linux has a different issue with --target x86_64-pc-windows-gnu:

   Compiling win-tts v3.1.2 (/home/jonpas/Work/Other/DATIS/crates/win-tts)
error: couldn't read /home/jonpas/Work/Other/DATIS/target/x86_64-pc-windows-gnu/release/build/win-tts-3d89ca416c86f8f0/out/windows.rs: No such file or directory (os error 2)
 --> crates/win-tts/src/lib.rs:4:5
  |
4 |     ::windows::include_bindings!();
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `::std::include` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `win-tts` due to previous error

Build command used: cargo build --release --package win-tts [--target x86_64-pc-windows-gnu].

Any help or information would be appreciated!

jonpas avatar Sep 11 '22 02:09 jonpas