← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2265: 1. Avoid recompilation of the UI when already compiled

 

------------------------------------------------------------
revno: 2265
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-06-02 06:34:33 +0200
message:
  1. Avoid recompilation of the UI when already compiled
modified:
  gui/SConscript


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'gui/SConscript'
--- gui/SConscript	2010-05-28 20:57:41 +0000
+++ gui/SConscript	2010-06-02 04:34:33 +0000
@@ -42,6 +42,9 @@
 	#
 	srcs=['FileDialog','GLViewer','MessageDialog','QtFileGenerator','QtGUI','QtGUIPreferences','SimulationController','YadeQtMainWindow','YadeCamera']
 	uis=['QtGeneratedSimulationController','QtGeneratedMessageDialog','YadeQtGeneratedMainWindow',	'QtFileGeneratorController']
+	import os.path
 	for ui in uis:
-		for s in srcs: env.AddPreAction('$buildDir/gui/qt3/%s.os'%s,'$QT_UIC -o $buildDir/gui/qt3/%s.h gui/qt3/%s.ui'%(ui,ui))
+		if os.path.exists(env.subst('$buildDir/gui/qt3/%s.h'%ui)): continue
+		for s in srcs:
+			env.AddPreAction('$buildDir/gui/qt3/%s.os'%s,'$QT_UIC -o $buildDir/gui/qt3/%s.h gui/qt3/%s.ui'%(ui,ui))