Skip to content

Commit

Permalink
Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
DEATHB4DEFEAT committed Nov 8, 2024
1 parent 9caf113 commit 8bac054
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Content.Server/TTS/TTSManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ private void Initialize()
{
StartInfo = new ProcessStartInfo
{
#if WINDOWS
FileName = "cmd.exe",
Arguments = $"/C \"mkdir {_cachePath} {_modelPath}\"",
#else
FileName = "/bin/sh",
Arguments = $"-c \"mkdir -p {_cachePath} {_modelPath}\"",
#endif
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true,
Expand Down Expand Up @@ -113,8 +118,13 @@ private ResPath MakeDataPath(string path)
{
StartInfo = new ProcessStartInfo
{
#if WINDOWS
FileName = "cmd.exe",
Arguments = $"/C \"{strCmdText}\"",
#else
FileName = "/bin/sh",
Arguments = $"-c \"{strCmdText}\"",
#endif
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true,
Expand Down Expand Up @@ -171,8 +181,13 @@ public void ClearCache()
{
StartInfo = new ProcessStartInfo
{
#if WINDOWS
FileName = "cmd.exe",
Arguments = $"/C \"del /q {_cachePath}\*.wav\"",
#else
FileName = "/bin/sh",
Arguments = $"-c \"rm {_cachePath}/*.wav\"",
#endif
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true,
Expand Down

0 comments on commit 8bac054

Please sign in to comment.