[chronojump] Command line: Chronojump version now shows also DB version
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Command line: Chronojump version now shows also DB version
- Date: Tue, 1 Mar 2022 10:51:36 +0000 (UTC)
commit ec48e2a6dc507de9563c053c7d900d7b373910b0
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Mar 1 11:50:33 2022 +0100
Command line: Chronojump version now shows also DB version
src/chronojump.cs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/src/chronojump.cs b/src/chronojump.cs
index 9562a7d62..d8602a40a 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -76,6 +76,20 @@ public class ChronoJump
Console.WriteLine("Chronojump version: " + BuildInfo.chronojumpVersion);
if(operatingSystem == UtilAll.OperatingSystems.LINUX)
Console.WriteLine("Note in Linux is not reliable if ./autogen.sh was
not un before make");
+
+ if(File.Exists(System.IO.Path.Combine(Util.GetDatabaseDir(),
"chronojump.db"))) {
+ try {
+ Sqlite.Connect();
+ Console.WriteLine("Chronojump DB version: " +
+ SqlitePreferences.Select("databaseVersion",
false));
+ Sqlite.DisConnect();
+ }
+ catch {
+ Console.WriteLine("Cannot check DB version, failed checking");
+ Sqlite.DisConnect();
+ }
+ } else
+ Console.WriteLine("Cannot check DB version, chronojump.db not found
on: " + System.IO.Path.Combine(Util.GetDatabaseDir()));
}
else // (args[0] == "version2")
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]