|
|
@ -31,7 +31,7 @@ from distutils import log
|
|
|
|
from distutils import file_util
|
|
|
|
from distutils import file_util
|
|
|
|
from distutils import dir_util
|
|
|
|
from distutils import dir_util
|
|
|
|
from distutils.util import byte_compile
|
|
|
|
from distutils.util import byte_compile
|
|
|
|
import qtuicompiler
|
|
|
|
import tqtuicompiler
|
|
|
|
import stat
|
|
|
|
import stat
|
|
|
|
import os,os.path,imp,glob
|
|
|
|
import os,os.path,imp,glob
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
@ -56,7 +56,7 @@ def setup(**arg_dict):
|
|
|
|
'build_messages' : BuildI18NMessages,
|
|
|
|
'build_messages' : BuildI18NMessages,
|
|
|
|
'install_messages' : InstallI18NMessages,
|
|
|
|
'install_messages' : InstallI18NMessages,
|
|
|
|
'update_messages' : UpdateI18NMessages,
|
|
|
|
'update_messages' : UpdateI18NMessages,
|
|
|
|
'checkpyqt' : CheckPyQt,
|
|
|
|
'checkpytqt' : CheckPyTQt,
|
|
|
|
'checkpytde' : CheckPyTDE,
|
|
|
|
'checkpytde' : CheckPyTDE,
|
|
|
|
'uninstall' : Uninstall,
|
|
|
|
'uninstall' : Uninstall,
|
|
|
|
'build' : BuildKDE,
|
|
|
|
'build' : BuildKDE,
|
|
|
@ -79,7 +79,7 @@ def setup(**arg_dict):
|
|
|
|
class KDEDistribution(Distribution):
|
|
|
|
class KDEDistribution(Distribution):
|
|
|
|
def __init__(self,attrs=None):
|
|
|
|
def __init__(self,attrs=None):
|
|
|
|
self.min_kde_version = None
|
|
|
|
self.min_kde_version = None
|
|
|
|
self.min_qt_version = None
|
|
|
|
self.min_tqt_version = None
|
|
|
|
self.kcontrol_modules = None
|
|
|
|
self.kcontrol_modules = None
|
|
|
|
self.tdeioslaves = None
|
|
|
|
self.tdeioslaves = None
|
|
|
|
self.executable_links = None
|
|
|
|
self.executable_links = None
|
|
|
@ -179,7 +179,7 @@ class InstallKDE(install):
|
|
|
|
|
|
|
|
|
|
|
|
sub_commands = install.sub_commands[:]
|
|
|
|
sub_commands = install.sub_commands[:]
|
|
|
|
sub_commands.insert(0, ('checkpytde',None) )
|
|
|
|
sub_commands.insert(0, ('checkpytde',None) )
|
|
|
|
sub_commands.insert(0, ('checkpyqt',None) )
|
|
|
|
sub_commands.insert(0, ('checkpytqt',None) )
|
|
|
|
sub_commands.append( ('install_executable_links',has_executable_links) )
|
|
|
|
sub_commands.append( ('install_executable_links',has_executable_links) )
|
|
|
|
sub_commands.append( ('install_messages',has_messages) )
|
|
|
|
sub_commands.append( ('install_messages',has_messages) )
|
|
|
|
sub_commands.append( ('install_html',has_docbook_html) )
|
|
|
|
sub_commands.append( ('install_html',has_docbook_html) )
|
|
|
@ -501,11 +501,11 @@ class BuildKControlModule(Command):
|
|
|
|
('kde-inc-dir=',None,'Directory containing C++ header files for KDE'),
|
|
|
|
('kde-inc-dir=',None,'Directory containing C++ header files for KDE'),
|
|
|
|
('kde-lib-dir=',None,'Directory containing library files for KDE'),
|
|
|
|
('kde-lib-dir=',None,'Directory containing library files for KDE'),
|
|
|
|
('kde-kcm-lib-dir=',None,'Directory for KDE kcm library files'),
|
|
|
|
('kde-kcm-lib-dir=',None,'Directory for KDE kcm library files'),
|
|
|
|
('qt-inc-dir=',None,'Directory containing C++ header files for Qt'),
|
|
|
|
('tqt-inc-dir=',None,'Directory containing C++ header files for TQt'),
|
|
|
|
('qt-lib-dir=',None,'Directory containing library files for Qt'),
|
|
|
|
('tqt-lib-dir=',None,'Directory containing library files for TQt'),
|
|
|
|
('sip-dir=',None,'Directory containing the sip library files'),
|
|
|
|
('sip-dir=',None,'Directory containing the sip library files'),
|
|
|
|
('clib=',None,'gcc library and path'),
|
|
|
|
('clib=',None,'gcc library and path'),
|
|
|
|
('pyqt-dir=',None,'PyQt module directory'),
|
|
|
|
('pytqt-dir=',None,'PyTQt module directory'),
|
|
|
|
('pytde-dir=',None,'PyTDE module directory'),
|
|
|
|
('pytde-dir=',None,'PyTDE module directory'),
|
|
|
|
('data-dir=',None,'installation directory for data (script) files')]
|
|
|
|
('data-dir=',None,'installation directory for data (script) files')]
|
|
|
|
|
|
|
|
|
|
|
@ -517,11 +517,11 @@ class BuildKControlModule(Command):
|
|
|
|
self.kde_inc_dir = None
|
|
|
|
self.kde_inc_dir = None
|
|
|
|
self.kde_lib_dir = None
|
|
|
|
self.kde_lib_dir = None
|
|
|
|
self.kde_kcm_lib_dir = None
|
|
|
|
self.kde_kcm_lib_dir = None
|
|
|
|
self.qt_inc_dir = None
|
|
|
|
self.tqt_inc_dir = None
|
|
|
|
self.qt_lib_dir = None
|
|
|
|
self.tqt_lib_dir = None
|
|
|
|
self.sip_dir = None
|
|
|
|
self.sip_dir = None
|
|
|
|
self.clib = None
|
|
|
|
self.clib = None
|
|
|
|
self.pyqt_dir = None
|
|
|
|
self.pytqt_dir = None
|
|
|
|
self.pytde_dir = None
|
|
|
|
self.pytde_dir = None
|
|
|
|
self.data_dir = None
|
|
|
|
self.data_dir = None
|
|
|
|
|
|
|
|
|
|
|
@ -561,38 +561,37 @@ class BuildKControlModule(Command):
|
|
|
|
self.announce("Using %s for KDE KCM library files" % self.kde_kcm_lib_dir)
|
|
|
|
self.announce("Using %s for KDE KCM library files" % self.kde_kcm_lib_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# TQt inc dir
|
|
|
|
# TQt inc dir
|
|
|
|
if self.qt_inc_dir is None:
|
|
|
|
if self.tqt_inc_dir is None:
|
|
|
|
canidatepaths = []
|
|
|
|
canidatepaths = []
|
|
|
|
qtinc = os.getenv("QTINC")
|
|
|
|
tqtinc = os.getenv("TQTINC")
|
|
|
|
if qtinc != None:
|
|
|
|
if tqtinc != None:
|
|
|
|
canidatepaths.append(qtinc)
|
|
|
|
canidatepaths.append(tqtinc)
|
|
|
|
qtdir = os.getenv("TQTDIR")
|
|
|
|
tqtdir = os.getenv("TQTDIR")
|
|
|
|
if qtdir != None:
|
|
|
|
if tqtdir != None:
|
|
|
|
canidatepaths.append(os.path.join(qtdir,"include"))
|
|
|
|
canidatepaths.append(os.path.join(tqtdir,"include"))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/include"))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/include"))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/qt3/include"))
|
|
|
|
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"include"))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"include"))
|
|
|
|
canidatepaths.append("/opt/tqt3/include")
|
|
|
|
canidatepaths.append("/opt/tqt3/include")
|
|
|
|
canidatepaths.append("/usr/include/tqt3")
|
|
|
|
canidatepaths.append("/usr/include/tqt3")
|
|
|
|
self.qt_inc_dir = FindFileInPaths('ntqstring.h',canidatepaths)
|
|
|
|
self.tqt_inc_dir = FindFileInPaths('ntqstring.h',canidatepaths)
|
|
|
|
if self.qt_inc_dir is None:
|
|
|
|
if self.tqt_inc_dir is None:
|
|
|
|
self.qt_inc_dir = FindFileInPaths('qstring.h',canidatepaths)
|
|
|
|
self.tqt_inc_dir = FindFileInPaths('tqstring.h',canidatepaths)
|
|
|
|
if self.qt_inc_dir is None:
|
|
|
|
if self.tqt_inc_dir is None:
|
|
|
|
raise SystemExit("Failed to find the TQt header file directory")
|
|
|
|
raise SystemExit("Failed to find the TQt header file directory")
|
|
|
|
if FindFileInPaths('ntqstring.h',[self.qt_inc_dir]) is None:
|
|
|
|
if FindFileInPaths('ntqstring.h',[self.tqt_inc_dir]) is None:
|
|
|
|
if FindFileInPaths('qstring.h',[self.qt_inc_dir]) is None:
|
|
|
|
if FindFileInPaths('tqstring.h',[self.tqt_inc_dir]) is None:
|
|
|
|
raise SystemExit("Failed to find TQt header files in: %s" % self.qt_inc_dir)
|
|
|
|
raise SystemExit("Failed to find TQt header files in: %s" % self.tqt_inc_dir)
|
|
|
|
self.announce("Using %s for TQt header files" % self.qt_inc_dir)
|
|
|
|
self.announce("Using %s for TQt header files" % self.tqt_inc_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# TQt lib dir
|
|
|
|
# TQt lib dir
|
|
|
|
if self.qt_lib_dir is None:
|
|
|
|
if self.tqt_lib_dir is None:
|
|
|
|
canidatepaths = []
|
|
|
|
canidatepaths = []
|
|
|
|
tqtlib = os.getenv("TQTLIB")
|
|
|
|
tqtlib = os.getenv("TQTLIB")
|
|
|
|
if tqtlib != None:
|
|
|
|
if tqtlib != None:
|
|
|
|
canidatepaths.append(tqtlib)
|
|
|
|
canidatepaths.append(tqtlib)
|
|
|
|
qtdir = os.getenv("TQTDIR")
|
|
|
|
tqtdir = os.getenv("TQTDIR")
|
|
|
|
if qtdir != None:
|
|
|
|
if tqtdir != None:
|
|
|
|
canidatepaths.append(os.path.join(qtdir,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(tqtdir,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
|
|
|
@ -600,26 +599,23 @@ class BuildKControlModule(Command):
|
|
|
|
canidatepaths.append("/opt/tqt/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt/lib/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt/lib/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
|
|
|
|
self.qt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
|
|
|
|
self.tqt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
|
|
|
|
if self.qt_lib_dir is None:
|
|
|
|
if self.tqt_lib_dir is None:
|
|
|
|
canidatepaths = []
|
|
|
|
canidatepaths = []
|
|
|
|
tqtlib = os.getenv("TQTLIB")
|
|
|
|
tqtlib = os.getenv("TQTLIB")
|
|
|
|
if tqtlib != None:
|
|
|
|
if tqtlib != None:
|
|
|
|
canidatepaths.append(tqtlib)
|
|
|
|
canidatepaths.append(tqtlib)
|
|
|
|
qtdir = os.getenv("TQTDIR")
|
|
|
|
tqtdir = os.getenv("TQTDIR")
|
|
|
|
if qtdir != None:
|
|
|
|
if tqtdir != None:
|
|
|
|
canidatepaths.append(os.path.join(qtdir,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(tqtdir,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/qt3/"+get_libdir_name()))
|
|
|
|
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
|
|
|
|
canidatepaths.append("/opt/tqt3/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt3/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/qt/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/qt/lib/"+get_libdir_name())
|
|
|
|
self.tqt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
|
|
|
|
canidatepaths.append("/opt/qt3/lib/"+get_libdir_name())
|
|
|
|
if self.tqt_lib_dir is None:
|
|
|
|
self.qt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
|
|
|
|
|
|
|
|
if self.qt_lib_dir is None:
|
|
|
|
|
|
|
|
raise SystemExit("Failed to find TQt library files")
|
|
|
|
raise SystemExit("Failed to find TQt library files")
|
|
|
|
self.announce("Using %s for TQt library files" % self.qt_lib_dir)
|
|
|
|
self.announce("Using %s for TQt library files" % self.tqt_lib_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# Python dir
|
|
|
|
# Python dir
|
|
|
|
if self.python_dir is None:
|
|
|
|
if self.python_dir is None:
|
|
|
@ -633,13 +629,13 @@ class BuildKControlModule(Command):
|
|
|
|
self.announce("Using %s for Python header files" % self.python_inc_dir)
|
|
|
|
self.announce("Using %s for Python header files" % self.python_inc_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# PyTQt dir
|
|
|
|
# PyTQt dir
|
|
|
|
if self.pyqt_dir is None:
|
|
|
|
if self.pytqt_dir is None:
|
|
|
|
self.pyqt_dir = FindFileInPaths("PyTQt", sys.path)
|
|
|
|
self.pytqt_dir = FindFileInPaths("PyTQt", sys.path)
|
|
|
|
if self.pyqt_dir is None:
|
|
|
|
if self.pytqt_dir is None:
|
|
|
|
self.pyqt_dir = os.path.join(sysconfig.get_python_lib(), 'PyTQt')
|
|
|
|
self.pytqt_dir = os.path.join(sysconfig.get_python_lib(), 'PyTQt')
|
|
|
|
if (FindFileInPaths("libtqtcmodule*",[self.pyqt_dir]) is None) and (FindFileInPaths("qt*",[self.pyqt_dir]) is None):
|
|
|
|
if (FindFileInPaths("libtqtcmodule*",[self.pytqt_dir]) is None) and (FindFileInPaths("tqt*",[self.pytqt_dir]) is None):
|
|
|
|
raise SystemExit("Failed to find the PyTQt directory: %s" % self.pyqt_dir)
|
|
|
|
raise SystemExit("Failed to find the PyTQt directory: %s" % self.pytqt_dir)
|
|
|
|
self.announce("Using %s for PyTQt modules" % self.pyqt_dir)
|
|
|
|
self.announce("Using %s for PyTQt modules" % self.pytqt_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# PyTDE dir
|
|
|
|
# PyTDE dir
|
|
|
|
if self.pytde_dir is None:
|
|
|
|
if self.pytde_dir is None:
|
|
|
@ -796,7 +792,7 @@ class BuildKControlModule(Command):
|
|
|
|
cmdlist.append("-I" + self.python_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.python_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.kde_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.kde_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.kde_inc_dir + "/tde")
|
|
|
|
cmdlist.append("-I" + self.kde_inc_dir + "/tde")
|
|
|
|
cmdlist.append("-I" + self.qt_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.tqt_inc_dir)
|
|
|
|
cmdlist.append("-I/usr/include/tqt")
|
|
|
|
cmdlist.append("-I/usr/include/tqt")
|
|
|
|
cmdlist.append("-I.")
|
|
|
|
cmdlist.append("-I.")
|
|
|
|
# input
|
|
|
|
# input
|
|
|
@ -831,28 +827,28 @@ class BuildKControlModule(Command):
|
|
|
|
|
|
|
|
|
|
|
|
# FIXME I doubt half of these libraries need to be here.
|
|
|
|
# FIXME I doubt half of these libraries need to be here.
|
|
|
|
linklist.append(self.sip_dir+"/sip_tqt.so")
|
|
|
|
linklist.append(self.sip_dir+"/sip_tqt.so")
|
|
|
|
# PyQt libs
|
|
|
|
# PyTQt libs
|
|
|
|
linklist.append(self.pyqt_dir+"/qt.so")
|
|
|
|
linklist.append(self.pytqt_dir+"/tqt.so")
|
|
|
|
# PyTDE libs
|
|
|
|
# PyTDE libs
|
|
|
|
linklist.append(self.pytde_dir+"/tdecore.so")
|
|
|
|
linklist.append(self.pytde_dir+"/tdecore.so")
|
|
|
|
linklist.append(self.pytde_dir+"/tdeui.so")
|
|
|
|
linklist.append(self.pytde_dir+"/tdeui.so")
|
|
|
|
|
|
|
|
|
|
|
|
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip_tqt")
|
|
|
|
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip_tqt")
|
|
|
|
# # PyQt libs
|
|
|
|
# # PyTQt libs
|
|
|
|
# linklist.append("-L"+self.pyqt_dir); linklist.append("-lqtcmodule")
|
|
|
|
# linklist.append("-L"+self.pytqt_dir); linklist.append("-lqtcmodule")
|
|
|
|
# # PyTDE libs
|
|
|
|
# # PyTDE libs
|
|
|
|
# linklist.append("-L"+self.pytde_dir); linklist.append("-ltdecorecmodule"); linklist.append("-ltdeuicmodule")
|
|
|
|
# linklist.append("-L"+self.pytde_dir); linklist.append("-ltdecorecmodule"); linklist.append("-ltdeuicmodule")
|
|
|
|
|
|
|
|
|
|
|
|
linklist.append("-L"+self.kde_lib_dir); linklist.append("-L/opt/trinity/lib"); linklist.append("-ltdecore"); linklist.append("-lpythonize")
|
|
|
|
linklist.append("-L"+self.kde_lib_dir); linklist.append("-L/opt/trinity/lib"); linklist.append("-ltdecore"); linklist.append("-lpythonize")
|
|
|
|
linklist.append("-L"+self.qt_lib_dir); linklist.append("-ltqt-mt")
|
|
|
|
linklist.append("-L"+self.tqt_lib_dir); linklist.append("-ltqt-mt")
|
|
|
|
linklist.append("-lm")
|
|
|
|
linklist.append("-lm")
|
|
|
|
linklist.append("-lc")
|
|
|
|
linklist.append("-lc")
|
|
|
|
linklist.append(self.clib)
|
|
|
|
linklist.append(self.clib)
|
|
|
|
|
|
|
|
|
|
|
|
linklist.append("-R"); linklist.append(self.python_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.python_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.qt_lib_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.tqt_lib_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.sip_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.sip_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.pyqt_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.pytqt_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.pytde_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.pytde_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.kde_lib_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.kde_lib_dir)
|
|
|
|
|
|
|
|
|
|
|
@ -944,10 +940,10 @@ static TDECModule* return_instance( TQWidget *parent, const char *name ) {
|
|
|
|
|
|
|
|
|
|
|
|
// Inject a helper function
|
|
|
|
// Inject a helper function
|
|
|
|
TQString bridge = TQString("import sip_tqt\n"
|
|
|
|
TQString bridge = TQString("import sip_tqt\n"
|
|
|
|
"from PyTQt import qt\n"
|
|
|
|
"from PyTQt import tqt\n"
|
|
|
|
"def kcontrol_bridge_" FACTORY "(parent,name):\n"
|
|
|
|
"def kcontrol_bridge_" FACTORY "(parent,name):\n"
|
|
|
|
" if parent!=0:\n"
|
|
|
|
" if parent!=0:\n"
|
|
|
|
" wparent = sip_tqt.wrapinstance(parent,qt.TQWidget)\n"
|
|
|
|
" wparent = sip_tqt.wrapinstance(parent,tqt.TQWidget)\n"
|
|
|
|
" else:\n"
|
|
|
|
" else:\n"
|
|
|
|
" wparent = None\n"
|
|
|
|
" wparent = None\n"
|
|
|
|
" inst = " FACTORY "(wparent, name)\n"
|
|
|
|
" inst = " FACTORY "(wparent, name)\n"
|
|
|
@ -1320,7 +1316,7 @@ class UpdateI18NMessages(Command):
|
|
|
|
# Compile any UI files
|
|
|
|
# Compile any UI files
|
|
|
|
for dir in self.distribution.i18n[1]:
|
|
|
|
for dir in self.distribution.i18n[1]:
|
|
|
|
for file in glob.glob(os.path.join(dir,'*.ui')):
|
|
|
|
for file in glob.glob(os.path.join(dir,'*.ui')):
|
|
|
|
qtuicompiler.UpdateUI(file,kde=True)
|
|
|
|
tqtuicompiler.UpdateUI(file,kde=True)
|
|
|
|
|
|
|
|
|
|
|
|
# Fetch all of the python files.
|
|
|
|
# Fetch all of the python files.
|
|
|
|
for dir in self.distribution.i18n[1]:
|
|
|
|
for dir in self.distribution.i18n[1]:
|
|
|
@ -1449,11 +1445,11 @@ class BuildTdeioslave(Command):
|
|
|
|
('kde-lib-dir=',None,'Directory containing library files for KDE'),
|
|
|
|
('kde-lib-dir=',None,'Directory containing library files for KDE'),
|
|
|
|
('kde-tdeioslave-lib-dir=',None,'Directory for KDE tdeioslave library files'),
|
|
|
|
('kde-tdeioslave-lib-dir=',None,'Directory for KDE tdeioslave library files'),
|
|
|
|
('kde-protocol-dir=',None,'Directory for KDE tdeioslave protocol files'),
|
|
|
|
('kde-protocol-dir=',None,'Directory for KDE tdeioslave protocol files'),
|
|
|
|
('qt-inc-dir=',None,'Directory containing C++ header files for Qt'),
|
|
|
|
('tqt-inc-dir=',None,'Directory containing C++ header files for TQt'),
|
|
|
|
('qt-lib-dir=',None,'Directory containing library files for Qt'),
|
|
|
|
('tqt-lib-dir=',None,'Directory containing library files for TQt'),
|
|
|
|
('sip-dir=','/usr/lib/pyshared/python*','Directory containing the sip library files'),
|
|
|
|
('sip-dir=','/usr/lib/pyshared/python*','Directory containing the sip library files'),
|
|
|
|
('clib=',None,'gcc library and path'),
|
|
|
|
('clib=',None,'gcc library and path'),
|
|
|
|
('pyqt-dir=','/usr/lib/pyshared/python*','PyQt module directory'),
|
|
|
|
('pytqt-dir=','/usr/lib/pyshared/python*','PyTQt module directory'),
|
|
|
|
('pytde-dir=',None,'PyTDE module directory'),
|
|
|
|
('pytde-dir=',None,'PyTDE module directory'),
|
|
|
|
('data-dir=',None,'installation directory for data (script) files')]
|
|
|
|
('data-dir=',None,'installation directory for data (script) files')]
|
|
|
|
|
|
|
|
|
|
|
@ -1466,11 +1462,11 @@ class BuildTdeioslave(Command):
|
|
|
|
self.kde_lib_dir = None
|
|
|
|
self.kde_lib_dir = None
|
|
|
|
self.kde_tdeioslave_lib_dir = None
|
|
|
|
self.kde_tdeioslave_lib_dir = None
|
|
|
|
self.kde_protocol_dir = None
|
|
|
|
self.kde_protocol_dir = None
|
|
|
|
self.qt_inc_dir = None
|
|
|
|
self.tqt_inc_dir = None
|
|
|
|
self.qt_lib_dir = None
|
|
|
|
self.tqt_lib_dir = None
|
|
|
|
self.sip_dir = None
|
|
|
|
self.sip_dir = None
|
|
|
|
self.clib = None
|
|
|
|
self.clib = None
|
|
|
|
self.pyqt_dir = None
|
|
|
|
self.pytqt_dir = None
|
|
|
|
self.pytde_dir = None
|
|
|
|
self.pytde_dir = None
|
|
|
|
self.data_dir = None
|
|
|
|
self.data_dir = None
|
|
|
|
|
|
|
|
|
|
|
@ -1510,40 +1506,37 @@ class BuildTdeioslave(Command):
|
|
|
|
self.announce("Using %s for KDE Tdeioslave library files" % self.kde_tdeioslave_lib_dir)
|
|
|
|
self.announce("Using %s for KDE Tdeioslave library files" % self.kde_tdeioslave_lib_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# TQt inc dir
|
|
|
|
# TQt inc dir
|
|
|
|
if self.qt_inc_dir is None:
|
|
|
|
if self.tqt_inc_dir is None:
|
|
|
|
canidatepaths = []
|
|
|
|
canidatepaths = []
|
|
|
|
qtinc = os.getenv("QTINC")
|
|
|
|
tqtinc = os.getenv("TQTINC")
|
|
|
|
if qtinc != None:
|
|
|
|
if tqtinc != None:
|
|
|
|
canidatepaths.append(qtinc)
|
|
|
|
canidatepaths.append(tqtinc)
|
|
|
|
qtdir = os.getenv("TQTDIR")
|
|
|
|
tqtdir = os.getenv("TQTDIR")
|
|
|
|
if qtdir != None:
|
|
|
|
if tqtdir != None:
|
|
|
|
canidatepaths.append(os.path.join(qtdir,"include"))
|
|
|
|
canidatepaths.append(os.path.join(tqtdir,"include"))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/include"))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/include"))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/qt3/include"))
|
|
|
|
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"include"))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"include"))
|
|
|
|
canidatepaths.append("/opt/tqt3/include")
|
|
|
|
canidatepaths.append("/opt/tqt3/include")
|
|
|
|
canidatepaths.append("/opt/qt/include")
|
|
|
|
canidatepaths.append("/opt/tqt3/lib/include")
|
|
|
|
canidatepaths.append("/opt/qt/lib/include")
|
|
|
|
self.tqt_inc_dir = FindFileInPaths('ntqstring.h',canidatepaths)
|
|
|
|
canidatepaths.append("/opt/qt3/lib/include")
|
|
|
|
if self.tqt_inc_dir is None:
|
|
|
|
self.qt_inc_dir = FindFileInPaths('ntqstring.h',canidatepaths)
|
|
|
|
self.tqt_inc_dir = FindFileInPaths('tqstring.h',canidatepaths)
|
|
|
|
if self.qt_inc_dir is None:
|
|
|
|
if self.tqt_inc_dir is None:
|
|
|
|
self.qt_inc_dir = FindFileInPaths('qstring.h',canidatepaths)
|
|
|
|
|
|
|
|
if self.qt_inc_dir is None:
|
|
|
|
|
|
|
|
raise SystemExit("Failed to find the TQt header file directory")
|
|
|
|
raise SystemExit("Failed to find the TQt header file directory")
|
|
|
|
if FindFileInPaths('ntqstring.h',[self.qt_inc_dir]) is None:
|
|
|
|
if FindFileInPaths('ntqstring.h',[self.tqt_inc_dir]) is None:
|
|
|
|
if FindFileInPaths('qstring.h',[self.qt_inc_dir]) is None:
|
|
|
|
if FindFileInPaths('tqstring.h',[self.tqt_inc_dir]) is None:
|
|
|
|
raise SystemExit("Failed to find TQt header files in: %s" % self.qt_inc_dir)
|
|
|
|
raise SystemExit("Failed to find TQt header files in: %s" % self.tqt_inc_dir)
|
|
|
|
self.announce("Using %s for TQt header files" % self.qt_inc_dir)
|
|
|
|
self.announce("Using %s for TQt header files" % self.tqt_inc_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# TQt lib dir
|
|
|
|
# TQt lib dir
|
|
|
|
if self.qt_lib_dir is None:
|
|
|
|
if self.tqt_lib_dir is None:
|
|
|
|
canidatepaths = []
|
|
|
|
canidatepaths = []
|
|
|
|
tqtlib = os.getenv("TQTLIB")
|
|
|
|
tqtlib = os.getenv("TQTLIB")
|
|
|
|
if tqtlib != None:
|
|
|
|
if tqtlib != None:
|
|
|
|
canidatepaths.append(tqtlib)
|
|
|
|
canidatepaths.append(tqtlib)
|
|
|
|
qtdir = os.getenv("TQTDIR")
|
|
|
|
tqtdir = os.getenv("TQTDIR")
|
|
|
|
if qtdir != None:
|
|
|
|
if tqtdir != None:
|
|
|
|
canidatepaths.append(os.path.join(qtdir,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(tqtdir,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
|
|
|
@ -1551,26 +1544,23 @@ class BuildTdeioslave(Command):
|
|
|
|
canidatepaths.append("/opt/tqt/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt/lib/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt/lib/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
|
|
|
|
self.qt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
|
|
|
|
self.tqt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
|
|
|
|
if self.qt_lib_dir is None:
|
|
|
|
if self.tqt_lib_dir is None:
|
|
|
|
canidatepaths = []
|
|
|
|
canidatepaths = []
|
|
|
|
tqtlib = os.getenv("TQTLIB")
|
|
|
|
tqtlib = os.getenv("TQTLIB")
|
|
|
|
if tqtlib != None:
|
|
|
|
if tqtlib != None:
|
|
|
|
canidatepaths.append(tqtlib)
|
|
|
|
canidatepaths.append(tqtlib)
|
|
|
|
qtdir = os.getenv("TQTDIR")
|
|
|
|
tqtdir = os.getenv("TQTDIR")
|
|
|
|
if qtdir != None:
|
|
|
|
if tqtdir != None:
|
|
|
|
canidatepaths.append(os.path.join(qtdir,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(tqtdir,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/tqt3/"+get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,"lib/qt3/"+get_libdir_name()))
|
|
|
|
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
|
|
|
|
canidatepaths.append(os.path.join(install.prefix,get_libdir_name()))
|
|
|
|
canidatepaths.append("/opt/tqt3/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt3/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/qt/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/tqt3/lib/"+get_libdir_name())
|
|
|
|
canidatepaths.append("/opt/qt/lib/"+get_libdir_name())
|
|
|
|
self.tqt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
|
|
|
|
canidatepaths.append("/opt/qt3/lib/"+get_libdir_name())
|
|
|
|
if self.tqt_lib_dir is None:
|
|
|
|
self.qt_lib_dir = FindFileInPaths('libtqt*',canidatepaths)
|
|
|
|
|
|
|
|
if self.qt_lib_dir is None:
|
|
|
|
|
|
|
|
raise SystemExit("Failed to find TQt library files")
|
|
|
|
raise SystemExit("Failed to find TQt library files")
|
|
|
|
self.announce("Using %s for TQt library files" % self.qt_lib_dir)
|
|
|
|
self.announce("Using %s for TQt library files" % self.tqt_lib_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# Python dir
|
|
|
|
# Python dir
|
|
|
|
if self.python_dir is None:
|
|
|
|
if self.python_dir is None:
|
|
|
@ -1584,13 +1574,13 @@ class BuildTdeioslave(Command):
|
|
|
|
self.announce("Using %s for Python header files" % self.python_inc_dir)
|
|
|
|
self.announce("Using %s for Python header files" % self.python_inc_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# PyTQt dir
|
|
|
|
# PyTQt dir
|
|
|
|
if self.pyqt_dir is None:
|
|
|
|
if self.pytqt_dir is None:
|
|
|
|
self.pyqt_dir = FindFileInPaths("PyTQt", sys.path)
|
|
|
|
self.pytqt_dir = FindFileInPaths("PyTQt", sys.path)
|
|
|
|
if self.pyqt_dir is None:
|
|
|
|
if self.pytqt_dir is None:
|
|
|
|
self.pyqt_dir = os.path.join(sysconfig.get_python_lib(), 'PyTQt')
|
|
|
|
self.pytqt_dir = os.path.join(sysconfig.get_python_lib(), 'PyTQt')
|
|
|
|
if (FindFileInPaths("libtqtcmodule*",[self.pyqt_dir]) is None) and (FindFileInPaths("qt*",[self.pyqt_dir]) is None):
|
|
|
|
if (FindFileInPaths("libtqtcmodule*",[self.pytqt_dir]) is None) and (FindFileInPaths("tqt*",[self.pytqt_dir]) is None):
|
|
|
|
raise SystemExit("Failed to find the PyTQt directory: %s" % self.pyqt_dir)
|
|
|
|
raise SystemExit("Failed to find the PyTQt directory: %s" % self.pytqt_dir)
|
|
|
|
self.announce("Using %s for PyTQt modules" % self.pyqt_dir)
|
|
|
|
self.announce("Using %s for PyTQt modules" % self.pytqt_dir)
|
|
|
|
|
|
|
|
|
|
|
|
# PyTDE dir
|
|
|
|
# PyTDE dir
|
|
|
|
if self.pytde_dir is None:
|
|
|
|
if self.pytde_dir is None:
|
|
|
@ -1731,7 +1721,7 @@ class BuildTdeioslave(Command):
|
|
|
|
cmdlist.append("-I" + self.python_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.python_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.kde_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.kde_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.kde_inc_dir + "/tde")
|
|
|
|
cmdlist.append("-I" + self.kde_inc_dir + "/tde")
|
|
|
|
cmdlist.append("-I" + self.qt_inc_dir)
|
|
|
|
cmdlist.append("-I" + self.tqt_inc_dir)
|
|
|
|
cmdlist.append("-I/usr/include/tqt")
|
|
|
|
cmdlist.append("-I/usr/include/tqt")
|
|
|
|
cmdlist.append("-I.")
|
|
|
|
cmdlist.append("-I.")
|
|
|
|
# input
|
|
|
|
# input
|
|
|
@ -1767,26 +1757,26 @@ class BuildTdeioslave(Command):
|
|
|
|
# FIXME I doubt half of these libraries need to be here.
|
|
|
|
# FIXME I doubt half of these libraries need to be here.
|
|
|
|
linklist.append(self.sip_dir+"/sip_tqt.so")
|
|
|
|
linklist.append(self.sip_dir+"/sip_tqt.so")
|
|
|
|
# PyTQt libs
|
|
|
|
# PyTQt libs
|
|
|
|
linklist.append(self.pyqt_dir+"/qt.so")
|
|
|
|
linklist.append(self.pytqt_dir+"/tqt.so")
|
|
|
|
# PyTDE libs
|
|
|
|
# PyTDE libs
|
|
|
|
linklist.append(self.pytde_dir+"/tdecore.so")
|
|
|
|
linklist.append(self.pytde_dir+"/tdecore.so")
|
|
|
|
|
|
|
|
|
|
|
|
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip_tqt")
|
|
|
|
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip_tqt")
|
|
|
|
# # PyTQt libs
|
|
|
|
# # PyTQt libs
|
|
|
|
# linklist.append("-L"+self.pyqt_dir); linklist.append("-lqtcmodule")
|
|
|
|
# linklist.append("-L"+self.pytqt_dir); linklist.append("-lqtcmodule")
|
|
|
|
# # PyTDE libs
|
|
|
|
# # PyTDE libs
|
|
|
|
# linklist.append("-L"+self.pytde_dir); linklist.append("-ltdecorecmodule"); linklist.append("-ltdeuicmodule")
|
|
|
|
# linklist.append("-L"+self.pytde_dir); linklist.append("-ltdecorecmodule"); linklist.append("-ltdeuicmodule")
|
|
|
|
|
|
|
|
|
|
|
|
linklist.append("-L"+self.kde_lib_dir); linklist.append("-L/opt/trinity/lib"); linklist.append("-ltdecore"); linklist.append("-lpythonize")
|
|
|
|
linklist.append("-L"+self.kde_lib_dir); linklist.append("-L/opt/trinity/lib"); linklist.append("-ltdecore"); linklist.append("-lpythonize")
|
|
|
|
linklist.append("-L"+self.qt_lib_dir); linklist.append("-lqt-mt")
|
|
|
|
linklist.append("-L"+self.tqt_lib_dir); linklist.append("-lqt-mt")
|
|
|
|
linklist.append("-lm")
|
|
|
|
linklist.append("-lm")
|
|
|
|
linklist.append("-lc")
|
|
|
|
linklist.append("-lc")
|
|
|
|
linklist.append(self.clib)
|
|
|
|
linklist.append(self.clib)
|
|
|
|
|
|
|
|
|
|
|
|
linklist.append("-R"); linklist.append(self.python_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.python_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.qt_lib_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.tqt_lib_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.sip_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.sip_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.pyqt_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.pytqt_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.pytde_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.pytde_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.kde_lib_dir)
|
|
|
|
linklist.append("-R"); linklist.append(self.kde_lib_dir)
|
|
|
|
|
|
|
|
|
|
|
@ -2010,7 +2000,7 @@ class InstallTdeioslave(Command):
|
|
|
|
return dir_util.mkpath(name, mode, dry_run=self.dry_run)
|
|
|
|
return dir_util.mkpath(name, mode, dry_run=self.dry_run)
|
|
|
|
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
###########################################################################
|
|
|
|
class CheckPyQt(Command):
|
|
|
|
class CheckPyTQt(Command):
|
|
|
|
description = "Checks for the presence of a working PyTQt installation"
|
|
|
|
description = "Checks for the presence of a working PyTQt installation"
|
|
|
|
|
|
|
|
|
|
|
|
user_options = []
|
|
|
|
user_options = []
|
|
|
@ -2019,17 +2009,17 @@ class CheckPyQt(Command):
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def finalize_options(self):
|
|
|
|
def finalize_options(self):
|
|
|
|
self.min_qt_version = self.distribution.min_qt_version
|
|
|
|
self.min_tqt_version = self.distribution.min_tqt_version
|
|
|
|
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
def run(self):
|
|
|
|
if self.min_qt_version!=None:
|
|
|
|
if self.min_tqt_version!=None:
|
|
|
|
qtver,kdever = get_qt_kde_versions()
|
|
|
|
tqtver,kdever = get_tqt_kde_versions()
|
|
|
|
if compare_versions(self.min_qt_version,qtver)==1:
|
|
|
|
if compare_versions(self.min_tqt_version,tqtver)==1:
|
|
|
|
raise SystemExit("Your TQt version is too old. Version %s or higher is required, found %s." % (self.min_qt_version,qtver))
|
|
|
|
raise SystemExit("Your TQt version is too old. Version %s or higher is required, found %s." % (self.min_tqt_version,tqtver))
|
|
|
|
self.announce("Found TQt version %s." % qtver)
|
|
|
|
self.announce("Found TQt version %s." % tqtver)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
self.announce("Checking for a working PyTQt...")
|
|
|
|
self.announce("Checking for a working PyTQt...")
|
|
|
|
from PyTQt import qt
|
|
|
|
from PyTQt import tqt
|
|
|
|
self.announce(" ...PyTQt is working")
|
|
|
|
self.announce(" ...PyTQt is working")
|
|
|
|
except:
|
|
|
|
except:
|
|
|
|
raise SystemExit("Couldn't import TQt! Please make sure that PyTQt is installed and working.")
|
|
|
|
raise SystemExit("Couldn't import TQt! Please make sure that PyTQt is installed and working.")
|
|
|
@ -2050,7 +2040,7 @@ class CheckPyTDE(Command):
|
|
|
|
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
def run(self):
|
|
|
|
if self.min_kde_version!=None:
|
|
|
|
if self.min_kde_version!=None:
|
|
|
|
qtver,kdever = get_qt_kde_versions()
|
|
|
|
tqtver,kdever = get_tqt_kde_versions()
|
|
|
|
if compare_versions(self.min_kde_version,kdever)==1:
|
|
|
|
if compare_versions(self.min_kde_version,kdever)==1:
|
|
|
|
raise SystemExit("Your TDE version is too old. Version %s or higher is required, found %s." % (self.min_kde_version,kdever))
|
|
|
|
raise SystemExit("Your TDE version is too old. Version %s or higher is required, found %s." % (self.min_kde_version,kdever))
|
|
|
|
self.announce("Found KDE version %s." % kdever)
|
|
|
|
self.announce("Found KDE version %s." % kdever)
|
|
|
@ -2208,24 +2198,26 @@ def compare_versions(a,b):
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
###########################################################################
|
|
|
|
def get_qt_kde_versions():
|
|
|
|
def get_tqt_kde_versions():
|
|
|
|
versioninfo = ask_kde_config('--version')
|
|
|
|
versioninfo = ask_kde_config('--version')
|
|
|
|
qtver = None
|
|
|
|
tqtver = None
|
|
|
|
kdever = None
|
|
|
|
kdever = None
|
|
|
|
if versioninfo!=None:
|
|
|
|
if versioninfo!=None:
|
|
|
|
for line in versioninfo.splitlines():
|
|
|
|
for line in versioninfo.splitlines():
|
|
|
|
if line.startswith("Qt: "):
|
|
|
|
if line.startswith("TQt: "):
|
|
|
|
qtver = line[4:]
|
|
|
|
tqtver = line[4:]
|
|
|
|
|
|
|
|
elif line.startswith("Qt: "):
|
|
|
|
|
|
|
|
tqtver = line[4:]
|
|
|
|
elif line.startswith("TDE: "):
|
|
|
|
elif line.startswith("TDE: "):
|
|
|
|
kdever = line[5:]
|
|
|
|
kdever = line[5:]
|
|
|
|
return qtver,kdever
|
|
|
|
return tqtver,kdever
|
|
|
|
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
###########################################################################
|
|
|
|
def compile_tqtdesigner(ui_files,
|
|
|
|
def compile_tqtdesigner(ui_files,
|
|
|
|
force=0,
|
|
|
|
force=0,
|
|
|
|
prefix=None, base_dir=None,
|
|
|
|
prefix=None, base_dir=None,
|
|
|
|
verbose=1, dry_run=0):
|
|
|
|
verbose=1, dry_run=0):
|
|
|
|
"""Compile a collection of QT Designer UI files to .py
|
|
|
|
"""Compile a collection of TQT Designer UI files to .py
|
|
|
|
|
|
|
|
|
|
|
|
If 'dry_run' is true, doesn't actually do anything that would
|
|
|
|
If 'dry_run' is true, doesn't actually do anything that would
|
|
|
|
affect the filesystem.
|
|
|
|
affect the filesystem.
|
|
|
@ -2246,12 +2238,12 @@ def compile_tqtdesigner(ui_files,
|
|
|
|
|
|
|
|
|
|
|
|
pyfile_base = os.path.basename(pyfile)
|
|
|
|
pyfile_base = os.path.basename(pyfile)
|
|
|
|
if force or newer(uifile, pyfile):
|
|
|
|
if force or newer(uifile, pyfile):
|
|
|
|
log.info("compiling Qt-Designer UI %s to %s", file, pyfile_base)
|
|
|
|
log.info("compiling TQt-Designer UI %s to %s", file, pyfile_base)
|
|
|
|
if not dry_run:
|
|
|
|
if not dry_run:
|
|
|
|
qtuicompiler.CompileUI(uifile, pyfile)
|
|
|
|
tqtuicompiler.CompileUI(uifile, pyfile)
|
|
|
|
generated_files.append(pyfile)
|
|
|
|
generated_files.append(pyfile)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
log.debug("skipping Qt-Designer compilation of %s to %s",
|
|
|
|
log.debug("skipping TQt-Designer compilation of %s to %s",
|
|
|
|
file, pyfile_base)
|
|
|
|
file, pyfile_base)
|
|
|
|
return generated_files
|
|
|
|
return generated_files
|
|
|
|
|
|
|
|
|
|
|
|