tootle-linux-client/src/Build.vala.in

52 lines
1.3 KiB
Vala
Raw Normal View History

2020-05-29 14:19:35 +02:00
public class Build {
2020-09-05 10:02:42 +02:00
public const string NAME = "@NAME@";
public const string VERSION = "@VERSION@";
public const string DOMAIN = "@EXEC_NAME@";
public const string RESOURCES = "@RESOURCES@";
public const string WEBSITE = "@WEBSITE@";
public const string SUPPORT_WEBSITE = "@SUPPORT_WEBSITE@";
public const string COPYRIGHT = "@COPYRIGHT@";
public const string PREFIX = "@PREFIX@";
2021-07-23 13:41:03 +02:00
public static string SYSTEM_INFO;
2020-09-05 10:02:42 +02:00
// Please do not remove the credits below. You may add your own, but keep the existing ones intact.
// TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
public const string TRANSLATOR = _(" ");
public static string[] get_authors () {
return new string[] {
"bleak_grey"
};
}
public static string[] get_artists () {
return new string[] {
"Tobias Bernard"
};
}
2020-05-29 14:19:35 +02:00
2021-07-23 13:41:03 +02:00
public static string print_info () {
var os_name = get_os_info ("NAME");
var os_ver = get_os_info ("VERSION");
2020-05-31 14:47:12 +02:00
2021-07-23 13:41:03 +02:00
SYSTEM_INFO = @"$NAME $VERSION";
SYSTEM_INFO += @"\nRunning on: $os_name $os_ver";
SYSTEM_INFO += @"\nBuild prefix: \"$PREFIX\"";
var lines = SYSTEM_INFO.split ("\n");
foreach (unowned string line in lines) {
message (line);
}
return SYSTEM_INFO;
2020-05-31 14:47:12 +02:00
}
2021-07-23 13:41:03 +02:00
static string get_os_info (string key) {
return GLib.Environment.get_os_info (key) ?? "Unknown";
2021-02-12 16:26:37 +01:00
}
2020-05-29 14:19:35 +02:00
}