diff options
| author | RMED24 <81475204+RMED24@users.noreply.github.com> | 2023-01-07 08:06:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-07 09:06:13 +0100 |
| commit | cbaa845f5d51fe61a46d1a57950aa76a0a976d3e (patch) | |
| tree | 952dbd2ec9dcc83e8c9ba5b9f4910808068b22bb /Ryujinx.Common/ReleaseInformation.cs | |
| parent | 9e2681f2d7e9b36af30f600b79107cb9cd6aa5f1 (diff) | |
Include a start.sh file with correct launch options (#4013)
* Include reference to start.sh to be bundled
* Add start.sh
* Fix silly mistake I made on windows-x64
* ... I cannot read properly
* Make same changes for avalonia csproj
* Remove notice from start.sh
Co-authored-by: Mary-nyan <thog@protonmail.com>
* Update Ryujinx/Ryujinx.csproj
Co-authored-by: Mary-nyan <thog@protonmail.com>
* Update Ryujinx.Ava/Ryujinx.Ava.csproj
Co-authored-by: Mary-nyan <thog@protonmail.com>
* Update distribution/linux/start.sh
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
* Update distribution/linux/start.sh
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
* Update Ryujinx.Ava/Ryujinx.Ava.csproj
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
* Update Ryujinx.csproj
* Update Ryujinx.Ava.csproj
* Rename start.sh to Ryujinx.sh
* Update Ryujinx.csproj
* Update Ryujinx.Ava.csproj
* Update Ryujinx.Ava.csproj
* Update Ryujinx.Ava/Ryujinx.Ava.csproj
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
* Add `GDK_BACKEND` variable
* Update Ryujinx.Ava.csproj
* Update Program.cs
* Update Program.cs
* Update Ryujinx.sh
* Update Program.cs
* linux: Register mime types on launch
* Add DOTNET_EnableAlternateStackCheck=1 to desktop file
* linux: Add exclusion for RegisterMimeTypes for flathub builds
* Update logo path
* Cleanup Ryujinx.sh
* Fix typo in ReleaseInformation
* gha: Fix permissions for linux release binaries
* ava: Rename output assembly to Ryujinx
* Update mime database after installing new types
Wait until logging is available before registering mime types
* Copy mime types to output directory
Co-authored-by: Mary-nyan <thog@protonmail.com>
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Diffstat (limited to 'Ryujinx.Common/ReleaseInformation.cs')
| -rw-r--r-- | Ryujinx.Common/ReleaseInformation.cs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Ryujinx.Common/ReleaseInformation.cs b/Ryujinx.Common/ReleaseInformation.cs new file mode 100644 index 00000000..d0e01328 --- /dev/null +++ b/Ryujinx.Common/ReleaseInformation.cs @@ -0,0 +1,53 @@ +using Ryujinx.Common.Configuration; +using System; +using System.Reflection; + +namespace Ryujinx.Common +{ + // DO NOT EDIT, filled by CI + public static class ReleaseInformation + { + private const string FlatHubChannelOwner = "flathub"; + + public static string BuildVersion = "%%RYUJINX_BUILD_VERSION%%"; + public static string BuildGitHash = "%%RYUJINX_BUILD_GIT_HASH%%"; + public static string ReleaseChannelName = "%%RYUJINX_TARGET_RELEASE_CHANNEL_NAME%%"; + public static string ReleaseChannelOwner = "%%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER%%"; + public static string ReleaseChannelRepo = "%%RYUJINX_TARGET_RELEASE_CHANNEL_REPO%%"; + + public static bool IsValid() + { + return !BuildGitHash.StartsWith("%%") && + !ReleaseChannelName.StartsWith("%%") && + !ReleaseChannelOwner.StartsWith("%%") && + !ReleaseChannelRepo.StartsWith("%%"); + } + + public static bool IsFlatHubBuild() + { + return IsValid() && ReleaseChannelOwner.Equals(FlatHubChannelOwner); + } + + public static string GetVersion() + { + if (IsValid()) + { + return BuildVersion; + } + else + { + return Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion; + } + } + + public static string GetBaseApplicationDirectory() + { + if (IsFlatHubBuild()) + { + return AppDataManager.BaseDirPath; + } + + return AppDomain.CurrentDomain.BaseDirectory; + } + } +}
\ No newline at end of file |
