Installing .desktop file, so it shows up in Ubuntu Launcher

Change-Id: Ie513459cd8cc2278116b1308a7064f2be502e242
diff --git a/ChronoShare.desktop.in b/ChronoShare.desktop.in
new file mode 100755
index 0000000..ee6ada4
--- /dev/null
+++ b/ChronoShare.desktop.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=ChronoShare
+Comment=Peer-to-peer file sharing over NDN
+Exec=${BINDIR}/ChronoShare
+Icon=${DATADIR}/ChronoShare/chronoshare-big.png
+Terminal=false
+Type=Application
+StartupNotify=true
diff --git a/wscript b/wscript
index 4e3b142..d82ce50 100644
--- a/wscript
+++ b/wscript
@@ -13,10 +13,10 @@
     if Utils.unversioned_sys_platform () == "darwin":
         opt.add_option('--auto-update', action='store_true',default=False,dest='autoupdate',help='''(OSX) Download sparkle framework and enable autoupdate feature''')
 
-    opt.load('compiler_c compiler_cxx boost ccnx protoc qt4')
+    opt.load('compiler_c compiler_cxx boost ccnx protoc qt4 gnu_dirs')
 
 def configure(conf):
-    conf.load("compiler_c compiler_cxx")
+    conf.load("compiler_c compiler_cxx gnu_dirs")
 
     if conf.options.debug:
         conf.define ('_DEBUG', 1)
@@ -265,6 +265,16 @@
             if bld.env['HAVE_LOCAL_SPARKLE']:
                 qt.mac_frameworks = "osx/Frameworks/Sparkle.framework"
 
+    if Utils.unversioned_sys_platform () == "linux":
+        bld (
+            features = "process_in",
+            target = "ChronoShare.desktop",
+            source = "ChronoShare.desktop.in",
+            install_prefix = "${DATADIR}/applications",
+            )
+        bld.install_files ("${DATADIR}/applications", "ChronoShare.desktop")
+        bld.install_files ("${DATADIR}/ChronoShare", "gui/images/chronoshare-big.png")
+
     cmdline = bld (
         target = "csd",
 	features = "qt4 cxx cxxprogram",
@@ -288,10 +298,22 @@
     """Alias .mm files to be compiled the same as .cc files, gcc/clang will do the right thing."""
     return self.create_compiled_task('cxx', node)
 
-@TaskGen.extension('.js', '.png', '.css', '.html', '.gif', '.ico')
+@TaskGen.extension('.js', '.png', '.css', '.html', '.gif', '.ico', '.in')
 def sig_hook(self, node):
     node.sig=Utils.h_file (node.abspath())
 
+@TaskGen.feature('process_in')
+@TaskGen.after_method('process_source')
+def create_process_in(self):
+    dst = self.bld.path.find_or_declare (self.target)
+    tsk = self.create_task ('process_in', self.source, dst)
+
+class process_in(Task.Task):
+    color='PINK'
+
+    def run (self):
+        self.outputs[0].write (Utils.subst_vars(self.inputs[0].read (), self.env))
+
 @TaskGen.feature('html_resources')
 @TaskGen.before_method('process_source')
 def create_qrc_task(self):