[gnome-sound-recorder] autotools



commit 8ca6155b8ef70c628ffdb8b80d156e2735d9ec4a
Author: Meg Ford <meg387 gmail com>
Date:   Thu Sep 19 23:34:06 2013 -0500

    autotools

 Makefile.am                                    |    2 ++
 configure.ac                                   |    9 ++++++++-
 data/Makefile.am                               |    3 +--
 data/gnome-sound-recorder.desktop.in.in        |    4 ++--
 data/org.gnome.gnome-sound-recorder.service.in |    4 ++--
 src/Makefile.am                                |   20 ++++++++++++++++++--
 src/gnome-sound-recorder.in                    |    2 +-
 src/main.js                                    |   10 +++++++++-
 src/org.gnome.gnome-sound-recorder.in          |    8 --------
 src/package.js                                 |    2 +-
 10 files changed, 44 insertions(+), 20 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 140b8de..215ea28 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,4 +19,6 @@ MAINTAINERCLEANFILES = \
 
 GITIGNOREFILES = .anjuta .anjuta_sym_db.db m4/
 
+distdir = $(PACKAGE_TARNAME)-$(VERSION)
+
 include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index 22a561b..4bd6708 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,11 +13,18 @@ LIBGD_INIT([header-bar notification revealer stack tagged-entry gir])
 
 GLIB_GSETTINGS
 GOBJECT_INTROSPECTION_REQUIRE([1.0])
+PKG_CHECK_MODULES([DEPS], [gdk-3.0
+                           gdk-pixbuf-2.0
+                           gio-2.0
+                           glib-2.0
+                           gobject-2.0
+                           gtk+-3.0 >= 3.9.4])
+
+AC_PATH_PROG(GJS, [gjs])
 
 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
 AC_SUBST(GLIB_COMPILE_RESOURCES)
 
-AC_PATH_PROG(GJS, [gjs])
 
 AC_OUTPUT([
 Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 2d13c2a..0156434 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,5 +1,4 @@
-# I chose to use recursive automake so I can use nobase_ and avoid
-# 5 different directory declarations
+
 
 appsdir = $(datadir)/applications
 apps_DATA = $(PACKAGE_NAME).desktop
diff --git a/data/gnome-sound-recorder.desktop.in.in b/data/gnome-sound-recorder.desktop.in.in
index 219a3b2..ba92a4a 100644
--- a/data/gnome-sound-recorder.desktop.in.in
+++ b/data/gnome-sound-recorder.desktop.in.in
@@ -1,10 +1,10 @@
 [Desktop Entry]
 Type=Application
-_Name=Sound Recorder
+_Name=SoundRecorder
 _Comment=Record sound via the microphone and play it back
 Icon=face-smile
 Categories=GNOME;GTK;
 _Keywords=Audio;Application;Record;
 Exec= pkgdatadir@/@PACKAGE_NAME@
-DBusActivatable=true
+DBusActivatable=false
 
diff --git a/data/org.gnome.gnome-sound-recorder.service.in b/data/org.gnome.gnome-sound-recorder.service.in
index d9fd296..94cd4c1 100644
--- a/data/org.gnome.gnome-sound-recorder.service.in
+++ b/data/org.gnome.gnome-sound-recorder.service.in
@@ -1,3 +1,3 @@
 [D-BUS Service]
-Name= PACKAGE_NAME@
-Exec= bindir@/gnome-sound-recorder
+Name=org.gnome.SoundRecorder
+Exec= pkgdatadir@/@PACKAGE_NAME@
diff --git a/src/Makefile.am b/src/Makefile.am
index 170efea..a5e29e4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,12 @@
 ## Process this file with automake to produce Makefile.in
 
-## Created by Anjuta  
+## Created by Anjuta 
+NULL = 
+ 
+nodist_bin_SCRIPTS = $(PACKAGE_TARNAME)
+nodist_pkgdata_SCRIPTS = $(PACKAGE_NAME)
+
+EXTRA_SCRIPTS = org.gnome.SoundRecorder gnome-sound-recorder
 
 jsdir = $(pkgdatadir)
 dist_js_DATA = \
@@ -18,7 +24,17 @@ dist_js_DATA = \
     waveform.js\
     $(NULL)
     
- nodist_bin_SCRIPTS = gnome-sound-recorder
+
+$(PACKAGE_TARNAME): $(PACKAGE_TARNAME).in
+       $(AM_V_GEN) sed \
+               -e "s|[ ]GJS@|$(GJS)|g" \
+               -e "s|[ ]PACKAGE_NAME@|$(PACKAGE_NAME)|g" \
+               -e "s|[ ]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \
+               -e "s|[ ]prefix@|$(prefix)|g" \
+               -e "s|[ ]libdir@|$(libdir)|g" \
+               -e "s|[ ]pkgdatadir@|$(pkgdatadir)|g" \
+               $< > $@
+       @chmod +x $@
     
 $(PACKAGE_NAME): $(PACKAGE_NAME).in
        $(AM_V_GEN) sed \
diff --git a/src/gnome-sound-recorder.in b/src/gnome-sound-recorder.in
index e59ca7e..61025e5 100644
--- a/src/gnome-sound-recorder.in
+++ b/src/gnome-sound-recorder.in
@@ -1,5 +1,5 @@
 #! GJS@
 imports.searchPath.push("@pkgdatadir@");
-imports.package.launch({ name: "@PACKAGE_NAME@", version: "@PACKAGE_VERSION@", prefix: "@prefix@"  })
+imports.package.launch({ name: "org.gnome.SoundRecorder" })
 
 
diff --git a/src/main.js b/src/main.js
index c06a86a..4f4e0c7 100644
--- a/src/main.js
+++ b/src/main.js
@@ -42,16 +42,23 @@ imports.gi.versions.Gst = '1.0';
 const Util = imports.util;
 const Gio = imports.gi.Gio;
 const Gst = imports.gi.Gst;
+const GLib = imports.gi.GLib;
 
 const MainWindow = imports.mainWindow;
 const Preferences = imports.preferences;
 
+function initEnvironment() {
+    mainWindow.getApp = function() {
+        return Gio.Application.get_default();
+    };
+}
+
 const Application = new Lang.Class({
     Name: 'Application',
     Extends: Gtk.Application,
 
     _init: function() {
-        this.parent({ application_id: "org.gnome.gnome-sound-recorder" }); 
+        this.parent({ application_id: "org.gnome.SoundRecorder" }); 
         GLib.set_application_name(_("SoundRecorder"));         
     },
     
@@ -100,6 +107,7 @@ const Application = new Lang.Class({
 });
 
 function main(argv) {
+    initEnvironment();
 
     return (new Application()).run(argv);
 }
diff --git a/src/package.js b/src/package.js
index ce96cf0..6ae687a 100644
--- a/src/package.js
+++ b/src/package.js
@@ -302,7 +302,7 @@ function initResources() {
 
 function launch(params) {
     params.flags = params.flags || 0;
-    let app = new Gio.Application({ application_id: params.name,
+    let app = new Gio.Application({ application_id: "org.gnome.SoundRecorder",
                                     flags: (Gio.ApplicationFlags.IS_LAUNCHER |
                                             params.flags),
                                   });


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