[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasmate/terietor/remoteinstaller] publisher: Merge branch 'master' into terietor/remoteinstaller
From: Giorgos Tsiapaliwkas <terietor () gmail ! com>
Date: 2012-05-24 17:42:09
Message-ID: 20120524174209.06F07A60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 06cd10c7712bfaf9c7d0869162976405cc547462 by Giorgos Tsiapaliwkas.
Committed on 24/05/2012 at 19:40.
Pushed by tsiapaliwkas into branch 'terietor/remoteinstaller'.
Merge branch 'master' into terietor/remoteinstaller
Conflicts:
publisher/publisher.cpp
publisher/publisher.h
M +72 -8 publisher/publisher.cpp
M +3 -1 publisher/publisher.h
http://commits.kde.org/plasmate/06cd10c7712bfaf9c7d0869162976405cc547462
diff --cc publisher/publisher.cpp
index 202239e,11ddf36..2592f53
--- a/publisher/publisher.cpp
+++ b/publisher/publisher.cpp
@@@ -183,13 -178,47 +182,46 @@@ void Publisher::doCMake(int index
//create a temporary build dir
QDir dir(packagePath);
- dir.mkdir("build");
- dir.mkdir("build/");
- //TODO now we have to move into the build dir but how?
- QStringList argv("cmake");
- argv.append(packagePath);
+ //cd build/
+ dir.cd("build/");
- if(KProcess::execute(argv) >= 0 ? true: false) {
+ //initilize the processes
+ KProcess cmake;
+ KProcess makeInstall;
+
+ //KProcess isn't aware of the QDir::cd, so we need to
+ //change current directory
+ cmake.setWorkingDirectory(dir.path());
+ makeInstall.setWorkingDirectory(dir.path());
+
+ //the cmake's arguments
+ QStringList cmakeArgv;
+ // cmakeArgv.append("-DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`");
+ cmakeArgv.append("-DCMAKE_INSTALL_PREFIX=" + QString(qgetenv("KDEDIRS")));
+ cmakeArgv.append("..");
+
+ //the make install arguments
+ QStringList makeInstallArgv("install");
+
+ cmake.setProgram("cmake", cmakeArgv);
+ makeInstall.setProgram("make", makeInstallArgv);
+
+ //start the processes
+ cmake.start();
+
+ //cmake must finish before make install
+ cmake.waitForFinished();
+ makeInstall.start();
+
+ //make install must finish before the KMessageBox
+ makeInstall.waitForFinished();
+
+ bool processStatus = false;
+ processStatus = cmakeProcessStatus(cmake.error());
+ processStatus = cmakeProcessStatus(makeInstall.error());
+
+ if(processStatus) {
QDBusInterface dbi("org.kde.kded", "/kbuildsycoca", "org.kde.kbuildsycoca");
dbi.call(QDBus::NoBlock, "recreate");
KMessageBox::information(this, i18n("Project has been installed"));
diff --cc publisher/publisher.h
index e001f19,ee57cf3..7ca40c5
--- a/publisher/publisher.h
+++ b/publisher/publisher.h
@@@ -38,9 -38,9 +39,10 @@@ private slots
void doPublish();
void doPlasmaPkg(int index);
void doCMake(int index);
+ void doRemoteInstall(int index);
private:
+ bool cmakeProcessStatus(QProcess::ProcessError error);
bool exportToFile(const KUrl& url);
const QString tempPackagePath();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic