diff options
author | Sebastian Reichel <sre@ring0.de> | 2018-07-14 19:33:03 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2018-07-18 01:27:02 +0200 |
commit | f77ef3ceb3b828724a60c4838b3524e8f7c5115b (patch) | |
tree | ebbf42206415464a39d77234263c4ea128524056 /src | |
parent | 568c2be3c328a272f7a872c3fc67b61af3c4e797 (diff) | |
download | serial-barcode-scanner-f77ef3ceb3b828724a60c4838b3524e8f7c5115b.tar.bz2 |
Debian packaging
Diffstat (limited to 'src')
-rw-r--r-- | src/audio/.gitignore | 1 | ||||
-rw-r--r-- | src/backup/.gitignore | 1 | ||||
-rw-r--r-- | src/cli/.gitignore | 1 | ||||
-rw-r--r-- | src/config/.gitignore | 1 | ||||
-rw-r--r-- | src/config/main.vala | 2 | ||||
-rw-r--r-- | src/curses-ui/.gitignore | 1 | ||||
-rw-r--r-- | src/curses-ui/curses-ui.vala | 4 | ||||
-rw-r--r-- | src/curses-ui/logo.vala | 4 | ||||
-rw-r--r-- | src/curses-ui/main.vala | 7 | ||||
-rw-r--r-- | src/database/.gitignore | 1 | ||||
-rw-r--r-- | src/input-device/.gitignore | 1 | ||||
-rw-r--r-- | src/invoice/.gitignore | 2 | ||||
-rw-r--r-- | src/libcairobarcode/.gitignore | 3 | ||||
-rw-r--r-- | src/mail/.gitignore | 1 | ||||
-rw-r--r-- | src/meson.build | 38 | ||||
-rw-r--r-- | src/pdf-invoice/.gitignore | 3 | ||||
-rw-r--r-- | src/pdf-stock/.gitignore | 3 | ||||
-rw-r--r-- | src/pgp/.gitignore | 1 | ||||
-rw-r--r-- | src/scanner-session/.gitignore | 1 | ||||
-rw-r--r-- | src/serial-device/.gitignore | 1 | ||||
-rw-r--r-- | src/web/.gitignore | 1 |
21 files changed, 26 insertions, 52 deletions
diff --git a/src/audio/.gitignore b/src/audio/.gitignore deleted file mode 100644 index d5cc284..0000000 --- a/src/audio/.gitignore +++ /dev/null @@ -1 +0,0 @@ -audio diff --git a/src/backup/.gitignore b/src/backup/.gitignore deleted file mode 100644 index ec76ec2..0000000 --- a/src/backup/.gitignore +++ /dev/null @@ -1 +0,0 @@ -backup diff --git a/src/cli/.gitignore b/src/cli/.gitignore deleted file mode 100644 index 573c0c4..0000000 --- a/src/cli/.gitignore +++ /dev/null @@ -1 +0,0 @@ -cli diff --git a/src/config/.gitignore b/src/config/.gitignore deleted file mode 100644 index 04204c7..0000000 --- a/src/config/.gitignore +++ /dev/null @@ -1 +0,0 @@ -config diff --git a/src/config/main.vala b/src/config/main.vala index 6a90ad0..1a5328d 100644 --- a/src/config/main.vala +++ b/src/config/main.vala @@ -19,7 +19,7 @@ public static int main(string[] args) { Intl.setlocale(LocaleCategory.ALL, ""); Intl.textdomain("shopsystem"); - cfg = new Cfg("/etc/shopsystem.cfg"); + cfg = new Cfg("/etc/shopsystem/config.ini"); Bus.own_name( BusType.SYSTEM, diff --git a/src/curses-ui/.gitignore b/src/curses-ui/.gitignore deleted file mode 100644 index b66c764..0000000 --- a/src/curses-ui/.gitignore +++ /dev/null @@ -1 +0,0 @@ -curses-ui diff --git a/src/curses-ui/curses-ui.vala b/src/curses-ui/curses-ui.vala index e98c6ea..539c959 100644 --- a/src/curses-ui/curses-ui.vala +++ b/src/curses-ui/curses-ui.vala @@ -23,7 +23,7 @@ public class CursesUI { //StatusPanel statuswin; MessageBoxOverlay mbOverlay; - public CursesUI(string datadir) { + public CursesUI(string configdir) { /* unicode support */ Intl.setlocale(LocaleCategory.CTYPE, ""); @@ -40,7 +40,7 @@ public class CursesUI { Curses.init_pair(2, Curses.Color.WHITE, Curses.Color.RED); /* initialize widgets */ - banner = new Logo(datadir); + banner = new Logo(configdir); //statuswin = new StatusPanel(); messages = new MessageBox(); clkwin = new ClockWindow(); diff --git a/src/curses-ui/logo.vala b/src/curses-ui/logo.vala index a4a2c2c..1bb609b 100644 --- a/src/curses-ui/logo.vala +++ b/src/curses-ui/logo.vala @@ -19,13 +19,13 @@ using Curses; public class Logo { Window win; - public Logo(string datadir) { + public Logo(string configdir) { win = new Window(8, COLS - 2, 0, 1); win.bkgdset(COLOR_PAIR(1) | Attribute.BOLD); win.addstr("\n"); - var logofilename = Path.build_filename(datadir, "logo.txt"); + var logofilename = Path.build_filename(configdir, "logo.txt"); var file = File.new_for_path(logofilename); if (!file.query_exists()) { stderr.printf (_("File '%s' doesn't exist.\n"), file.get_path ()); diff --git a/src/curses-ui/main.vala b/src/curses-ui/main.vala index 3518bb2..adeb67f 100644 --- a/src/curses-ui/main.vala +++ b/src/curses-ui/main.vala @@ -19,7 +19,6 @@ public MainLoop loop; public AudioPlayer audio; public ScannerSession scanner; public CursesUI ui; -private Config cfg; private static void play(string file) { try { @@ -57,11 +56,9 @@ public static int main(string[] args) { try { audio = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.AudioPlayer", "/io/mainframe/shopsystem/audio"); scanner = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.ScannerSession", "/io/mainframe/shopsystem/scanner_session"); - cfg = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.Config", "/io/mainframe/shopsystem/config"); - var datapath = cfg.get_string("GENERAL", "datapath"); - var datadir = Path.build_filename(datapath, "curses-ui"); - ui = new CursesUI(datadir); + var configdir = "/etc/shopsystem"; + ui = new CursesUI(configdir); } catch(IOError e) { error(_("IO Error: %s\n"), e.message); } catch(DBusError e) { diff --git a/src/database/.gitignore b/src/database/.gitignore deleted file mode 100644 index aa0d57e..0000000 --- a/src/database/.gitignore +++ /dev/null @@ -1 +0,0 @@ -database diff --git a/src/input-device/.gitignore b/src/input-device/.gitignore deleted file mode 100644 index 3ba6df4..0000000 --- a/src/input-device/.gitignore +++ /dev/null @@ -1 +0,0 @@ -input-device diff --git a/src/invoice/.gitignore b/src/invoice/.gitignore deleted file mode 100644 index 0d4d46e..0000000 --- a/src/invoice/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -invoice -single-invoice diff --git a/src/libcairobarcode/.gitignore b/src/libcairobarcode/.gitignore deleted file mode 100644 index 8721023..0000000 --- a/src/libcairobarcode/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -libcairobarcode.h -libcairobarcode.so -libcairobarcode.vapi diff --git a/src/mail/.gitignore b/src/mail/.gitignore deleted file mode 100644 index f2ae723..0000000 --- a/src/mail/.gitignore +++ /dev/null @@ -1 +0,0 @@ -mailer diff --git a/src/meson.build b/src/meson.build index e65d3a3..49b57fa 100644 --- a/src/meson.build +++ b/src/meson.build @@ -31,22 +31,22 @@ gdk_dep = meson.get_compiler('vala').find_library('gdk-2.0') # gdk is only neede posix_dep = meson.get_compiler('vala').find_library('posix') linux_dep = meson.get_compiler('vala').find_library('linux') -libcairobarcode = library('libcairobarcode', ['libcairobarcode/ean.vala', 'libcairobarcode/code39.vala', 'libcairobarcode/error.vala'], dependencies: [gio_dep, cairo_dep], install: true, install_dir: [true, true, true]) -executable('shop-audio', ['audio/main.vala', 'audio/audio.vala', 'audio/audio-interface.vala', 'config/config-interface.vala'], dependencies :[gio_dep, gstreamer_dep], install: true) -executable('shop-backup', ['backup/main.vala', 'mail/mailer-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep], install: true) -executable('shop-cli', ['cli/main.vala', 'cli/cli.vala', 'cli/cli-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep], install: true) -executable('shop-config', ['config/main.vala', 'config/config.vala', 'config/config-interface.vala'], dependencies: [gio_dep], install: true) -executable('shop-curses-ui', ['curses-ui/clock.vala', 'curses-ui/curses-ui.vala', 'curses-ui/dialog.vala', 'curses-ui/logo.vala', 'curses-ui/main.vala', 'curses-ui/message_box.vala', 'curses-ui/message_box_overlay.vala', 'curses-ui/numbers.vala', 'curses-ui/status.vala', 'audio/audio-interface.vala', 'scanner-session/scannersession-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep, posix_dep, curses_dep], install: true) -executable('shop-database', ['database/main.vala', 'database/database.vala', 'database/db-interface.vala', 'config/config-interface.vala', 'price.vapi'], dependencies: [gio_dep, gee_dep, sqlite_dep], install: true) -executable('shop-input-device', ['input-device/main.vala', 'input-device/input-device.vala', 'input-device/input-device-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep, linux_dep], install: true) -executable('shop-invoice', ['invoice/main.vala', 'invoice/invoice.vala', 'mail/mailer-interface.vala', 'pdf-invoice/pdf-invoice-interface.vala', 'database/db-interface.vala', 'config/config-interface.vala', 'price.vapi'], dependencies: [gio_dep], install: true) -executable('shop-single-invoice', ['invoice/single.vala', 'invoice/invoice.vala', 'mail/mailer-interface.vala', 'pdf-invoice/pdf-invoice-interface.vala', 'database/db-interface.vala', 'config/config-interface.vala', 'price.vapi'], dependencies: [gio_dep], install: true) -executable('shop-mailer', ['mail/main.vala', 'mail/mailer.vala', 'mail/mail.vala', 'mail/mailer-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep, posix_dep, esmtp_dep, gmime_dep], install: true) -executable('shop-pdf-invoice', ['pdf-invoice/main.vala', 'pdf-invoice/pdf-invoice.vala', 'pdf-invoice/pdf-invoice-interface.vala', 'config/config-interface.vala', 'database/db-interface.vala', 'price.vapi'], dependencies: [gio_dep, pangocairo_dep, rsvg_dep, gdk_dep, posix_dep], install: true) -executable('shop-test-pdf-invoice', ['pdf-invoice/test.vala', 'pdf-invoice/pdf-invoice-interface.vala', 'database/db-interface.vala', 'price.vapi'], dependencies: [gio_dep, pangocairo_dep, rsvg_dep, gdk_dep, posix_dep], install: true) -executable('shop-pdf-stock', ['pdf-stock/main.vala', 'pdf-stock/pdf-stock.vala', 'database/db-interface.vala', 'price.vapi'], dependencies: [gio_dep, pangocairo_dep, cairo_dep, posix_dep], link_with: libcairobarcode, install: true) -executable('shop-test-pdf-stock', ['pdf-stock/test.vala', 'pdf-stock/pdf-stock-interface.vala'], dependencies: [gio_dep], install: true) -executable('shop-pgp', ['pgp/main.vala', 'pgp/pgp.vala', 'pgp/pgp-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep, gpgme_dep, archive_dep], c_args: ['-D_FILE_OFFSET_BITS=64'], install: true) -executable('shop-scanner-session', ['scanner-session/main.vala', 'scanner-session/scannersession.vala', 'scanner-session/scannersession-interface.vala', 'database/db-interface.vala', 'input-device/input-device-interface.vala', 'cli/cli-interface.vala', 'audio/audio-interface.vala', 'price.vapi'], dependencies: [gio_dep], install: true) -executable('shop-serial-device', ['serial-device/main.vala', 'serial-device/serial-device.vala', 'config/config-interface.vala'], dependencies: [gio_dep, linux_dep], install: true) -executable('shop-web', ['web/main.vala', 'web/web.vala', 'web/websession.vala', 'web/csv.vala', 'web/template.vala', 'database/db-interface.vala', 'pgp/pgp-interface.vala', 'price.vapi', 'config/config-interface.vala', 'audio/audio-interface.vala'], dependencies: [gio_dep, gee_dep, soup_dep, posix_dep], install: true) +libcairobarcode = library('cairobarcode', ['libcairobarcode/ean.vala', 'libcairobarcode/code39.vala', 'libcairobarcode/error.vala'], soversion: '0', version: meson.project_version(), dependencies: [gio_dep, cairo_dep], install: true, install_dir: [true, true, true]) +executable('shop-audio', ['audio/main.vala', 'audio/audio.vala', 'audio/audio-interface.vala', 'config/config-interface.vala'], dependencies :[gio_dep, gstreamer_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-backup', ['backup/main.vala', 'mail/mailer-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-cli', ['cli/main.vala', 'cli/cli.vala', 'cli/cli-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-config', ['config/main.vala', 'config/config.vala', 'config/config-interface.vala'], dependencies: [gio_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-curses-ui', ['curses-ui/clock.vala', 'curses-ui/curses-ui.vala', 'curses-ui/dialog.vala', 'curses-ui/logo.vala', 'curses-ui/main.vala', 'curses-ui/message_box.vala', 'curses-ui/message_box_overlay.vala', 'curses-ui/numbers.vala', 'curses-ui/status.vala', 'audio/audio-interface.vala', 'scanner-session/scannersession-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep, posix_dep, curses_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-database', ['database/main.vala', 'database/database.vala', 'database/db-interface.vala', 'config/config-interface.vala', 'price.vapi'], dependencies: [gio_dep, gee_dep, sqlite_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-input-device', ['input-device/main.vala', 'input-device/input-device.vala', 'input-device/input-device-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep, linux_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-invoice', ['invoice/main.vala', 'invoice/invoice.vala', 'mail/mailer-interface.vala', 'pdf-invoice/pdf-invoice-interface.vala', 'database/db-interface.vala', 'config/config-interface.vala', 'price.vapi'], dependencies: [gio_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-single-invoice', ['invoice/single.vala', 'invoice/invoice.vala', 'mail/mailer-interface.vala', 'pdf-invoice/pdf-invoice-interface.vala', 'database/db-interface.vala', 'config/config-interface.vala', 'price.vapi'], dependencies: [gio_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-mailer', ['mail/main.vala', 'mail/mailer.vala', 'mail/mail.vala', 'mail/mailer-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep, posix_dep, esmtp_dep, gmime_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-pdf-invoice', ['pdf-invoice/main.vala', 'pdf-invoice/pdf-invoice.vala', 'pdf-invoice/pdf-invoice-interface.vala', 'config/config-interface.vala', 'database/db-interface.vala', 'price.vapi'], dependencies: [gio_dep, pangocairo_dep, rsvg_dep, gdk_dep, posix_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-test-pdf-invoice', ['pdf-invoice/test.vala', 'pdf-invoice/pdf-invoice-interface.vala', 'database/db-interface.vala', 'price.vapi'], dependencies: [gio_dep, pangocairo_dep, rsvg_dep, gdk_dep, posix_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-pdf-stock', ['pdf-stock/main.vala', 'pdf-stock/pdf-stock.vala', 'database/db-interface.vala', 'price.vapi'], dependencies: [gio_dep, pangocairo_dep, cairo_dep, posix_dep], link_with: libcairobarcode, install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-test-pdf-stock', ['pdf-stock/test.vala', 'pdf-stock/pdf-stock-interface.vala'], dependencies: [gio_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-pgp', ['pgp/main.vala', 'pgp/pgp.vala', 'pgp/pgp-interface.vala', 'config/config-interface.vala'], dependencies: [gio_dep, gpgme_dep, archive_dep], c_args: ['-D_FILE_OFFSET_BITS=64'], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-scanner-session', ['scanner-session/main.vala', 'scanner-session/scannersession.vala', 'scanner-session/scannersession-interface.vala', 'database/db-interface.vala', 'input-device/input-device-interface.vala', 'cli/cli-interface.vala', 'audio/audio-interface.vala', 'price.vapi'], dependencies: [gio_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-serial-device', ['serial-device/main.vala', 'serial-device/serial-device.vala', 'config/config-interface.vala'], dependencies: [gio_dep, linux_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) +executable('shop-web', ['web/main.vala', 'web/web.vala', 'web/websession.vala', 'web/csv.vala', 'web/template.vala', 'database/db-interface.vala', 'pgp/pgp-interface.vala', 'price.vapi', 'config/config-interface.vala', 'audio/audio-interface.vala'], dependencies: [gio_dep, gee_dep, soup_dep, posix_dep], install: true, install_dir: join_paths(get_option('libexecdir'), 'shopsystem')) diff --git a/src/pdf-invoice/.gitignore b/src/pdf-invoice/.gitignore deleted file mode 100644 index 0b84a09..0000000 --- a/src/pdf-invoice/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -pdf-invoice -test -test.pdf diff --git a/src/pdf-stock/.gitignore b/src/pdf-stock/.gitignore deleted file mode 100644 index 58a1e54..0000000 --- a/src/pdf-stock/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -pdf-stock -test -test.pdf diff --git a/src/pgp/.gitignore b/src/pgp/.gitignore deleted file mode 100644 index c8886a7..0000000 --- a/src/pgp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -pgp diff --git a/src/scanner-session/.gitignore b/src/scanner-session/.gitignore deleted file mode 100644 index b16547e..0000000 --- a/src/scanner-session/.gitignore +++ /dev/null @@ -1 +0,0 @@ -scanner-session diff --git a/src/serial-device/.gitignore b/src/serial-device/.gitignore deleted file mode 100644 index e455d42..0000000 --- a/src/serial-device/.gitignore +++ /dev/null @@ -1 +0,0 @@ -serial-device diff --git a/src/web/.gitignore b/src/web/.gitignore deleted file mode 100644 index c077218..0000000 --- a/src/web/.gitignore +++ /dev/null @@ -1 +0,0 @@ -web |