mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-13 10:32:03 +08:00
新增架构检测
This commit is contained in:
@@ -21,8 +21,25 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->tabWidget->setTabPosition(QTabWidget::West); // 标签靠左
|
||||
// 允许输出 qDebug 信息
|
||||
QLoggingCategory::defaultCategory()->setEnabled(QtDebugMsg, true);
|
||||
// 判断是否安装 vbox
|
||||
if(system("which VBoxManage")){
|
||||
if(QMessageBox::question(NULL, "提示", "检测到您似乎没有安装 VirtualBox,立即安装?") == QMessageBox::Yes){
|
||||
system("xdg-open https://www.virtualbox.org/wiki/Linux_Downloads");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString MainWindow::GetRunCommand(QString command){
|
||||
QProcess process;
|
||||
process.start(command);
|
||||
process.waitForStarted();
|
||||
process.waitForFinished();
|
||||
QString re = process.readAllStandardOutput();
|
||||
process.close();
|
||||
return re;
|
||||
}
|
||||
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
|
||||
Reference in New Issue
Block a user