diff options
| author | Thog <me@thog.eu> | 2020-02-12 14:35:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-12 14:35:39 +0100 |
| commit | 8d83878f671e03b4bae803ee848a35158d8ffdf3 (patch) | |
| tree | 48bcfe6b8e32e4295362ebd881ca69b724879486 | |
| parent | 505f95848ba28a59893b574dba1c5a50af63e60a (diff) | |
Improve build identification (#927)
* Improve build identification
Add versioning on CI build
Fix #887
* Fix appveyor
* Fix appveyor for real now
| -rw-r--r-- | Ryujinx/Program.cs | 5 | ||||
| -rw-r--r-- | Ryujinx/Ryujinx.csproj | 1 | ||||
| -rw-r--r-- | Ryujinx/Ui/AboutWindow.cs | 3 | ||||
| -rw-r--r-- | Ryujinx/Ui/GLRenderer.cs | 2 | ||||
| -rw-r--r-- | appveyor.yml | 6 |
5 files changed, 11 insertions, 6 deletions
diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs index 4aaa5e9f..e24d09fb 100644 --- a/Ryujinx/Program.cs +++ b/Ryujinx/Program.cs @@ -6,11 +6,14 @@ using Ryujinx.Ui; using OpenTK; using System; using System.IO; +using System.Reflection; namespace Ryujinx { class Program { + public static string Version { get; private set; } + static void Main(string[] args) { Toolkit.Init(new ToolkitOptions @@ -21,6 +24,8 @@ namespace Ryujinx Console.Title = "Ryujinx Console"; + Version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion; + string systemPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Machine); Environment.SetEnvironmentVariable("Path", $"{Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin")};{systemPath}"); diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj index bde01b24..9bd2de66 100644 --- a/Ryujinx/Ryujinx.csproj +++ b/Ryujinx/Ryujinx.csproj @@ -6,6 +6,7 @@ <OutputType>Exe</OutputType> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <Configurations>Debug;Release;Profile Debug;Profile Release</Configurations> + <Version>1.0.0-dirty</Version> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile Release|AnyCPU'"> diff --git a/Ryujinx/Ui/AboutWindow.cs b/Ryujinx/Ui/AboutWindow.cs index 122dcaae..cae77776 100644 --- a/Ryujinx/Ui/AboutWindow.cs +++ b/Ryujinx/Ui/AboutWindow.cs @@ -38,8 +38,7 @@ namespace Ryujinx.Ui _discordLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.DiscordLogo.png", 30 , 30 ); _twitterLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.TwitterLogo.png", 30 , 30 ); - // todo: Get version string - _versionText.Text = "Unknown Version"; + _versionText.Text = Program.Version; } private static void OpenUrl(string url) diff --git a/Ryujinx/Ui/GLRenderer.cs b/Ryujinx/Ui/GLRenderer.cs index dff72b36..75068217 100644 --- a/Ryujinx/Ui/GLRenderer.cs +++ b/Ryujinx/Ui/GLRenderer.cs @@ -295,7 +295,7 @@ namespace Ryujinx.Ui string titleIdSection = string.IsNullOrWhiteSpace(_device.System.TitleIdText) ? string.Empty : " | " + _device.System.TitleIdText.ToUpper(); - _newTitle = $"Ryujinx{titleNameSection}{titleIdSection} | Host FPS: {hostFps:0.0} | Game FPS: {gameFps:0.0} | " + + _newTitle = $"Ryujinx {Program.Version}{titleNameSection}{titleIdSection} | Host FPS: {hostFps:0.0} | Game FPS: {gameFps:0.0} | " + $"Game Vsync: {(_device.EnableDeviceVsync ? "On" : "Off")}"; _titleEvent = true; diff --git a/appveyor.yml b/appveyor.yml index 73f4654d..4fcf5050 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,11 +14,11 @@ build_script: - ps: >- dotnet --version - dotnet publish -c $env:config -r win-x64 + dotnet publish -c $env:config -r win-x64 /p:Version=$env:APPVEYOR_BUILD_VERSION - dotnet publish -c $env:config -r linux-x64 + dotnet publish -c $env:config -r linux-x64 /p:Version=$env:APPVEYOR_BUILD_VERSION - dotnet publish -c $env:config -r osx-x64 + dotnet publish -c $env:config -r osx-x64 /p:Version=$env:APPVEYOR_BUILD_VERSION 7z a ryujinx$env:config_name$env:APPVEYOR_BUILD_VERSION-win_x64.zip $env:APPVEYOR_BUILD_FOLDER\Ryujinx\bin\$env:config\netcoreapp3.0\win-x64\publish\ |
