Merge pull request #15 from unmojang/evan-goode/disable-updater
Disable updater, news
This commit is contained in:
commit
c3bdc0f79b
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -454,7 +454,7 @@ jobs:
|
||||
if (Get-Content ./codesign.pfx){
|
||||
cd ${{ env.INSTALL_DIR }}
|
||||
# We ship the exact same executable for portable and non-portable editions, so signing just once is fine
|
||||
SignTool sign /fd sha256 /td sha256 /f ../codesign.pfx /p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' /tr http://timestamp.digicert.com fjordlauncher.exe fjordlauncher_updater.exe fjordlauncher_filelink.exe
|
||||
SignTool sign /fd sha256 /td sha256 /f ../codesign.pfx /p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' /tr http://timestamp.digicert.com fjordlauncher.exe fjordlauncher_filelink.exe
|
||||
} else {
|
||||
":warning: Skipped code signing for Windows, as certificate was not present." >> $env:GITHUB_STEP_SUMMARY
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ endif()
|
||||
##################################### Set Application options #####################################
|
||||
|
||||
######## Set URLs ########
|
||||
set(Launcher_NEWS_RSS_URL "https://prismlauncher.org/feed/feed.xml" CACHE STRING "URL to fetch Prism Launcher's news RSS feed from.")
|
||||
set(Launcher_NEWS_RSS_URL "" CACHE STRING "URL to fetch Prism Launcher's news RSS feed from.")
|
||||
set(Launcher_NEWS_OPEN_URL "https://prismlauncher.org/news" CACHE STRING "URL that gets opened when the user clicks 'More News'")
|
||||
set(Launcher_HELP_URL "https://prismlauncher.org/wiki/help-pages/%1" CACHE STRING "URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help")
|
||||
|
||||
@ -189,7 +189,7 @@ set(Launcher_VERSION_NAME4_COMMA "${Launcher_VERSION_MAJOR},${Launcher_VERSION_M
|
||||
set(Launcher_BUILD_PLATFORM "unknown" CACHE STRING "A short string identifying the platform that this build was built for. Only used to display in the about dialog.")
|
||||
|
||||
# Github repo URL with releases for updater
|
||||
set(Launcher_UPDATER_GITHUB_REPO "https://github.com/unmojang/FjordLauncher" CACHE STRING "Base github URL for the updater.")
|
||||
set(Launcher_UPDATER_GITHUB_REPO "" CACHE STRING "Base github URL for the updater.")
|
||||
|
||||
# Name to help updater identify valid artifacts
|
||||
set(Launcher_BUILD_ARTIFACT "" CACHE STRING "Artifact name to help the updater identify valid artifacts.")
|
||||
|
@ -86,7 +86,6 @@
|
||||
#include <minecraft/auth/AccountList.h>
|
||||
#include <net/ApiDownload.h>
|
||||
#include <net/NetJob.h>
|
||||
#include <news/NewsChecker.h>
|
||||
#include <tools/BaseProfiler.h>
|
||||
#include <updater/ExternalUpdater.h>
|
||||
#include "InstanceWindow.h"
|
||||
@ -100,7 +99,6 @@
|
||||
#include "ui/dialogs/IconPickerDialog.h"
|
||||
#include "ui/dialogs/ImportResourceDialog.h"
|
||||
#include "ui/dialogs/NewInstanceDialog.h"
|
||||
#include "ui/dialogs/NewsDialog.h"
|
||||
#include "ui/dialogs/ProgressDialog.h"
|
||||
#include "ui/instanceview/InstanceDelegate.h"
|
||||
#include "ui/instanceview/InstanceProxyModel.h"
|
||||
@ -184,7 +182,6 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
|
||||
ui->instanceToolBar->setVisibilityState(instanceToolbarSetting->get().toByteArray());
|
||||
|
||||
ui->instanceToolBar->addContextMenuAction(ui->newsToolBar->toggleViewAction());
|
||||
ui->instanceToolBar->addContextMenuAction(ui->instanceToolBar->toggleViewAction());
|
||||
ui->instanceToolBar->addContextMenuAction(ui->actionLockToolbars);
|
||||
}
|
||||
@ -238,7 +235,6 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
|
||||
// add the toolbar toggles to the view menu
|
||||
ui->viewMenu->addAction(ui->instanceToolBar->toggleViewAction());
|
||||
ui->viewMenu->addAction(ui->newsToolBar->toggleViewAction());
|
||||
|
||||
updateThemeMenu();
|
||||
updateMainToolBar();
|
||||
@ -266,21 +262,6 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
connect(secretEventFilter, &KonamiCode::triggered, this, &MainWindow::konamiTriggered);
|
||||
}
|
||||
|
||||
// Add the news label to the news toolbar.
|
||||
{
|
||||
m_newsChecker.reset(new NewsChecker(APPLICATION->network(), BuildConfig.NEWS_RSS_URL));
|
||||
newsLabel = new QToolButton();
|
||||
newsLabel->setIcon(APPLICATION->getThemedIcon("news"));
|
||||
newsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
newsLabel->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
newsLabel->setFocusPolicy(Qt::NoFocus);
|
||||
ui->newsToolBar->insertWidget(ui->actionMoreNews, newsLabel);
|
||||
|
||||
QObject::connect(newsLabel, &QAbstractButton::clicked, this, &MainWindow::newsButtonClicked);
|
||||
QObject::connect(m_newsChecker.get(), &NewsChecker::newsLoaded, this, &MainWindow::updateNewsLabel);
|
||||
updateNewsLabel();
|
||||
}
|
||||
|
||||
// Create the instance list widget
|
||||
{
|
||||
view = new InstanceView(ui->centralWidget);
|
||||
@ -371,12 +352,6 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
// TODO: refresh accounts here?
|
||||
// auto accounts = APPLICATION->accounts();
|
||||
|
||||
// load the news
|
||||
{
|
||||
m_newsChecker->reloadNews();
|
||||
updateNewsLabel();
|
||||
}
|
||||
|
||||
if (APPLICATION->updaterEnabled()) {
|
||||
bool updatesAllowed = APPLICATION->updatesAreAllowed();
|
||||
updatesAllowedChanged(updatesAllowed);
|
||||
@ -459,7 +434,6 @@ void MainWindow::lockToolbars(bool state)
|
||||
{
|
||||
ui->mainToolBar->setMovable(!state);
|
||||
ui->instanceToolBar->setMovable(!state);
|
||||
ui->newsToolBar->setMovable(!state);
|
||||
APPLICATION->settings()->set("ToolbarsLocked", state);
|
||||
}
|
||||
|
||||
@ -473,14 +447,12 @@ void MainWindow::konamiTriggered()
|
||||
ui->mainToolBar->setStyleSheet("");
|
||||
ui->instanceToolBar->setStyleSheet("");
|
||||
ui->centralWidget->setStyleSheet("");
|
||||
ui->newsToolBar->setStyleSheet("");
|
||||
ui->statusBar->setStyleSheet("");
|
||||
qDebug() << "Super Secret Mode DEACTIVATED!";
|
||||
} else {
|
||||
ui->mainToolBar->setStyleSheet(stylesheet);
|
||||
ui->instanceToolBar->setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1," + gradient);
|
||||
ui->centralWidget->setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1," + gradient);
|
||||
ui->newsToolBar->setStyleSheet(stylesheet);
|
||||
ui->statusBar->setStyleSheet(stylesheet);
|
||||
qDebug() << "Super Secret Mode ACTIVATED!";
|
||||
}
|
||||
@ -759,26 +731,6 @@ bool MainWindow::eventFilter(QObject* obj, QEvent* ev)
|
||||
return QMainWindow::eventFilter(obj, ev);
|
||||
}
|
||||
|
||||
void MainWindow::updateNewsLabel()
|
||||
{
|
||||
if (m_newsChecker->isLoadingNews()) {
|
||||
newsLabel->setText(tr("Loading news..."));
|
||||
newsLabel->setEnabled(false);
|
||||
ui->actionMoreNews->setVisible(false);
|
||||
} else {
|
||||
QList<NewsEntryPtr> entries = m_newsChecker->getNewsEntries();
|
||||
if (entries.length() > 0) {
|
||||
newsLabel->setText(entries[0]->title);
|
||||
newsLabel->setEnabled(true);
|
||||
ui->actionMoreNews->setVisible(true);
|
||||
} else {
|
||||
newsLabel->setText(tr("No news available."));
|
||||
newsLabel->setEnabled(false);
|
||||
ui->actionMoreNews->setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QList<int> stringToIntList(const QString& string)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
@ -1315,21 +1267,6 @@ void MainWindow::on_actionOpenWiki_triggered()
|
||||
DesktopServices::openUrl(QUrl(BuildConfig.HELP_URL.arg("")));
|
||||
}
|
||||
|
||||
void MainWindow::on_actionMoreNews_triggered()
|
||||
{
|
||||
auto entries = m_newsChecker->getNewsEntries();
|
||||
NewsDialog news_dialog(entries, this);
|
||||
news_dialog.exec();
|
||||
}
|
||||
|
||||
void MainWindow::newsButtonClicked()
|
||||
{
|
||||
auto entries = m_newsChecker->getNewsEntries();
|
||||
NewsDialog news_dialog(entries, this);
|
||||
news_dialog.toggleArticleList();
|
||||
news_dialog.exec();
|
||||
}
|
||||
|
||||
void MainWindow::onCatChanged(int)
|
||||
{
|
||||
setCatBackground(APPLICATION->settings()->get("TheCat").toBool());
|
||||
|
@ -51,7 +51,6 @@
|
||||
#include "net/NetJob.h"
|
||||
|
||||
class LaunchController;
|
||||
class NewsChecker;
|
||||
class QToolButton;
|
||||
class InstanceProxyModel;
|
||||
class LabeledToolButton;
|
||||
@ -140,10 +139,6 @@ class MainWindow : public QMainWindow {
|
||||
|
||||
void on_actionOpenWiki_triggered();
|
||||
|
||||
void on_actionMoreNews_triggered();
|
||||
|
||||
void newsButtonClicked();
|
||||
|
||||
void on_actionLaunchInstance_triggered();
|
||||
|
||||
void on_actionKillInstance_triggered();
|
||||
@ -199,8 +194,6 @@ class MainWindow : public QMainWindow {
|
||||
|
||||
void repopulateAccountsMenu();
|
||||
|
||||
void updateNewsLabel();
|
||||
|
||||
void konamiTriggered();
|
||||
|
||||
void globalSettingsClosed();
|
||||
@ -233,7 +226,6 @@ class MainWindow : public QMainWindow {
|
||||
// these are managed by Qt's memory management model!
|
||||
InstanceView* view = nullptr;
|
||||
InstanceProxyModel* proxymodel = nullptr;
|
||||
QToolButton* newsLabel = nullptr;
|
||||
QLabel* m_statusLeft = nullptr;
|
||||
QLabel* m_statusCenter = nullptr;
|
||||
LabeledToolButton* changeIconButton = nullptr;
|
||||
@ -243,8 +235,6 @@ class MainWindow : public QMainWindow {
|
||||
|
||||
std::shared_ptr<Setting> instanceToolbarSetting = nullptr;
|
||||
|
||||
unique_qobject_ptr<NewsChecker> m_newsChecker;
|
||||
|
||||
InstancePtr m_selectedInstance;
|
||||
QString m_currentInstIcon;
|
||||
|
||||
|
@ -59,33 +59,6 @@
|
||||
<addaction name="actionCAT"/>
|
||||
<addaction name="actionAccountsButton"/>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="newsToolBar">
|
||||
<property name="windowTitle">
|
||||
<string>News Toolbar</string>
|
||||
</property>
|
||||
<property name="allowedAreas">
|
||||
<set>Qt::BottomToolBarArea|Qt::TopToolBarArea</set>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="floatable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>BottomToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="actionMoreNews"/>
|
||||
</widget>
|
||||
<widget class="WideBar" name="instanceToolBar">
|
||||
<property name="windowTitle">
|
||||
<string>Instance Toolbar</string>
|
||||
|
@ -350,7 +350,6 @@ Section "@Launcher_DisplayName@"
|
||||
|
||||
File "@Launcher_APP_BINARY_NAME@.exe"
|
||||
File "@Launcher_APP_BINARY_NAME@_filelink.exe"
|
||||
File "@Launcher_APP_BINARY_NAME@_updater.exe"
|
||||
File "qt.conf"
|
||||
File "qtlogging.ini"
|
||||
File *.dll
|
||||
@ -436,7 +435,6 @@ Section "Uninstall"
|
||||
|
||||
Delete $INSTDIR\@Launcher_APP_BINARY_NAME@.exe
|
||||
Delete $INSTDIR\@Launcher_APP_BINARY_NAME@_filelink.exe
|
||||
Delete $INSTDIR\@Launcher_APP_BINARY_NAME@_updater.exe
|
||||
Delete $INSTDIR\qt.conf
|
||||
Delete $INSTDIR\*.dll
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user