summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kscons_kmdi/SConscript-src
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/app_templates/kscons_kmdi/SConscript-src')
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/SConscript-src60
1 files changed, 60 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/kscons_kmdi/SConscript-src b/languages/cpp/app_templates/kscons_kmdi/SConscript-src
new file mode 100644
index 00000000..746cdf98
--- /dev/null
+++ b/languages/cpp/app_templates/kscons_kmdi/SConscript-src
@@ -0,0 +1,60 @@
+#! /usr/bin/env python
+## This script is a quick test to demonstrate (and test)
+## the bksys moc handling '#include "file.moc"' can be added .. or not
+##
+## Thomas Nagy, 2005
+## This file can be reused freely for any project (see COPYING)
+
+Import('env')
+myenv=env.Copy()
+
+## First build : the shell
+## Each tab in it will hold an instance of the part ..
+
+%{APPNAMELC}_sources="""
+main.cpp
+%{APPNAMELC}kmdi.cpp
+%{APPNAMELC}kmdiView.cpp
+kmdikonsole.cpp
+settings.kcfgc
+prefs.ui
+"""
+# Now that we have our list of sources we can build the program
+myenv.KDEprogram( '%{APPNAMELC}', %{APPNAMELC}_sources ) # main program
+myenv.KDEaddpaths_includes( './ ../' ) # additional paths
+myenv.KDEaddlibs( 'qt-mt kdecore kio kparts kmdi' ) # additional libraries
+
+## Next, the kpart library
+## using KDEshlib, the .so and .la are installed automatically when needed
+
+myenv2=env.Copy()
+%{APPNAMELC}part_sources = '%{APPNAMELC}_part.cpp'
+myenv2.KDEshlib( 'lib%{APPNAMELC}part', %{APPNAMELC}part_sources)
+myenv2.KDEaddpaths_includes( './ #/' ) # the '#' means the top-level directory
+myenv2.KDEaddlibs( 'qt-mt kio kdecore kdeprint kparts' )
+# myenv2.KDEaddflags_link( '-DQT_THREAD_SUPPORT' )
+
+#############################
+## Data files to install
+
+## NOTE: KDEinstall( resource_type, subdir, list of files )
+
+## the .kcfg file
+myenv.KDEinstall( 'KDEKCFG', '', '%{APPNAMELC}.kcfg' )
+
+## the program .desktop file
+myenv.KDEinstall( 'KDEMENU', '/Utilities', '%{APPNAMELC}.desktop' )
+
+## the rc file - named *_shell.rc instead of *ui.rc for kpart apps
+myenv.KDEinstall( 'KDEDATA', '/%{APPNAMELC}', '%{APPNAMELC}_shell.rc' )
+
+## this servicetype desktop file goes in KDEXDG whether the other one goes in KDEMENU
+myenv.KDEinstall( 'KDEXDG', '', '%{APPNAMELC}_part.desktop' )
+
+## the kpart resource file
+myenv.KDEinstall( 'KDEDATA', '/%{APPNAMELC}part', '%{APPNAMELC}_part.rc' )
+
+## Installing icons is easy (hi-16-app-%{APPNAMELC}.png, hi-22-app-%{APPNAMELC}.png)
+#myenv.KDEicon()
+
+## do not forget that this is a python script so even loops are allowed... :)