mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-13 10:32:03 +08:00
优化wine下载器
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#include "buildvbox.h"
|
||||
#include "vbox.h"
|
||||
#include <QFile>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef BUILDVBOX_H
|
||||
#define BUILDVBOX_H
|
||||
#include <QString>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#include "command.h"
|
||||
#include <QProcess>
|
||||
Command::Command()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef COMMAND_H
|
||||
#define COMMAND_H
|
||||
#include <QString>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
#include <QTranslator>
|
||||
@@ -23,11 +27,11 @@ int main(int argc, char *argv[])
|
||||
trans->load("virtualmachine-en_US.qm");
|
||||
|
||||
a.installTranslator(trans);
|
||||
// 判断是否为 !amd64
|
||||
if(GetRunCommand("arch").replace(" ", "").replace("\n", "") != QString("x86_64")){
|
||||
// 判断是否为 !amd64(无需判断了)
|
||||
/*if(GetRunCommand("arch").replace(" ", "").replace("\n", "") != QString("x86_64")){
|
||||
QMessageBox::critical(NULL, "错误", "此程序不支持非 X86 架构,立即退出");
|
||||
return 0;
|
||||
}
|
||||
}*/
|
||||
MainWindow w;
|
||||
|
||||
w.show();
|
||||
|
||||
@@ -28,12 +28,12 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->tabWidget->setTabPosition(QTabWidget::West); // 标签靠左
|
||||
// 允许输出 qDebug 信息
|
||||
QLoggingCategory::defaultCategory()->setEnabled(QtDebugMsg, true);
|
||||
// 判断是否安装 vbox
|
||||
if(system("which VBoxManage")){
|
||||
// 判断是否安装 vbox(无需判断)
|
||||
/*if(system("which VBoxManage")){
|
||||
if(QMessageBox::question(this, "提示", "检测到您似乎没有安装 VirtualBox,立即安装?") == QMessageBox::Yes){
|
||||
system("xdg-open https://www.virtualbox.org/wiki/Linux_Downloads");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
// QTimer
|
||||
QTimer *cpuGet = new QTimer(this);
|
||||
connect(cpuGet, &QTimer::timeout, this, &MainWindow::ShowCPUMessage);
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
*/
|
||||
#include "qemu.h"
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
@@ -30,7 +33,7 @@ int qemu::CreateDisk(QString path, int size){
|
||||
if(QFile::exists(path)){
|
||||
return 0;
|
||||
}
|
||||
return system(("qemu-img create '" + path + "' " + QString::number(size) + "M").toLatin1());
|
||||
return system(("qemu-img create -f qcow2 '" + path + "' " + QString::number(size) + "M").toLatin1());
|
||||
}
|
||||
int qemu::CreateDiskControl(QString controlName){
|
||||
return 0;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef QEMU_H
|
||||
#define QEMU_H
|
||||
#include <QString>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
*/
|
||||
#include "vbox.h"
|
||||
#include "command.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef VBOX_H
|
||||
#define VBOX_H
|
||||
#include <QString>
|
||||
|
||||
Reference in New Issue
Block a user