feat: 支持按策略生成 Git 标签清单
This commit is contained in:
+21
-5
@@ -251,15 +251,31 @@ int main(int argc, char* argv[])
|
||||
QCoreApplication::translate("Launcher", "A version policy sequence rollback was detected. Startup has been blocked."));
|
||||
return -1;
|
||||
}
|
||||
if (state.isSystemTimeRewound())
|
||||
{
|
||||
progress.close();
|
||||
if (state.isSystemTimeRewound())
|
||||
{
|
||||
progress.close();
|
||||
QMessageBox::critical(nullptr,
|
||||
QCoreApplication::translate("Launcher", "Security Check Failed"),
|
||||
QCoreApplication::translate("Launcher", "A possible system time rollback was detected. Startup has been blocked."));
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (networkOk && policy.gitTagsEnabled())
|
||||
{
|
||||
progress.setLabelText(QCoreApplication::translate("Launcher", "Generating Git tag list..."));
|
||||
QApplication::processEvents();
|
||||
const QString tagsPath = QDir(appDir).filePath("tags.txt");
|
||||
if (!logic.refreshGitTagsFile(tagsPath))
|
||||
{
|
||||
progress.close();
|
||||
QMessageBox::warning(nullptr,
|
||||
QCoreApplication::translate("Launcher", "Git Tag List Failed"),
|
||||
QCoreApplication::translate("Launcher", "Cannot generate tags.txt, but startup will continue:\n%1").arg(logic.errorString()));
|
||||
progress.show();
|
||||
QApplication::processEvents();
|
||||
}
|
||||
}
|
||||
|
||||
if (networkOk && needUpdate)
|
||||
{
|
||||
progress.close();
|
||||
|
||||
Reference in New Issue
Block a user