[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdevelop/3.4/buildtools/qmake
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2007-02-12 17:04:52
Message-ID: 1171299892.231750.24074.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 632907 by apaku:
Add install project/subproject action to the build menu and the context menu of the \
QM BUG:141600
M +2 -0 kdevtrollproject.rc
M +17 -0 trollprojectpart.cpp
M +49 -1 trollprojectwidget.cpp
M +2 -0 trollprojectwidget.h
--- branches/kdevelop/3.4/buildtools/qmake/kdevtrollproject.rc #632906:632907
@@ -3,12 +3,14 @@
<MenuBar>
<Menu name="build" >
<Action name="build_build_project" />
+ <Action name="build_install_project" />
<Action name="build_rebuild_project" />
<Action name="build_execute_project" />
<Action name="build_clean_project" />
<Action name="build_distclean_project" />
<Separator/>
<Action name="build_build_target" />
+ <Action name="build_install_target" />
<Action name="build_rebuild_target" />
<Action name="build_execute_target" />
<Action name="build_clean_target" />
--- branches/kdevelop/3.4/buildtools/qmake/trollprojectpart.cpp #632906:632907
@@ -114,6 +114,14 @@
"Environment variables and make arguments can be \
specified "
"in the project settings dialog, <b>Make Options</b> \
tab."));
+ action = new KAction( i18n("&Install Project"),"install" , 0,
+ m_widget, SLOT(slotInstallProject()),
+ actionCollection(),"build_install_project" );
+ action->setToolTip(i18n("Install project"));
+ action->setWhatsThis(i18n("<b>Install project</b><p>Runs <b>make install</b> \
from the project directory.<br>" + "Environment \
variables and make arguments can be specified " + "in \
the project settings dialog, <b>Make Options</b> tab.")); +
action = new KAction( i18n("&Clean Project"), 0,
m_widget, SLOT(slotCleanProject()),
actionCollection(), "build_clean_project" );
@@ -154,6 +162,15 @@
"Environment variables and make arguments can be \
specified "
"in the project settings dialog, <b>Make Options</b> \
tab."));
+ action = new KAction( i18n("&Install Subproject"), "install", 0,
+ m_widget, SLOT(slotInstallTarget()),
+ actionCollection(),"build_install_target" );
+ action->setToolTip(i18n("Install subproject"));
+ action->setWhatsThis(i18n("<b>Install subproject</b><p>Runs <b>make install</b> \
from the current subproject directory. " + "Current \
subproject is a subproject selected in <b>QMake manager</b> 'overview' window.<br>" + \
"Environment variables and make arguments can be specified " + \
"in the project settings dialog, <b>Make Options</b> tab.")); +
action = new KAction( i18n("&Clean Subproject"), 0,
m_widget, SLOT(slotCleanTarget()),
actionCollection(), "build_clean_target" );
--- branches/kdevelop/3.4/buildtools/qmake/trollprojectwidget.cpp #632906:632907
@@ -132,6 +132,7 @@
QWhatsThis::add( rebuildProjectButton, i18n( "<b>Rebuild project</b><p>Runs \
<b>make clean</b> and then <b>make</b> from the project \
directory.<br>"
"Environment variables and make arguments can be specified \
"
"in the project settings dialog, <b>Make Options</b> tab." \
) ); +
// run
executeProjectButton = new QToolButton ( projectTools, "Run button" );
executeProjectButton->setPixmap ( SmallIcon ( "exec" ) );
@@ -162,7 +163,6 @@
connect ( executeProjectButton, SIGNAL ( clicked () ), m_part, SLOT ( \
slotBuildAndExecuteProject () ) );
-
connect ( projectconfButton, SIGNAL ( clicked () ), this, SLOT ( \
slotConfigureProject () ) );
// Project tree
@@ -250,6 +250,7 @@
"Current subproject is a subproject selected in <b>QMake \
manager</b> 'overview' window.<br>"
"Environment variables and make arguments can be specified \
"
"in the project settings dialog, <b>Make Options</b> tab." \
) ); +
// run
executeTargetButton = new QToolButton ( fileTools, "Run sp button" );
executeTargetButton->setPixmap ( SmallIcon ( "exec" ) );
@@ -674,6 +675,25 @@
QString buildcmd = constructMakeCommandLine( m_rootSubproject->scope );
m_part->queueCmd( dir, dircmd + buildcmd );
}
+
+void TrollProjectWidget::slotInstallProject()
+{
+ if ( m_part->partController() ->saveAllFiles() == false )
+ return ; //user cancelled
+
+ QString dir = projectDirectory();
+
+ if ( !m_rootSubproject )
+ return ;
+
+ createMakefileIfMissing( dir, m_rootSubproject );
+
+ m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() );
+ QString dircmd = "cd " + KProcess::quote( dir ) + " && " ;
+ QString buildcmd = constructMakeCommandLine( m_rootSubproject->scope ) + " \
install"; + m_part->queueCmd( dir, dircmd + buildcmd );
+}
+
void TrollProjectWidget::slotBuildTarget()
{
// no subproject selected
@@ -692,6 +712,24 @@
m_part->queueCmd( dir, dircmd + buildcmd );
}
+void TrollProjectWidget::slotInstallTarget()
+{
+ // no subproject selected
+ m_part->partController() ->saveAllFiles();
+ if ( !m_shownSubproject )
+ return ;
+ // can't build from scope
+ if ( m_shownSubproject->scope->scopeType() != Scope::ProjectScope )
+ return ;
+ QString dir = subprojectDirectory();
+ createMakefileIfMissing( dir, m_shownSubproject );
+
+ m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() );
+ QString dircmd = "cd " + KProcess::quote( dir ) + " && " ;
+ QString buildcmd = constructMakeCommandLine( m_shownSubproject->scope ) + " \
install"; + m_part->queueCmd( dir, dircmd + buildcmd );
+}
+
void TrollProjectWidget::slotRebuildProject()
{
m_part->partController() ->saveAllFiles();
@@ -872,6 +910,7 @@
int idBuild = -2;
int idRebuild = -2;
int idClean = -2;
+ int idInstall = -2;
int idDistClean = -2;
int idQmake = -2;
int idQmakeRecursive = -2;
@@ -889,6 +928,10 @@
popup.setWhatsThis( idBuild, i18n( "<b>Build</b><p>Runs <b>make</b> from the \
selected subproject directory.<br>"
"Environment variables and make arguments \
can be specified "
"in the project settings dialog, <b>Make \
Options</b> tab." ) ); + idInstall = popup.insertItem( i18n( "Install" ) );
+ popup.setWhatsThis( idBuild, i18n( "<b>Install</b><p>Runs <b>make \
install</b> from the selected subproject directory.<br>" + \
"Environment variables and make arguments can be specified " + \
"in the project settings dialog, <b>Make Options</b> tab." ) ); idClean = \
popup.insertItem( i18n( "Clean" ) );
popup.setWhatsThis( idBuild, i18n( "<b>Clean project</b><p>Runs <b>make \
clean</b> command from the project "
"directory.<br> Environment variables and \
make arguments can be specified " @@ -980,6 +1023,11 @@
slotBuildTarget();
// m_part->startMakeCommand(projectDirectory() + relpath, \
QString::fromLatin1("")); }
+ else if ( r == idInstall )
+ {
+ slotInstallTarget();
+ // m_part->startMakeCommand(projectDirectory() + relpath, \
QString::fromLatin1("")); + }
else if ( r == idRebuild )
{
slotRebuildTarget();
--- branches/kdevelop/3.4/buildtools/qmake/trollprojectwidget.h #632906:632907
@@ -97,12 +97,14 @@
public slots:
void slotBuildTarget();
+ void slotInstallTarget();
void slotRebuildTarget();
void slotCleanTarget();
void slotDistCleanTarget();
void slotExecuteTarget();
void slotBuildProject();
+ void slotInstallProject();
void slotRebuildProject();
void slotCleanProject();
void slotDistCleanProject();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic