Correctly handle the "--first-run" CLI option.
This commit is contained in:
parent
6e8b0511c8
commit
086639e37b
@ -49,6 +49,7 @@ s_parameters[] =
|
|||||||
MAKE_ARG( "skip-vapoursynth-check", 0, CLI_PARAM_SKIP_VPS_CHECK ),
|
MAKE_ARG( "skip-vapoursynth-check", 0, CLI_PARAM_SKIP_VPS_CHECK ),
|
||||||
MAKE_ARG( "no-deadlock-detection", 0, CLI_PARAM_NO_DEADLOCK ),
|
MAKE_ARG( "no-deadlock-detection", 0, CLI_PARAM_NO_DEADLOCK ),
|
||||||
MAKE_ARG( "no-style", 0, CLI_PARAM_NO_GUI_STYLE ),
|
MAKE_ARG( "no-style", 0, CLI_PARAM_NO_GUI_STYLE ),
|
||||||
|
MAKE_ARG( "first-run", 0, CLI_PARAM_FIRST_RUN ),
|
||||||
MAKE_ARG( "console", 0, CLI_PARAM_OTHER ),
|
MAKE_ARG( "console", 0, CLI_PARAM_OTHER ),
|
||||||
MAKE_ARG( "no-console", 0, CLI_PARAM_OTHER ),
|
MAKE_ARG( "no-console", 0, CLI_PARAM_OTHER ),
|
||||||
MAKE_ARG( "force-cpu-no-64bit", 0, CLI_PARAM_OTHER ),
|
MAKE_ARG( "force-cpu-no-64bit", 0, CLI_PARAM_OTHER ),
|
||||||
|
@ -38,6 +38,7 @@ static const int CLI_PARAM_SKIP_VPS_CHECK = 7;
|
|||||||
static const int CLI_PARAM_SKIP_X264_CHECK = 8;
|
static const int CLI_PARAM_SKIP_X264_CHECK = 8;
|
||||||
static const int CLI_PARAM_NO_DEADLOCK = 9;
|
static const int CLI_PARAM_NO_DEADLOCK = 9;
|
||||||
static const int CLI_PARAM_NO_GUI_STYLE = 10;
|
static const int CLI_PARAM_NO_GUI_STYLE = 10;
|
||||||
|
static const int CLI_PARAM_FIRST_RUN = 11;
|
||||||
static const int CLI_PARAM_OTHER = 42;
|
static const int CLI_PARAM_OTHER = 42;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#define VER_X264_MAJOR 2
|
#define VER_X264_MAJOR 2
|
||||||
#define VER_X264_MINOR 3
|
#define VER_X264_MINOR 3
|
||||||
#define VER_X264_PATCH 7
|
#define VER_X264_PATCH 7
|
||||||
#define VER_X264_BUILD 846
|
#define VER_X264_BUILD 848
|
||||||
|
|
||||||
#define VER_X264_PORTABLE_EDITION (0)
|
#define VER_X264_PORTABLE_EDITION (0)
|
||||||
|
|
||||||
|
@ -747,6 +747,8 @@ void MainWindow::init(void)
|
|||||||
|
|
||||||
updateLabelPos();
|
updateLabelPos();
|
||||||
|
|
||||||
|
const QStringList arguments = x264_arguments();
|
||||||
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
// Create the IPC listener thread
|
// Create the IPC listener thread
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
@ -870,8 +872,6 @@ void MainWindow::init(void)
|
|||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
// Check CPU capabilities
|
// Check CPU capabilities
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
|
|
||||||
const QStringList arguments = x264_arguments();
|
|
||||||
|
|
||||||
//Make sure this CPU can run x264 (requires MMX + MMXEXT/iSSE to run x264 with ASM enabled, additionally requires SSE1 for most x264 builds)
|
//Make sure this CPU can run x264 (requires MMX + MMXEXT/iSSE to run x264 with ASM enabled, additionally requires SSE1 for most x264 builds)
|
||||||
if(!m_sysinfo->hasMMXSupport())
|
if(!m_sysinfo->hasMMXSupport())
|
||||||
@ -989,9 +989,9 @@ void MainWindow::init(void)
|
|||||||
if(x264_version_date().addMonths(6) < x264_current_date_safe())
|
if(x264_version_date().addMonths(6) < x264_current_date_safe())
|
||||||
{
|
{
|
||||||
QString text;
|
QString text;
|
||||||
text += QString("<nobr><tt>%1</tt></nobr><br><br>").arg(tr("Your version of Simple x264 Launcher is more than 6 months old!").replace("-", "−"));
|
text += QString("<nobr><tt>%1</tt></nobr><br><br>").arg(tr("Your version of Simple x264 Launcher is more than 6 months old!").replace('-', "−"));
|
||||||
text += QString("<nobr><tt>%1<br><a href=\"%2\">%3</a><br><br>").arg(tr("You can download the most recent version from the official web-site now:").replace("-", "−"), QString::fromLatin1(update_url), QString::fromLatin1(update_url).replace("-", "−"));
|
text += QString("<nobr><tt>%1<br><a href=\"%2\">%3</a><br><br>").arg(tr("You can download the most recent version from the official web-site now:").replace('-', "−"), QString::fromLatin1(update_url), QString::fromLatin1(update_url).replace("-", "−"));
|
||||||
text += QString("<nobr><tt>%1</tt></nobr><br>").arg(tr("Alternatively, click 'Check for Updates' to run the auto-update utility.").replace("-", "−"));
|
text += QString("<nobr><tt>%1</tt></nobr><br>").arg(tr("Alternatively, click 'Check for Updates' to run the auto-update utility.").replace('-', "−"));
|
||||||
QMessageBox msgBox(this);
|
QMessageBox msgBox(this);
|
||||||
msgBox.setIconPixmap(QIcon(":/images/update.png").pixmap(56,56));
|
msgBox.setIconPixmap(QIcon(":/images/update.png").pixmap(56,56));
|
||||||
msgBox.setWindowTitle(tr("Update Notification"));
|
msgBox.setWindowTitle(tr("Update Notification"));
|
||||||
@ -1029,7 +1029,13 @@ void MainWindow::init(void)
|
|||||||
if(!parseCommandLineArgs())
|
if(!parseCommandLineArgs())
|
||||||
{
|
{
|
||||||
//Update reminder
|
//Update reminder
|
||||||
if((!m_preferences->getNoUpdateReminder()) && (m_recentlyUsed->lastUpdateCheck() + 14 < x264_current_date_safe().toJulianDay()))
|
if(CLIParser::checkFlag(CLI_PARAM_FIRST_RUN, arguments))
|
||||||
|
{
|
||||||
|
qWarning("First run -> resetting update check now!");
|
||||||
|
m_recentlyUsed->setLastUpdateCheck(0);
|
||||||
|
RecentlyUsed::saveRecentlyUsed(m_recentlyUsed);
|
||||||
|
}
|
||||||
|
else if((!m_preferences->getNoUpdateReminder()) && (m_recentlyUsed->lastUpdateCheck() + 14 < x264_current_date_safe().toJulianDay()))
|
||||||
{
|
{
|
||||||
if(QMessageBox::warning(this, tr("Update Notification"), QString("<nobr>%1</nobr>").arg(tr("Your last update check was more than 14 days ago. Check for updates now?")), tr("Check for Updates"), tr("Discard")) == 0)
|
if(QMessageBox::warning(this, tr("Update Notification"), QString("<nobr>%1</nobr>").arg(tr("Your last update check was more than 14 days ago. Check for updates now?")), tr("Check for Updates"), tr("Discard")) == 0)
|
||||||
{
|
{
|
||||||
@ -1061,7 +1067,7 @@ void MainWindow::updateLabelPos(void)
|
|||||||
*/
|
*/
|
||||||
void MainWindow::copyLogToClipboard(bool checked)
|
void MainWindow::copyLogToClipboard(bool checked)
|
||||||
{
|
{
|
||||||
qDebug("copyLogToClipboard");
|
qDebug("Coyping logfile to clipboard...");
|
||||||
|
|
||||||
if(LogFileModel *log = dynamic_cast<LogFileModel*>(ui->logView->model()))
|
if(LogFileModel *log = dynamic_cast<LogFileModel*>(ui->logView->model()))
|
||||||
{
|
{
|
||||||
|
@ -461,7 +461,7 @@ bool UpdaterDialog::checkBinaries(QString &wgetBin, QString &gpgvBin)
|
|||||||
}
|
}
|
||||||
FILE_INFO[] =
|
FILE_INFO[] =
|
||||||
{
|
{
|
||||||
{ "wget.exe", "17b522345239bcb95b5b0f7f50a883ba5957894a1feb769763e38ed789a8a0f63fead0155f54b9ffd0f1cdc5dfd855d207a6e7a8e4fd192589a8838ce646c504e" },
|
{ "wget.exe", "7b522345239bcb95b5b0f7f50a883ba5957894a1feb769763e38ed789a8a0f63fead0155f54b9ffd0f1cdc5dfd855d207a6e7a8e4fd192589a8838ce646c504e" },
|
||||||
{ "gpgv.exe", "b42b7ef5650cd78d92773f03d4eefc90d9ba6ffe6af19d389851e32b5ab1c58c91c3dfceb2cbe0d0d13774ee2cf100c20f0add7f33463229999da5aaa861f064" },
|
{ "gpgv.exe", "b42b7ef5650cd78d92773f03d4eefc90d9ba6ffe6af19d389851e32b5ab1c58c91c3dfceb2cbe0d0d13774ee2cf100c20f0add7f33463229999da5aaa861f064" },
|
||||||
{ "gpgv.gpg", "58e0f0e462bbd0b5aa4f638801c1097da7da4b3eb38c8c88ad1db23705c0f11e174b083fa55fe76bd3ba196341c967833a6f3427d6f63ad8565900745535d8fa" },
|
{ "gpgv.gpg", "58e0f0e462bbd0b5aa4f638801c1097da7da4b3eb38c8c88ad1db23705c0f11e174b083fa55fe76bd3ba196341c967833a6f3427d6f63ad8565900745535d8fa" },
|
||||||
{ "wupd.exe", "e8ee5fb11e4964c0091311a41b46e2ea49cf675755ee830c38a26027c81aecc78842c25facc0ac6b797586e4c4b22ac116dd1735b0b11b67c13e4a17fb1e5f5e" },
|
{ "wupd.exe", "e8ee5fb11e4964c0091311a41b46e2ea49cf675755ee830c38a26027c81aecc78842c25facc0ac6b797586e4c4b22ac116dd1735b0b11b67c13e4a17fb1e5f5e" },
|
||||||
|
Loading…
Reference in New Issue
Block a user