update gui

This commit is contained in:
Logan McNaughton
2022-04-03 09:43:19 -06:00
parent 02004ff0cf
commit ee252cb1d5
5 changed files with 18 additions and 17 deletions
+5 -4
View File
@@ -4,7 +4,8 @@ on: [push, pull_request]
jobs:
build-linux:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
container: quay.io/centos/centos:stream8
steps:
- uses: actions/checkout@v2
- name: Checkout core repo
@@ -14,14 +15,14 @@ jobs:
path: mupen64plus-core
- name: Update and install packages
run: |
sudo apt-get -qq update
sudo apt-get -y install build-essential qt5-default libqt5websockets5-dev libsdl2-dev
dnf -y update
dnf -y install qt5-qtwebsockets-devel
- name: Run build script
run: |
echo "#define GUI_VERSION \"a12345\"" > version.h
mkdir build
cd build
qmake ..
qmake-qt5 ..
make
build-windows:
runs-on: windows-2022
+4 -4
View File
@@ -168,10 +168,10 @@ m64p_error loadROM(QString filename)
if (filename.endsWith(".7z") || filename.endsWith(".zip") || filename.endsWith(".ZIP"))
{
QProcess process;
QString command = "7za e -so \"";
command += filename;
command += "\" *64";
process.start(command);
process.setProgram("7za");
QStringList arguments = { "e", "-so", filename, "*64" };
process.setArguments(arguments);
process.start();
process.waitForFinished(-1);
QByteArray data = process.readAllStandardOutput();
romlength = data.size();
+5 -5
View File
@@ -499,10 +499,10 @@ void MainWindow::updateDownloadFinished(QNetworkReply *reply)
file.setPermissions(QFileDevice::ReadOwner | QFileDevice::WriteOwner | QFileDevice::ExeOwner);
file.close();
QProcess process;
QString command = fullpath + " \"";
command += QCoreApplication::applicationDirPath();
command += "\"";
process.startDetached(command);
process.setProgram(fullpath);
QStringList arguments = { QCoreApplication::applicationDirPath() };
process.setArguments(arguments);
process.startDetached();
reply->deleteLater();
QCoreApplication::quit();
}
@@ -533,7 +533,7 @@ void MainWindow::updateReplyFinished(QNetworkReply *reply)
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
updateManager->get(req);
QMessageBox *message = new QMessageBox(this);
message->setStandardButtons(0);
message->setStandardButtons(QMessageBox::NoButton);
message->setText("Downloading updater");
message->show();
}
+1 -1
View File
@@ -13,7 +13,7 @@ RC_ICONS = mupen64plus.ico
ICON = mupen64plus.icns
RESOURCES = mupen64plus-gui.qrc
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050C00
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
DEFINES += "NETPLAY_VER=8"
+3 -3
View File
@@ -78,9 +78,9 @@ void SettingsDialog::initStuff()
my_index = inputChoice->findText(qtInputPlugin);
}
inputChoice->setCurrentIndex(my_index);
connect(inputChoice, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::activated),
[=](const QString &text) {
w->getSettings()->setValue("inputPlugin", text);
connect(inputChoice, QOverload<int>::of(&QComboBox::activated),
[=](int index){
w->getSettings()->setValue("inputPlugin", inputChoice->itemText(index));
w->updatePlugins();
});
layout->addWidget(inputChoice,5,1);