Skip to content

Commit

Permalink
Merge branch 'release/v0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-poidevin committed May 15, 2017
2 parents f9efbec + 1fe3ed3 commit 1c190ec
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@
*.user*
Makefile
*.qmake*
build-debug
build-release
test
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
42 changes: 33 additions & 9 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
{
Expand Down Expand Up @@ -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"))
Expand Down Expand Up @@ -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");
}

Expand Down Expand Up @@ -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;
}
4 changes: 3 additions & 1 deletion mainwindow.h
Original file line number Diff line number Diff line change
@@ -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 <QMainWindow>
Expand All @@ -26,6 +26,7 @@
#include <QInputDialog>
#include <QLabel>
#include <QPixmap>
#include <QSysInfo>

#include "logger.h"

Expand All @@ -50,6 +51,7 @@ private slots:
void on_patchButton_clicked();
void on_restoreButton_clicked();
void on_gitHubButton_clicked();
void on_versionButton_clicked();

void exit();

Expand Down
23 changes: 23 additions & 0 deletions mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,29 @@
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="versionButton">
<property name="geometry">
<rect>
<x>340</x>
<y>180</y>
<width>51</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<weight>50</weight>
<italic>true</italic>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>vX.X.X</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
Expand Down
18 changes: 18 additions & 0 deletions ressource/MBPMid2010-GPU-Fix-client_mac.ini
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions ressource/Readme deploy and release
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1c190ec

Please sign in to comment.