diff --git a/General/FrameServer.vb b/General/FrameServer.vb index 46922885..b6fadc75 100644 --- a/General/FrameServer.vb +++ b/General/FrameServer.vb @@ -10,16 +10,16 @@ Public Class FrameServer Shared WasInitialized As Boolean Sub New(path As String) + If Not WasInitialized Then + Package.Python.AddToPath() + Package.AviSynth.AddToPath() + Package.VapourSynth.AddToPath() + WasInitialized = True + End If + If path.EndsWith(".avs") Then NativeServer = CreateAviSynthServer() Else - If Not WasInitialized Then - Environment.SetEnvironmentVariable("path", - Package.Python.Directory + ";" + Environment.GetEnvironmentVariable("path")) - - WasInitialized = True - End If - NativeServer = CreateVapourSynthServer() End If diff --git a/General/Package.vb b/General/Package.vb index 56d44c76..687959dc 100644 --- a/General/Package.vb +++ b/General/Package.vb @@ -177,7 +177,7 @@ Public Class Package .WebURL = "https://github.com/AviSynth/AviSynthPlus", .HelpURL = "http://avisynth.nl", .Description = "StaxRip supports both AviSynth and VapourSynth as video processing tool.", - .FixedDir = Folder.System, + .HintDirectories = {Folder.System}, .SetupFilename = "Installers\AviSynthPlus-3.5.1_20200402.exe", .RequiredFunc = Function() p.Script.Engine = ScriptEngine.AviSynth}) @@ -1887,6 +1887,13 @@ Public Class Package End If End Function + Sub AddToPath() + If Path.FileExists Then + Environment.SetEnvironmentVariable("path", Directory + ";" + + Environment.GetEnvironmentVariable("path")) + End If + End Sub + Sub ShowHelp() Dim dic As New SortedDictionary(Of String, String) diff --git a/General/Strings.vb b/General/Strings.vb index 5343bc0e..3e378742 100644 --- a/General/Strings.vb +++ b/General/Strings.vb @@ -1,6 +1,6 @@ Public Class Strings - Public Shared CharacterLimitReason As String = "In theory Windows supports paths that are longer than 260 characters, in reality neither Windows, nor the .NET Framework or the used tools have full long path support. StaxRip has a setting that allows to increase the limit but it's not recommended to change this limit! It will almost certainly not work!" + Public Shared CharacterLimitReason As String = "In theory Windows supports paths that are longer than 260 characters, in reality neither Windows, nor the .NET Framework or the used tools have full long path support. StaxRip has a setting that allows to increase the limit but it's not recommended changing this limit! It will almost certainly not work!" Public Shared Muxer As String = "A muxer merges different video, audio and subtitle files into a single container file which is the actual output file. Using x264 or subtitles MKV or MP4 is required as container." Public Shared NoUnicode As String = $"Unicode filenames are not supported by AviSynth.{BR2}VapourSynth supports unicode, it can be enabled at:{BR2}Filters > Filter Setup > VapourSynth" Public Shared TaskDialogFooter As String = "[copymsg: Copy Message]"