Mouse Password executable has blueprint version

This commit is contained in:
Victor Tran 2018-06-02 20:20:48 +10:00
parent 0421b740bc
commit 009fd1b9d8
No known key found for this signature in database
GPG key ID: FBA10B22D602BAC1
3 changed files with 26 additions and 4 deletions

View file

@ -25,13 +25,25 @@ DEFINES += QT_DEPRECATED_WARNINGS
SOURCES += \
main.cpp
TARGET = ts-mousepass-change
blueprint {
TARGET = ts-mousepass-changeb
DEFINES += "BLUEPRINT"
} else {
TARGET = ts-mousepass-change
}
unix {
target.path = /usr/lib
suid.path = /usr/lib
suid.extra = chmod u+s $(INSTALL_ROOT)/usr/lib/ts-mousepass-change
blueprint {
suid.extra = chmod u+s $(INSTALL_ROOT)/usr/lib/ts-mousepass-changeb
} else {
suid.extra = chmod u+s $(INSTALL_ROOT)/usr/lib/ts-mousepass-change
}
INSTALLS += target suid
}

View file

@ -4242,7 +4242,12 @@ void InfoPaneDropdown::on_removeMousePassword_clicked()
//Remove the mouse password
QProcess* proc = new QProcess();
QDir::home().mkdir(".theshell");
proc->start("/usr/lib/ts-mousepass-change --remove --passfile=" + QDir::homePath() + "/.theshell/mousepassword");
QString executable = "/usr/lib/ts-mousepas-change";
#ifdef BLUEPRINT
executable += "b";
#endif
proc->start(executable + " --remove --passfile=" + QDir::homePath() + "/.theshell/mousepassword");
proc->waitForFinished();
if (proc->exitCode() == 0) {

View file

@ -206,7 +206,12 @@ void MousePassword::on_nextButton_clicked()
//Save the mouse password
QProcess* proc = new QProcess();
QDir::home().mkdir(".theshell");
proc->start("/usr/lib/ts-mousepass-change --set=" + currentMousePassword + " --passfile=" + QDir::homePath() + "/.theshell/mousepassword");
QString executable = "/usr/lib/ts-mousepas-change";
#ifdef BLUEPRINT
executable += "b";
#endif
proc->start(executable + " --set=" + currentMousePassword + " --passfile=" + QDir::homePath() + "/.theshell/mousepassword");
proc->waitForFinished();
if (proc->exitCode() == 1) {