2020-05-29 12:19:35 +00:00
|
|
|
public class Build {
|
|
|
|
|
2020-09-05 08:02:42 +00: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 11:41:03 +00:00
|
|
|
public static string SYSTEM_INFO;
|
|
|
|
|
2020-09-05 08:02:42 +00: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 = _(" ");
|
|
|
|
|
2021-07-23 11:41:03 +00:00
|
|
|
public static string print_info () {
|
|
|
|
var os_name = get_os_info ("NAME");
|
|
|
|
var os_ver = get_os_info ("VERSION");
|
2020-05-31 12:47:12 +00:00
|
|
|
|
2021-07-23 11:41:03 +00: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 12:47:12 +00:00
|
|
|
}
|
|
|
|
|
2021-07-23 11:41:03 +00:00
|
|
|
static string get_os_info (string key) {
|
|
|
|
return GLib.Environment.get_os_info (key) ?? "Unknown";
|
2021-02-12 15:26:37 +00:00
|
|
|
}
|
|
|
|
|
2020-05-29 12:19:35 +00:00
|
|
|
}
|