/loggerouter/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerouter/trunk

« back to all changes in this revision

Viewing changes to src/main.vala

  • Committer: Gustav Hartvigsson
  • Date: 2025-06-03 20:51:10 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20250603205110-zfozhyqh8werenbv
* Inital release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   This file is part of LoggerOuter.
 
3
 
 
4
 LoggerOuter is free software: you can redistribute it and/or modify it under the
 
5
 terms of the GNU Lesser General Public License as published by the Free Software
 
6
 Foundation, either version 3 of the License, or (at your option) any later
 
7
 version.
 
8
 
 
9
 LoggerOuter is distributed in the hope that it will be useful, but WITHOUT
 
10
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
11
 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
 
12
 License for more details.
 
13
 
 
14
 You should have received a copy of the GNU Lessel General Public License
 
15
 along with LoggerOuter. If not, see <https://www.gnu.org/licenses/>.
 
16
 */
 
17
 
 
18
public const string APP_NAME  = "eu.bato24.gegoxaren.loggeroutr";
 
19
public const int APP_VERSION_MAJOR = 0;
 
20
public const int APP_VERSION_MINOR = 0;
 
21
public static string get_app_version () {
 
22
  return @"$APP_VERSION_MAJOR.$APP_VERSION_MINOR";
 
23
}
 
24
 
 
25
public static string? LO_XDG_ACTIONS_PATH;
 
26
public static string? LO_XDG_CONFIG_DIR;
 
27
public static string? LO_XDG_CONFIG_PATH;
 
28
 
 
29
 
 
30
public static LO.App app;
 
31
 
 
32
LO.Options opts;
 
33
LO.Settings settings;
 
34
 
 
35
 
 
36
int main (string[] args) {
 
37
  LO_XDG_CONFIG_DIR = GLib.Environment.get_user_config_dir () + "/loggerouter";
 
38
  LO_XDG_ACTIONS_PATH = LO_XDG_CONFIG_DIR + "/actions.ini";
 
39
  LO_XDG_CONFIG_PATH = LO_XDG_CONFIG_DIR + "/config.ini";
 
40
 
 
41
  opts = LO.Options.get_instance (); // Prevents segfault
 
42
  settings = LO.Settings.get_instance ();
 
43
  opts.exec_name = args[0];
 
44
  app = new  LO.App ();
 
45
 
 
46
  return app.run (args);
 
47
}
 
48
 
 
49
 
 
50