Skip to content

Commit e99689d

Browse files
committed
Check for avsrepo, avsrepo-32 & avsrepo-64
1 parent f834755 commit e99689d

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

AVSRepoGUI/MainWindow.xaml.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,25 @@ private void InitAvisynth()
138138
avsrepo.SetPortableMode(true); // avsrepo should always be called with -p since it doesn't know anything about avisynth plugin folders
139139
var settings = new PortableSettings().LoadLocalFile("avsrepogui.json");
140140

141-
if (File.Exists(avsrepo_file))
141+
var avsrepo_files = new string[] { "avsrepo.exe", "avsrepo-32.exe", "avsrepo-64.exe" };
142+
var found_avrespo_bin = false;
143+
144+
foreach (var avs_file in avsrepo_files)
142145
{
143-
avsrepo.python_bin = avsrepo_file;
146+
if (File.Exists(avs_file))
147+
{
148+
avsrepo.python_bin = avs_file;
149+
found_avrespo_bin = true;
150+
}
144151
}
145-
else
152+
153+
if (!found_avrespo_bin)
146154
{
147-
MessageBox.Show("Can't find avsrepo.exe");
155+
MessageBox.Show("Can't find avsrepo.exe, avsrepo-32.exe or avsrepo-64.exe");
148156
System.Environment.Exit(1);
149157
}
150158

159+
151160
if (settings is null)
152161
{
153162
AppIsWorking(true);

0 commit comments

Comments
 (0)