diff --git a/README.md b/README.md index 570b5ab..bea96dd 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,24 @@ gatuna/ └── PingTest.cs # PING/PONG network test with stats ``` +## Versioning + +Both programs use `MAJOR.MINOR.PATCH` where: + +- **MAJOR** matches the wire protocol version. A v2.x program rejects any frame + with `version != 2`. No cross-major compatibility. +- **MINOR** is the main change indicator for features and fixes within a major + version. +- **PATCH** is reserved for bug fixes; generally unused. + +Current version: **2.0.0** (wire protocol v2). + +Check versions: +```sh +gatunad --version # Rust server +``` +The Windows client shows its version in the title bar and tray tooltip. + ## License CC0 1.0 Universal. See [`LICENSE`](LICENSE). diff --git a/gatuna-win/MainForm.cs b/gatuna-win/MainForm.cs index 595d574..99a197b 100644 --- a/gatuna-win/MainForm.cs +++ b/gatuna-win/MainForm.cs @@ -17,7 +17,8 @@ public partial class MainForm : Form public MainForm() { - Text = "gatuna"; + var ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version!; + Text = $"gatuna {ver.Major}.{ver.Minor}"; Width = 520; Height = 420; FormBorderStyle = FormBorderStyle.FixedSingle; diff --git a/gatuna-win/Program.cs b/gatuna-win/Program.cs index 59acfcf..1b1ddb9 100644 --- a/gatuna-win/Program.cs +++ b/gatuna-win/Program.cs @@ -9,10 +9,12 @@ static class Program var form = new MainForm(); + var ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version!; + using var tray = new NotifyIcon { Icon = SystemIcons.GetStockIcon(StockIconId.NetworkConnect, 32), - Text = "gatuna", + Text = $"gatuna {ver.Major}.{ver.Minor}", Visible = true, }; diff --git a/gatuna-win/app.manifest b/gatuna-win/app.manifest index ba80e1c..ecd2013 100644 --- a/gatuna-win/app.manifest +++ b/gatuna-win/app.manifest @@ -1,6 +1,6 @@ - + diff --git a/gatuna-win/gatuna.csproj b/gatuna-win/gatuna.csproj index 4229f06..f92dc02 100644 --- a/gatuna-win/gatuna.csproj +++ b/gatuna-win/gatuna.csproj @@ -5,6 +5,7 @@ net8.0-windows gatuna gatuna + 2.0.0 enable true enable diff --git a/gatunad/Cargo.toml b/gatunad/Cargo.toml index 4de11b8..a4e2756 100644 --- a/gatunad/Cargo.toml +++ b/gatunad/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gatuna" -version = "0.1.0" +version = "2.0.0" edition = "2021" license = "CC0-1.0"