Commit 8ca6155b authored by Meg Ford's avatar Meg Ford

autotools

parent c60de96f
......@@ -19,4 +19,6 @@ MAINTAINERCLEANFILES = \
GITIGNOREFILES = .anjuta .anjuta_sym_db.db m4/
distdir = $(PACKAGE_TARNAME)-$(VERSION)
include $(top_srcdir)/git.mk
......@@ -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
......
# 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
......
[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
[D-BUS Service]
Name=@PACKAGE_NAME@
Exec=@bindir@/gnome-sound-recorder
Name=org.gnome.SoundRecorder
Exec=@pkgdatadir@/@PACKAGE_NAME@
## 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 \
......
#!@GJS@
imports.searchPath.push("@pkgdatadir@");
imports.package.launch({ name: "@PACKAGE_NAME@", version: "@PACKAGE_VERSION@", prefix: "@prefix@" })
imports.package.launch({ name: "org.gnome.SoundRecorder" })
......@@ -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);
}
#!@GJS@
imports.searchPath.push("@pkgdatadir@");
imports.package.start({ name: "@PACKAGE_NAME@",
version: "@PACKAGE_VERSION@",
prefix: "@prefix@",
libdir: "@libdir@" });
......@@ -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),
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment