Commit 6e972c49 authored by Petr Štětka's avatar Petr Štětka
Browse files

Ported to meson.

Updated .desktop file.
Updated .doap file.
parent 256a5315
......@@ -20,19 +20,18 @@ New GNOME Usage!
In terminal run ```gnome-usage``` command or run GNOME Usage application from app launcher.
##Version
Actual version is 0.3.8
Actual version is 0.4.0
##Dependencies
- libnetinfo >= 0.3.1
- [libnetinfo >= 0.3.1](https://github.com/kaegi/netinfo-ffi)
- libgtop >= 2.34.2
##Compilation from sources:
```
autovala update
mkdir build && cd build
cmake ..
make
sudo make install
cd gnome-usage
meson build && cd build
ninja-build #or ninja
sudo ninja-build install #sudo ninja install
sudo setcap cap_net_raw,cap_net_admin=eip /usr/local/bin/gnome-usage
```
......
gnome_module = import('gnome')
resources = gnome_module.compile_resources('org.gnome.Usage',
'org.gnome.Usage.gresource.xml',
source_dir: '.',
c_name: 'resources')
install_data('org.gnome.Usage.gschema.xml', install_dir : get_option('datadir') + '/glib-2.0/schemas/')
install_data('org.gnome.Usage.desktop', install_dir : get_option('datadir') + '/applications')
[Desktop Entry]
Name=Usage
Comment=View current application and monitor system state
Comment=A nice way to view information about use of system resources, like memory and disk space
Categories=GNOME;GTK;
Exec=gnome-usage
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
......
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
BUILT_SOURCES =
pkglibdir = $(libdir)/gnome-builder
pkglib_LTLIBRARIES = libegg-private.la
headersdir = $(includedir)/gnome-builder-@VERSION@/egg
headers_DATA = \
egg-animation.h \
egg-binding-group.h \
egg-box.h \
egg-centering-bin.h \
egg-column-layout.h \
egg-counter.h \
egg-date-time.h \
egg-empty-state.h \
egg-entry-box.h \
egg-file-chooser-entry.h \
egg-frame-source.h \
egg-heap.h \
egg-list-box.h \
egg-menu-manager.h \
egg-pill-box.h \
egg-priority-box.h \
egg-private.h \
egg-radio-box.h \
egg-scrolled-window.h \
egg-search-bar.h \
egg-settings-flag-action.h \
egg-settings-sandwich.h \
egg-signal-group.h \
egg-simple-label.h \
egg-simple-popover.h \
egg-slider.h \
egg-state-machine-buildable.h \
egg-state-machine.h \
egg-task-cache.h \
egg-three-grid.h \
egg-widget-action-group.h \
$(NULL)
libegg_private_la_SOURCES = \
$(headers_DATA) \
egg-animation.c \
egg-binding-group.c \
egg-box.c \
egg-centering-bin.c \
egg-column-layout.c \
egg-counter.c \
egg-date-time.c \
egg-empty-state.c \
egg-entry-box.c \
egg-file-chooser-entry.c \
egg-frame-source.c \
egg-heap.c \
egg-list-box.c \
egg-menu-manager.c \
egg-pill-box.c \
egg-priority-box.c \
egg-radio-box.c \
egg-scrolled-window.c \
egg-search-bar.c \
egg-settings-flag-action.c \
egg-settings-sandwich.c \
egg-signal-group.c \
egg-simple-label.c \
egg-simple-popover.c \
egg-slider.c \
egg-state-machine-buildable.c \
egg-state-machine.c \
egg-task-cache.c \
egg-three-grid.c \
egg-widget-action-group.c \
$(NULL)
nodist_libegg_private_la_SOURCES = \
egg-resources.c \
egg-resources.h \
$(NULL)
glib_resources_c = egg-resources.c
glib_resources_h = egg-resources.h
glib_resources_xml = egg.gresource.xml
glib_resources_namespace = egg
include $(top_srcdir)/build/autotools/Makefile.am.gresources
libegg_private_la_CFLAGS = \
$(EGG_CFLAGS) \
$(NULL)
libegg_private_la_LIBADD = \
$(EGG_LIBS) \
$(SHM_LIB) \
$(LIBM) \
$(NULL)
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
Egg-1.0.gir: libegg-private.la
Egg_1_0_gir_INCLUDES = Gio-2.0 Gdk-3.0 Gtk-3.0
Egg_1_0_gir_CFLAGS = $(libegg_private_la_CFLAGS)
Egg_1_0_gir_LIBS = libegg-private.la
Egg_1_0_gir_FILES = $(libegg_private_la_SOURCES)
Egg_1_0_gir_SCANNERFLAGS = \
--c-include="egg-private.h" \
-n Egg \
$(NULL)
INTROSPECTION_GIRS += Egg-1.0.gir
girdir = $(datadir)/gnome-builder/gir-1.0
dist_gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(pkglibdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
endif
if ENABLE_VAPIGEN
-include $(VAPIGEN_MAKEFILE)
egg-private.vapi: Egg-1.0.gir
VAPIGEN_VAPIS = egg-private.vapi
egg_private_vapi_DEPS = gio-2.0 gtk+-3.0
egg_private_vapi_METADATADIRS = $(srcdir)
egg_private_vapi_FILES = Egg-1.0.gir
egg-private.deps: Makefile
$(AM_V_GEN) echo $(libegg_private_vapi_DEPS) | tr ' ' '\n' > $@
vapidir = $(datadir)/gnome-builder/vapi
vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
EXTRA_DIST += egg-private.deps
DISTCLEANFILES += $(vapi_DATA)
endif
-include $(top_srcdir)/git.mk
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
add_definitions (${DEPS_CFLAGS})
link_libraries ( ${DEPS_LIBRARIES} )
link_directories ( ${DEPS_LIBRARY_DIRS} )
add_library(egg STATIC egg-animation.h
egg-binding-group.h
egg-box.h
egg-centering-bin.h
egg-column-layout.h
egg-counter.h
egg-date-time.h
egg-empty-state.h
egg-entry-box.h
egg-file-chooser-entry.h
egg-frame-source.h
egg-heap.h
egg-list-box.h
egg-menu-manager.h
egg-pill-box.h
egg-priority-box.h
egg-private.h
egg-radio-box.h
egg-scrolled-window.h
egg-search-bar.h
egg-settings-flag-action.h
egg-settings-sandwich.h
egg-signal-group.h
egg-simple-label.h
egg-simple-popover.h
egg-slider.h
egg-state-machine-buildable.h
egg-state-machine.h
egg-task-cache.h
egg-three-grid.h
egg-widget-action-group.h
egg-animation.c
egg-binding-group.c
egg-box.c
egg-centering-bin.c
egg-column-layout.c
egg-counter.c
egg-date-time.c
egg-empty-state.c
egg-entry-box.c
egg-file-chooser-entry.c
egg-frame-source.c
egg-heap.c
egg-list-box.c
egg-menu-manager.c
egg-pill-box.c
egg-priority-box.c
egg-radio-box.c
egg-scrolled-window.c
egg-search-bar.c
egg-settings-flag-action.c
egg-settings-sandwich.c
egg-signal-group.c
egg-simple-label.c
egg-simple-popover.c
egg-slider.c
egg-state-machine-buildable.c
egg-state-machine.c
egg-task-cache.c
egg-three-grid.c
egg-widget-action-group.c )
#egg-resources.c
#egg-resources.h )
\ No newline at end of file
sources = [
'egg-animation.h',
'egg-binding-group.h',
'egg-box.h',
'egg-centering-bin.h',
'egg-column-layout.h',
'egg-counter.h',
'egg-date-time.h',
'egg-empty-state.h',
'egg-entry-box.h',
'egg-file-chooser-entry.h',
'egg-frame-source.h',
'egg-heap.h',
'egg-list-box.h',
'egg-menu-manager.h',
'egg-pill-box.h',
'egg-priority-box.h',
'egg-private.h',
'egg-radio-box.h',
'egg-scrolled-window.h',
'egg-search-bar.h',
'egg-settings-flag-action.h',
'egg-settings-sandwich.h',
'egg-signal-group.h',
'egg-simple-label.h',
'egg-simple-popover.h',
'egg-slider.h',
'egg-state-machine-buildable.h',
'egg-state-machine.h',
'egg-task-cache.h',
'egg-three-grid.h',
'egg-widget-action-group.h',
'egg-animation.c',
'egg-binding-group.c',
'egg-box.c',
'egg-centering-bin.c',
'egg-column-layout.c',
'egg-counter.c',
'egg-date-time.c',
'egg-empty-state.c',
'egg-entry-box.c',
'egg-file-chooser-entry.c',
'egg-frame-source.c',
'egg-heap.c',
'egg-list-box.c',
'egg-menu-manager.c',
'egg-pill-box.c',
'egg-priority-box.c',
'egg-radio-box.c',
'egg-scrolled-window.c',
'egg-search-bar.c',
'egg-settings-flag-action.c',
'egg-settings-sandwich.c',
'egg-signal-group.c',
'egg-simple-label.c',
'egg-simple-popover.c',
'egg-slider.c',
'egg-state-machine-buildable.c',
'egg-state-machine.c',
'egg-task-cache.c',
'egg-three-grid.c',
'egg-widget-action-group.c']
egg_lib = static_library( 'egg', sources, dependencies : [glib, gobject, gio, gtk], install : false)
egg = declare_dependency(link_with : egg_lib, include_directories : include_directories('.'))
subdir('egg')
subdir('rg')
pkglibdir = $(libdir)/gnome-builder
pkglib_LTLIBRARIES = librg.la
librg_la_SOURCES = \
realtime-graphs.h \
rg-column.c \
rg-column.h \
rg-column-private.h \
rg-cpu-graph.c \
rg-cpu-graph.h \
rg-cpu-table.c \
rg-cpu-table.h \
rg-graph.c \
rg-graph.h \
rg-line-renderer.c \
rg-line-renderer.h \
rg-stacked-renderer.c \
rg-stacked-renderer.h \
rg-renderer.c \
rg-renderer.h \
rg-ring.c \
rg-ring.h \
rg-table.c \
rg-table.h \
$(NULL)
librg_la_CFLAGS = \
-I$(top_srcdir)/contrib/egg \
$(DEBUG_CFLAGS) \
$(OPTIMIZE_CFLAGS) \
$(RG_CFLAGS) \
$(NULL)
librg_la_LIBADD = \
$(RG_LIBS) \
$(top_builddir)/contrib/egg/libegg-private.la \
$(NULL)
librg_la_LDFLAGS = \
$(OPTIMIZE_LDFLAGS) \
$(NULL)
-include $(top_srcdir)/git.mk
sources = [
'realtime-graphs.h',
'rg-column.c',
'rg-column.h',
'rg-column-private.h',
'rg-cpu-graph.c',
'rg-cpu-graph.h',
'rg-cpu-table.c',
'rg-cpu-table.h',
'rg-graph.c',
'rg-graph.h',
'rg-line-renderer.c',
'rg-line-renderer.h',
'rg-stacked-renderer.c',
'rg-stacked-renderer.h',
'rg-renderer.c',
'rg-renderer.h',
'rg-ring.c',
'rg-ring.h',
'rg-table.c',
'rg-table.h']
rg_lib = static_library( 'rg', sources, dependencies : [glib, gobject, gio, gtk],
include_directories : include_directories('../egg'), install : false)
rg = declare_dependency(link_with : rg_lib,
include_directories : include_directories('.'))
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
add_definitions (${DEPS_CFLAGS})
link_libraries ( ${DEPS_LIBRARIES} )
link_directories ( ${DEPS_LIBRARY_DIRS} )
include_directories(${CMAKE_SOURCE_DIR}/external/egg)
add_library(rg STATIC realtime-graphs.h
rg-column.c
rg-column.h
rg-column-private.h
rg-cpu-graph.c
rg-cpu-graph.h
rg-cpu-table.c
rg-cpu-table.h
rg-graph.c
rg-graph.h
rg-line-renderer.c
rg-line-renderer.h
rg-stacked-renderer.c
rg-stacked-renderer.h
rg-renderer.c
rg-renderer.h
rg-ring.c
rg-ring.h
rg-table.c
rg-table.h )
### AutoVala Project ###
autovala_version: 24
project_name: gnome-usage
*vala_version: 0.34
*gresource: usage_gresource_xml data/usage.gresource.xml
vala_binary: src/gnome-usage
version: 0.3.8
use_gresource: usage_gresource_xml
*vala_vapi: vapis/better.vapi
*vala_vapi: vapis/egg.vapi
*vala_vapi: vapis/glibtop.vapi
*vala_vapi: vapis/netinfo.vapi
*vala_vapi: vapis/rg.vapi
*vala_package: posix
*vala_check_package: atk
*vala_check_package: cairo
*vala_check_package: gdk-3.0
*vala_check_package: gdk-pixbuf-2.0
*vala_check_package: gio-2.0
*vala_check_package: glib-2.0
*vala_check_package: gobject-2.0
*vala_check_package: gtk+-3.0
*vala_check_package: pango
*vala_check_package: x11
c_library: rg egg gmodule-2.0 m rt gtop-2.0 pthread dl netinfo
*vala_source: application.vala
*vala_source: color-rectangle.vala
*vala_source: cpu-graph-table.vala
*vala_source: cpu-graph.vala
*vala_source: cpu-monitor.vala
*vala_source: cpu-sub-view.vala
*vala_source: data-view.vala
*vala_source: disk-graph.vala
*vala_source: disk-sub-view.vala
*vala_source: gnome-usage.vala
*vala_source: graph-block-row.vala
*vala_source: graph-block.vala
*vala_source: graph-box.vala
*vala_source: graph-stack-switcher.vala
*vala_source: graph-switcher-button.vala
*vala_source: header-bar.vala
*vala_source: memory-graph-table.vala
*vala_source: memory-graph.vala
*vala_source: memory-monitor.vala
*vala_source: memory-sub-view.vala
*vala_source: network-graph-table.vala
*vala_source: network-graph.vala
*vala_source: network-monitor.vala
*vala_source: network-sub-view.vala
*vala_source: performance-view.vala
*vala_source: pie-chart.vala
*vala_source: power-view.vala
*vala_source: process-dialog.vala
*vala_source: process-list-box.vala
*vala_source: process-row.vala
*vala_source: process.vala
*vala_source: settings.vala
*vala_source: storage-analyzer.vala
*vala_source: storage-graph.vala
*vala_source: storage-item.vala
*vala_source: storage-list-box.vala
*vala_source: storage-row.vala
*vala_source: storage-view.vala
*vala_source: storage-worker.vala
*vala_source: sub-process-list-box.vala
*vala_source: sub-process-sub-row.vala
*vala_source: system-monitor.vala
*vala_source: utils.vala
*vala_source: view.vala
*vala_source: window.vala
*c_source: better-box.c
h_folder: ../external/egg
h_folder: ../external/rg
h_folder: /usr/include/libgtop-2.0
*h_folder: .
*po: po
*translate: vala src/application.vala
*translate: c src/better-box.c
*translate: vala src/color-rectangle.vala
*translate: vala src/cpu-graph-table.vala
*translate: vala src/cpu-graph.vala
*translate: vala src/cpu-monitor.vala
*translate: vala src/cpu-sub-view.vala
*translate: vala src/data-view.vala
*translate: vala src/disk-graph.vala
*translate: vala src/disk-sub-view.vala
*translate: vala src/gnome-usage.vala
*translate: vala src/graph-block-row.vala
*translate: vala src/graph-block.vala
*translate: vala src/graph-box.vala
*translate: vala src/graph-stack-switcher.vala
*translate: vala src/graph-switcher-button.vala
*translate: vala src/header-bar.vala
*translate: vala src/memory-graph-table.vala
*translate: vala src/memory-graph.vala
*translate: vala src/memory-monitor.vala
*translate: vala src/memory-sub-view.vala
*translate: vala src/network-graph-table.vala
*translate: vala src/network-graph.vala
*translate: vala src/network-monitor.vala
*translate: vala src/network-sub-view.vala
*translate: vala src/performance-view.vala
*translate: vala src/pie-chart.vala
*translate: vala src/power-view.vala
*translate: vala src/process-dialog.vala
*translate: vala src/process-list-box.vala
*translate: vala src/process-row.vala
*translate: vala src/process.vala
*translate: vala src/settings.vala
*translate: vala src/storage-analyzer.vala
*translate: vala src/storage-graph.vala
*translate: vala src/storage-item.vala
*translate: vala src/storage-list-box.vala
*translate: vala src/storage-row.vala
*translate: vala src/storage-view.vala
*translate: vala src/storage-worker.vala
*translate: vala src/sub-process-list-box.vala
*translate: vala src/sub-process-sub-row.vala
*translate: vala src/system-monitor.vala
*translate: vala src/utils.vala
*translate: vala src/view.vala
*translate: vala src/window.vala
*desktop: data/org.gnome.Usage.desktop
scheme: data/org.gnome.Usage.gschema.xml
include: external/egg/egg.cmake
include: external/rg/rg.cmake
......@@ -12,8 +12,8 @@
<homepage rdf:resource="https://wiki.gnome.org/Apps/Usage" />
<!--
<download-page rdf:resource="https://download.gnome.org/sources/epiphany/" />
<bug-database rdf:resource="https://bugzilla.gnome.org/browse.cgi?product=epiphany" />
-->
<bug-database rdf:resource="https://bugzilla.gnome.org/browse.cgi?product=gnome-usage" />
<maintainer>
<foaf:Person>
<foaf:name>Petr Štětka</foaf:name>
......
project('gnome-usage', ['vala', 'c'], version : '0.4.0')
cc = meson.get_compiler('c')
glib = dependency('glib-2.0')
gobject = dependency('gobject-2.0')
gio = dependency('gio-2.0')
gtk = dependency('gtk+-3.0')
gtop = dependency('libgtop-2.0', version : '>=2.34.2')
netinfo = cc.find_library('netinfo')
math = cc.find_library('m')
subdir('data')
subdir('po')
subdir('external')
subdir('src')
langs = [ 'de', 'es', 'fi', 'fur', 'pl', 'pt_BR', 'sk', 'sr', 'sv' ]
i18n = import('i18n')
i18n.gettext('gnome-usage', languages : langs)
......@@ -78,7 +78,7 @@ namespace Usage
authors: authors,
website: "https://wiki.gnome.org/Apps/Usage",
website_label: _("Websites"),
version: Constants.VERSION,
version: Config.VERSION,
license_type: License.GPL_3_0);
}
......
public static int main (string[] args)
{
Intl.bindtextdomain(Constants.GETTEXT_PACKAGE, Path.build_filename(Constants.DATADIR,"locale"));
Intl.bindtextdomain(Config.GETTEXT_PACKAGE, Config.GNOMELOCALEDIR);
Intl.setlocale(LocaleCategory.ALL, "");
Intl.textdomain(Constants.GETTEXT_PACKAGE);
Intl.bind_textdomain_codeset(Constants.GETTEXT_PACKAGE, "utf-8");
Intl.textdomain(Config.GETTEXT_PACKAGE);
Intl.bind_textdomain_codeset(Config.GETTEXT_PACKAGE, "utf-8");
var application = new Usage.Application();
return application.run(args);
......
vala_sources = [
'application.vala',
'color-rectangle.vala',
'cpu-graph-table.vala',
'cpu-graph.vala',
'cpu-monitor.vala',
'cpu-sub-view.vala',
'data-view.vala',
'disk-graph.vala',