diff --git a/.gitignore b/.gitignore index 82101d3..f75b751 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ *.user* Makefile *.qmake* +build-debug +build-release +test diff --git a/CHANGELOG.md b/CHANGELOG.md index 02f3f9b..8c543a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ # CHANGELOG +## 0.4.0 (May 15th, 2017) +#### Features +* Added application version to main windows ([#20](https://github.com/julian-poidevin/MBPMid2010_GPUFix/issues/20)) + +#### BugFix +* Removed SIP checking for OS version before El Capitan ([#22](https://github.com/julian-poidevin/MBPMid2010_GPUFix/issues/22)) + ## 0.3.0 (May 6th, 2017) #### Features * Now scanning for error while patching and avoid loading when patching failed ([#15](https://github.com/julian-poidevin/MBPMid2010_GPUFix/issues/15)) diff --git a/mainwindow.cpp b/mainwindow.cpp index 0551a6d..60eea27 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -154,6 +154,12 @@ bool MainWindow::init() //this->ui->labelgithubIcon->setTextInteractionFlags(Qt::TextBrowserInteraction); //this->ui->labelgithubIcon->setOpenExternalLinks(true); + //Configure version label + QString versionNumber = VERSION; + QString versionPrefix = "v"; + QString versionName = versionPrefix + versionNumber; + this->ui->versionButton->setText(versionName); + //Search for compatibility if(isCompatibleVersion(getMBPModelVersion())) { @@ -224,20 +230,30 @@ bool MainWindow::isSIPEnabled(void) { QString SIPStatus; QProcess process; + QSysInfo::MacVersion macVersion = QSysInfo::MacintoshVersion; logger->write(" | Checking SIP Status\n"); - //Execute commande line - process.start("csrutil status"); + //SIP as been introduced since El Capitan + if(macVersion >= QSysInfo::MV_ELCAPITAN) + { + //Execute commande line + process.start("csrutil status"); - //Wait forever until finished - process.waitForFinished(-1); + //Wait forever until finished + process.waitForFinished(-1); - //Get command line output - SIPStatus = process.readAllStandardOutput(); + //Get command line output + SIPStatus = process.readAllStandardOutput(); - //Close process - process.close(); + //Close process + process.close(); + } + else + { + logger->write("No SIP for this OS\n"); + return false; + } #ifndef WINDOWS if(SIPStatus.contains("disable")) @@ -639,7 +655,7 @@ bool MainWindow::patchKernelExtensionFile(QFile *kernelFile) } else { - qDebug() << "RemoveSiblingLabel - " << confTree.at(i).nodeName << "Not found \n"; + qDebug() << "RemoveSiblingLabel - " << confTree.at(i).nodeName << "Not found"; logger->write(" - RemoveSiblingLabel - " + confTree.at(i).nodeName + " Not found \n"); } @@ -805,3 +821,11 @@ void MainWindow::on_gitHubButton_clicked() return; } + +void MainWindow::on_versionButton_clicked() +{ + QString link = "http://github.com/julian-poidevin/MBPMid2010_GPUFix/blob/master/CHANGELOG.md"; + QDesktopServices::openUrl(QUrl(link)); + + return; +} diff --git a/mainwindow.h b/mainwindow.h index 395f8b3..aed2e16 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,7 +1,7 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#define VERSION "0.3.0" +#define VERSION "0.4.0" #define APP_NAME "MBPMid2010-GPU-Fix" #include @@ -26,6 +26,7 @@ #include #include #include +#include #include "logger.h" @@ -50,6 +51,7 @@ private slots: void on_patchButton_clicked(); void on_restoreButton_clicked(); void on_gitHubButton_clicked(); + void on_versionButton_clicked(); void exit(); diff --git a/mainwindow.ui b/mainwindow.ui index ab58f4b..83c2b05 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -90,6 +90,29 @@ true + + + + 340 + 180 + 51 + 32 + + + + + 50 + true + false + + + + vX.X.X + + + true + + diff --git a/ressource/MBPMid2010-GPU-Fix-client_mac.ini b/ressource/MBPMid2010-GPU-Fix-client_mac.ini new file mode 100755 index 0000000..3234699 --- /dev/null +++ b/ressource/MBPMid2010-GPU-Fix-client_mac.ini @@ -0,0 +1,18 @@ +[DEFAULT] +name=MBPMid2010-GPU-Fix + +[Deployment] +platform="mac" +qtDir="~/Qt/5.8/clang_64" +qmlSourceDir="" +applicationDir="./build-release/" +pkgname="MBPMid2010-GPU-Fix-%(version)s" +pkgPattern="" + +[GitHub] +user="julian-poidevin" +repo="julian-poidevin/MBPMid2010_GPUFix" + +[Release] +name="v%(version)s" +description="CHANGELOG.md" diff --git a/ressource/Readme deploy and release b/ressource/Readme deploy and release new file mode 100644 index 0000000..cfe724f --- /dev/null +++ b/ressource/Readme deploy and release @@ -0,0 +1,2 @@ +qt-deploy -v VERSION --deploy ressource/MBPMid2010-GPU-Fix-client_mac.ini +sudo qt-release -v VERSION -t VERSION ./ressource/MBPMid2010-GPU-Fix-client_mac.ini \ No newline at end of file