Added option to by-pass the Avisynth check. Not recommended!

This commit is contained in:
LoRd_MuldeR 2012-02-13 20:49:16 +01:00
parent 9829729d7f
commit a0991e1137
3 changed files with 18 additions and 14 deletions

View File

@ -151,6 +151,7 @@ The following command-line switches are available:
--console ............... Show the "debug" console --console ............... Show the "debug" console
--no-console ............ Don't show the "debug" console --no-console ............ Don't show the "debug" console
--no-style .............. Don't use the Qt "Plastique" style --no-style .............. Don't use the Qt "Plastique" style
--skip-avisynth-check ... Skip Avisynth check (not recommended!)
--force-cpu-no-64bit .... Forcefully disable 64-Bit support --force-cpu-no-64bit .... Forcefully disable 64-Bit support

View File

@ -22,7 +22,7 @@
#define VER_X264_MAJOR 2 #define VER_X264_MAJOR 2
#define VER_X264_MINOR 0 #define VER_X264_MINOR 0
#define VER_X264_PATCH 2 #define VER_X264_PATCH 2
#define VER_X264_BUILD 175 #define VER_X264_BUILD 177
#define VER_X264_MINIMUM_REV 2146 #define VER_X264_MINIMUM_REV 2146
#define VER_X264_CURRENT_API 120 #define VER_X264_CURRENT_API 120

View File

@ -677,23 +677,26 @@ void MainWindow::init(void)
} }
//Check for Avisynth support //Check for Avisynth support
double avisynthVersion = 0.0; if(!qApp->arguments().contains("--skip-avisynth-check", Qt::CaseInsensitive))
QLibrary *avsLib = new QLibrary("avisynth.dll");
if(avsLib->load())
{ {
avisynthVersion = detectAvisynthVersion(avsLib); double avisynthVersion = 0.0;
if(avisynthVersion < 0.0) QLibrary *avsLib = new QLibrary("avisynth.dll");
if(avsLib->load())
{ {
int val = QMessageBox::critical(this, tr("Avisynth Error"), tr("<nobr>A critical error was encountered while checking your Avisynth version!</nobr>").replace("-", "&minus;"), tr("Quit"), tr("Ignore")); avisynthVersion = detectAvisynthVersion(avsLib);
if(avisynthVersion < 0.0)
{
int val = QMessageBox::critical(this, tr("Avisynth Error"), tr("<nobr>A critical error was encountered while checking your Avisynth version!</nobr>").replace("-", "&minus;"), tr("Quit"), tr("Ignore"));
if(val != 1) { close(); qApp->exit(-1); return; }
}
}
if(avisynthVersion < 2.5)
{
int val = QMessageBox::warning(this, tr("Avisynth Missing"), tr("<nobr>It appears that Avisynth is <b>not</b> currently installed on your computer.<br>Therefore Avisynth (.avs) input will <b>not</b> be working at all!<br><br>Please download and install Avisynth:<br><a href=\"http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/\">http://sourceforge.net/projects/avisynth2/files/AviSynth 2.5/</a></nobr>").replace("-", "&minus;"), tr("Quit"), tr("Ignore"));
avsLib->unload(); X264_DELETE(avsLib);
if(val != 1) { close(); qApp->exit(-1); return; } if(val != 1) { close(); qApp->exit(-1); return; }
} }
} }
if(avisynthVersion < 2.5)
{
int val = QMessageBox::warning(this, tr("Avisynth Missing"), tr("<nobr>It appears that Avisynth is <b>not</b> currently installed on your computer.<br>Therefore Avisynth (.avs) input will <b>not</b> be working at all!<br><br>Please download and install Avisynth:<br><a href=\"http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/\">http://sourceforge.net/projects/avisynth2/files/AviSynth 2.5/</a></nobr>").replace("-", "&minus;"), tr("Quit"), tr("Ignore"));
avsLib->unload(); X264_DELETE(avsLib);
if(val != 1) { close(); qApp->exit(-1); return; }
}
//Check for expiration //Check for expiration
if(x264_version_date().addMonths(6) < QDate::currentDate()) if(x264_version_date().addMonths(6) < QDate::currentDate())
@ -1052,7 +1055,7 @@ double MainWindow::detectAvisynthVersion(QLibrary *avsLib)
{ {
if(avs_is_float(avs_version)) if(avs_is_float(avs_version))
{ {
qDebug("Avisynth version: v%f", avs_as_float(avs_version)); qDebug("Avisynth version: v%.2f", avs_as_float(avs_version));
version_number = avs_as_float(avs_version); version_number = avs_as_float(avs_version);
} }
} }