[gnome-weather/wip/new-package-js: 4/4] Replace launcher script with a symlink to the actual application



commit c6599926df43b79ed8d214a9555a1617f8b96d42
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Feb 8 19:58:35 2014 +0100

    Replace launcher script with a symlink to the actual application
    
    Now that we use --gapplication-service, launching the application
    outside of DBus does the expected thing of opening a new window,
    and the launcher becomes unnecessary. Also, now that package.js
    supports symlinks, we can replace it completely with a simple
    symlink to the application binary in $(pkglibdir).
    The biggest advantage is restoring "jhbuild run gnome-weather"
    from outside a jhbuild session, but we also get decent --help.

 src/Makefile.am   |    7 ++++++-
 src/gnome-weather |    2 --
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 32cac01..52ae0cb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,5 @@
 NULL =
 
-dist_bin_SCRIPTS = gnome-weather
 appdir = $(pkglibdir)
 nodist_app_SCRIPTS = org.gnome.Weather.Application
 
@@ -36,4 +35,10 @@ CLEANFILES = \
        $(PACKAGE_NAME).src.gresource \
        $(NULL)
 
+install-exec-hook:
+       $(MKDIR_P) $(DESTDIR)$(bindir)
+       $(LN_S) $(pkglibdir)/$(PACKAGE_NAME) $(DESTDIR)$(bindir)/$(PACKAGE_TARNAME)
+uninstall-hook:
+       -rm -f $(DESTDIR)$(bindir)/$(PACKAGE_NAME)
+
 -include $(top_srcdir)/git.mk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]