Improve build identification (#927)

* Improve build identification

Add versioning on CI build

Fix #887

* Fix appveyor

* Fix appveyor for real now
This commit is contained in:
Thog 2020-02-12 14:35:39 +01:00 committed by GitHub
parent 505f95848b
commit 8d83878f67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View file

@ -6,11 +6,14 @@ using Ryujinx.Ui;
using OpenTK; using OpenTK;
using System; using System;
using System.IO; using System.IO;
using System.Reflection;
namespace Ryujinx namespace Ryujinx
{ {
class Program class Program
{ {
public static string Version { get; private set; }
static void Main(string[] args) static void Main(string[] args)
{ {
Toolkit.Init(new ToolkitOptions Toolkit.Init(new ToolkitOptions
@ -21,6 +24,8 @@ namespace Ryujinx
Console.Title = "Ryujinx Console"; Console.Title = "Ryujinx Console";
Version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
string systemPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Machine); string systemPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Machine);
Environment.SetEnvironmentVariable("Path", $"{Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin")};{systemPath}"); Environment.SetEnvironmentVariable("Path", $"{Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin")};{systemPath}");

View file

@ -6,6 +6,7 @@
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Configurations>Debug;Release;Profile Debug;Profile Release</Configurations> <Configurations>Debug;Release;Profile Debug;Profile Release</Configurations>
<Version>1.0.0-dirty</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile Release|AnyCPU'">

View file

@ -38,8 +38,7 @@ namespace Ryujinx.Ui
_discordLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.DiscordLogo.png", 30 , 30 ); _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 ); _twitterLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.TwitterLogo.png", 30 , 30 );
// todo: Get version string _versionText.Text = Program.Version;
_versionText.Text = "Unknown Version";
} }
private static void OpenUrl(string url) private static void OpenUrl(string url)

View file

@ -295,7 +295,7 @@ namespace Ryujinx.Ui
string titleIdSection = string.IsNullOrWhiteSpace(_device.System.TitleIdText) ? string.Empty string titleIdSection = string.IsNullOrWhiteSpace(_device.System.TitleIdText) ? string.Empty
: " | " + _device.System.TitleIdText.ToUpper(); : " | " + _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")}"; $"Game Vsync: {(_device.EnableDeviceVsync ? "On" : "Off")}";
_titleEvent = true; _titleEvent = true;

View file

@ -14,11 +14,11 @@ build_script:
- ps: >- - ps: >-
dotnet --version 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\ 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\