diff --git a/.editorconfig b/.editorconfig index f7a664c935..b7f5dce684 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,5 @@ [*.cs] +dotnet_code_quality.enable_platform_analyzer_on_pre_net5_target = true dotnet_analyzer_diagnostic.category-Style.severity = warning dotnet_analyzer_diagnostic.category-CodeQuality.severity = warning diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec8310ef1c..ec82ae1cb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,57 +100,3 @@ jobs: git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL shell: bash - - - build_NetCore: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - configuration: - - Debug_NetCore - - Release_NetCore - - steps: - - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '7' - - name: Restore cache for _build/tools - uses: actions/cache@v3 - with: - path: _build/tools - key: build-tools-${{ hashFiles('build', 'build.ps1', 'build.cake') }} - - name: Restore cache for _build/cake - uses: actions/cache@v3 - with: - path: _build/cake - key: build-cake-${{ hashFiles('build.cake') }} - - name: Restore cache for _build/lib/nuget - uses: actions/cache@v3 - with: - path: _build/lib/nuget - key: nuget-oldref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }} - - name: Restore cache for ~/.nuget/packages - uses: actions/cache@v3 - with: - path: ~/.nuget/packages - key: nuget-packref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }} - - - name: Build with .NET Core - run: ./build --configuration=${{ matrix.configuration }} - - name: Test with .NET Core - run: ./build test+only --configuration=${{ matrix.configuration }} - - - name: Send Discord Notification - env: - JOB_STATUS: ${{ job.status }} - WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} - HOOK_OS_NAME: ${{ runner.os }} - WORKFLOW_NAME: ${{ github.workflow }} - if: ${{ failure() && env.WEBHOOK_URL }} - run: | - git clone --depth 1 https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook - bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL diff --git a/AutoUpdate/App.config b/AutoUpdate/App.config index 156a5c0f15..dd28e9dec5 100644 --- a/AutoUpdate/App.config +++ b/AutoUpdate/App.config @@ -1,7 +1,7 @@ - + diff --git a/AutoUpdate/CKAN-autoupdate.csproj b/AutoUpdate/CKAN-autoupdate.csproj index 9d65829fc2..bae16e8402 100644 --- a/AutoUpdate/CKAN-autoupdate.csproj +++ b/AutoUpdate/CKAN-autoupdate.csproj @@ -1,9 +1,10 @@ CKAN-AutoUpdateHelper - ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ - ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ - ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ + ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\obj\ @@ -17,14 +18,15 @@ false 7 ..\assets\ckan.ico - net48 - v4.8 + net48;net7.0-windows + true 512 prompt 4 IDE1006 + PrepareResources;$(CompileDependsOn) - + @@ -36,13 +38,29 @@ Properties\GlobalAssemblyInfo.cs + + MSBuild:Compile + $(IntermediateOutputPath)Resources.Designer.cs + $(IntermediateOutputPath)Resources.Designer.cs + $(Language) + $(RootNamespace).Properties + %(Filename) + + + + - - - + + + diff --git a/AutoUpdate/Properties/Resources.Designer.cs b/AutoUpdate/Properties/Resources.Designer.cs deleted file mode 100644 index d88e0ce3d9..0000000000 --- a/AutoUpdate/Properties/Resources.Designer.cs +++ /dev/null @@ -1,82 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. (I WISH!) -// -//------------------------------------------------------------------------------ - -namespace CKAN.AutoUpdateHelper.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) - { - resourceMan = new SingleAssemblyResourceManager("CKAN.AutoUpdateHelper.Properties.Resources", typeof(Resources).Assembly); - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string Usage { - get { return (string)(ResourceManager.GetObject("Usage", resourceCulture)); } - } - internal static string DownloadNotFound { - get { return (string)(ResourceManager.GetObject("DownloadNotFound", resourceCulture)); } - } - internal static string FailedToWait { - get { return (string)(ResourceManager.GetObject("FailedToWait", resourceCulture)); } - } - internal static string FailedToDelete { - get { return (string)(ResourceManager.GetObject("FailedToDelete", resourceCulture)); } - } - internal static string UnhandledException { - get { return (string)(ResourceManager.GetObject("UnhandledException", resourceCulture)); } - } - internal static string FatalErrorTitle { - get { return (string)(ResourceManager.GetObject("FatalErrorTitle", resourceCulture)); } - } - - } -} diff --git a/CKAN.sln b/CKAN.sln index 839592b893..864ee92723 100644 --- a/CKAN.sln +++ b/CKAN.sln @@ -19,58 +19,51 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_NetCore|Any CPU = Debug_NetCore|Any CPU Debug|Any CPU = Debug|Any CPU - Release_NetCore|Any CPU = Release_NetCore|Any CPU Release|Any CPU = Release|Any CPU + NoGUI|Any CPU = NoGUI|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Debug_NetCore|Any CPU.ActiveCfg = Debug_NetCore|Any CPU - {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Debug_NetCore|Any CPU.Build.0 = Debug_NetCore|Any CPU {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Release_NetCore|Any CPU.ActiveCfg = Release_NetCore|Any CPU - {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Release_NetCore|Any CPU.Build.0 = Release_NetCore|Any CPU {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Release|Any CPU.ActiveCfg = Release|Any CPU {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Release|Any CPU.Build.0 = Release|Any CPU - {E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Debug_NetCore|Any CPU.ActiveCfg = Debug|Any CPU + {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.NoGUI|Any CPU.ActiveCfg = NoGUI|Any CPU + {3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.NoGUI|Any CPU.Build.0 = NoGUI|Any CPU {E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Release_NetCore|Any CPU.ActiveCfg = Release|Any CPU {E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Release|Any CPU.ActiveCfg = Release|Any CPU {E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Release|Any CPU.Build.0 = Release|Any CPU - {E97D81F6-85E2-4F1F-906D-BE21766602E5}.Debug_NetCore|Any CPU.ActiveCfg = Debug|Any CPU + {E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.NoGUI|Any CPU.ActiveCfg = NoGUI|Any CPU {E97D81F6-85E2-4F1F-906D-BE21766602E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E97D81F6-85E2-4F1F-906D-BE21766602E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E97D81F6-85E2-4F1F-906D-BE21766602E5}.Release_NetCore|Any CPU.ActiveCfg = Release|Any CPU {E97D81F6-85E2-4F1F-906D-BE21766602E5}.Release|Any CPU.ActiveCfg = Release|Any CPU {E97D81F6-85E2-4F1F-906D-BE21766602E5}.Release|Any CPU.Build.0 = Release|Any CPU - {DA5C7023-9A3B-4204-AE2F-BBA6C388B436}.Debug_NetCore|Any CPU.ActiveCfg = Debug|Any CPU + {E97D81F6-85E2-4F1F-906D-BE21766602E5}.NoGUI|Any CPU.ActiveCfg = NoGUI|Any CPU + {E97D81F6-85E2-4F1F-906D-BE21766602E5}.NoGUI|Any CPU.Build.0 = NoGUI|Any CPU {DA5C7023-9A3B-4204-AE2F-BBA6C388B436}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DA5C7023-9A3B-4204-AE2F-BBA6C388B436}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DA5C7023-9A3B-4204-AE2F-BBA6C388B436}.Release_NetCore|Any CPU.ActiveCfg = Release|Any CPU {DA5C7023-9A3B-4204-AE2F-BBA6C388B436}.Release|Any CPU.ActiveCfg = Release|Any CPU {DA5C7023-9A3B-4204-AE2F-BBA6C388B436}.Release|Any CPU.Build.0 = Release|Any CPU - {A79F9D54-315C-472B-928F-713A5860B2BE}.Debug_NetCore|Any CPU.ActiveCfg = Debug|Any CPU + {DA5C7023-9A3B-4204-AE2F-BBA6C388B436}.NoGUI|Any CPU.ActiveCfg = NoGUI|Any CPU + {DA5C7023-9A3B-4204-AE2F-BBA6C388B436}.NoGUI|Any CPU.Build.0 = NoGUI|Any CPU {A79F9D54-315C-472B-928F-713A5860B2BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A79F9D54-315C-472B-928F-713A5860B2BE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A79F9D54-315C-472B-928F-713A5860B2BE}.Release_NetCore|Any CPU.ActiveCfg = Release|Any CPU {A79F9D54-315C-472B-928F-713A5860B2BE}.Release|Any CPU.ActiveCfg = Release|Any CPU {A79F9D54-315C-472B-928F-713A5860B2BE}.Release|Any CPU.Build.0 = Release|Any CPU - {4336F356-33DB-442A-BF74-5E89AF47A5B9}.Debug_NetCore|Any CPU.ActiveCfg = Debug|Any CPU + {A79F9D54-315C-472B-928F-713A5860B2BE}.NoGUI|Any CPU.ActiveCfg = NoGUI|Any CPU {4336F356-33DB-442A-BF74-5E89AF47A5B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4336F356-33DB-442A-BF74-5E89AF47A5B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4336F356-33DB-442A-BF74-5E89AF47A5B9}.Release_NetCore|Any CPU.ActiveCfg = Release|Any CPU {4336F356-33DB-442A-BF74-5E89AF47A5B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {4336F356-33DB-442A-BF74-5E89AF47A5B9}.Release|Any CPU.Build.0 = Release|Any CPU - {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Debug_NetCore|Any CPU.ActiveCfg = Debug_NetCore|Any CPU - {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Debug_NetCore|Any CPU.Build.0 = Debug_NetCore|Any CPU + {4336F356-33DB-442A-BF74-5E89AF47A5B9}.NoGUI|Any CPU.ActiveCfg = NoGUI|Any CPU + {4336F356-33DB-442A-BF74-5E89AF47A5B9}.NoGUI|Any CPU.Build.0 = NoGUI|Any CPU {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release_NetCore|Any CPU.ActiveCfg = Release_NetCore|Any CPU - {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release_NetCore|Any CPU.Build.0 = Release_NetCore|Any CPU {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release|Any CPU.ActiveCfg = Release|Any CPU {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release|Any CPU.Build.0 = Release|Any CPU + {4F41255E-8BC1-465B-82D5-1C5665BC099A}.NoGUI|Any CPU.ActiveCfg = NoGUI|Any CPU + {4F41255E-8BC1-465B-82D5-1C5665BC099A}.NoGUI|Any CPU.Build.0 = NoGUI|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Cmdline/Action/Show.cs b/Cmdline/Action/Show.cs index 3673724979..dd06981868 100644 --- a/Cmdline/Action/Show.cs +++ b/Cmdline/Action/Show.cs @@ -258,43 +258,43 @@ private int ShowMod(CkanModule module, ShowOptions opts) user.RaiseMessage(Properties.Resources.ShowResourcesHeader); if (module.resources.homepage != null) { - user.RaiseMessage(Properties.Resources.ShowHomePage, Uri.EscapeUriString(module.resources.homepage.ToString())); + user.RaiseMessage(Properties.Resources.ShowHomePage, Uri.EscapeDataString(module.resources.homepage.ToString())); } if (module.resources.manual != null) { - user.RaiseMessage(Properties.Resources.ShowManual, Uri.EscapeUriString(module.resources.manual.ToString())); + user.RaiseMessage(Properties.Resources.ShowManual, Uri.EscapeDataString(module.resources.manual.ToString())); } if (module.resources.spacedock != null) { - user.RaiseMessage(Properties.Resources.ShowSpaceDock, Uri.EscapeUriString(module.resources.spacedock.ToString())); + user.RaiseMessage(Properties.Resources.ShowSpaceDock, Uri.EscapeDataString(module.resources.spacedock.ToString())); } if (module.resources.repository != null) { - user.RaiseMessage(Properties.Resources.ShowRepository, Uri.EscapeUriString(module.resources.repository.ToString())); + user.RaiseMessage(Properties.Resources.ShowRepository, Uri.EscapeDataString(module.resources.repository.ToString())); } if (module.resources.bugtracker != null) { - user.RaiseMessage(Properties.Resources.ShowBugTracker, Uri.EscapeUriString(module.resources.bugtracker.ToString())); + user.RaiseMessage(Properties.Resources.ShowBugTracker, Uri.EscapeDataString(module.resources.bugtracker.ToString())); } if (module.resources.curse != null) { - user.RaiseMessage(Properties.Resources.ShowCurse, Uri.EscapeUriString(module.resources.curse.ToString())); + user.RaiseMessage(Properties.Resources.ShowCurse, Uri.EscapeDataString(module.resources.curse.ToString())); } if (module.resources.store != null) { - user.RaiseMessage(Properties.Resources.ShowStore, Uri.EscapeUriString(module.resources.store.ToString())); + user.RaiseMessage(Properties.Resources.ShowStore, Uri.EscapeDataString(module.resources.store.ToString())); } if (module.resources.steamstore != null) { - user.RaiseMessage(Properties.Resources.ShowSteamStore, Uri.EscapeUriString(module.resources.steamstore.ToString())); + user.RaiseMessage(Properties.Resources.ShowSteamStore, Uri.EscapeDataString(module.resources.steamstore.ToString())); } if (module.resources.remoteAvc != null) { - user.RaiseMessage(Properties.Resources.ShowVersionFile, Uri.EscapeUriString(module.resources.remoteAvc.ToString())); + user.RaiseMessage(Properties.Resources.ShowVersionFile, Uri.EscapeDataString(module.resources.remoteAvc.ToString())); } if (module.resources.remoteSWInfo != null) { - user.RaiseMessage(Properties.Resources.ShowSpaceWarpInfo, Uri.EscapeUriString(module.resources.remoteSWInfo.ToString())); + user.RaiseMessage(Properties.Resources.ShowSpaceWarpInfo, Uri.EscapeDataString(module.resources.remoteSWInfo.ToString())); } } diff --git a/Cmdline/CKAN-cmdline.csproj b/Cmdline/CKAN-cmdline.csproj index 10f9de0ec8..43245ee6e5 100644 --- a/Cmdline/CKAN-cmdline.csproj +++ b/Cmdline/CKAN-cmdline.csproj @@ -1,9 +1,10 @@ CKAN-CmdLine - ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ - ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ - ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ + ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\obj\ @@ -13,17 +14,18 @@ false true true - Debug;Release + Debug;Release;NoGUI false 7.3 - net48 CKAN.CmdLine.MainClass ..\assets\ckan.ico - v4.8 + net48;net7.0;net7.0-windows + $(TargetFramework.Replace("-windows", "")) 512 prompt 4 IDE1006 + PrepareResources;$(CompileDependsOn) @@ -32,7 +34,7 @@ - + @@ -43,20 +45,37 @@ Properties\GlobalAssemblyInfo.cs + + MSBuild:Compile + $(IntermediateOutputPath)Resources.Designer.cs + $(IntermediateOutputPath)Resources.Designer.cs + $(Language) + $(RootNamespace).Properties + %(Filename) + + + + - - {DA5C7023-9A3B-4204-AE2F-BBA6C388B436} - CKAN-ConsoleUI - + TargetFramework=$(BaseTargetFramework) {3B9AEA22-FA3B-4E43-9283-EABDD81CF271} CKAN-core - + + TargetFramework=$(BaseTargetFramework) + {DA5C7023-9A3B-4204-AE2F-BBA6C388B436} + CKAN-ConsoleUI + + + TargetFramework=$(TargetFramework) {A79F9D54-315C-472B-928F-713A5860B2BE} CKAN-GUI @@ -68,8 +87,11 @@ - - - + + + diff --git a/Cmdline/Main.cs b/Cmdline/Main.cs index 4767f8a7d0..a978c45aca 100644 --- a/Cmdline/Main.cs +++ b/Cmdline/Main.cs @@ -8,6 +8,9 @@ using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Autofac; using log4net; @@ -195,8 +198,22 @@ private static int RunSimpleAction(Options cmdline, CommonOptions options, strin { switch (cmdline.action) { + #if NETFRAMEWORK || WINDOWS case "gui": - return Gui(manager, (GuiOptions)options, args); + #if NET6_0_OR_GREATER + if (Platform.IsWindows) + { + #endif + return Gui(manager, (GuiOptions)options, args); + #if NET6_0_OR_GREATER + } + else + { + return Exit.ERROR; + } + #else + #endif + #endif case "consoleui": return ConsoleUi(manager, (ConsoleUIOptions)options); @@ -275,6 +292,10 @@ private static int printMissingInstanceError(IUser user) return Exit.ERROR; } + #if NETFRAMEWORK || WINDOWS + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif private static int Gui(GameInstanceManager manager, GuiOptions options, string[] args) { // TODO: Sometimes when the GUI exits, we get a System.ArgumentException, @@ -287,6 +308,7 @@ private static int Gui(GameInstanceManager manager, GuiOptions options, string[] return Exit.OK; } + #endif private static int ConsoleUi(GameInstanceManager manager, ConsoleUIOptions opts) { diff --git a/Cmdline/Options.cs b/Cmdline/Options.cs index 6f676ee0ed..c0cdf7f006 100644 --- a/Cmdline/Options.cs +++ b/Cmdline/Options.cs @@ -45,8 +45,10 @@ public Options(string[] args) internal class Actions : VerbCommandOptions { + #if NETFRAMEWORK || WINDOWS [VerbOption("gui", HelpText = "Start the CKAN GUI")] public GuiOptions GuiOptions { get; set; } + #endif [VerbOption("consoleui", HelpText = "Start the CKAN console UI")] public ConsoleUIOptions ConsoleUIOptions { get; set; } @@ -484,11 +486,13 @@ internal class AvailableOptions : InstanceSpecificOptions public bool detail { get; set; } } + #if NETFRAMEWORK || WINDOWS internal class GuiOptions : InstanceSpecificOptions { [Option("show-console", HelpText = "Shows the console while running the GUI")] public bool ShowConsole { get; set; } } + #endif internal class ConsoleUIOptions : InstanceSpecificOptions { diff --git a/Cmdline/Properties/Resources.Designer.cs b/Cmdline/Properties/Resources.Designer.cs deleted file mode 100644 index 9cb49c701a..0000000000 --- a/Cmdline/Properties/Resources.Designer.cs +++ /dev/null @@ -1,715 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. (I WISH!) -// -//------------------------------------------------------------------------------ - -namespace CKAN.CmdLine.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) - { - resourceMan = new SingleAssemblyResourceManager("CKAN.CmdLine.Properties.Resources", typeof(Resources).Assembly); - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string Usage { - get { return (string)(ResourceManager.GetObject("Usage", resourceCulture)); } - } - internal static string Command { - get { return (string)(ResourceManager.GetObject("Command", resourceCulture)); } - } - internal static string UnknownCommand { - get { return (string)(ResourceManager.GetObject("UnknownCommand", resourceCulture)); } - } - internal static string Options { - get { return (string)(ResourceManager.GetObject("Options", resourceCulture)); } - } - internal static string ArgumentMissing { - get { return (string)(ResourceManager.GetObject("ArgumentMissing", resourceCulture)); } - } - internal static string Path { - get { return (string)(ResourceManager.GetObject("Path", resourceCulture)); } - } - - internal static string MainVersion { - get { return (string)(ResourceManager.GetObject("MainVersion", resourceCulture)); } - } - internal static string MainUnknownCommand { - get { return (string)(ResourceManager.GetObject("MainUnknownCommand", resourceCulture)); } - } - internal static string MainMissingInstance { - get { return (string)(ResourceManager.GetObject("MainMissingInstance", resourceCulture)); } - } - internal static string OptionsRootError { - get { return (string)(ResourceManager.GetObject("OptionsRootError", resourceCulture)); } - } - internal static string OptionsRootWarning { - get { return (string)(ResourceManager.GetObject("OptionsRootWarning", resourceCulture)); } - } - internal static string OptionsMonoWarning { - get { return (string)(ResourceManager.GetObject("OptionsMonoWarning", resourceCulture)); } - } - internal static string OptionsInstanceAndGameDir { - get { return (string)(ResourceManager.GetObject("OptionsInstanceAndGameDir", resourceCulture)); } - } - internal static string OptionsInvalidInstance { - get { return (string)(ResourceManager.GetObject("OptionsInvalidInstance", resourceCulture)); } - } - internal static string InstanceNotInstance { - get { return (string)(ResourceManager.GetObject("InstanceNotInstance", resourceCulture)); } - } - internal static string InstanceDuplicate { - get { return (string)(ResourceManager.GetObject("InstanceDuplicate", resourceCulture)); } - } - - internal static string UserYesNoPromptSuffix { - get { return (string)(ResourceManager.GetObject("UserYesNoPromptSuffix", resourceCulture)); } - } - internal static string UserYesNoY { - get { return (string)(ResourceManager.GetObject("UserYesNoY", resourceCulture)); } - } - internal static string UserYesNoYes { - get { return (string)(ResourceManager.GetObject("UserYesNoYes", resourceCulture)); } - } - internal static string UserYesNoN { - get { return (string)(ResourceManager.GetObject("UserYesNoN", resourceCulture)); } - } - internal static string UserYesNoNo { - get { return (string)(ResourceManager.GetObject("UserYesNoNo", resourceCulture)); } - } - internal static string UserYesNoInvalid { - get { return (string)(ResourceManager.GetObject("UserYesNoInvalid", resourceCulture)); } - } - internal static string UserSelectionPromptWithDefault { - get { return (string)(ResourceManager.GetObject("UserSelectionPromptWithDefault", resourceCulture)); } - } - internal static string UserSelectionPromptWithoutDefault { - get { return (string)(ResourceManager.GetObject("UserSelectionPromptWithoutDefault", resourceCulture)); } - } - internal static string UserSelectionC { - get { return (string)(ResourceManager.GetObject("UserSelectionC", resourceCulture)); } - } - internal static string UserSelectionN { - get { return (string)(ResourceManager.GetObject("UserSelectionN", resourceCulture)); } - } - internal static string UserSelectionCancelled { - get { return (string)(ResourceManager.GetObject("UserSelectionCancelled", resourceCulture)); } - } - internal static string UserSelectionNotNumber { - get { return (string)(ResourceManager.GetObject("UserSelectionNotNumber", resourceCulture)); } - } - internal static string UserSelectionTooLarge { - get { return (string)(ResourceManager.GetObject("UserSelectionTooLarge", resourceCulture)); } - } - internal static string UserSelectionTooSmall { - get { return (string)(ResourceManager.GetObject("UserSelectionTooSmall", resourceCulture)); } - } - internal static string UserProgressDownloadSubstring { - get { return (string)(ResourceManager.GetObject("UserProgressDownloadSubstring", resourceCulture)); } - } - - internal static string AuthTokenHostHeader { - get { return (string)(ResourceManager.GetObject("AuthTokenHostHeader", resourceCulture)); } - } - internal static string AuthTokenTokenHeader { - get { return (string)(ResourceManager.GetObject("AuthTokenTokenHeader", resourceCulture)); } - } - internal static string AuthTokenHelpSummary { - get { return (string)(ResourceManager.GetObject("AuthTokenHelpSummary", resourceCulture)); } - } - internal static string AuthTokenInvalidHostName { - get { return (string)(ResourceManager.GetObject("AuthTokenHelpSummary", resourceCulture)); } - } - - internal static string AvailableHeader { - get { return (string)(ResourceManager.GetObject("AvailableHeader", resourceCulture)); } - } - - internal static string CacheHelpSummary { - get { return (string)(ResourceManager.GetObject("CacheHelpSummary", resourceCulture)); } - } - internal static string CacheSet { - get { return (string)(ResourceManager.GetObject("CacheSet", resourceCulture)); } - } - internal static string CacheInvalidPath { - get { return (string)(ResourceManager.GetObject("CacheInvalidPath", resourceCulture)); } - } - internal static string CacheCleared { - get { return (string)(ResourceManager.GetObject("CacheCleared", resourceCulture)); } - } - internal static string CacheReset { - get { return (string)(ResourceManager.GetObject("CacheReset", resourceCulture)); } - } - internal static string CacheResetFailed { - get { return (string)(ResourceManager.GetObject("CacheResetFailed", resourceCulture)); } - } - internal static string CacheUnlimited { - get { return (string)(ResourceManager.GetObject("CacheUnlimited", resourceCulture)); } - } - internal static string CacheInfo { - get { return (string)(ResourceManager.GetObject("CacheInfo", resourceCulture)); } - } - - internal static string CompareSame { - get { return (string)(ResourceManager.GetObject("CompareSame", resourceCulture)); } - } - internal static string CompareLower { - get { return (string)(ResourceManager.GetObject("CompareLower", resourceCulture)); } - } - internal static string CompareHigher { - get { return (string)(ResourceManager.GetObject("CompareHigher", resourceCulture)); } - } - internal static string CompatHelpSummary { - get { return (string)(ResourceManager.GetObject("CompatHelpSummary", resourceCulture)); } - } - internal static string CompatVersionHeader { - get { return (string)(ResourceManager.GetObject("CompatVersionHeader", resourceCulture)); } - } - internal static string CompatActualHeader { - get { return (string)(ResourceManager.GetObject("CompatActualHeader", resourceCulture)); } - } - internal static string CompatInvalid { - get { return (string)(ResourceManager.GetObject("CompatInvalid", resourceCulture)); } - } - internal static string CompatCantForget { - get { return (string)(ResourceManager.GetObject("CompatCantForget", resourceCulture)); } - } - - internal static string InstanceHelpSummary { - get { return (string)(ResourceManager.GetObject("InstanceHelpSummary", resourceCulture)); } - } - internal static string InstanceListNoVersion { - get { return (string)(ResourceManager.GetObject("InstanceListNoVersion", resourceCulture)); } - } - internal static string InstanceListYes { - get { return (string)(ResourceManager.GetObject("InstanceListYes", resourceCulture)); } - } - internal static string InstanceListNo { - get { return (string)(ResourceManager.GetObject("InstanceListNo", resourceCulture)); } - } - internal static string InstanceListNameHeader { - get { return (string)(ResourceManager.GetObject("InstanceListNameHeader", resourceCulture)); } - } - internal static string InstanceListVersionHeader { - get { return (string)(ResourceManager.GetObject("InstanceListVersionHeader", resourceCulture)); } - } - internal static string InstanceListDefaultHeader { - get { return (string)(ResourceManager.GetObject("InstanceListDefaultHeader", resourceCulture)); } - } - internal static string InstanceListPathHeader { - get { return (string)(ResourceManager.GetObject("InstanceListPathHeader", resourceCulture)); } - } - internal static string InstanceAddDuplicate { - get { return (string)(ResourceManager.GetObject("InstanceAddDuplicate", resourceCulture)); } - } - internal static string InstanceAdded { - get { return (string)(ResourceManager.GetObject("InstanceAdded", resourceCulture)); } - } - internal static string InstanceCloneNotFound { - get { return (string)(ResourceManager.GetObject("InstanceCloneNotFound", resourceCulture)); } - } - internal static string InstanceCloneFailed { - get { return (string)(ResourceManager.GetObject("InstanceCloneFailed", resourceCulture)); } - } - internal static string InstanceNotFound { - get { return (string)(ResourceManager.GetObject("InstanceNotFound", resourceCulture)); } - } - internal static string InstanceRenamed { - get { return (string)(ResourceManager.GetObject("InstanceRenamed", resourceCulture)); } - } - internal static string InstanceForgot { - get { return (string)(ResourceManager.GetObject("InstanceForgot", resourceCulture)); } - } - internal static string InstanceDefaultArgumentMissing { - get { return (string)(ResourceManager.GetObject("InstanceDefaultArgumentMissing", resourceCulture)); } - } - internal static string InstanceDefaultSet { - get { return (string)(ResourceManager.GetObject("InstanceDefaultSet", resourceCulture)); } - } - internal static string InstanceFakeFailed { - get { return (string)(ResourceManager.GetObject("InstanceFakeFailed", resourceCulture)); } - } - internal static string InstanceFakeBadArguments { - get { return (string)(ResourceManager.GetObject("InstanceFakeBadArguments", resourceCulture)); } - } - internal static string InstanceFakeMakingHistory { - get { return (string)(ResourceManager.GetObject("InstanceFakeMakingHistory", resourceCulture)); } - } - internal static string InstanceFakeBreakingGround { - get { return (string)(ResourceManager.GetObject("InstanceFakeBreakingGround", resourceCulture)); } - } - internal static string InstanceFakeVersion { - get { return (string)(ResourceManager.GetObject("InstanceFakeVersion", resourceCulture)); } - } - internal static string InstanceFakeBadGame { - get { return (string)(ResourceManager.GetObject("InstanceFakeBadGame", resourceCulture)); } - } - internal static string InstanceFakeBadGameVersion { - get { return (string)(ResourceManager.GetObject("InstanceFakeBadGameVersion", resourceCulture)); } - } - internal static string InstanceFakeCancelled { - get { return (string)(ResourceManager.GetObject("InstanceFakeCancelled", resourceCulture)); } - } - internal static string InstanceFakeCreating { - get { return (string)(ResourceManager.GetObject("InstanceFakeCreating", resourceCulture)); } - } - internal static string InstanceFakeDefault { - get { return (string)(ResourceManager.GetObject("InstanceFakeDefault", resourceCulture)); } - } - internal static string InstanceFakeDone { - get { return (string)(ResourceManager.GetObject("InstanceFakeDone", resourceCulture)); } - } - - internal static string ImportError { - get { return (string)(ResourceManager.GetObject("ImportError", resourceCulture)); } - } - internal static string ImportNotFound { - get { return (string)(ResourceManager.GetObject("ImportNotFound", resourceCulture)); } - } - - internal static string InstallNotFound { - get { return (string)(ResourceManager.GetObject("InstallNotFound", resourceCulture)); } - } - internal static string InstallTryAgain { - get { return (string)(ResourceManager.GetObject("InstallTryAgain", resourceCulture)); } - } - internal static string InstallUnversionedDependencyNotSatisfied { - get { return (string)(ResourceManager.GetObject("InstallUnversionedDependencyNotSatisfied", resourceCulture)); } - } - internal static string InstallVersionedDependencyNotSatisfied { - get { return (string)(ResourceManager.GetObject("InstallVersionedDependencyNotSatisfied", resourceCulture)); } - } - internal static string InstallBadMetadata { - get { return (string)(ResourceManager.GetObject("InstallBadMetadata", resourceCulture)); } - } - internal static string InstallFileConflictOwned { - get { return (string)(ResourceManager.GetObject("InstallFileConflictOwned", resourceCulture)); } - } - internal static string InstallFileConflictUnowned { - get { return (string)(ResourceManager.GetObject("InstallFileConflictUnowned", resourceCulture)); } - } - internal static string InstallGamedataReturned { - get { return (string)(ResourceManager.GetObject("InstallGamedataReturned", resourceCulture)); } - } - internal static string InstallCancelled { - get { return (string)(ResourceManager.GetObject("InstallCancelled", resourceCulture)); } - } - internal static string InstallAborted { - get { return (string)(ResourceManager.GetObject("InstallAborted", resourceCulture)); } - } - internal static string InstallTryAuthToken { - get { return (string)(ResourceManager.GetObject("InstallTryAuthToken", resourceCulture)); } - } - internal static string InstallDownloadFailed { - get { return (string)(ResourceManager.GetObject("InstallDownloadFailed", resourceCulture)); } - } - internal static string InstallDLC { - get { return (string)(ResourceManager.GetObject("InstallDLC", resourceCulture)); } - } - internal static string InstallDLCStorePage { - get { return (string)(ResourceManager.GetObject("InstallDLCStorePage", resourceCulture)); } - } - - internal static string ListUnknownFormat { - get { return (string)(ResourceManager.GetObject("ListUnknownFormat", resourceCulture)); } - } - internal static string ListGameFound { - get { return (string)(ResourceManager.GetObject("ListGameFound", resourceCulture)); } - } - internal static string ListGameVersion { - get { return (string)(ResourceManager.GetObject("ListGameVersion", resourceCulture)); } - } - internal static string ListGameModulesHeader { - get { return (string)(ResourceManager.GetObject("ListGameModulesHeader", resourceCulture)); } - } - internal static string ListLegend { - get { return (string)(ResourceManager.GetObject("ListLegend", resourceCulture)); } - } - - internal static string MarkHelpSummary { - get { return (string)(ResourceManager.GetObject("MarkHelpSummary", resourceCulture)); } - } - internal static string MarkUnknownCommand { - get { return (string)(ResourceManager.GetObject("MarkUnknownCommand", resourceCulture)); } - } - internal static string MarkNotInstalled { - get { return (string)(ResourceManager.GetObject("MarkNotInstalled", resourceCulture)); } - } - internal static string MarkAlready { - get { return (string)(ResourceManager.GetObject("MarkAlready", resourceCulture)); } - } - internal static string Marking { - get { return (string)(ResourceManager.GetObject("Marking", resourceCulture)); } - } - internal static string MarkDLC { - get { return (string)(ResourceManager.GetObject("MarkDLC", resourceCulture)); } - } - internal static string MarkChanged { - get { return (string)(ResourceManager.GetObject("MarkChanged", resourceCulture)); } - } - internal static string MarkAutoInstalled { - get { return (string)(ResourceManager.GetObject("MarkAutoInstalled", resourceCulture)); } - } - internal static string MarkUserSelected { - get { return (string)(ResourceManager.GetObject("MarkUserSelected", resourceCulture)); } - } - - internal static string PromptWelcome { - get { return (string)(ResourceManager.GetObject("PromptWelcome", resourceCulture)); } - } - internal static string PromptWithInstance { - get { return (string)(ResourceManager.GetObject("PromptWithInstance", resourceCulture)); } - } - internal static string PromptWithoutInstance { - get { return (string)(ResourceManager.GetObject("PromptWithoutInstance", resourceCulture)); } - } - - internal static string RemoveNotInstalled { - get { return (string)(ResourceManager.GetObject("RemoveNotInstalled", resourceCulture)); } - } - internal static string RemoveDLC { - get { return (string)(ResourceManager.GetObject("RemoveDLC", resourceCulture)); } - } - internal static string RemoveDLCStorePage { - get { return (string)(ResourceManager.GetObject("RemoveDLCStorePage", resourceCulture)); } - } - internal static string RemoveCancelled { - get { return (string)(ResourceManager.GetObject("RemoveCancelled", resourceCulture)); } - } - internal static string RemoveNothing { - get { return (string)(ResourceManager.GetObject("RemoveNothing", resourceCulture)); } - } - - internal static string RepairHelpSummary { - get { return (string)(ResourceManager.GetObject("RepairHelpSummary", resourceCulture)); } - } - internal static string RepairUnknownCommand { - get { return (string)(ResourceManager.GetObject("RepairUnknownCommand", resourceCulture)); } - } - internal static string Repaired { - get { return (string)(ResourceManager.GetObject("Repaired", resourceCulture)); } - } - internal static string ReplaceModuleNotFound { - get { return (string)(ResourceManager.GetObject("ReplaceModuleNotFound", resourceCulture)); } - } - internal static string Replacing { - get { return (string)(ResourceManager.GetObject("Replacing", resourceCulture)); } - } - internal static string ReplaceFound { - get { return (string)(ResourceManager.GetObject("ReplaceFound", resourceCulture)); } - } - internal static string ReplaceContinuePrompt { - get { return (string)(ResourceManager.GetObject("ReplaceContinuePrompt", resourceCulture)); } - } - internal static string ReplaceCancelled { - get { return (string)(ResourceManager.GetObject("ReplaceCancelled", resourceCulture)); } - } - internal static string ReplaceDependencyNotSatisfied { - get { return (string)(ResourceManager.GetObject("ReplaceDependencyNotSatisfied", resourceCulture)); } - } - internal static string ReplaceNotFound { - get { return (string)(ResourceManager.GetObject("ReplaceNotFound", resourceCulture)); } - } - - internal static string RepoHelpSummary { - get { return (string)(ResourceManager.GetObject("RepoHelpSummary", resourceCulture)); } - } - internal static string RepoUnknownCommand { - get { return (string)(ResourceManager.GetObject("RepoUnknownCommand", resourceCulture)); } - } - internal static string RepoAvailableHeader { - get { return (string)(ResourceManager.GetObject("RepoAvailableHeader", resourceCulture)); } - } - internal static string RepoAvailableFailed { - get { return (string)(ResourceManager.GetObject("RepoAvailableFailed", resourceCulture)); } - } - internal static string RepoListPriorityHeader { - get { return (string)(ResourceManager.GetObject("RepoListPriorityHeader", resourceCulture)); } - } - internal static string RepoListNameHeader { - get { return (string)(ResourceManager.GetObject("RepoListNameHeader", resourceCulture)); } - } - internal static string RepoListURLHeader { - get { return (string)(ResourceManager.GetObject("RepoListURLHeader", resourceCulture)); } - } - internal static string RepoAddNotFound { - get { return (string)(ResourceManager.GetObject("RepoAddNotFound", resourceCulture)); } - } - internal static string RepoAddDuplicate { - get { return (string)(ResourceManager.GetObject("RepoAddDuplicate", resourceCulture)); } - } - internal static string RepoAddDuplicateURL { - get { return (string)(ResourceManager.GetObject("RepoAddDuplicateURL", resourceCulture)); } - } - internal static string RepoAdded { - get { return (string)(ResourceManager.GetObject("RepoAdded", resourceCulture)); } - } - internal static string RepoPriorityNotFound { - get { return (string)(ResourceManager.GetObject("RepoPriorityNotFound", resourceCulture)); } - } - internal static string RepoPriorityInvalid { - get { return (string)(ResourceManager.GetObject("RepoPriorityInvalid", resourceCulture)); } - } - internal static string RepoForgetNotFound { - get { return (string)(ResourceManager.GetObject("RepoForgetNotFound", resourceCulture)); } - } - internal static string RepoForgetRemoving { - get { return (string)(ResourceManager.GetObject("RepoForgetRemoving", resourceCulture)); } - } - internal static string RepoForgetRemoved { - get { return (string)(ResourceManager.GetObject("RepoForgetRemoved", resourceCulture)); } - } - internal static string RepoSet { - get { return (string)(ResourceManager.GetObject("RepoSet", resourceCulture)); } - } - - internal static string SearchNoTerm { - get { return (string)(ResourceManager.GetObject("SearchNoTerm", resourceCulture)); } - } - internal static string SearchFoundByAuthorWithIncompat { - get { return (string)(ResourceManager.GetObject("SearchFoundByAuthorWithIncompat", resourceCulture)); } - } - internal static string SearchFoundWithIncompat { - get { return (string)(ResourceManager.GetObject("SearchFoundWithIncompat", resourceCulture)); } - } - internal static string SearchFoundByAuthor { - get { return (string)(ResourceManager.GetObject("SearchFoundByAuthor", resourceCulture)); } - } - internal static string SearchFound { - get { return (string)(ResourceManager.GetObject("SearchFound", resourceCulture)); } - } - internal static string SearchCompatibleModsHeader { - get { return (string)(ResourceManager.GetObject("SearchCompatibleModsHeader", resourceCulture)); } - } - internal static string SearchCompatibleMod { - get { return (string)(ResourceManager.GetObject("SearchCompatibleMod", resourceCulture)); } - } - internal static string SearchIncompatibleModsHeader { - get { return (string)(ResourceManager.GetObject("SearchIncompatibleModsHeader", resourceCulture)); } - } - internal static string SearchIncompatibleMod { - get { return (string)(ResourceManager.GetObject("SearchIncompatibleMod", resourceCulture)); } - } - internal static string ShowNotInstalledOrCompatible { - get { return (string)(ResourceManager.GetObject("ShowNotInstalledOrCompatible", resourceCulture)); } - } - internal static string ShowLookingForClose { - get { return (string)(ResourceManager.GetObject("ShowLookingForClose", resourceCulture)); } - } - internal static string ShowNoClose { - get { return (string)(ResourceManager.GetObject("ShowNoClose", resourceCulture)); } - } - internal static string ShowFoundOne { - get { return (string)(ResourceManager.GetObject("ShowFoundOne", resourceCulture)); } - } - internal static string ShowClosePrompt { - get { return (string)(ResourceManager.GetObject("ShowClosePrompt", resourceCulture)); } - } - internal static string ShowFilesHeader { - get { return (string)(ResourceManager.GetObject("ShowFilesHeader", resourceCulture)); } - } - internal static string ShowModuleInfoHeader { - get { return (string)(ResourceManager.GetObject("ShowModuleInfoHeader", resourceCulture)); } - } - internal static string ShowVersion { - get { return (string)(ResourceManager.GetObject("ShowVersion", resourceCulture)); } - } - internal static string ShowAuthor { - get { return (string)(ResourceManager.GetObject("ShowAuthor", resourceCulture)); } - } - internal static string ShowAuthorUnknown { - get { return (string)(ResourceManager.GetObject("ShowAuthorUnknown", resourceCulture)); } - } - internal static string ShowStatus { - get { return (string)(ResourceManager.GetObject("ShowStatus", resourceCulture)); } - } - internal static string ShowLicence { - get { return (string)(ResourceManager.GetObject("ShowLicence", resourceCulture)); } - } - internal static string ShowTags { - get { return (string)(ResourceManager.GetObject("ShowTags", resourceCulture)); } - } - internal static string ShowLanguages { - get { return (string)(ResourceManager.GetObject("ShowLanguages", resourceCulture)); } - } - internal static string ShowDependsHeader { - get { return (string)(ResourceManager.GetObject("ShowDependsHeader", resourceCulture)); } - } - internal static string ShowRecommendsHeader { - get { return (string)(ResourceManager.GetObject("ShowRecommendsHeader", resourceCulture)); } - } - internal static string ShowSuggestsHeader { - get { return (string)(ResourceManager.GetObject("ShowSuggestsHeader", resourceCulture)); } - } - internal static string ShowProvidesHeader { - get { return (string)(ResourceManager.GetObject("ShowProvidesHeader", resourceCulture)); } - } - internal static string ShowResourcesHeader { - get { return (string)(ResourceManager.GetObject("ShowResourcesHeader", resourceCulture)); } - } - internal static string ShowHomePage { - get { return (string)(ResourceManager.GetObject("ShowHomePage", resourceCulture)); } - } - internal static string ShowManual { - get { return (string)(ResourceManager.GetObject("ShowManual", resourceCulture)); } - } - internal static string ShowSpaceDock { - get { return (string)(ResourceManager.GetObject("ShowSpaceDock", resourceCulture)); } - } - internal static string ShowRepository { - get { return (string)(ResourceManager.GetObject("ShowRepository", resourceCulture)); } - } - internal static string ShowBugTracker { - get { return (string)(ResourceManager.GetObject("ShowBugTracker", resourceCulture)); } - } - internal static string ShowCurse { - get { return (string)(ResourceManager.GetObject("ShowCurse", resourceCulture)); } - } - internal static string ShowStore { - get { return (string)(ResourceManager.GetObject("ShowStore", resourceCulture)); } - } - internal static string ShowSteamStore { - get { return (string)(ResourceManager.GetObject("ShowSteamStore", resourceCulture)); } - } - internal static string ShowVersionFile { - get { return (string)(ResourceManager.GetObject("ShowVersionFile", resourceCulture)); } - } - internal static string ShowSpaceWarpInfo { - get { return (string)(ResourceManager.GetObject("ShowSpaceWarpInfo", resourceCulture)); } - } - internal static string ShowFileName { - get { return (string)(ResourceManager.GetObject("ShowFileName", resourceCulture)); } - } - internal static string ShowVersionHeader { - get { return (string)(ResourceManager.GetObject("ShowVersionHeader", resourceCulture)); } - } - internal static string ShowGameVersionsHeader { - get { return (string)(ResourceManager.GetObject("ShowGameVersionsHeader", resourceCulture)); } - } - - internal static string UpdateChangesSummary { - get { return (string)(ResourceManager.GetObject("UpdateChangesSummary", resourceCulture)); } - } - internal static string UpdateAddedHeader { - get { return (string)(ResourceManager.GetObject("UpdateAddedHeader", resourceCulture)); } - } - internal static string UpdateRemovedHeader { - get { return (string)(ResourceManager.GetObject("UpdateRemovedHeader", resourceCulture)); } - } - internal static string UpdateUpdatedHeader { - get { return (string)(ResourceManager.GetObject("UpdateUpdatedHeader", resourceCulture)); } - } - internal static string UpdateSummary { - get { return (string)(ResourceManager.GetObject("UpdateSummary", resourceCulture)); } - } - - internal static string UpgradeQueryingCKAN { - get { return (string)(ResourceManager.GetObject("UpgradeQueryingCKAN", resourceCulture)); } - } - internal static string UpgradeNewCKANAvailable { - get { return (string)(ResourceManager.GetObject("UpgradeNewCKANAvailable", resourceCulture)); } - } - internal static string UpgradeProceed { - get { return (string)(ResourceManager.GetObject("UpgradeProceed", resourceCulture)); } - } - internal static string UpgradePleaseWait { - get { return (string)(ResourceManager.GetObject("UpgradePleaseWait", resourceCulture)); } - } - internal static string UpgradeAlreadyHaveLatest { - get { return (string)(ResourceManager.GetObject("UpgradeAlreadyHaveLatest", resourceCulture)); } - } - internal static string UpgradeAborted { - get { return (string)(ResourceManager.GetObject("UpgradeAborted", resourceCulture)); } - } - internal static string UpgradeNotFound { - get { return (string)(ResourceManager.GetObject("UpgradeNotFound", resourceCulture)); } - } - internal static string UpgradeDLC { - get { return (string)(ResourceManager.GetObject("UpgradeDLC", resourceCulture)); } - } - internal static string UpgradeDLCStorePage { - get { return (string)(ResourceManager.GetObject("UpgradeDLCStorePage", resourceCulture)); } - } - - internal static string ScanNotSaved { - get { return (string)(ResourceManager.GetObject("ScanNotSaved", resourceCulture)); } - } - internal static string ScanPreliminaryInconsistent { - get { return (string)(ResourceManager.GetObject("ScanPreliminaryInconsistent", resourceCulture)); } - } - - internal static string FilterListGlobalHeader { - get { return (string)(ResourceManager.GetObject("FilterListGlobalHeader", resourceCulture)); } - } - internal static string FilterListInstanceHeader { - get { return (string)(ResourceManager.GetObject("FilterListInstanceHeader", resourceCulture)); } - } - internal static string FilterAddGlobalDuplicateError { - get { return (string)(ResourceManager.GetObject("FilterAddGlobalDuplicateError", resourceCulture)); } - } - internal static string FilterAddInstanceDuplicateError { - get { return (string)(ResourceManager.GetObject("FilterAddInstanceDuplicateError", resourceCulture)); } - } - internal static string FilterRemoveGlobalNotFoundError { - get { return (string)(ResourceManager.GetObject("FilterRemoveGlobalNotFoundError", resourceCulture)); } - } - internal static string FilterRemoveInstanceNotFoundError { - get { return (string)(ResourceManager.GetObject("FilterRemoveInstanceNotFoundError", resourceCulture)); } - } - internal static string FilterHelpSummary { - get { return (string)(ResourceManager.GetObject("FilterHelpSummary", resourceCulture)); } - } - - internal static string CompletionNotAvailable { - get { return (string)(ResourceManager.GetObject("CompletionNotAvailable", resourceCulture)); } - } - - } -} diff --git a/Cmdline/app.config b/Cmdline/app.config index 5035d4fa63..6c3273cff7 100644 --- a/Cmdline/app.config +++ b/Cmdline/app.config @@ -1,6 +1,6 @@ - + - \ No newline at end of file + diff --git a/ConsoleUI/App.config b/ConsoleUI/App.config index bd9d7e75a7..b786595539 100644 --- a/ConsoleUI/App.config +++ b/ConsoleUI/App.config @@ -1,10 +1,10 @@ - + - \ No newline at end of file + diff --git a/ConsoleUI/CKAN-ConsoleUI.csproj b/ConsoleUI/CKAN-ConsoleUI.csproj index 634c192ed8..685c9dc66d 100644 --- a/ConsoleUI/CKAN-ConsoleUI.csproj +++ b/ConsoleUI/CKAN-ConsoleUI.csproj @@ -1,9 +1,10 @@ CKAN-ConsoleUI - ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ - ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ - ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ + ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\obj\ @@ -13,30 +14,35 @@ false true true - Debug;Release + Debug;Release;NoGUI false 7.3 - net48 ..\assets\ckan.ico - v4.8 + net48;net7.0 512 prompt 4 $(OutputPath)$(AssemblyName).xml true IDE1006 + PrepareResources;$(CompileDependsOn) - + + + + + + TargetFramework=$(TargetFramework) {3B9AEA22-FA3B-4E43-9283-EABDD81CF271} CKAN-core @@ -48,13 +54,32 @@ Properties\GlobalAssemblyInfo.cs + + MSBuild:Compile + $(IntermediateOutputPath)Resources.Designer.cs + $(IntermediateOutputPath)Resources.Designer.cs + $(Language) + $(RootNamespace).Properties + %(Filename) + + + + - - - + + + diff --git a/ConsoleUI/Properties/Resources.Designer.cs b/ConsoleUI/Properties/Resources.Designer.cs deleted file mode 100644 index f2aa5b47d9..0000000000 --- a/ConsoleUI/Properties/Resources.Designer.cs +++ /dev/null @@ -1,841 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. (I WISH!) -// -//------------------------------------------------------------------------------ - -namespace CKAN.ConsoleUI.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) - { - resourceMan = new SingleAssemblyResourceManager("CKAN.ConsoleUI.Properties.Resources", typeof(Resources).Assembly); - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string Accept { - get { return (string)(ResourceManager.GetObject("Accept", resourceCulture)); } - } - internal static string Cancel { - get { return (string)(ResourceManager.GetObject("Cancel", resourceCulture)); } - } - internal static string DefaultGhostText { - get { return (string)(ResourceManager.GetObject("DefaultGhostText", resourceCulture)); } - } - internal static string Ascending { - get { return (string)(ResourceManager.GetObject("Ascending", resourceCulture)); } - } - internal static string AscendingSortTip { - get { return (string)(ResourceManager.GetObject("AscendingSortTip", resourceCulture)); } - } - internal static string Descending { - get { return (string)(ResourceManager.GetObject("Descending", resourceCulture)); } - } - internal static string DescendingSortTip { - get { return (string)(ResourceManager.GetObject("DescendingSortTip", resourceCulture)); } - } - internal static string ColumnNumber { - get { return (string)(ResourceManager.GetObject("ColumnNumber", resourceCulture)); } - } - internal static string ColumnNumberSortTip { - get { return (string)(ResourceManager.GetObject("ColumnNumberSortTip", resourceCulture)); } - } - internal static string ColumnNameSortTip { - get { return (string)(ResourceManager.GetObject("ColumnNameSortTip", resourceCulture)); } - } - internal static string CursorKeys { - get { return (string)(ResourceManager.GetObject("CursorKeys", resourceCulture)); } - } - internal static string Scroll { - get { return (string)(ResourceManager.GetObject("Scroll", resourceCulture)); } - } - internal static string ScrollMessages { - get { return (string)(ResourceManager.GetObject("ScrollMessages", resourceCulture)); } - } - internal static string Menu { - get { return (string)(ResourceManager.GetObject("Menu", resourceCulture)); } - } - internal static string Yes { - get { return (string)(ResourceManager.GetObject("Yes", resourceCulture)); } - } - internal static string No { - get { return (string)(ResourceManager.GetObject("No", resourceCulture)); } - } - internal static string OK { - get { return (string)(ResourceManager.GetObject("OK", resourceCulture)); } - } - internal static string Force { - get { return (string)(ResourceManager.GetObject("Force", resourceCulture)); } - } - internal static string Tab { - get { return (string)(ResourceManager.GetObject("Tab", resourceCulture)); } - } - internal static string Enter { - get { return (string)(ResourceManager.GetObject("Enter", resourceCulture)); } - } - internal static string Esc { - get { return (string)(ResourceManager.GetObject("Esc", resourceCulture)); } - } - internal static string Ctrl { - get { return (string)(ResourceManager.GetObject("Ctrl", resourceCulture)); } - } - internal static string Alt { - get { return (string)(ResourceManager.GetObject("Alt", resourceCulture)); } - } - internal static string Back { - get { return (string)(ResourceManager.GetObject("Back", resourceCulture)); } - } - internal static string Quit { - get { return (string)(ResourceManager.GetObject("Quit", resourceCulture)); } - } - internal static string Add { - get { return (string)(ResourceManager.GetObject("Add", resourceCulture)); } - } - internal static string Remove { - get { return (string)(ResourceManager.GetObject("Remove", resourceCulture)); } - } - internal static string Edit { - get { return (string)(ResourceManager.GetObject("Edit", resourceCulture)); } - } - internal static string Sort { - get { return (string)(ResourceManager.GetObject("Sort", resourceCulture)); } - } - internal static string Toggle { - get { return (string)(ResourceManager.GetObject("Toggle", resourceCulture)); } - } - internal static string Select { - get { return (string)(ResourceManager.GetObject("Select", resourceCulture)); } - } - internal static string SelectAll { - get { return (string)(ResourceManager.GetObject("SelectAll", resourceCulture)); } - } - internal static string DeselectAll { - get { return (string)(ResourceManager.GetObject("DeselectAll", resourceCulture)); } - } - internal static string Details { - get { return (string)(ResourceManager.GetObject("Details", resourceCulture)); } - } - internal static string Up { - get { return (string)(ResourceManager.GetObject("Up", resourceCulture)); } - } - internal static string Down { - get { return (string)(ResourceManager.GetObject("Down", resourceCulture)); } - } - internal static string FileSelectDirectory { - get { return (string)(ResourceManager.GetObject("FileSelectDirectory", resourceCulture)); } - } - internal static string FileSelectCountFooter { - get { return (string)(ResourceManager.GetObject("FileSelectCountFooter", resourceCulture)); } - } - internal static string FileSelectNameHeader { - get { return (string)(ResourceManager.GetObject("FileSelectNameHeader", resourceCulture)); } - } - internal static string FileSelectSizeHeader { - get { return (string)(ResourceManager.GetObject("FileSelectSizeHeader", resourceCulture)); } - } - internal static string FileSelectTimestampHeader { - get { return (string)(ResourceManager.GetObject("FileSelectTimestampHeader", resourceCulture)); } - } - internal static string FileSelectChangeDirectory { - get { return (string)(ResourceManager.GetObject("FileSelectChangeDirectory", resourceCulture)); } - } - internal static string FileSelectSelect { - get { return (string)(ResourceManager.GetObject("FileSelectSelect", resourceCulture)); } - } - internal static string FileSelectImport { - get { return (string)(ResourceManager.GetObject("FileSelectImport", resourceCulture)); } - } - internal static string FileSelectDirSize { - get { return (string)(ResourceManager.GetObject("FileSelectDirSize", resourceCulture)); } - } - internal static string AuthTokenListTitle { - get { return (string)(ResourceManager.GetObject("AuthTokenListTitle", resourceCulture)); } - } - internal static string AuthTokenListGitHubLink { - get { return (string)(ResourceManager.GetObject("AuthTokenListGitHubLink", resourceCulture)); } - } - internal static string AuthTokenListGitHubLinkTip { - get { return (string)(ResourceManager.GetObject("AuthTokenListGitHubLinkTip", resourceCulture)); } - } - internal static string AuthTokenListLabel { - get { return (string)(ResourceManager.GetObject("AuthTokenListLabel", resourceCulture)); } - } - internal static string AuthTokenListHostHeader { - get { return (string)(ResourceManager.GetObject("AuthTokenListHostHeader", resourceCulture)); } - } - internal static string AuthTokenListTokenHeader { - get { return (string)(ResourceManager.GetObject("AuthTokenListTokenHeader", resourceCulture)); } - } - internal static string AuthTokenListWarning { - get { return (string)(ResourceManager.GetObject("AuthTokenListWarning", resourceCulture)); } - } - internal static string AuthTokenListMissingToken { - get { return (string)(ResourceManager.GetObject("AuthTokenListMissingToken", resourceCulture)); } - } - internal static string AuthTokenAddTitle { - get { return (string)(ResourceManager.GetObject("AuthTokenAddTitle", resourceCulture)); } - } - internal static string AuthTokenAddHost { - get { return (string)(ResourceManager.GetObject("AuthTokenAddHost", resourceCulture)); } - } - internal static string AuthTokenAddHostGhostText { - get { return (string)(ResourceManager.GetObject("AuthTokenAddHostGhostText", resourceCulture)); } - } - internal static string AuthTokenAddToken { - get { return (string)(ResourceManager.GetObject("AuthTokenAddToken", resourceCulture)); } - } - internal static string AuthTokenAddTokenGhostText { - get { return (string)(ResourceManager.GetObject("AuthTokenAddTokenGhostText", resourceCulture)); } - } - internal static string CompatibleVersionsTitle { - get { return (string)(ResourceManager.GetObject("CompatibleVersionsTitle", resourceCulture)); } - } - internal static string CompatibleVersionsListHeader { - get { return (string)(ResourceManager.GetObject("CompatibleVersionsListHeader", resourceCulture)); } - } - internal static string CompatibleVersionsListAcceptTip { - get { return (string)(ResourceManager.GetObject("CompatibleVersionsListAcceptTip", resourceCulture)); } - } - internal static string CompatibleVersionsGhostText { - get { return (string)(ResourceManager.GetObject("CompatibleVersionsGhostText", resourceCulture)); } - } - internal static string CompatibleVersionsEntryAcceptTip { - get { return (string)(ResourceManager.GetObject("CompatibleVersionsEntryAcceptTip", resourceCulture)); } - } - internal static string ThemeNotFound { - get { return (string)(ResourceManager.GetObject("ThemeNotFound", resourceCulture)); } - } - internal static string ThemeList { - get { return (string)(ResourceManager.GetObject("ThemeList", resourceCulture)); } - } - internal static string RecommendationsLabel { - get { return (string)(ResourceManager.GetObject("RecommendationsLabel", resourceCulture)); } - } - internal static string RecommendationsInstallHeader { - get { return (string)(ResourceManager.GetObject("RecommendationsInstallHeader", resourceCulture)); } - } - internal static string RecommendationsNameHeader { - get { return (string)(ResourceManager.GetObject("RecommendationsNameHeader", resourceCulture)); } - } - internal static string RecommendationsSourcesHeader { - get { return (string)(ResourceManager.GetObject("RecommendationsSourcesHeader", resourceCulture)); } - } - internal static string RecommendationsTitle { - get { return (string)(ResourceManager.GetObject("RecommendationsTitle", resourceCulture)); } - } - internal static string ImportSelectTitle { - get { return (string)(ResourceManager.GetObject("ImportSelectTitle", resourceCulture)); } - } - internal static string ImportSelectHeader { - get { return (string)(ResourceManager.GetObject("ImportSelectHeader", resourceCulture)); } - } - internal static string ImportProgressTitle { - get { return (string)(ResourceManager.GetObject("ImportProgressTitle", resourceCulture)); } - } - internal static string ImportProgressMessage { - get { return (string)(ResourceManager.GetObject("ImportProgressMessage", resourceCulture)); } - } - internal static string InstanceNameLabel { - get { return (string)(ResourceManager.GetObject("InstanceNameLabel", resourceCulture)); } - } - internal static string InstanceNameGhostText { - get { return (string)(ResourceManager.GetObject("InstanceNameGhostText", resourceCulture)); } - } - internal static string InstancePathGhostText { - get { return (string)(ResourceManager.GetObject("InstancePathGhostText", resourceCulture)); } - } - internal static string InstancePathLabel { - get { return (string)(ResourceManager.GetObject("InstancePathLabel", resourceCulture)); } - } - internal static string InstanceNameEmptyError { - get { return (string)(ResourceManager.GetObject("InstanceNameEmptyError", resourceCulture)); } - } - internal static string InstanceNameDuplicateError { - get { return (string)(ResourceManager.GetObject("InstanceNameDuplicateError", resourceCulture)); } - } - internal static string InstancePathNotGameFolderError { - get { return (string)(ResourceManager.GetObject("InstancePathNotGameFolderError", resourceCulture)); } - } - internal static string InstanceAddExample { - get { return (string)(ResourceManager.GetObject("InstanceAddExample", resourceCulture)); } - } - internal static string InstanceAddTitle { - get { return (string)(ResourceManager.GetObject("InstanceAddTitle", resourceCulture)); } - } - internal static string InstanceEditTitle { - get { return (string)(ResourceManager.GetObject("InstanceEditTitle", resourceCulture)); } - } - internal static string InstanceEditRepoFrameTitle { - get { return (string)(ResourceManager.GetObject("InstanceEditRepoFrameTitle", resourceCulture)); } - } - internal static string InstanceEditCompatFrameTitle { - get { return (string)(ResourceManager.GetObject("InstanceEditCompatFrameTitle", resourceCulture)); } - } - internal static string InstanceEditRepoIndexHeader { - get { return (string)(ResourceManager.GetObject("InstanceEditRepoIndexHeader", resourceCulture)); } - } - internal static string InstanceEditRepoNameHeader { - get { return (string)(ResourceManager.GetObject("InstanceEditRepoNameHeader", resourceCulture)); } - } - internal static string InstanceEditRepoURLHeader { - get { return (string)(ResourceManager.GetObject("InstanceEditRepoURLHeader", resourceCulture)); } - } - internal static string InstanceEditCompatVersionHeader { - get { return (string)(ResourceManager.GetObject("InstanceEditCompatVersionHeader", resourceCulture)); } - } - internal static string InstanceEditRegistryParseError { - get { return (string)(ResourceManager.GetObject("InstanceEditRegistryParseError", resourceCulture)); } - } - internal static string InstanceListTitle { - get { return (string)(ResourceManager.GetObject("InstanceListTitle", resourceCulture)); } - } - internal static string InstanceListLabel { - get { return (string)(ResourceManager.GetObject("InstanceListLabel", resourceCulture)); } - } - internal static string InstanceListDefaultHeader { - get { return (string)(ResourceManager.GetObject("InstanceListDefaultHeader", resourceCulture)); } - } - internal static string InstanceListNameHeader { - get { return (string)(ResourceManager.GetObject("InstanceListNameHeader", resourceCulture)); } - } - internal static string InstanceListGameHeader { - get { return (string)(ResourceManager.GetObject("InstanceListGameHeader", resourceCulture)); } - } - internal static string InstanceListVersionHeader { - get { return (string)(ResourceManager.GetObject("InstanceListVersionHeader", resourceCulture)); } - } - internal static string InstanceListPathHeader { - get { return (string)(ResourceManager.GetObject("InstanceListPathHeader", resourceCulture)); } - } - internal static string InstanceListLoadingInstance { - get { return (string)(ResourceManager.GetObject("InstanceListLoadingInstance", resourceCulture)); } - } - internal static string InstanceListDefaultToggle { - get { return (string)(ResourceManager.GetObject("InstanceListDefaultToggle", resourceCulture)); } - } - internal static string InstanceListLoadingError { - get { return (string)(ResourceManager.GetObject("InstanceListLoadingError", resourceCulture)); } - } - internal static string InstanceListNoVersion { - get { return (string)(ResourceManager.GetObject("InstanceListNoVersion", resourceCulture)); } - } - internal static string InstallTitle { - get { return (string)(ResourceManager.GetObject("InstallTitle", resourceCulture)); } - } - internal static string InstallMessage { - get { return (string)(ResourceManager.GetObject("InstallMessage", resourceCulture)); } - } - internal static string InstallOwnedFileConflict { - get { return (string)(ResourceManager.GetObject("InstallOwnedFileConflict", resourceCulture)); } - } - internal static string InstallUnownedFileConflict { - get { return (string)(ResourceManager.GetObject("InstallUnownedFileConflict", resourceCulture)); } - } - internal static string InstallFilesReverted { - get { return (string)(ResourceManager.GetObject("InstallFilesReverted", resourceCulture)); } - } - internal static string InstallAuthTokenPrompt { - get { return (string)(ResourceManager.GetObject("InstallAuthTokenPrompt", resourceCulture)); } - } - internal static string InstallTooManyModsNameHeader { - get { return (string)(ResourceManager.GetObject("InstallTooManyModsNameHeader", resourceCulture)); } - } - internal static string InstallBadMetadata { - get { return (string)(ResourceManager.GetObject("InstallBadMetadata", resourceCulture)); } - } - internal static string InstallUnsatisfiedDependency { - get { return (string)(ResourceManager.GetObject("InstallUnsatisfiedDependency", resourceCulture)); } - } - internal static string InstallModuleNotFound { - get { return (string)(ResourceManager.GetObject("InstallModuleNotFound", resourceCulture)); } - } - internal static string InstallNotInstalled { - get { return (string)(ResourceManager.GetObject("InstallNotInstalled", resourceCulture)); } - } - internal static string InstallModInstalled { - get { return (string)(ResourceManager.GetObject("InstallModInstalled", resourceCulture)); } - } - internal static string ModInfoTitle { - get { return (string)(ResourceManager.GetObject("ModInfoTitle", resourceCulture)); } - } - internal static string ModInfoMenuTip { - get { return (string)(ResourceManager.GetObject("ModInfoMenuTip", resourceCulture)); } - } - internal static string ModInfoAuthors { - get { return (string)(ResourceManager.GetObject("ModInfoAuthors", resourceCulture)); } - } - internal static string ModInfoLicence { - get { return (string)(ResourceManager.GetObject("ModInfoLicence", resourceCulture)); } - } - internal static string ModInfoDownload { - get { return (string)(ResourceManager.GetObject("ModInfoDownload", resourceCulture)); } - } - internal static string ModInfoDescriptionFrame { - get { return (string)(ResourceManager.GetObject("ModInfoDescriptionFrame", resourceCulture)); } - } - internal static string ModInfoUnavailableWarning { - get { return (string)(ResourceManager.GetObject("ModInfoUnavailableWarning", resourceCulture)); } - } - internal static string ModInfoDownloadToCache { - get { return (string)(ResourceManager.GetObject("ModInfoDownloadToCache", resourceCulture)); } - } - internal static string ModInfoHomePage { - get { return (string)(ResourceManager.GetObject("ModInfoHomePage", resourceCulture)); } - } - internal static string ModInfoHomePageTip { - get { return (string)(ResourceManager.GetObject("ModInfoHomePageTip", resourceCulture)); } - } - internal static string ModInfoRepository { - get { return (string)(ResourceManager.GetObject("ModInfoRepository", resourceCulture)); } - } - internal static string ModInfoRepositoryTip { - get { return (string)(ResourceManager.GetObject("ModInfoRepositoryTip", resourceCulture)); } - } - internal static string ModInfoBugtracker { - get { return (string)(ResourceManager.GetObject("ModInfoBugtracker", resourceCulture)); } - } - internal static string ModInfoBugtrackerTip { - get { return (string)(ResourceManager.GetObject("ModInfoBugtrackerTip", resourceCulture)); } - } - internal static string ModInfoSpaceDock { - get { return (string)(ResourceManager.GetObject("ModInfoSpaceDock", resourceCulture)); } - } - internal static string ModInfoSpaceDockTip { - get { return (string)(ResourceManager.GetObject("ModInfoSpaceDockTip", resourceCulture)); } - } - internal static string ModInfoCurse { - get { return (string)(ResourceManager.GetObject("ModInfoCurse", resourceCulture)); } - } - internal static string ModInfoCurseTip { - get { return (string)(ResourceManager.GetObject("ModInfoCurseTip", resourceCulture)); } - } - internal static string ModInfoStore { - get { return (string)(ResourceManager.GetObject("ModInfoStore", resourceCulture)); } - } - internal static string ModInfoStoreTip { - get { return (string)(ResourceManager.GetObject("ModInfoStoreTip", resourceCulture)); } - } - internal static string ModInfoSteamStore { - get { return (string)(ResourceManager.GetObject("ModInfoSteamStore", resourceCulture)); } - } - internal static string ModInfoSteamStoreTip { - get { return (string)(ResourceManager.GetObject("ModInfoSteamStoreTip", resourceCulture)); } - } - internal static string ModInfoViewMetadata { - get { return (string)(ResourceManager.GetObject("ModInfoViewMetadata", resourceCulture)); } - } - internal static string ModInfoViewMetadataTip { - get { return (string)(ResourceManager.GetObject("ModInfoViewMetadataTip", resourceCulture)); } - } - internal static string ModInfoViewMetadataTitle { - get { return (string)(ResourceManager.GetObject("ModInfoViewMetadataTitle", resourceCulture)); } - } - internal static string ModInfoURLLaunching { - get { return (string)(ResourceManager.GetObject("ModInfoURLLaunching", resourceCulture)); } - } - internal static string ModInfoDependenciesFrame { - get { return (string)(ResourceManager.GetObject("ModInfoDependenciesFrame", resourceCulture)); } - } - internal static string ModInfoRequiredLabel { - get { return (string)(ResourceManager.GetObject("ModInfoRequiredLabel", resourceCulture)); } - } - internal static string ModInfoConflictsLabel { - get { return (string)(ResourceManager.GetObject("ModInfoConflictsLabel", resourceCulture)); } - } - internal static string ModInfoReplacedBy { - get { return (string)(ResourceManager.GetObject("ModInfoReplacedBy", resourceCulture)); } - } - internal static string ModInfoInstalledOn { - get { return (string)(ResourceManager.GetObject("ModInfoInstalledOn", resourceCulture)); } - } - internal static string ModInfoInstalledManually { - get { return (string)(ResourceManager.GetObject("ModInfoInstalledManually", resourceCulture)); } - } - internal static string ModInfoLatestInstalledOn { - get { return (string)(ResourceManager.GetObject("ModInfoLatestInstalledOn", resourceCulture)); } - } - internal static string ModInfoLatestInstalledManually { - get { return (string)(ResourceManager.GetObject("ModInfoLatestInstalledManually", resourceCulture)); } - } - internal static string ModInfoLatestVersion { - get { return (string)(ResourceManager.GetObject("ModInfoLatestVersion", resourceCulture)); } - } - internal static string ModInfoOtherVersions { - get { return (string)(ResourceManager.GetObject("ModInfoOtherVersions", resourceCulture)); } - } - internal static string ModInfoUnavailableInstalledOn { - get { return (string)(ResourceManager.GetObject("ModInfoUnavailableInstalledOn", resourceCulture)); } - } - internal static string ModInfoUnavailableInstalledManually { - get { return (string)(ResourceManager.GetObject("ModInfoUnavailableInstalledManually", resourceCulture)); } - } - internal static string ModInfoCompatibleWith { - get { return (string)(ResourceManager.GetObject("ModInfoCompatibleWith", resourceCulture)); } - } - internal static string ModInfoHostedOn { - get { return (string)(ResourceManager.GetObject("ModInfoHostedOn", resourceCulture)); } - } - internal static string ModInfoReportBugsOn { - get { return (string)(ResourceManager.GetObject("ModInfoReportBugsOn", resourceCulture)); } - } - internal static string ModInfoRepositoryOn { - get { return (string)(ResourceManager.GetObject("ModInfoRepositoryOn", resourceCulture)); } - } - internal static string ModInfoHomePageOn { - get { return (string)(ResourceManager.GetObject("ModInfoHomePageOn", resourceCulture)); } - } - internal static string ModInfoBuyFromKSPStore { - get { return (string)(ResourceManager.GetObject("ModInfoBuyFromKSPStore", resourceCulture)); } - } - internal static string ModInfoBuyFromSteamStore { - get { return (string)(ResourceManager.GetObject("ModInfoBuyFromSteamStore", resourceCulture)); } - } - internal static string ModInfoBuyFromKSPStoreOrSteamStore { - get { return (string)(ResourceManager.GetObject("ModInfoBuyFromKSPStoreOrSteamStore", resourceCulture)); } - } - internal static string ModInfoDownloading { - get { return (string)(ResourceManager.GetObject("ModInfoDownloading", resourceCulture)); } - } - internal static string ModInfoDownloadCorrupted { - get { return (string)(ResourceManager.GetObject("ModInfoDownloadCorrupted", resourceCulture)); } - } - internal static string ModInfoDownloadFailed { - get { return (string)(ResourceManager.GetObject("ModInfoDownloadFailed", resourceCulture)); } - } - internal static string ProgressTitle { - get { return (string)(ResourceManager.GetObject("ProgressTitle", resourceCulture)); } - } - internal static string ProgressMessages { - get { return (string)(ResourceManager.GetObject("ProgressMessages", resourceCulture)); } - } - internal static string SplashLoading { - get { return (string)(ResourceManager.GetObject("SplashLoading", resourceCulture)); } - } - internal static string SplashPressAnyKey { - get { return (string)(ResourceManager.GetObject("SplashPressAnyKey", resourceCulture)); } - } - internal static string RepoNameLabel { - get { return (string)(ResourceManager.GetObject("RepoNameLabel", resourceCulture)); } - } - internal static string RepoNameGhostText { - get { return (string)(ResourceManager.GetObject("RepoNameGhostText", resourceCulture)); } - } - internal static string RepoURLLabel { - get { return (string)(ResourceManager.GetObject("RepoURLLabel", resourceCulture)); } - } - internal static string RepoURLGhostText { - get { return (string)(ResourceManager.GetObject("RepoURLGhostText", resourceCulture)); } - } - internal static string RepoImportTip { - get { return (string)(ResourceManager.GetObject("RepoImportTip", resourceCulture)); } - } - internal static string RepoTitle { - get { return (string)(ResourceManager.GetObject("RepoTitle", resourceCulture)); } - } - internal static string RepoNameEmptyError { - get { return (string)(ResourceManager.GetObject("RepoNameEmptyError", resourceCulture)); } - } - internal static string RepoNameDuplicateError { - get { return (string)(ResourceManager.GetObject("RepoNameDuplicateError", resourceCulture)); } - } - internal static string RepoURLEmptyError { - get { return (string)(ResourceManager.GetObject("RepoURLEmptyError", resourceCulture)); } - } - internal static string ModListNameHeader { - get { return (string)(ResourceManager.GetObject("ModListNameHeader", resourceCulture)); } - } - internal static string ModListVersionHeader { - get { return (string)(ResourceManager.GetObject("ModListVersionHeader", resourceCulture)); } - } - internal static string ModListMaxGameVersionHeader { - get { return (string)(ResourceManager.GetObject("ModListMaxGameVersionHeader", resourceCulture)); } - } - internal static string ModListSearchFocusedGhostText { - get { return (string)(ResourceManager.GetObject("ModListSearchFocusedGhostText", resourceCulture)); } - } - internal static string ModListSearchUnfocusedGhostText { - get { return (string)(ResourceManager.GetObject("ModListSearchUnfocusedGhostText", resourceCulture)); } - } - internal static string ModListCount { - get { return (string)(ResourceManager.GetObject("ModListCount", resourceCulture)); } - } - internal static string ModListSizeOnDisk { - get { return (string)(ResourceManager.GetObject("ModListSizeOnDisk", resourceCulture)); } - } - internal static string ModListInstallTip { - get { return (string)(ResourceManager.GetObject("ModListInstallTip", resourceCulture)); } - } - internal static string ModListUpgradeTip { - get { return (string)(ResourceManager.GetObject("ModListUpgradeTip", resourceCulture)); } - } - internal static string ModListReplaceTip { - get { return (string)(ResourceManager.GetObject("ModListReplaceTip", resourceCulture)); } - } - internal static string ModListRemoveTip { - get { return (string)(ResourceManager.GetObject("ModListRemoveTip", resourceCulture)); } - } - internal static string ModListAutoInstTip { - get { return (string)(ResourceManager.GetObject("ModListAutoInstTip", resourceCulture)); } - } - internal static string ModListUserSelectedTip { - get { return (string)(ResourceManager.GetObject("ModListUserSelectedTip", resourceCulture)); } - } - internal static string ModListApplyChangesTip { - get { return (string)(ResourceManager.GetObject("ModListApplyChangesTip", resourceCulture)); } - } - internal static string ModListUpdatedDayAgo { - get { return (string)(ResourceManager.GetObject("ModListUpdatedDayAgo", resourceCulture)); } - } - internal static string ModListUpdatedDaysAgo { - get { return (string)(ResourceManager.GetObject("ModListUpdatedDaysAgo", resourceCulture)); } - } - internal static string ModListSortMenu { - get { return (string)(ResourceManager.GetObject("ModListSortMenu", resourceCulture)); } - } - internal static string ModListSortMenuTip { - get { return (string)(ResourceManager.GetObject("ModListSortMenuTip", resourceCulture)); } - } - internal static string ModListRefreshMenu { - get { return (string)(ResourceManager.GetObject("ModListRefreshMenu", resourceCulture)); } - } - internal static string ModListRefreshMenuTip { - get { return (string)(ResourceManager.GetObject("ModListRefreshMenuTip", resourceCulture)); } - } - internal static string ModListUpgradeMenu { - get { return (string)(ResourceManager.GetObject("ModListUpgradeMenu", resourceCulture)); } - } - internal static string ModListUpgradeMenuTip { - get { return (string)(ResourceManager.GetObject("ModListUpgradeMenuTip", resourceCulture)); } - } - internal static string ModListAuditRecsMenu { - get { return (string)(ResourceManager.GetObject("ModListAuditRecsMenu", resourceCulture)); } - } - internal static string ModListAuditRecsMenuTip { - get { return (string)(ResourceManager.GetObject("ModListAuditRecsMenuTip", resourceCulture)); } - } - internal static string ModListImportMenu { - get { return (string)(ResourceManager.GetObject("ModListImportMenu", resourceCulture)); } - } - internal static string ModListImportMenuTip { - get { return (string)(ResourceManager.GetObject("ModListImportMenuTip", resourceCulture)); } - } - internal static string ModListExportMenu { - get { return (string)(ResourceManager.GetObject("ModListExportMenu", resourceCulture)); } - } - internal static string ModListExportMenuTip { - get { return (string)(ResourceManager.GetObject("ModListExportMenuTip", resourceCulture)); } - } - internal static string ModListInstanceSettingsMenu { - get { return (string)(ResourceManager.GetObject("ModListInstanceSettingsMenu", resourceCulture)); } - } - internal static string ModListInstanceSettingsMenuTip { - get { return (string)(ResourceManager.GetObject("ModListInstanceSettingsMenuTip", resourceCulture)); } - } - internal static string ModListSelectInstanceMenu { - get { return (string)(ResourceManager.GetObject("ModListSelectInstanceMenu", resourceCulture)); } - } - internal static string ModListSelectInstanceMenuTip { - get { return (string)(ResourceManager.GetObject("ModListSelectInstanceMenuTip", resourceCulture)); } - } - internal static string ModListAuthTokenMenu { - get { return (string)(ResourceManager.GetObject("ModListAuthTokenMenu", resourceCulture)); } - } - internal static string ModListAuthTokenMenuTip { - get { return (string)(ResourceManager.GetObject("ModListAuthTokenMenuTip", resourceCulture)); } - } - internal static string ModListHelpMenu { - get { return (string)(ResourceManager.GetObject("ModListHelpMenu", resourceCulture)); } - } - internal static string ModListFilterMenu { - get { return (string)(ResourceManager.GetObject("ModListFilterMenu", resourceCulture)); } - } - internal static string ModListFilterMenuTip { - get { return (string)(ResourceManager.GetObject("ModListFilterMenuTip", resourceCulture)); } - } - internal static string ModListHelpMenuTip { - get { return (string)(ResourceManager.GetObject("ModListHelpMenuTip", resourceCulture)); } - } - internal static string ModListQuitMenu { - get { return (string)(ResourceManager.GetObject("ModListQuitMenu", resourceCulture)); } - } - internal static string ModListQuitMenuTip { - get { return (string)(ResourceManager.GetObject("ModListQuitMenuTip", resourceCulture)); } - } - internal static string ModListCaptureKeyMenu { - get { return (string)(ResourceManager.GetObject("ModListCaptureKeyMenu", resourceCulture)); } - } - internal static string ModListCaptureKeyMenuTip { - get { return (string)(ResourceManager.GetObject("ModListCaptureKeyMenuTip", resourceCulture)); } - } - internal static string ModListPressAKey { - get { return (string)(ResourceManager.GetObject("ModListPressAKey", resourceCulture)); } - } - internal static string ModListAuditNotFound { - get { return (string)(ResourceManager.GetObject("ModListAuditNotFound", resourceCulture)); } - } - internal static string ModListUpdateRegistryTitle { - get { return (string)(ResourceManager.GetObject("ModListUpdateRegistryTitle", resourceCulture)); } - } - internal static string ModListUpdateRegistryMessage { - get { return (string)(ResourceManager.GetObject("ModListUpdateRegistryMessage", resourceCulture)); } - } - internal static string ModListNewMod { - get { return (string)(ResourceManager.GetObject("ModListNewMod", resourceCulture)); } - } - internal static string ModListNewMods { - get { return (string)(ResourceManager.GetObject("ModListNewMods", resourceCulture)); } - } - internal static string ModListScanBad { - get { return (string)(ResourceManager.GetObject("ModListScanBad", resourceCulture)); } - } - internal static string ModListExportPrefix { - get { return (string)(ResourceManager.GetObject("ModListExportPrefix", resourceCulture)); } - } - internal static string ModListExported { - get { return (string)(ResourceManager.GetObject("ModListExported", resourceCulture)); } - } - internal static string ModListExportFailed { - get { return (string)(ResourceManager.GetObject("ModListExportFailed", resourceCulture)); } - } - internal static string ModListHelpSymbolHeader { - get { return (string)(ResourceManager.GetObject("ModListHelpSymbolHeader", resourceCulture)); } - } - internal static string ModListHelpInstalled { - get { return (string)(ResourceManager.GetObject("ModListHelpInstalled", resourceCulture)); } - } - internal static string ModListHelpAutoInstalled { - get { return (string)(ResourceManager.GetObject("ModListHelpAutoInstalled", resourceCulture)); } - } - internal static string ModListHelpUpgradeable { - get { return (string)(ResourceManager.GetObject("ModListHelpUpgradeable", resourceCulture)); } - } - internal static string ModListHelpManuallyInstalled { - get { return (string)(ResourceManager.GetObject("ModListHelpManuallyInstalled", resourceCulture)); } - } - internal static string ModListHelpReplaceable { - get { return (string)(ResourceManager.GetObject("ModListHelpReplaceable", resourceCulture)); } - } - internal static string ModListHelpUnavailable { - get { return (string)(ResourceManager.GetObject("ModListHelpUnavailable", resourceCulture)); } - } - internal static string ModListHelpBasicKeysHeader { - get { return (string)(ResourceManager.GetObject("ModListHelpBasicKeysHeader", resourceCulture)); } - } - internal static string ModListHelpMoveFocus { - get { return (string)(ResourceManager.GetObject("ModListHelpMoveFocus", resourceCulture)); } - } - internal static string ModListHelpSelectRow { - get { return (string)(ResourceManager.GetObject("ModListHelpSelectRow", resourceCulture)); } - } - internal static string ModListHelpClearSearch { - get { return (string)(ResourceManager.GetObject("ModListHelpClearSearch", resourceCulture)); } - } - internal static string ModListHelpSpecialSearchesHeader { - get { return (string)(ResourceManager.GetObject("ModListHelpSpecialSearchesHeader", resourceCulture)); } - } - internal static string ModListHelpAuthor { - get { return (string)(ResourceManager.GetObject("ModListHelpAuthor", resourceCulture)); } - } - internal static string ModListHelpName { - get { return (string)(ResourceManager.GetObject("ModListHelpName", resourceCulture)); } - } - internal static string ModListHelpSearchAuthor { - get { return (string)(ResourceManager.GetObject("ModListHelpSearchAuthor", resourceCulture)); } - } - internal static string ModListHelpSearchInstalled { - get { return (string)(ResourceManager.GetObject("ModListHelpSearchInstalled", resourceCulture)); } - } - internal static string ModListHelpSearchUpgradeable { - get { return (string)(ResourceManager.GetObject("ModListHelpSearchUpgradeable", resourceCulture)); } - } - internal static string ModListHelpSearchDepends { - get { return (string)(ResourceManager.GetObject("ModListHelpSearchDepends", resourceCulture)); } - } - internal static string ModListHelpSearchConflicts { - get { return (string)(ResourceManager.GetObject("ModListHelpSearchConflicts", resourceCulture)); } - } - internal static string ModListHelpSearchNew { - get { return (string)(ResourceManager.GetObject("ModListHelpSearchNew", resourceCulture)); } - } - - internal static string FiltersAddMiniAVCMenu { - get { return (string)(ResourceManager.GetObject("FiltersAddMiniAVCMenu", resourceCulture)); } - } - internal static string FiltersAddMiniAVCMenuTip { - get { return (string)(ResourceManager.GetObject("FiltersAddMiniAVCMenuTip", resourceCulture)); } - } - internal static string FiltersGlobalHeader { - get { return (string)(ResourceManager.GetObject("FiltersGlobalHeader", resourceCulture)); } - } - internal static string FiltersInstanceHeader { - get { return (string)(ResourceManager.GetObject("FiltersInstanceHeader", resourceCulture)); } - } - internal static string FiltersTitle { - get { return (string)(ResourceManager.GetObject("FiltersTitle", resourceCulture)); } - } - - internal static string FilterAddGhostText { - get { return (string)(ResourceManager.GetObject("FilterAddGhostText", resourceCulture)); } - } - internal static string FilterAddAcceptTip { - get { return (string)(ResourceManager.GetObject("FilterAddAcceptTip", resourceCulture)); } - } - internal static string FilterAddTitle { - get { return (string)(ResourceManager.GetObject("FilterAddTitle", resourceCulture)); } - } - - internal static string ExitTitle { - get { return (string)(ResourceManager.GetObject("ExitTitle", resourceCulture)); } - } - internal static string ExitBody { - get { return (string)(ResourceManager.GetObject("ExitBody", resourceCulture)); } - } - - } -} diff --git a/ConsoleUI/Toolkit/Symbols.cs b/ConsoleUI/Toolkit/Symbols.cs index 0588060ca2..5f09159f48 100644 --- a/ConsoleUI/Toolkit/Symbols.cs +++ b/ConsoleUI/Toolkit/Symbols.cs @@ -9,8 +9,16 @@ namespace CKAN.ConsoleUI.Toolkit { /// public static class Symbols { + private static Encoding GetCodePage(int which) + { + #if !NETFRAMEWORK + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + #endif + return Encoding.GetEncoding(which); + } + // This needs to be first so it's set when the other properties are initialized - private static readonly Encoding dosCodePage = Encoding.GetEncoding(437); + private static readonly Encoding dosCodePage = GetCodePage(437); /// /// The "three horizontal lines" menu symbol in the latest web apps @@ -137,8 +145,8 @@ public static class Symbols { /// public static readonly char leftHalfBlock = cp437c(0xdd); - private static char cp437c(byte num) { return dosCodePage.GetChars(new byte[] {num})[0]; } - private static string cp437s(byte num) { return $"{cp437c(num)}"; } + private static char cp437c(byte num) => dosCodePage.GetChars(new byte[] {num})[0]; + private static string cp437s(byte num) => $"{cp437c(num)}"; } } diff --git a/Core/CKAN-core.csproj b/Core/CKAN-core.csproj index 6bb5d4e083..4d73dad1d0 100644 --- a/Core/CKAN-core.csproj +++ b/Core/CKAN-core.csproj @@ -1,9 +1,10 @@ CKAN - ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ - ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ - ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ + ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\obj\ @@ -13,30 +14,12 @@ false true true - Debug;Release;Debug_NetCore;Release_NetCore + Debug;Release;NoGUI false 7.3 IDE1006 - - - - - net7.0 - - - - - net48 - - - - - true - portable - false - - - true + net48;net7.0 + PrepareResources;$(CompileDependsOn) @@ -49,6 +32,7 @@ + @@ -72,15 +56,31 @@ CKAN.Core.CKAN.schema + + MSBuild:Compile + $(IntermediateOutputPath)Resources.Designer.cs + $(IntermediateOutputPath)Resources.Designer.cs + $(Language) + $(RootNamespace).Properties + %(Filename) + + + + PreserveNewest - - - + + + diff --git a/Core/CKANPathUtils.cs b/Core/CKANPathUtils.cs index bbef46c3aa..018005eb05 100644 --- a/Core/CKANPathUtils.cs +++ b/Core/CKANPathUtils.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Linq; using System.Text.RegularExpressions; using log4net; @@ -25,73 +26,41 @@ public static class CKANPathUtils /// The path to Steam, or null if not found public static string SteamPath() { - // First check the registry. - - const string reg_key = @"HKEY_CURRENT_USER\Software\Valve\Steam"; - const string reg_value = @"SteamPath"; - - log.DebugFormat("Checking {0}\\{1} for Steam path", reg_key, reg_value); - - var steam = (string)Microsoft.Win32.Registry.GetValue(reg_key, reg_value, null); - - // If that directory exists, we've found Steam! - if (steam != null && Directory.Exists(steam)) + foreach (var steam in SteamPaths.Where(p => !string.IsNullOrEmpty(p))) { - log.InfoFormat("Found Steam at {0}", steam); - return steam; + log.DebugFormat("Looking for Steam in {0}", steam); + if (Directory.Exists(steam)) + { + log.InfoFormat("Found Steam at {0}", steam); + return steam; + } } + log.Info("Steam not found on this system."); + return null; + } - log.Debug("Couldn't find Steam via registry key, trying other locations..."); - - // Not in the registry, or missing file, but that's cool. This should find it on Linux - steam = Path.Combine( - Environment.GetFolderPath(Environment.SpecialFolder.Personal), - ".local", - "share", - "Steam" - ); - - log.DebugFormat("Looking for Steam in {0}", steam); + private const string steamRegKey = @"HKEY_CURRENT_USER\Software\Valve\Steam"; + private const string steamRegValue = @"SteamPath"; - if (Directory.Exists(steam)) + private static string[] SteamPaths + => Platform.IsWindows ? new string[] { - log.InfoFormat("Found Steam at {0}", steam); - return steam; + // First check the registry + (string)Microsoft.Win32.Registry.GetValue(steamRegKey, steamRegValue, null), } - - // Try an alternative path. - steam = Path.Combine( - Environment.GetFolderPath(Environment.SpecialFolder.Personal), - ".steam", - "steam" - ); - - log.DebugFormat("Looking for Steam in {0}", steam); - - if (Directory.Exists(steam)) + : Platform.IsUnix ? new string[] { - log.InfoFormat("Found Steam at {0}", steam); - return steam; + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), + ".local", "share", "Steam"), + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), + ".steam", "steam"), } - - // Ok - Perhaps we're running OSX? - - steam = Path.Combine( - Environment.GetFolderPath(Environment.SpecialFolder.Personal), - Path.Combine("Library", "Application Support", "Steam") - ); - - log.DebugFormat("Looking for Steam in {0}", steam); - - if (Directory.Exists(steam)) + : Platform.IsMac ? new string[] { - log.InfoFormat("Found Steam at {0}", steam); - return steam; + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), + "Library", "Application Support", "Steam"), } - - log.Info("Steam not found on this system."); - return null; - } + : new string[] {}; /// /// Normalizes the path by replacing all \ with / and removing any trailing slash. @@ -99,11 +68,9 @@ public static string SteamPath() /// The path to normalize /// The normalized path public static string NormalizePath(string path) - { - return path == null ? null - : path.Length < 2 ? path.Replace('\\', '/') - : path.Replace('\\', '/').TrimEnd('/'); - } + => path == null ? null + : path.Length < 2 ? path.Replace('\\', '/') + : path.Replace('\\', '/').TrimEnd('/'); /// /// Gets the last path element. Ex: /a/b/c returns c @@ -111,9 +78,7 @@ public static string NormalizePath(string path) /// The last path element. /// The path to process. public static string GetLastPathElement(string path) - { - return Regex.Replace(NormalizePath(path), @"^.*/", ""); - } + => Regex.Replace(NormalizePath(path), @"^.*/", ""); /// /// Gets the leading path elements. Ex: /a/b/c returns /a/b diff --git a/Core/CkanTransaction.cs b/Core/CkanTransaction.cs index fe56ce614b..f24865f8d0 100644 --- a/Core/CkanTransaction.cs +++ b/Core/CkanTransaction.cs @@ -29,10 +29,10 @@ public static TransactionScope CreateTransactionScope() private const double timeoutMs = 4294967294d; private static readonly TimeSpan maxCoretimeout = TimeSpan.FromMilliseconds(timeoutMs); - private static TransactionOptions transOpts = new TransactionOptions() + private static readonly TransactionOptions transOpts = new TransactionOptions() { IsolationLevel = IsolationLevel.ReadCommitted, - Timeout = maxCoretimeout + Timeout = maxCoretimeout, }; /// diff --git a/Core/Configuration/JsonConfiguration.cs b/Core/Configuration/JsonConfiguration.cs index 526f0e35f2..cf47850d74 100644 --- a/Core/Configuration/JsonConfiguration.cs +++ b/Core/Configuration/JsonConfiguration.cs @@ -2,6 +2,9 @@ using System.Collections.Generic; using System.IO; using System.Linq; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Newtonsoft.Json; @@ -382,16 +385,18 @@ private void LoadConfig() // Ensure the directory exists new FileInfo(configFile).Directory.Create(); -#if !NETCOREAPP - // If we are not running on .NET Core, try to migrate from the real registry - if (Win32RegistryConfiguration.DoesRegistryConfigurationExist()) + // Try to migrate from the real registry + if ( + #if NET6_0_OR_GREATER + Platform.IsWindows && + #endif + Win32RegistryConfiguration.DoesRegistryConfigurationExist()) { Migrate(); // TODO: At some point, we can uncomment this to clean up after ourselves. // Win32RegistryConfiguration.DeleteAllKeys(); } -#endif SaveConfig(); } @@ -401,6 +406,9 @@ private void LoadConfig() // // Copy the configuration from the registry here. // + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif private void Migrate() { Win32RegistryConfiguration registry = new Win32RegistryConfiguration(); diff --git a/Core/Configuration/Win32RegistryConfiguration.cs b/Core/Configuration/Win32RegistryConfiguration.cs index 92dbbdffc5..75fea7d724 100644 --- a/Core/Configuration/Win32RegistryConfiguration.cs +++ b/Core/Configuration/Win32RegistryConfiguration.cs @@ -2,6 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.IO; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Microsoft.Win32; namespace CKAN.Configuration @@ -9,6 +12,9 @@ namespace CKAN.Configuration // DEPRECATED: We now use a JSON configuration file. This still exists to facilitate migration. // // N.B., you can resume using this version by changing the instance created in ServiceLocator. + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class Win32RegistryConfiguration : IConfiguration { private const string CKAN_KEY = @"HKEY_CURRENT_USER\Software\CKAN"; diff --git a/Core/Net/Net.cs b/Core/Net/Net.cs index 12d1f68294..aca30d4f73 100644 --- a/Core/Net/Net.cs +++ b/Core/Net/Net.cs @@ -3,6 +3,8 @@ using System.IO; using System.Linq; using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; using System.Text.RegularExpressions; using System.Threading; @@ -45,14 +47,27 @@ public static class Net /// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag /// public static string CurrentETag(Uri url) - { - WebRequest req = WebRequest.Create(url); - req.Method = "HEAD"; - HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); - string val = resp.Headers["ETag"]?.Replace("\"", ""); - resp.Close(); - return val; - } + => httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, url), + HttpCompletionOption.ResponseHeadersRead) + .Result + .Headers.ETag.ToString() + .Replace("\"", ""); + + /// + /// "HttpClient is intended to be instantiated once and reused + /// throughout the life of an application. In .NET Core and .NET 5+, + /// HttpClient pools connections inside the handler instance and + /// reuses a connection across multiple requests. If you instantiate + /// an HttpClient class for every request, the number of sockets + /// available under heavy loads will be exhausted. This exhaustion + /// will result in SocketException errors." + /// + public static readonly HttpClient httpClient = new HttpClient(); + public static readonly HttpClient nonRedirectingHttpClient = new HttpClient( + new HttpClientHandler() + { + AllowAutoRedirect = false, + }); /// /// Downloads the specified url, and stores it in the filename given. @@ -88,7 +103,10 @@ public static string Download(string url, out string etag, string filename = nul try { + // This WebClient child class does some complicated stuff, let's keep using it for now + #pragma warning disable SYSLIB0014 var agent = new RedirectingTimeoutWebClient(); + #pragma warning restore SYSLIB0014 agent.DownloadFile(url, filename); etag = agent.ResponseHeaders.Get("ETag")?.Replace("\"", ""); } @@ -197,7 +215,10 @@ public static string DownloadText(Uri url, string authToken = "", string mimeTyp { log.DebugFormat("About to download {0}", url.OriginalString); + // This WebClient child class does some complicated stuff, let's keep using it for now + #pragma warning disable SYSLIB0014 WebClient agent = new RedirectingTimeoutWebClient(timeout, mimeType); + #pragma warning restore SYSLIB0014 // Check whether to use an auth token for this host if (!string.IsNullOrEmpty(authToken) @@ -232,46 +253,36 @@ public static string DownloadText(Uri url, string authToken = "", string mimeTyp return null; } - public static Uri ResolveRedirect(Uri uri) + public static Uri ResolveRedirect(Uri url) { - const int maximumRequest = 5; - - var currentUri = uri; - for (var i = 0; i < maximumRequest; i++) + const int maxRedirects = 6; + for (int redirects = 0; redirects <= maxRedirects; ++redirects) { - var client = new RedirectWebClient(); - - // The empty using is so that we dispose of the stream and don't block - // We don't ACTUALLY attempt to download the file, but it appears that if the client sees a - // Content Length in the response it thinks there will be a response body and blocks. - using (client.OpenRead(currentUri)) { } - - var location = client.ResponseHeaders["Location"]; + var req = new HttpRequestMessage(HttpMethod.Head, url); + req.Headers.UserAgent.Clear(); + req.Headers.UserAgent.Add(new ProductInfoHeaderValue(UserAgentString)); + var response = nonRedirectingHttpClient.SendAsync( + req, HttpCompletionOption.ResponseHeadersRead).Result; + if (response.Headers.Location == null) + { + return url; + } - if (location == null) + var location = response.Headers.Location.ToString(); + if (Uri.IsWellFormedUriString(location, UriKind.Absolute)) { - return currentUri; + url = response.Headers.Location; + } + else if (Uri.IsWellFormedUriString(location, UriKind.Relative)) + { + url = new Uri(url, response.Headers.Location); + log.DebugFormat("Relative URL {0} is absolute URL {1}", location, url); } else { - log.InfoFormat("{0} redirected to {1}", currentUri, location); - - if (Uri.IsWellFormedUriString(location, UriKind.Absolute)) - { - currentUri = new Uri(location); - } - else if (Uri.IsWellFormedUriString(location, UriKind.Relative)) - { - currentUri = new Uri(currentUri, location); - log.DebugFormat("Relative URL {0} is absolute URL {1}", location, currentUri); - } - else - { - throw new Kraken(string.Format(Properties.Resources.NetInvalidLocation, location)); - } + throw new Kraken(string.Format(Properties.Resources.NetInvalidLocation, location)); } } - return null; } diff --git a/Core/Net/NetAsyncDownloader.cs b/Core/Net/NetAsyncDownloader.cs index ca9c7c4bb9..f87ed0e669 100644 --- a/Core/Net/NetAsyncDownloader.cs +++ b/Core/Net/NetAsyncDownloader.cs @@ -86,7 +86,10 @@ public void Abort() private void ResetAgent() { + // This WebClient child class does some complicated stuff, let's keep using it for now + #pragma warning disable SYSLIB0014 agent = new ResumingWebClient(); + #pragma warning restore SYSLIB0014 agent.Headers.Add("User-Agent", Net.UserAgentString); diff --git a/Core/Net/NetFileCache.cs b/Core/Net/NetFileCache.cs index 46f56a262e..38f4a5c546 100644 --- a/Core/Net/NetFileCache.cs +++ b/Core/Net/NetFileCache.cs @@ -6,8 +6,10 @@ using System.Linq; using System.Diagnostics; using System.Threading; -using System.Security.Permissions; using System.Security.Cryptography; +#if NETFRAMEWORK +using System.Security.Permissions; +#endif using log4net; using ChinhDo.Transactions.FileManager; @@ -24,7 +26,10 @@ namespace CKAN /// // We require fancy permissions to use the FileSystemWatcher + // (No longer supported by .NET Core/Standard/5/6/7/etc.) + #if NETFRAMEWORK [PermissionSet(SecurityAction.Demand, Name="FullTrust")] + #endif public class NetFileCache : IDisposable { private readonly FileSystemWatcher watcher; @@ -548,7 +553,7 @@ public void MoveFrom(string fromDir) /// public static string CreateURLHash(Uri url) { - using (SHA1 sha1 = new SHA1CryptoServiceProvider()) + using (SHA1 sha1 = SHA1.Create()) { byte[] hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(url.ToString())); @@ -565,7 +570,7 @@ public static string CreateURLHash(Uri url) /// SHA1 hash, in all-caps hexadecimal format /// public string GetFileHashSha1(string filePath, IProgress progress, CancellationToken cancelToken = default) - => GetFileHash(filePath, "sha1", sha1Cache, progress, cancelToken); + => GetFileHash(filePath, "sha1", sha1Cache, SHA1.Create, progress, cancelToken); /// /// Calculate the SHA256 hash of a file @@ -576,7 +581,7 @@ public string GetFileHashSha1(string filePath, IProgress progress, Cancell /// SHA256 hash, in all-caps hexadecimal format /// public string GetFileHashSha256(string filePath, IProgress progress, CancellationToken cancelToken = default) - => GetFileHash(filePath, "sha256", sha256Cache, progress, cancelToken); + => GetFileHash(filePath, "sha256", sha256Cache, SHA256.Create, progress, cancelToken); /// /// Calculate the hash of a file @@ -586,8 +591,12 @@ public string GetFileHashSha256(string filePath, IProgress progress, Cance /// /// Hash, in all-caps hexadecimal format /// - private string GetFileHash(string filePath, string hashSuffix, Dictionary cache, IProgress progress, CancellationToken cancelToken) - where T: HashAlgorithm, new() + private string GetFileHash(string filePath, + string hashSuffix, + Dictionary cache, + Func getHashAlgo, + IProgress progress, + CancellationToken cancelToken) { string hashFile = $"{filePath}.{hashSuffix}"; if (cache.TryGetValue(filePath, out string hash)) @@ -604,7 +613,7 @@ private string GetFileHash(string filePath, string hashSuffix, Dictionary diff --git a/Core/Net/ResumingWebClient.cs b/Core/Net/ResumingWebClient.cs index cba0feb490..f851e86d04 100644 --- a/Core/Net/ResumingWebClient.cs +++ b/Core/Net/ResumingWebClient.cs @@ -9,6 +9,9 @@ using CKAN.Extensions; +// This WebClient child class does some complicated stuff, let's keep using it for now +#pragma warning disable SYSLIB0014 + namespace CKAN { internal class ResumingWebClient : WebClient diff --git a/Core/Platform.cs b/Core/Platform.cs index 1754c58a30..4a6dbd9816 100644 --- a/Core/Platform.cs +++ b/Core/Platform.cs @@ -1,6 +1,9 @@ using System; using System.Reflection; using System.Runtime.InteropServices; +#if NET6_0_OR_GREATER +using System.Runtime.Versioning; +#endif using System.Text.RegularExpressions; namespace CKAN @@ -24,12 +27,18 @@ static Platform() /// Are we on a Mac? /// /// true if is mac; otherwise, false. + #if NET6_0_OR_GREATER + [SupportedOSPlatformGuard("macos")] + #endif public static readonly bool IsMac = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); /// /// Are we on a Unix (including Linux, but *not* Mac) system. /// /// true if is unix; otherwise, false. + #if NET6_0_OR_GREATER + [SupportedOSPlatformGuard("linux")] + #endif public static readonly bool IsUnix = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); /// @@ -37,6 +46,9 @@ static Platform() /// if we're not on Unix or Mac. /// /// true if is windows; otherwise, false. + #if NET6_0_OR_GREATER + [SupportedOSPlatformGuard("windows")] + #endif public static readonly bool IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); /// diff --git a/Core/Properties/Resources.Designer.cs b/Core/Properties/Resources.Designer.cs deleted file mode 100644 index 4fd2327533..0000000000 --- a/Core/Properties/Resources.Designer.cs +++ /dev/null @@ -1,611 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. (I WISH!) -// -//------------------------------------------------------------------------------ - -namespace CKAN.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) - { - resourceMan = new SingleAssemblyResourceManager("CKAN.Properties.Resources", typeof(Resources).Assembly); - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static string AutoUpdateNotFetched { - get { return (string)(ResourceManager.GetObject("AutoUpdateNotFetched", resourceCulture)); } - } - - internal static string NetDownloading { - get { return (string)(ResourceManager.GetObject("NetDownloading", resourceCulture)); } - } - internal static string NetMissingCertFailed { - get { return (string)(ResourceManager.GetObject("NetMissingCertFailed", resourceCulture)); } - } - internal static string NetInvalidLocation { - get { return (string)(ResourceManager.GetObject("NetInvalidLocation", resourceCulture)); } - } - - internal static string NetAsyncDownloaderDownloading { - get { return (string)(ResourceManager.GetObject("NetAsyncDownloaderDownloading", resourceCulture)); } - } - internal static string NetAsyncDownloaderCancelled { - get { return (string)(ResourceManager.GetObject("NetAsyncDownloaderCancelled", resourceCulture)); } - } - internal static string NetAsyncDownloaderProgress { - get { return (string)(ResourceManager.GetObject("NetAsyncDownloaderProgress", resourceCulture)); } - } - internal static string NetAsyncDownloaderTryingFallback { - get { return (string)(ResourceManager.GetObject("NetAsyncDownloaderTryingFallback", resourceCulture)); } - } - internal static string NetAsyncDownloaderValidating { - get { return (string)(ResourceManager.GetObject("NetAsyncDownloaderValidating", resourceCulture)); } - } - - internal static string NetFileCacheCannotFind { - get { return (string)(ResourceManager.GetObject("NetFileCacheCannotFind", resourceCulture)); } - } - internal static string NetFileCacheZipError { - get { return (string)(ResourceManager.GetObject("NetFileCacheZipError", resourceCulture)); } - } - internal static string NetFileCacheZipTestArchiveFalse { - get { return (string)(ResourceManager.GetObject("NetFileCacheZipTestArchiveFalse", resourceCulture)); } - } - internal static string NetFileCacheNullFileName { - get { return (string)(ResourceManager.GetObject("NetFileCacheNullFileName", resourceCulture)); } - } - internal static string NetFileCacheMonoNotSupported { - get { return (string)(ResourceManager.GetObject("NetFileCacheMonoNotSupported", resourceCulture)); } - } - internal static string NetModuleCacheBadLength { - get { return (string)(ResourceManager.GetObject("NetModuleCacheBadLength", resourceCulture)); } - } - internal static string NetModuleCacheNotValidZIP { - get { return (string)(ResourceManager.GetObject("NetModuleCacheNotValidZIP", resourceCulture)); } - } - internal static string NetModuleCacheMismatchSHA1 { - get { return (string)(ResourceManager.GetObject("NetModuleCacheMismatchSHA1", resourceCulture)); } - } - internal static string NetModuleCacheMismatchSHA256 { - get { return (string)(ResourceManager.GetObject("NetModuleCacheMismatchSHA256", resourceCulture)); } - } - - internal static string NetRepoUpdatingBuildMap { - get { return (string)(ResourceManager.GetObject("NetRepoUpdatingBuildMap", resourceCulture)); } - } - internal static string NetRepoCheckingForUpdates { - get { return (string)(ResourceManager.GetObject("NetRepoCheckingForUpdates", resourceCulture)); } - } - internal static string NetRepoAlreadyUpToDate { - get { return (string)(ResourceManager.GetObject("NetRepoAlreadyUpToDate", resourceCulture)); } - } - internal static string NetRepoNoChanges { - get { return (string)(ResourceManager.GetObject("NetRepoNoChanges", resourceCulture)); } - } - internal static string NetRepoUpdating { - get { return (string)(ResourceManager.GetObject("NetRepoUpdating", resourceCulture)); } - } - internal static string NetRepoUpdated { - get { return (string)(ResourceManager.GetObject("NetRepoUpdated", resourceCulture)); } - } - internal static string NetRepoSaving { - get { return (string)(ResourceManager.GetObject("NetRepoSaving", resourceCulture)); } - } - internal static string NetRepoSaved { - get { return (string)(ResourceManager.GetObject("NetRepoSaved", resourceCulture)); } - } - internal static string NetRepoUpdatedAll { - get { return (string)(ResourceManager.GetObject("NetRepoUpdatedAll", resourceCulture)); } - } - internal static string NetRepoNoModules { - get { return (string)(ResourceManager.GetObject("NetRepoNoModules", resourceCulture)); } - } - internal static string NetRepoFailedDownload { - get { return (string)(ResourceManager.GetObject("NetRepoFailedDownload", resourceCulture)); } - } - internal static string NetRepoInconsistenciesHeader { - get { return (string)(ResourceManager.GetObject("NetRepoInconsistenciesHeader", resourceCulture)); } - } - internal static string NetRepoLoadingModulesFromRepo { - get { return (string)(ResourceManager.GetObject("NetRepoLoadingModulesFromRepo", resourceCulture)); } - } - internal static string NetRepoLoadedDownloadCounts { - get { return (string)(ResourceManager.GetObject("NetRepoLoadedDownloadCounts", resourceCulture)); } - } - - internal static string JsonRelationshipConverterAnyOfCombined { - get { return (string)(ResourceManager.GetObject("JsonRelationshipConverterAnyOfCombined", resourceCulture)); } - } - - internal static string RegistryFileConflict { - get { return (string)(ResourceManager.GetObject("RegistryFileConflict", resourceCulture)); } - } - internal static string RegistryFileNotRemoved { - get { return (string)(ResourceManager.GetObject("RegistryFileNotRemoved", resourceCulture)); } - } - internal static string RegistryDefaultDLCAbstract { - get { return (string)(ResourceManager.GetObject("RegistryDefaultDLCAbstract", resourceCulture)); } - } - internal static string RegistryManagerDirectoryNotFound { - get { return (string)(ResourceManager.GetObject("RegistryManagerDirectoryNotFound", resourceCulture)); } - } - internal static string RegistryManagerExportFilenamePrefix { - get { return (string)(ResourceManager.GetObject("RegistryManagerExportFilenamePrefix", resourceCulture)); } - } - internal static string RegistryManagerDefaultModpackAbstract { - get { return (string)(ResourceManager.GetObject("RegistryManagerDefaultModpackAbstract", resourceCulture)); } - } - - internal static string CkanModuleDeserialisationError { - get { return (string)(ResourceManager.GetObject("CkanModuleDeserialisationError", resourceCulture)); } - } - internal static string CkanModuleUnsupportedSpec { - get { return (string)(ResourceManager.GetObject("CkanModuleUnsupportedSpec", resourceCulture)); } - } - internal static string CkanModuleMissingRequired { - get { return (string)(ResourceManager.GetObject("CkanModuleMissingRequired", resourceCulture)); } - } - internal static string CkanModuleKspVersionMixed { - get { return (string)(ResourceManager.GetObject("CkanModuleKspVersionMixed", resourceCulture)); } - } - internal static string CkanModuleNotAvailable { - get { return (string)(ResourceManager.GetObject("CkanModuleNotAvailable", resourceCulture)); } - } - internal static string CkanModuleNotInstalledOrAvailable { - get { return (string)(ResourceManager.GetObject("CkanModuleNotInstalledOrAvailable", resourceCulture)); } - } - internal static string CkanModuleAllVersions { - get { return (string)(ResourceManager.GetObject("CkanModuleAllVersions", resourceCulture)); } - } - - internal static string LicenceInvalid { - get { return (string)(ResourceManager.GetObject("LicenceInvalid", resourceCulture)); } - } - - internal static string ModuleInstallDescriptorMustHaveInstallTo { - get { return (string)(ResourceManager.GetObject("ModuleInstallDescriptorMustHaveInstallTo", resourceCulture)); } - } - internal static string ModuleInstallDescriptorRequireFileFind { - get { return (string)(ResourceManager.GetObject("ModuleInstallDescriptorRequireFileFind", resourceCulture)); } - } - internal static string ModuleInstallDescriptorTooManyFileFind { - get { return (string)(ResourceManager.GetObject("ModuleInstallDescriptorTooManyFileFind", resourceCulture)); } - } - internal static string ModuleInstallDescriptorTooManyFilterInclude { - get { return (string)(ResourceManager.GetObject("ModuleInstallDescriptorTooManyFilterInclude", resourceCulture)); } - } - internal static string ModuleInstallDescriptorInvalidInstallPath { - get { return (string)(ResourceManager.GetObject("ModuleInstallDescriptorInvalidInstallPath", resourceCulture)); } - } - internal static string ModuleInstallDescriptorUnknownInstallPath { - get { return (string)(ResourceManager.GetObject("ModuleInstallDescriptorUnknownInstallPath", resourceCulture)); } - } - internal static string ModuleInstallDescriptorNoFilesFound { - get { return (string)(ResourceManager.GetObject("ModuleInstallDescriptorNoFilesFound", resourceCulture)); } - } - internal static string ModuleInstallDescriptorAsNoPathSeparators { - get { return (string)(ResourceManager.GetObject("ModuleInstallDescriptorAsNoPathSeparators", resourceCulture)); } - } - - internal static string RelationshipDescriptorMinVersionOnly { - get { return (string)(ResourceManager.GetObject("RelationshipDescriptorMinVersionOnly", resourceCulture)); } - } - internal static string RelationshipDescriptorMaxVersionOnly { - get { return (string)(ResourceManager.GetObject("RelationshipDescriptorMaxVersionOnly", resourceCulture)); } - } - internal static string RelationshipDescriptorAnyOfJoiner { - get { return (string)(ResourceManager.GetObject("RelationshipDescriptorAnyOfJoiner", resourceCulture)); } - } - - internal static string ReleaseStatusInvalid { - get { return (string)(ResourceManager.GetObject("ReleaseStatusInvalid", resourceCulture)); } - } - - internal static string RepositoryDefaultName { - get { return (string)(ResourceManager.GetObject("RepositoryDefaultName", resourceCulture)); } - } - - internal static string CkanModuleVersionToString { - get { return (string)(ResourceManager.GetObject("CkanModuleVersionToString", resourceCulture)); } - } - - internal static string GameVersionYalovAny { - get { return (string)(ResourceManager.GetObject("GameVersionYalovAny", resourceCulture)); } - } - internal static string GameVersionSelectNeedOne { - get { return (string)(ResourceManager.GetObject("GameVersionSelectNeedOne", resourceCulture)); } - } - internal static string GameVersionSelectHeader { - get { return (string)(ResourceManager.GetObject("GameVersionSelectHeader", resourceCulture)); } - } - internal static string GameVersionSelectBuildHeader { - get { return (string)(ResourceManager.GetObject("GameVersionSelectBuildHeader", resourceCulture)); } - } - internal static string GameVersionNotKnown { - get { return (string)(ResourceManager.GetObject("GameVersionNotKnown", resourceCulture)); } - } - internal static string GameVersionCriteriaToString { - get { return (string)(ResourceManager.GetObject("GameVersionCriteriaToString", resourceCulture)); } - } - internal static string GameVersionRangeMinOnly { - get { return (string)(ResourceManager.GetObject("GameVersionRangeMinOnly", resourceCulture)); } - } - internal static string GameVersionRangeMaxOnly { - get { return (string)(ResourceManager.GetObject("GameVersionRangeMaxOnly", resourceCulture)); } - } - - internal static string ProvidesModuleVersionToString { - get { return (string)(ResourceManager.GetObject("ProvidesModuleVersionToString", resourceCulture)); } - } - - internal static string UnmanagedModuleVersionUnknown { - get { return (string)(ResourceManager.GetObject("UnmanagedModuleVersionUnknown", resourceCulture)); } - } - internal static string UnmanagedModuleVersionKnown { - get { return (string)(ResourceManager.GetObject("UnmanagedModuleVersionKnown", resourceCulture)); } - } - - internal static string PathUtilsNotAbsolute { - get { return (string)(ResourceManager.GetObject("PathUtilsNotAbsolute", resourceCulture)); } - } - internal static string PathUtilsNotInside { - get { return (string)(ResourceManager.GetObject("PathUtilsNotInside", resourceCulture)); } - } - internal static string PathUtilsAlreadyAbsolute { - get { return (string)(ResourceManager.GetObject("PathUtilsAlreadyAbsolute", resourceCulture)); } - } - internal static string PathUtilsNotRoot { - get { return (string)(ResourceManager.GetObject("PathUtilsNotRoot", resourceCulture)); } - } - - internal static string GameInstanceSettingUp { - get { return (string)(ResourceManager.GetObject("GameInstanceSettingUp", resourceCulture)); } - } - internal static string GameInstanceCreatingDir { - get { return (string)(ResourceManager.GetObject("GameInstanceCreatingDir", resourceCulture)); } - } - internal static string GameInstanceScanning { - get { return (string)(ResourceManager.GetObject("GameInstanceScanning", resourceCulture)); } - } - internal static string GameInstanceVersionNotFound { - get { return (string)(ResourceManager.GetObject("GameInstanceVersionNotFound", resourceCulture)); } - } - internal static string GameInstanceToString { - get { return (string)(ResourceManager.GetObject("GameInstanceToString", resourceCulture)); } - } - - internal static string GameInstanceManagerPortable { - get { return (string)(ResourceManager.GetObject("GameInstanceManagerPortable", resourceCulture)); } - } - internal static string GameInstanceManagerAuto { - get { return (string)(ResourceManager.GetObject("GameInstanceManagerAuto", resourceCulture)); } - } - internal static string GameInstanceCloneInvalid { - get { return (string)(ResourceManager.GetObject("GameInstanceCloneInvalid", resourceCulture)); } - } - internal static string GameInstanceFakeBadVersion { - get { return (string)(ResourceManager.GetObject("GameInstanceFakeBadVersion", resourceCulture)); } - } - internal static string GameInstanceFakeNotEmpty { - get { return (string)(ResourceManager.GetObject("GameInstanceFakeNotEmpty", resourceCulture)); } - } - internal static string GameInstanceFakeDLCNotAllowed { - get { return (string)(ResourceManager.GetObject("GameInstanceFakeDLCNotAllowed", resourceCulture)); } - } - internal static string GameInstanceNoValidName { - get { return (string)(ResourceManager.GetObject("GameInstanceNoValidName", resourceCulture)); } - } - internal static string GameInstanceByPathName { - get { return (string)(ResourceManager.GetObject("GameInstanceByPathName", resourceCulture)); } - } - internal static string GameInstancePathNotFound { - get { return (string)(ResourceManager.GetObject("GameInstancePathNotFound", resourceCulture)); } - } - - internal static string NetModuleCacheMetapackage { - get { return (string)(ResourceManager.GetObject("NetModuleCacheModuleHostSize", resourceCulture)); } - } - internal static string NetModuleCacheModuleHostSize { - get { return (string)(ResourceManager.GetObject("NetModuleCacheModuleHostSize", resourceCulture)); } - } - internal static string NetModuleCacheModuleCached { - get { return (string)(ResourceManager.GetObject("NetModuleCacheModuleCached", resourceCulture)); } - } - internal static string NetModuleCacheModuleResuming { - get { return (string)(ResourceManager.GetObject("NetModuleCacheModuleResuming", resourceCulture)); } - } - - internal static string ModuleInstallerDownloading { - get { return (string)(ResourceManager.GetObject("ModuleInstallerDownloading", resourceCulture)); } - } - internal static string ModuleInstallerNothingToInstall { - get { return (string)(ResourceManager.GetObject("ModuleInstallerNothingToInstall", resourceCulture)); } - } - internal static string ModuleInstallerAboutToInstall { - get { return (string)(ResourceManager.GetObject("ModuleInstallerAboutToInstall", resourceCulture)); } - } - internal static string ModuleInstallerUserDeclined { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUserDeclined", resourceCulture)); } - } - internal static string ModuleInstallerInstallingMod { - get { return (string)(ResourceManager.GetObject("ModuleInstallerInstallingMod", resourceCulture)); } - } - internal static string ModuleInstallerUpdatingRegistry { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpdatingRegistry", resourceCulture)); } - } - internal static string ModuleInstallerCommitting { - get { return (string)(ResourceManager.GetObject("ModuleInstallerCommitting", resourceCulture)); } - } - internal static string ModuleInstallerRescanning { - get { return (string)(ResourceManager.GetObject("ModuleInstallerRescanning", resourceCulture)); } - } - internal static string ModuleInstallerDone { - get { return (string)(ResourceManager.GetObject("ModuleInstallerDone", resourceCulture)); } - } - internal static string ModuleInstallerAlreadyInstalled { - get { return (string)(ResourceManager.GetObject("ModuleInstallerAlreadyInstalled", resourceCulture)); } - } - internal static string ModuleInstallerZIPNotInCache { - get { return (string)(ResourceManager.GetObject("ModuleInstallerZIPNotInCache", resourceCulture)); } - } - internal static string ModuleInstallerMetapackage { - get { return (string)(ResourceManager.GetObject("ModuleInstallerMetapackage", resourceCulture)); } - } - internal static string ModuleInstallerDLC { - get { return (string)(ResourceManager.GetObject("ModuleInstallerDLC", resourceCulture)); } - } - internal static string ModuleInstallerBadDLLLocation { - get { return (string)(ResourceManager.GetObject("ModuleInstallerBadDLLLocation", resourceCulture)); } - } - internal static string ModuleInstallerFileSame { - get { return (string)(ResourceManager.GetObject("ModuleInstallerFileSame", resourceCulture)); } - } - internal static string ModuleInstallerFileDifferent { - get { return (string)(ResourceManager.GetObject("ModuleInstallerFileDifferent", resourceCulture)); } - } - internal static string ModuleInstallerOverwrite { - get { return (string)(ResourceManager.GetObject("ModuleInstallerOverwrite", resourceCulture)); } - } - internal static string ModuleInstallerOverwriteCancelled { - get { return (string)(ResourceManager.GetObject("ModuleInstallerOverwriteCancelled", resourceCulture)); } - } - internal static string ModuleInstallerFileExists { - get { return (string)(ResourceManager.GetObject("ModuleInstallerFileExists", resourceCulture)); } - } - internal static string ModuleInstallerAboutToRemove { - get { return (string)(ResourceManager.GetObject("ModuleInstallerAboutToRemove", resourceCulture)); } - } - internal static string ModuleInstallerContinuePrompt { - get { return (string)(ResourceManager.GetObject("ModuleInstallerContinuePrompt", resourceCulture)); } - } - internal static string ModuleInstallerRemoveAborted { - get { return (string)(ResourceManager.GetObject("ModuleInstallerRemoveAborted", resourceCulture)); } - } - internal static string ModuleInstallerRemovingMod { - get { return (string)(ResourceManager.GetObject("ModuleInstallerRemovingMod", resourceCulture)); } - } - internal static string ModuleInstallerAboutToUpgrade { - get { return (string)(ResourceManager.GetObject("ModuleInstallerAboutToUpgrade", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeInstallingUncached { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeInstallingUncached", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeInstallingResuming { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeInstallingResuming", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeInstallingCached { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeInstallingCached", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeReinstalling { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeReinstalling", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeDowngrading { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeDowngrading", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeUpgradingUncached { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeUpgradingUncached", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeUpgradingCached { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeUpgradingCached", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeUpgradingResuming { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeUpgradingResuming", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeAutoRemoving { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeAutoRemoving", resourceCulture)); } - } - internal static string ModuleInstallerUpgradeUserDeclined { - get { return (string)(ResourceManager.GetObject("ModuleInstallerUpgradeUserDeclined", resourceCulture)); } - } - - internal static string ModuleInstallerReplaceAutodetected { - get { return (string)(ResourceManager.GetObject("ModuleInstallerReplaceAutodetected", resourceCulture)); } - } - internal static string ModuleInstallerReplaceNotInstalled { - get { return (string)(ResourceManager.GetObject("ModuleInstallerReplaceNotInstalled", resourceCulture)); } - } - internal static string ModuleInstallerImporting { - get { return (string)(ResourceManager.GetObject("ModuleInstallerImporting", resourceCulture)); } - } - internal static string ModuleInstallerImportAlreadyCached { - get { return (string)(ResourceManager.GetObject("ModuleInstallerImportAlreadyCached", resourceCulture)); } - } - internal static string ModuleInstallerImportingMod { - get { return (string)(ResourceManager.GetObject("ModuleInstallerImportingMod", resourceCulture)); } - } - internal static string ModuleInstallerImportNotFound { - get { return (string)(ResourceManager.GetObject("ModuleInstallerImportNotFound", resourceCulture)); } - } - internal static string ModuleInstallerImportInstallPrompt { - get { return (string)(ResourceManager.GetObject("ModuleInstallerImportInstallPrompt", resourceCulture)); } - } - internal static string ModuleInstallerImportDeletePrompt { - get { return (string)(ResourceManager.GetObject("ModuleInstallerImportDeletePrompt", resourceCulture)); } - } - - internal static string KrakenDependencyNotSatisfied { - get { return (string)(ResourceManager.GetObject("KrakenDependencyNotSatisfied", resourceCulture)); } - } - internal static string KrakenDependencyModuleNotFound { - get { return (string)(ResourceManager.GetObject("KrakenDependencyModuleNotFound", resourceCulture)); } - } - internal static string KrakenParentDependencyNotSatisfied { - get { return (string)(ResourceManager.GetObject("KrakenParentDependencyNotSatisfied", resourceCulture)); } - } - internal static string KrakenAny { - get { return (string)(ResourceManager.GetObject("KrakenAny", resourceCulture)); } - } - internal static string KrakenProvidedByMoreThanOne { - get { return (string)(ResourceManager.GetObject("KrakenProvidedByMoreThanOne", resourceCulture)); } - } - internal static string KrakenInconsistenciesHeader { - get { return (string)(ResourceManager.GetObject("KrakenInconsistenciesHeader", resourceCulture)); } - } - internal static string KrakenMissingDependency { - get { return (string)(ResourceManager.GetObject("KrakenMissingDependency", resourceCulture)); } - } - internal static string KrakenConflictsWith { - get { return (string)(ResourceManager.GetObject("KrakenConflictsWith", resourceCulture)); } - } - internal static string KrakenDownloadErrorsHeader { - get { return (string)(ResourceManager.GetObject("KrakenDownloadErrorsHeader", resourceCulture)); } - } - internal static string KrakenModuleDownloadErrorsHeader { - get { return (string)(ResourceManager.GetObject("KrakenModuleDownloadErrorsHeader", resourceCulture)); } - } - internal static string KrakenModuleDownloadError { - get { return (string)(ResourceManager.GetObject("KrakenModuleDownloadError", resourceCulture)); } - } - internal static string KrakenNotInstalled { - get { return (string)(ResourceManager.GetObject("KrakenNotInstalled", resourceCulture)); } - } - internal static string KrakenMissingCertificateUnix { - get { return (string)(ResourceManager.GetObject("KrakenMissingCertificateUnix", resourceCulture)); } - } - internal static string KrakenMissingCertificateNotUnix { - get { return (string)(ResourceManager.GetObject("KrakenMissingCertificateNotUnix", resourceCulture)); } - } - internal static string KrakenDownloadThrottled { - get { return (string)(ResourceManager.GetObject("KrakenDownloadThrottled", resourceCulture)); } - } - internal static string KrakenAlreadyRunning { - get { return (string)(ResourceManager.GetObject("KrakenAlreadyRunning", resourceCulture)); } - } - internal static string NotEnoughSpaceToDownload { - get { return (string)(ResourceManager.GetObject("NotEnoughSpaceToDownload", resourceCulture)); } - } - internal static string NotEnoughSpaceToCache { - get { return (string)(ResourceManager.GetObject("NotEnoughSpaceToCache", resourceCulture)); } - } - internal static string NotEnoughSpaceToInstall { - get { return (string)(ResourceManager.GetObject("NotEnoughSpaceToInstall", resourceCulture)); } - } - internal static string KrakenNotEnoughSpace { - get { return (string)(ResourceManager.GetObject("KrakenNotEnoughSpace", resourceCulture)); } - } - - internal static string RelationshipResolverConflictsWith { - get { return (string)(ResourceManager.GetObject("RelationshipResolverConflictsWith", resourceCulture)); } - } - internal static string RelationshipResolverConflictingModDescription { - get { return (string)(ResourceManager.GetObject("RelationshipResolverConflictingModDescription", resourceCulture)); } - } - internal static string RelationshipResolverRequiredButResolver { - get { return (string)(ResourceManager.GetObject("RelationshipResolverRequiredButResolver", resourceCulture)); } - } - internal static string RelationshipResolverRequiredButInstalled { - get { return (string)(ResourceManager.GetObject("RelationshipResolverRequiredButInstalled", resourceCulture)); } - } - internal static string RelationshipResolverAnUnmanaged { - get { return (string)(ResourceManager.GetObject("RelationshipResolverAnUnmanaged", resourceCulture)); } - } - internal static string RelationshipResolverUnmanaged { - get { return (string)(ResourceManager.GetObject("RelationshipResolverUnmanaged", resourceCulture)); } - } - internal static string RelationshipResolverModNotInList { - get { return (string)(ResourceManager.GetObject("RelationshipResolverModNotInList", resourceCulture)); } - } - internal static string RelationshipResolverInstalledReason { - get { return (string)(ResourceManager.GetObject("RelationshipResolverInstalledReason", resourceCulture)); } - } - internal static string RelationshipResolverUserReason { - get { return (string)(ResourceManager.GetObject("RelationshipResolverUserReason", resourceCulture)); } - } - internal static string RelationshipResolverDependencyRemoved { - get { return (string)(ResourceManager.GetObject("RelationshipResolverDependencyRemoved", resourceCulture)); } - } - internal static string RelationshipResolverNoLongerUsedReason { - get { return (string)(ResourceManager.GetObject("RelationshipResolverNoLongerUsedReason", resourceCulture)); } - } - internal static string RelationshipResolverReplacementReason { - get { return (string)(ResourceManager.GetObject("RelationshipResolverReplacementReason", resourceCulture)); } - } - internal static string RelationshipResolverSuggestedReason { - get { return (string)(ResourceManager.GetObject("RelationshipResolverSuggestedReason", resourceCulture)); } - } - internal static string RelationshipResolverDependsReason { - get { return (string)(ResourceManager.GetObject("RelationshipResolverDependsReason", resourceCulture)); } - } - internal static string RelationshipResolverRecommendedReason { - get { return (string)(ResourceManager.GetObject("RelationshipResolverRecommendedReason", resourceCulture)); } - } - - internal static string SanityCheckerUnsatisfiedDependency { - get { return (string)(ResourceManager.GetObject("SanityCheckerUnsatisfiedDependency", resourceCulture)); } - } - internal static string SanityCheckerConflictsWith { - get { return (string)(ResourceManager.GetObject("SanityCheckerConflictsWith", resourceCulture)); } - } - - internal static string ModpackName { - get { return (string)(ResourceManager.GetObject("ModpackName", resourceCulture)); } - } - } -} diff --git a/Core/Registry/InstalledModule.cs b/Core/Registry/InstalledModule.cs index 25467a8c95..62dd0670ad 100644 --- a/Core/Registry/InstalledModule.cs +++ b/Core/Registry/InstalledModule.cs @@ -47,7 +47,7 @@ private static string Sha1Sum(string path) return null; } - SHA1 hasher = new SHA1CryptoServiceProvider(); + SHA1 hasher = SHA1.Create(); // Even if we throw an exception, the using block here makes sure // we close our file. diff --git a/Core/Repositories/RepositoryDataManager.cs b/Core/Repositories/RepositoryDataManager.cs index 1908f6fcef..66163ef43e 100644 --- a/Core/Repositories/RepositoryDataManager.cs +++ b/Core/Repositories/RepositoryDataManager.cs @@ -7,7 +7,9 @@ using ChinhDo.Transactions.FileManager; using log4net; +#if NETFRAMEWORK using CKAN.Extensions; +#endif using CKAN.Games; namespace CKAN diff --git a/Core/Versioning/GameVersion.cs b/Core/Versioning/GameVersion.cs index 1efe095fb0..e261f2a85c 100644 --- a/Core/Versioning/GameVersion.cs +++ b/Core/Versioning/GameVersion.cs @@ -635,6 +635,12 @@ public override bool Equals(object obj) /// /// A 32-bit signed integer hash code. public override int GetHashCode() + #if NET5_0_OR_GREATER + => HashCode.Combine(_major.GetHashCode(), + _minor.GetHashCode(), + _patch.GetHashCode(), + _build.GetHashCode()); + #else { unchecked { @@ -645,6 +651,7 @@ public override int GetHashCode() return hashCode; } } + #endif /// /// Determines whether two specified objects are equal. diff --git a/GUI/App.config b/GUI/App.config index bd9d7e75a7..b786595539 100644 --- a/GUI/App.config +++ b/GUI/App.config @@ -1,10 +1,10 @@ - + - \ No newline at end of file + diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj index 6a0e37ee50..beb157d9d6 100644 --- a/GUI/CKAN-GUI.csproj +++ b/GUI/CKAN-GUI.csproj @@ -1,14 +1,16 @@ CKAN-GUI - ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ - ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ - ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ + ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\obj\ {A79F9D54-315C-472B-928F-713A5860B2BE} WinExe + ..\assets\ckan.ico CKAN.GUI false true @@ -16,38 +18,36 @@ Debug;Release false 7.3 - net48 - ..\assets\ckan.ico - v4.8 + net48;net7.0-windows + $(TargetFramework.Replace("-windows", "")) + true 512 prompt 4 IDE1006 - - true + PrepareResources;$(CompileDependsOn) - - + - + + + + + + @@ -57,6 +57,7 @@ + TargetFramework=$(BaseTargetFramework) {3B9AEA22-FA3B-4E43-9283-EABDD81CF271} CKAN-core @@ -74,15 +75,37 @@ + + CKAN.ckan.ico + + + CKAN.GUI.Resources.%(Filename)%(Extension) + %(Filename).cs $([System.IO.Directory]::GetFiles($(MSBuildProjectDirectory), '$([System.Text.RegularExpressions.Regex]::Replace(%(Filename), '\..*', '')).cs', System.IO.SearchOption.AllDirectories)[0]) + + MSBuild:Compile + $(IntermediateOutputPath)Resources.Designer.cs + $(IntermediateOutputPath)Resources.Designer.cs + $(Language) + $(RootNamespace).Properties + %(Filename) + - - - + + + + + + diff --git a/GUI/Controls/Changeset.cs b/GUI/Controls/Changeset.cs index 07852248a5..de3c498e15 100644 --- a/GUI/Controls/Changeset.cs +++ b/GUI/Controls/Changeset.cs @@ -3,11 +3,17 @@ using System.Drawing; using System.Collections.Generic; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.Extensions; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Changeset : UserControl { public Changeset() diff --git a/GUI/Controls/ChooseProvidedMods.cs b/GUI/Controls/ChooseProvidedMods.cs index 60cb9dde73..521c0b5181 100644 --- a/GUI/Controls/ChooseProvidedMods.cs +++ b/GUI/Controls/ChooseProvidedMods.cs @@ -3,11 +3,17 @@ using System.Threading.Tasks; using System.Collections.Generic; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.GUI.Attributes; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class ChooseProvidedMods : UserControl { public ChooseProvidedMods() diff --git a/GUI/Controls/ChooseRecommendedMods.cs b/GUI/Controls/ChooseRecommendedMods.cs index a28ec8c08d..7af0086e86 100644 --- a/GUI/Controls/ChooseRecommendedMods.cs +++ b/GUI/Controls/ChooseRecommendedMods.cs @@ -4,12 +4,18 @@ using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.Versioning; using CKAN.GUI.Attributes; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class ChooseRecommendedMods : UserControl { public ChooseRecommendedMods() diff --git a/GUI/Controls/DeleteDirectories.cs b/GUI/Controls/DeleteDirectories.cs index ab9fdccde7..cc13f25508 100644 --- a/GUI/Controls/DeleteDirectories.cs +++ b/GUI/Controls/DeleteDirectories.cs @@ -4,10 +4,17 @@ using System.Threading.Tasks; using System.Collections.Generic; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif + using CKAN.GUI.Attributes; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class DeleteDirectories : UserControl { public DeleteDirectories() diff --git a/GUI/Controls/DropdownMenuButton.cs b/GUI/Controls/DropdownMenuButton.cs index c1bdbb12e6..9cacd77782 100644 --- a/GUI/Controls/DropdownMenuButton.cs +++ b/GUI/Controls/DropdownMenuButton.cs @@ -1,6 +1,9 @@ using System.ComponentModel; using System.Drawing; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { @@ -10,6 +13,9 @@ namespace CKAN.GUI /// /// Based on https://stackoverflow.com/a/24087828/2422988 /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class DropdownMenuButton : Button { /// diff --git a/GUI/Controls/EditModSearch.cs b/GUI/Controls/EditModSearch.cs index 0e8a87206d..3773553191 100644 --- a/GUI/Controls/EditModSearch.cs +++ b/GUI/Controls/EditModSearch.cs @@ -2,6 +2,9 @@ using System.Linq; using System.Drawing; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { @@ -10,6 +13,9 @@ namespace CKAN.GUI /// Contains several separate fields for searching different properties, /// plus a combined field that represents them all in a special syntax. /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class EditModSearch : UserControl { /// diff --git a/GUI/Controls/EditModSearches.cs b/GUI/Controls/EditModSearches.cs index 8fe823c0e7..013f98747a 100644 --- a/GUI/Controls/EditModSearches.cs +++ b/GUI/Controls/EditModSearches.cs @@ -2,12 +2,18 @@ using System.Linq; using System.Collections.Generic; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { /// /// A container control for the individual EditModSearch controls /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class EditModSearches : UserControl { public EditModSearches() diff --git a/GUI/Controls/EditModpack.cs b/GUI/Controls/EditModpack.cs index 8799e2c7ef..c4b1605a9d 100644 --- a/GUI/Controls/EditModpack.cs +++ b/GUI/Controls/EditModpack.cs @@ -3,6 +3,9 @@ using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Autofac; @@ -12,6 +15,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class EditModpack : UserControl { public EditModpack() diff --git a/GUI/Controls/HintTextBox.Designer.cs b/GUI/Controls/HintTextBox.Designer.cs index 2001a433fb..2733a44d1e 100644 --- a/GUI/Controls/HintTextBox.Designer.cs +++ b/GUI/Controls/HintTextBox.Designer.cs @@ -36,7 +36,7 @@ private void InitializeComponent() this.ClearIcon.BackColor = System.Drawing.Color.Transparent; this.ClearIcon.Visible = false; this.ClearIcon.Cursor = System.Windows.Forms.Cursors.Hand; - this.ClearIcon.Image = global::CKAN.GUI.Properties.Resources.textClear; + this.ClearIcon.Image = global::CKAN.GUI.EmbeddedImages.textClear; this.ClearIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.ClearIcon.Size = new System.Drawing.Size(18, 18); this.ClearIcon.Click += HintClearIcon_Click; diff --git a/GUI/Controls/InstallationHistory.cs b/GUI/Controls/InstallationHistory.cs index fa847f1623..f73ea3fc8d 100644 --- a/GUI/Controls/InstallationHistory.cs +++ b/GUI/Controls/InstallationHistory.cs @@ -3,9 +3,15 @@ using System.Windows.Forms; using System.IO; using System.Threading.Tasks; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class InstallationHistory : UserControl { public InstallationHistory() diff --git a/GUI/Controls/ManageMods.Designer.cs b/GUI/Controls/ManageMods.Designer.cs index 6aecdbb1a9..75d99db5d5 100644 --- a/GUI/Controls/ManageMods.Designer.cs +++ b/GUI/Controls/ManageMods.Designer.cs @@ -118,7 +118,7 @@ private void InitializeComponent() // // launchGameToolStripMenuItem // - this.launchGameToolStripMenuItem.Image = global::CKAN.GUI.Properties.Resources.ksp; + this.launchGameToolStripMenuItem.Image = global::CKAN.GUI.EmbeddedImages.ksp; this.launchGameToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.launchGameToolStripMenuItem.Name = "launchGameToolStripMenuItem"; this.launchGameToolStripMenuItem.Size = new System.Drawing.Size(146, 56); @@ -128,7 +128,7 @@ private void InitializeComponent() // // RefreshToolButton // - this.RefreshToolButton.Image = global::CKAN.GUI.Properties.Resources.refresh; + this.RefreshToolButton.Image = global::CKAN.GUI.EmbeddedImages.refresh; this.RefreshToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.RefreshToolButton.Name = "RefreshToolButton"; this.RefreshToolButton.Size = new System.Drawing.Size(114, 56); @@ -138,7 +138,7 @@ private void InitializeComponent() // // UpdateAllToolButton // - this.UpdateAllToolButton.Image = global::CKAN.GUI.Properties.Resources.update; + this.UpdateAllToolButton.Image = global::CKAN.GUI.EmbeddedImages.update; this.UpdateAllToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.UpdateAllToolButton.Name = "UpdateAllToolButton"; this.UpdateAllToolButton.Size = new System.Drawing.Size(232, 56); @@ -149,7 +149,7 @@ private void InitializeComponent() // ApplyToolButton // this.ApplyToolButton.AutoToolTip = false; - this.ApplyToolButton.Image = global::CKAN.GUI.Properties.Resources.apply; + this.ApplyToolButton.Image = global::CKAN.GUI.EmbeddedImages.apply; this.ApplyToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.ApplyToolButton.Name = "ApplyToolButton"; this.ApplyToolButton.Size = new System.Drawing.Size(173, 56); @@ -174,7 +174,7 @@ private void InitializeComponent() this.FilterTagsToolButton, this.FilterLabelsToolButton}); this.FilterToolButton.DropDown.Opening += new System.ComponentModel.CancelEventHandler(FilterToolButton_DropDown_Opening); - this.FilterToolButton.Image = global::CKAN.GUI.Properties.Resources.filter; + this.FilterToolButton.Image = global::CKAN.GUI.EmbeddedImages.filter; this.FilterToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.FilterToolButton.Name = "FilterToolButton"; this.FilterToolButton.Size = new System.Drawing.Size(201, 56); @@ -267,7 +267,7 @@ private void InitializeComponent() // // NavBackwardToolButton // - this.NavBackwardToolButton.Image = global::CKAN.GUI.Properties.Resources.backward; + this.NavBackwardToolButton.Image = global::CKAN.GUI.EmbeddedImages.backward; this.NavBackwardToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.NavBackwardToolButton.Name = "NavBackwardToolButton"; this.NavBackwardToolButton.Size = new System.Drawing.Size(44, 56); @@ -277,7 +277,7 @@ private void InitializeComponent() // // NavForwardToolButton // - this.NavForwardToolButton.Image = global::CKAN.GUI.Properties.Resources.forward; + this.NavForwardToolButton.Image = global::CKAN.GUI.EmbeddedImages.forward; this.NavForwardToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.NavForwardToolButton.Name = "NavForwardToolButton"; this.NavForwardToolButton.Size = new System.Drawing.Size(44, 56); diff --git a/GUI/Controls/ManageMods.cs b/GUI/Controls/ManageMods.cs index b319806cd1..40b59303a1 100644 --- a/GUI/Controls/ManageMods.cs +++ b/GUI/Controls/ManageMods.cs @@ -4,6 +4,9 @@ using System.Collections.Generic; using System.Windows.Forms; using System.ComponentModel; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Autofac; using log4net; @@ -14,6 +17,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class ManageMods : UserControl { public ManageMods() diff --git a/GUI/Controls/ModInfo.Designer.cs b/GUI/Controls/ModInfo.Designer.cs index 389319332c..eed2040214 100644 --- a/GUI/Controls/ModInfo.Designer.cs +++ b/GUI/Controls/ModInfo.Designer.cs @@ -141,7 +141,7 @@ private void InitializeComponent() // ImageList's default makes icons look like garbage ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit }; - this.ModInfoTabControl.ImageList.Images.Add("Stop", global::CKAN.GUI.Properties.Resources.stop); + this.ModInfoTabControl.ImageList.Images.Add("Stop", global::CKAN.GUI.EmbeddedImages.stop); this.ModInfoTabControl.SelectedIndexChanged += new System.EventHandler(this.ModInfoTabControl_SelectedIndexChanged); // // MetadataTabPage diff --git a/GUI/Controls/ModInfo.cs b/GUI/Controls/ModInfo.cs index 73c3119789..2b0177cbb5 100644 --- a/GUI/Controls/ModInfo.cs +++ b/GUI/Controls/ModInfo.cs @@ -2,6 +2,9 @@ using System.Linq; using System.Drawing; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Autofac; @@ -9,6 +12,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class ModInfo : UserControl { public ModInfo() diff --git a/GUI/Controls/ModInfoTabs/Contents.Designer.cs b/GUI/Controls/ModInfoTabs/Contents.Designer.cs index fea495efc5..2b9edfa93d 100644 --- a/GUI/Controls/ModInfoTabs/Contents.Designer.cs +++ b/GUI/Controls/ModInfoTabs/Contents.Designer.cs @@ -80,9 +80,9 @@ private void InitializeComponent() // ImageList's default makes icons look like garbage ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit }; - this.ContentsPreviewTree.ImageList.Images.Add("folderZip", global::CKAN.GUI.Properties.Resources.folderZip); - this.ContentsPreviewTree.ImageList.Images.Add("folder", global::CKAN.GUI.Properties.Resources.folder); - this.ContentsPreviewTree.ImageList.Images.Add("file", global::CKAN.GUI.Properties.Resources.file); + this.ContentsPreviewTree.ImageList.Images.Add("folderZip", global::CKAN.GUI.EmbeddedImages.folderZip); + this.ContentsPreviewTree.ImageList.Images.Add("folder", global::CKAN.GUI.EmbeddedImages.folder); + this.ContentsPreviewTree.ImageList.Images.Add("file", global::CKAN.GUI.EmbeddedImages.file); this.ContentsPreviewTree.ShowPlusMinus = true; this.ContentsPreviewTree.ShowRootLines = false; this.ContentsPreviewTree.Location = new System.Drawing.Point(3, 65); diff --git a/GUI/Controls/ModInfoTabs/Contents.cs b/GUI/Controls/ModInfoTabs/Contents.cs index e3c0eec71e..b3c457efb2 100644 --- a/GUI/Controls/ModInfoTabs/Contents.cs +++ b/GUI/Controls/ModInfoTabs/Contents.cs @@ -5,9 +5,15 @@ using System.Windows.Forms; using System.IO; using System.Threading.Tasks; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Contents : UserControl { public Contents() diff --git a/GUI/Controls/ModInfoTabs/Metadata.cs b/GUI/Controls/ModInfoTabs/Metadata.cs index ec6b99f428..b27573fe9f 100644 --- a/GUI/Controls/ModInfoTabs/Metadata.cs +++ b/GUI/Controls/ModInfoTabs/Metadata.cs @@ -3,9 +3,15 @@ using System.Windows.Forms; using System.Linq; using System.Collections.Generic; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Metadata : UserControl { public Metadata() diff --git a/GUI/Controls/ModInfoTabs/Relationships.Designer.cs b/GUI/Controls/ModInfoTabs/Relationships.Designer.cs index 58c3b8c46a..d1b5254577 100644 --- a/GUI/Controls/ModInfoTabs/Relationships.Designer.cs +++ b/GUI/Controls/ModInfoTabs/Relationships.Designer.cs @@ -71,18 +71,18 @@ private void InitializeComponent() // ImageList's default makes icons look like garbage ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit }; - this.DependsGraphTree.ImageList.Images.Add("Root", global::CKAN.GUI.Properties.Resources.ksp); - this.DependsGraphTree.ImageList.Images.Add("Provides", global::CKAN.GUI.Properties.Resources.ballot); - this.DependsGraphTree.ImageList.Images.Add("Depends", global::CKAN.GUI.Properties.Resources.star); - this.DependsGraphTree.ImageList.Images.Add("Recommends", global::CKAN.GUI.Properties.Resources.thumbup); - this.DependsGraphTree.ImageList.Images.Add("Suggests", global::CKAN.GUI.Properties.Resources.info); - this.DependsGraphTree.ImageList.Images.Add("Supports", global::CKAN.GUI.Properties.Resources.smile); - this.DependsGraphTree.ImageList.Images.Add("Conflicts", global::CKAN.GUI.Properties.Resources.alert); + this.DependsGraphTree.ImageList.Images.Add("Root", global::CKAN.GUI.EmbeddedImages.ksp); + this.DependsGraphTree.ImageList.Images.Add("Provides", global::CKAN.GUI.EmbeddedImages.ballot); + this.DependsGraphTree.ImageList.Images.Add("Depends", global::CKAN.GUI.EmbeddedImages.star); + this.DependsGraphTree.ImageList.Images.Add("Recommends", global::CKAN.GUI.EmbeddedImages.thumbup); + this.DependsGraphTree.ImageList.Images.Add("Suggests", global::CKAN.GUI.EmbeddedImages.info); + this.DependsGraphTree.ImageList.Images.Add("Supports", global::CKAN.GUI.EmbeddedImages.smile); + this.DependsGraphTree.ImageList.Images.Add("Conflicts", global::CKAN.GUI.EmbeddedImages.alert); // // LegendProvidesImage // this.LegendProvidesImage.BackColor = System.Drawing.SystemColors.Window; - this.LegendProvidesImage.Image = global::CKAN.GUI.Properties.Resources.ballot; + this.LegendProvidesImage.Image = global::CKAN.GUI.EmbeddedImages.ballot; this.LegendProvidesImage.Location = new System.Drawing.Point(6, 3); this.LegendProvidesImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.LegendProvidesImage.ClientSize = new System.Drawing.Size(14, 14); @@ -96,7 +96,7 @@ private void InitializeComponent() // LegendDependsImage // this.LegendDependsImage.BackColor = System.Drawing.SystemColors.Window; - this.LegendDependsImage.Image = global::CKAN.GUI.Properties.Resources.star; + this.LegendDependsImage.Image = global::CKAN.GUI.EmbeddedImages.star; this.LegendDependsImage.Location = new System.Drawing.Point(6, 21); this.LegendDependsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.LegendDependsImage.ClientSize = new System.Drawing.Size(14, 14); @@ -110,7 +110,7 @@ private void InitializeComponent() // LegendRecommendsImage // this.LegendRecommendsImage.BackColor = System.Drawing.SystemColors.Window; - this.LegendRecommendsImage.Image = global::CKAN.GUI.Properties.Resources.thumbup; + this.LegendRecommendsImage.Image = global::CKAN.GUI.EmbeddedImages.thumbup; this.LegendRecommendsImage.Location = new System.Drawing.Point(6, 39); this.LegendRecommendsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.LegendRecommendsImage.ClientSize = new System.Drawing.Size(14, 14); @@ -124,7 +124,7 @@ private void InitializeComponent() // LegendSuggestsImage // this.LegendSuggestsImage.BackColor = System.Drawing.SystemColors.Window; - this.LegendSuggestsImage.Image = global::CKAN.GUI.Properties.Resources.info; + this.LegendSuggestsImage.Image = global::CKAN.GUI.EmbeddedImages.info; this.LegendSuggestsImage.Location = new System.Drawing.Point(6, 57); this.LegendSuggestsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.LegendSuggestsImage.ClientSize = new System.Drawing.Size(14, 14); @@ -138,7 +138,7 @@ private void InitializeComponent() // LegendSupportsImage // this.LegendSupportsImage.BackColor = System.Drawing.SystemColors.Window; - this.LegendSupportsImage.Image = global::CKAN.GUI.Properties.Resources.smile; + this.LegendSupportsImage.Image = global::CKAN.GUI.EmbeddedImages.smile; this.LegendSupportsImage.Location = new System.Drawing.Point(6, 75); this.LegendSupportsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.LegendSupportsImage.ClientSize = new System.Drawing.Size(14, 14); @@ -152,7 +152,7 @@ private void InitializeComponent() // LegendConflictsImage // this.LegendConflictsImage.BackColor = System.Drawing.SystemColors.Window; - this.LegendConflictsImage.Image = global::CKAN.GUI.Properties.Resources.alert; + this.LegendConflictsImage.Image = global::CKAN.GUI.EmbeddedImages.alert; this.LegendConflictsImage.Location = new System.Drawing.Point(6, 93); this.LegendConflictsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.LegendConflictsImage.ClientSize = new System.Drawing.Size(14, 14); diff --git a/GUI/Controls/ModInfoTabs/Relationships.cs b/GUI/Controls/ModInfoTabs/Relationships.cs index 6a3fc22a61..cc34dab2d6 100644 --- a/GUI/Controls/ModInfoTabs/Relationships.cs +++ b/GUI/Controls/ModInfoTabs/Relationships.cs @@ -5,6 +5,9 @@ using System.Windows.Forms; using System.Threading.Tasks; using System.ComponentModel.DataAnnotations; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Autofac; @@ -41,6 +44,9 @@ public enum RelationshipType Conflicts = 5, } + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Relationships : UserControl { public Relationships() diff --git a/GUI/Controls/ModInfoTabs/Versions.cs b/GUI/Controls/ModInfoTabs/Versions.cs index 768020fb37..a253ad67ac 100644 --- a/GUI/Controls/ModInfoTabs/Versions.cs +++ b/GUI/Controls/ModInfoTabs/Versions.cs @@ -6,6 +6,9 @@ using System.Windows.Forms; using System.Threading; using System.Threading.Tasks; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Autofac; @@ -14,6 +17,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Versions : UserControl { public Versions() diff --git a/GUI/Controls/PlayTime.cs b/GUI/Controls/PlayTime.cs index a751eebded..d4cd26ecc6 100755 --- a/GUI/Controls/PlayTime.cs +++ b/GUI/Controls/PlayTime.cs @@ -3,6 +3,9 @@ using System.ComponentModel; using System.Collections.Generic; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.Extensions; @@ -11,6 +14,9 @@ namespace CKAN.GUI /// /// Show the user's play time in each instance and allow editing /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class PlayTime : UserControl { /// diff --git a/GUI/Controls/ThemedListView.cs b/GUI/Controls/ThemedListView.cs index 09d8f3140d..0f42d808e7 100644 --- a/GUI/Controls/ThemedListView.cs +++ b/GUI/Controls/ThemedListView.cs @@ -1,11 +1,17 @@ using System.Drawing; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { /// /// A ListView that obeys system colors to look less awful in a dark theme /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class ThemedListView : ListView { public ThemedListView() : base() diff --git a/GUI/Controls/ThemedTabControl.cs b/GUI/Controls/ThemedTabControl.cs index d0f6f54317..05955fe72e 100644 --- a/GUI/Controls/ThemedTabControl.cs +++ b/GUI/Controls/ThemedTabControl.cs @@ -1,12 +1,18 @@ using System; using System.Drawing; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { /// /// A TabControl that obeys system colors to look less awful in a dark theme /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class ThemedTabControl : TabControl { public ThemedTabControl() : base() diff --git a/GUI/Controls/TriStateToggle.cs b/GUI/Controls/TriStateToggle.cs index f89a04c895..ac677ab0fa 100644 --- a/GUI/Controls/TriStateToggle.cs +++ b/GUI/Controls/TriStateToggle.cs @@ -1,9 +1,15 @@ using System; using System.Drawing; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class TriStateToggle : UserControl { public TriStateToggle() @@ -18,11 +24,11 @@ public TriStateToggle() ShowAlways = true, }; - YesRadioButton = MakeRadioButton(0, Properties.Resources.triToggleYes, + YesRadioButton = MakeRadioButton(0, EmbeddedImages.triToggleYes, Properties.Resources.TriStateToggleYesTooltip); - BothRadioButton = MakeRadioButton(1, Properties.Resources.triToggleBoth, + BothRadioButton = MakeRadioButton(1, EmbeddedImages.triToggleBoth, Properties.Resources.TriStateToggleBothTooltip, true); - NoRadioButton = MakeRadioButton(2, Properties.Resources.triToggleNo, + NoRadioButton = MakeRadioButton(2, EmbeddedImages.triToggleNo, Properties.Resources.TriStateToggleNoTooltip); Controls.Add(YesRadioButton); Controls.Add(BothRadioButton); diff --git a/GUI/Controls/UnmanagedFiles.Designer.cs b/GUI/Controls/UnmanagedFiles.Designer.cs index 7c68e31348..ee0779b189 100644 --- a/GUI/Controls/UnmanagedFiles.Designer.cs +++ b/GUI/Controls/UnmanagedFiles.Designer.cs @@ -71,7 +71,7 @@ private void InitializeComponent() // // RefreshButton // - this.RefreshButton.Image = global::CKAN.GUI.Properties.Resources.refresh; + this.RefreshButton.Image = global::CKAN.GUI.EmbeddedImages.refresh; this.RefreshButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.RefreshButton.Name = "RefreshButton"; this.RefreshButton.Size = new System.Drawing.Size(114, 56); @@ -81,7 +81,7 @@ private void InitializeComponent() // // ExpandAllButton // - this.ExpandAllButton.Image = global::CKAN.GUI.Properties.Resources.expandAll; + this.ExpandAllButton.Image = global::CKAN.GUI.EmbeddedImages.expandAll; this.ExpandAllButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.ExpandAllButton.Name = "ExpandAllButton"; this.ExpandAllButton.Size = new System.Drawing.Size(114, 56); @@ -91,7 +91,7 @@ private void InitializeComponent() // // CollapseAllButton // - this.CollapseAllButton.Image = global::CKAN.GUI.Properties.Resources.collapseAll; + this.CollapseAllButton.Image = global::CKAN.GUI.EmbeddedImages.collapseAll; this.CollapseAllButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.CollapseAllButton.Name = "CollapseAllButton"; this.CollapseAllButton.Size = new System.Drawing.Size(114, 56); @@ -101,7 +101,7 @@ private void InitializeComponent() // // ResetCollapseButton // - this.ResetCollapseButton.Image = global::CKAN.GUI.Properties.Resources.resetCollapse; + this.ResetCollapseButton.Image = global::CKAN.GUI.EmbeddedImages.resetCollapse; this.ResetCollapseButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.ResetCollapseButton.Name = "ResetCollapseButton"; this.ResetCollapseButton.Size = new System.Drawing.Size(114, 56); @@ -111,7 +111,7 @@ private void InitializeComponent() // // ShowInFolderButton // - this.ShowInFolderButton.Image = global::CKAN.GUI.Properties.Resources.search; + this.ShowInFolderButton.Image = global::CKAN.GUI.EmbeddedImages.search; this.ShowInFolderButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.ShowInFolderButton.Name = "ShowInFolderButton"; this.ShowInFolderButton.Size = new System.Drawing.Size(114, 56); @@ -121,7 +121,7 @@ private void InitializeComponent() // // DeleteButton // - this.DeleteButton.Image = global::CKAN.GUI.Properties.Resources.delete; + this.DeleteButton.Image = global::CKAN.GUI.EmbeddedImages.delete; this.DeleteButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.DeleteButton.Name = "DeleteButton"; this.DeleteButton.Size = new System.Drawing.Size(114, 56); @@ -138,8 +138,8 @@ private void InitializeComponent() // ImageList's default makes icons look like garbage ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit }; - this.GameFolderTree.ImageList.Images.Add("folder", global::CKAN.GUI.Properties.Resources.folder); - this.GameFolderTree.ImageList.Images.Add("file", global::CKAN.GUI.Properties.Resources.file); + this.GameFolderTree.ImageList.Images.Add("folder", global::CKAN.GUI.EmbeddedImages.folder); + this.GameFolderTree.ImageList.Images.Add("file", global::CKAN.GUI.EmbeddedImages.file); this.GameFolderTree.ShowPlusMinus = true; this.GameFolderTree.ShowRootLines = false; this.GameFolderTree.Location = new System.Drawing.Point(3, 3); diff --git a/GUI/Controls/UnmanagedFiles.cs b/GUI/Controls/UnmanagedFiles.cs index 0102d4b331..887af5dcaf 100644 --- a/GUI/Controls/UnmanagedFiles.cs +++ b/GUI/Controls/UnmanagedFiles.cs @@ -6,6 +6,9 @@ using System.Windows.Forms; using System.IO; using System.Threading.Tasks; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using log4net; @@ -13,6 +16,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class UnmanagedFiles : UserControl { public UnmanagedFiles() diff --git a/GUI/Controls/Wait.cs b/GUI/Controls/Wait.cs index c37353bb90..81bcccd071 100644 --- a/GUI/Controls/Wait.cs +++ b/GUI/Controls/Wait.cs @@ -5,11 +5,17 @@ using System.Drawing; using System.Windows.Forms; using Timer = System.Windows.Forms.Timer; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.GUI.Attributes; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Wait : UserControl { public Wait() diff --git a/GUI/Dialogs/AboutDialog.Designer.cs b/GUI/Dialogs/AboutDialog.Designer.cs index 0263bfb4f3..228702edc4 100644 --- a/GUI/Dialogs/AboutDialog.Designer.cs +++ b/GUI/Dialogs/AboutDialog.Designer.cs @@ -196,7 +196,7 @@ private void InitializeComponent() this.Controls.Add(this.homepageLabel); this.Controls.Add(this.homepageLinkLabel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AboutDialog"; diff --git a/GUI/Dialogs/AboutDialog.cs b/GUI/Dialogs/AboutDialog.cs index aaf0d1cdd7..337d9b80da 100644 --- a/GUI/Dialogs/AboutDialog.cs +++ b/GUI/Dialogs/AboutDialog.cs @@ -1,7 +1,13 @@ using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class AboutDialog : FormCompatibility { public AboutDialog() diff --git a/GUI/Dialogs/AskUserForAutoUpdatesDialog.Designer.cs b/GUI/Dialogs/AskUserForAutoUpdatesDialog.Designer.cs index d0f6856bc0..c1202eb5d2 100644 --- a/GUI/Dialogs/AskUserForAutoUpdatesDialog.Designer.cs +++ b/GUI/Dialogs/AskUserForAutoUpdatesDialog.Designer.cs @@ -73,7 +73,7 @@ private void InitializeComponent() this.Controls.Add(this.YesButton); this.Controls.Add(this.autoCheckLabel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.Name = "AskUserForAutoUpdatesDialog"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; resources.ApplyResources(this, "$this"); diff --git a/GUI/Dialogs/CloneGameInstanceDialog.Designer.cs b/GUI/Dialogs/CloneGameInstanceDialog.Designer.cs index fafa669449..6a911d51f5 100644 --- a/GUI/Dialogs/CloneGameInstanceDialog.Designer.cs +++ b/GUI/Dialogs/CloneGameInstanceDialog.Designer.cs @@ -224,7 +224,7 @@ private void InitializeComponent() this.AcceptButton = this.buttonOK; this.CancelButton = this.buttonCancel; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.HelpButton = true; diff --git a/GUI/Dialogs/CloneGameInstanceDialog.cs b/GUI/Dialogs/CloneGameInstanceDialog.cs index f5627c6e80..0acc8b8149 100644 --- a/GUI/Dialogs/CloneGameInstanceDialog.cs +++ b/GUI/Dialogs/CloneGameInstanceDialog.cs @@ -4,6 +4,9 @@ using System.Threading.Tasks; using System.ComponentModel; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Autofac; @@ -15,6 +18,9 @@ namespace CKAN.GUI /// The GUI implementation of clone and fake. /// It's a separate window, handling the whole process. /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class CloneGameInstanceDialog : Form { private readonly GameInstanceManager manager; diff --git a/GUI/Dialogs/CompatibleGameVersionsDialog.Designer.cs b/GUI/Dialogs/CompatibleGameVersionsDialog.Designer.cs index f539a1ba39..d3d0e738c9 100644 --- a/GUI/Dialogs/CompatibleGameVersionsDialog.Designer.cs +++ b/GUI/Dialogs/CompatibleGameVersionsDialog.Designer.cs @@ -221,7 +221,7 @@ private void InitializeComponent() this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.label1); - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.HelpButton = true; diff --git a/GUI/Dialogs/CompatibleGameVersionsDialog.cs b/GUI/Dialogs/CompatibleGameVersionsDialog.cs index f996d4d721..24f133baa8 100644 --- a/GUI/Dialogs/CompatibleGameVersionsDialog.cs +++ b/GUI/Dialogs/CompatibleGameVersionsDialog.cs @@ -5,11 +5,17 @@ using System.Windows.Forms; using System.Collections.Generic; using System.Drawing; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.Versioning; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class CompatibleGameVersionsDialog : Form { private readonly GameInstance _inst; diff --git a/GUI/Dialogs/DownloadsFailedDialog.Designer.cs b/GUI/Dialogs/DownloadsFailedDialog.Designer.cs index a6e5379b57..02ebe26c55 100644 --- a/GUI/Dialogs/DownloadsFailedDialog.Designer.cs +++ b/GUI/Dialogs/DownloadsFailedDialog.Designer.cs @@ -165,7 +165,7 @@ private void InitializeComponent() this.ClientSize = new System.Drawing.Size(800, 300); this.MinimumSize = new System.Drawing.Size(675, 200); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.HelpButton = true; diff --git a/GUI/Dialogs/DownloadsFailedDialog.cs b/GUI/Dialogs/DownloadsFailedDialog.cs index e807677075..f5bb21cb03 100644 --- a/GUI/Dialogs/DownloadsFailedDialog.cs +++ b/GUI/Dialogs/DownloadsFailedDialog.cs @@ -5,6 +5,9 @@ using System.Drawing; using System.Windows.Forms; using System.Threading.Tasks; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.GUI.Attributes; @@ -32,6 +35,9 @@ namespace CKAN.GUI /// | [Abort whole changeset] | /// +--------------------------------------------------------+ /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class DownloadsFailedDialog : Form { /// diff --git a/GUI/Dialogs/EditLabelsDialog.Designer.cs b/GUI/Dialogs/EditLabelsDialog.Designer.cs index 213ad6b1f7..70a35bff96 100644 --- a/GUI/Dialogs/EditLabelsDialog.Designer.cs +++ b/GUI/Dialogs/EditLabelsDialog.Designer.cs @@ -333,7 +333,7 @@ private void InitializeComponent() this.Controls.Add(this.EditDetailsPanel); this.Controls.Add(this.CloseButton); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.HelpButton = true; diff --git a/GUI/Dialogs/EditLabelsDialog.cs b/GUI/Dialogs/EditLabelsDialog.cs index 21443bec92..13ea333ace 100644 --- a/GUI/Dialogs/EditLabelsDialog.cs +++ b/GUI/Dialogs/EditLabelsDialog.cs @@ -3,9 +3,15 @@ using System.Drawing; using System.ComponentModel; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class EditLabelsDialog : Form { public EditLabelsDialog(IUser user, GameInstanceManager manager, ModuleLabelList labels) diff --git a/GUI/Dialogs/ErrorDialog.Designer.cs b/GUI/Dialogs/ErrorDialog.Designer.cs index e4cd92a1b2..16eb438e79 100644 --- a/GUI/Dialogs/ErrorDialog.Designer.cs +++ b/GUI/Dialogs/ErrorDialog.Designer.cs @@ -79,7 +79,7 @@ private void InitializeComponent() this.Controls.Add(this.DismissButton); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.Name = "ErrorDialog"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; resources.ApplyResources(this, "$this"); diff --git a/GUI/Dialogs/ErrorDialog.cs b/GUI/Dialogs/ErrorDialog.cs index 7e4a5f8f4f..60155e8b33 100644 --- a/GUI/Dialogs/ErrorDialog.cs +++ b/GUI/Dialogs/ErrorDialog.cs @@ -1,6 +1,9 @@ using System; using System.Drawing; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using log4net; @@ -8,6 +11,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class ErrorDialog : Form { public ErrorDialog() diff --git a/GUI/Dialogs/GameCommandLineOptionsDialog.Designer.cs b/GUI/Dialogs/GameCommandLineOptionsDialog.Designer.cs index 27614a610f..18ea06132a 100644 --- a/GUI/Dialogs/GameCommandLineOptionsDialog.Designer.cs +++ b/GUI/Dialogs/GameCommandLineOptionsDialog.Designer.cs @@ -87,7 +87,7 @@ private void InitializeComponent() this.Controls.Add(this.label1); this.Controls.Add(this.AdditionalArguments); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.Name = "GameCommandLineOptionsDialog"; resources.ApplyResources(this, "$this"); this.ResumeLayout(false); diff --git a/GUI/Dialogs/InstallFiltersDialog.Designer.cs b/GUI/Dialogs/InstallFiltersDialog.Designer.cs index 21405da87e..76ccd315e2 100644 --- a/GUI/Dialogs/InstallFiltersDialog.Designer.cs +++ b/GUI/Dialogs/InstallFiltersDialog.Designer.cs @@ -121,7 +121,7 @@ private void InitializeComponent() this.Controls.Add(this.InstanceFiltersGroupBox); this.Controls.Add(this.WarningLabel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.HelpButton = true; diff --git a/GUI/Dialogs/InstallFiltersDialog.cs b/GUI/Dialogs/InstallFiltersDialog.cs index 94eeb1aa94..b8b9b8618a 100644 --- a/GUI/Dialogs/InstallFiltersDialog.cs +++ b/GUI/Dialogs/InstallFiltersDialog.cs @@ -2,11 +2,17 @@ using System.Linq; using System.ComponentModel; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.Configuration; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class InstallFiltersDialog : Form { public InstallFiltersDialog(IConfiguration globalConfig, GameInstance instance) diff --git a/GUI/Dialogs/ManageGameInstancesDialog.Designer.cs b/GUI/Dialogs/ManageGameInstancesDialog.Designer.cs index a49682e267..fc0e493bc1 100644 --- a/GUI/Dialogs/ManageGameInstancesDialog.Designer.cs +++ b/GUI/Dialogs/ManageGameInstancesDialog.Designer.cs @@ -220,7 +220,7 @@ private void InitializeComponent() this.MinimizeBox = false; this.MaximizeBox = false; this.HelpButton = true; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MinimumSize = new System.Drawing.Size(560, 200); this.Name = "ManageGameInstancesDialog"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/GUI/Dialogs/ManageGameInstancesDialog.cs b/GUI/Dialogs/ManageGameInstancesDialog.cs index 8e93a44878..6303ad777d 100644 --- a/GUI/Dialogs/ManageGameInstancesDialog.cs +++ b/GUI/Dialogs/ManageGameInstancesDialog.cs @@ -5,11 +5,17 @@ using System.Windows.Forms; using System.IO; using System.Drawing; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.Versioning; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class ManageGameInstancesDialog : Form { private readonly GameInstanceManager _manager = Main.Instance.Manager; diff --git a/GUI/Dialogs/NewRepoDialog.Designer.cs b/GUI/Dialogs/NewRepoDialog.Designer.cs index 6e6f363f7d..9b73eb0b8d 100644 --- a/GUI/Dialogs/NewRepoDialog.Designer.cs +++ b/GUI/Dialogs/NewRepoDialog.Designer.cs @@ -166,7 +166,7 @@ private void InitializeComponent() this.Controls.Add(this.RepositoryGroupBox); this.Controls.Add(this.BottomPanel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.Name = "NewRepoDialog"; this.Load += new System.EventHandler(this.NewRepoDialog_Load); resources.ApplyResources(this, "$this"); diff --git a/GUI/Dialogs/NewRepoDialog.cs b/GUI/Dialogs/NewRepoDialog.cs index 47b50ad6b4..767f48c0b0 100644 --- a/GUI/Dialogs/NewRepoDialog.cs +++ b/GUI/Dialogs/NewRepoDialog.cs @@ -1,9 +1,15 @@ using System; using System.Linq; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class NewRepoDialog : Form { public NewRepoDialog() diff --git a/GUI/Dialogs/NewUpdateDialog.Designer.cs b/GUI/Dialogs/NewUpdateDialog.Designer.cs index a6185c2b0e..44b50fa2d0 100644 --- a/GUI/Dialogs/NewUpdateDialog.Designer.cs +++ b/GUI/Dialogs/NewUpdateDialog.Designer.cs @@ -106,7 +106,7 @@ private void InitializeComponent() this.Controls.Add(this.ReleaseNotesTextbox); this.Controls.Add(this.VersionLabel); this.Controls.Add(this.label1); - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MinimumSize = new System.Drawing.Size(354, 245); this.Name = "NewUpdateDialog"; resources.ApplyResources(this, "$this"); diff --git a/GUI/Dialogs/PluginsDialog.Designer.cs b/GUI/Dialogs/PluginsDialog.Designer.cs index a400e5b20b..1b63e38952 100644 --- a/GUI/Dialogs/PluginsDialog.Designer.cs +++ b/GUI/Dialogs/PluginsDialog.Designer.cs @@ -172,7 +172,7 @@ private void InitializeComponent() this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.Name = "PluginsDialog"; this.Load += new System.EventHandler(this.PluginsDialog_Load); resources.ApplyResources(this, "$this"); diff --git a/GUI/Dialogs/PluginsDialog.cs b/GUI/Dialogs/PluginsDialog.cs index 107f56ed30..4e19a3a634 100644 --- a/GUI/Dialogs/PluginsDialog.cs +++ b/GUI/Dialogs/PluginsDialog.cs @@ -1,8 +1,14 @@ using System; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class PluginsDialog : Form { public PluginsDialog() diff --git a/GUI/Dialogs/PreferredHostsDialog.Designer.cs b/GUI/Dialogs/PreferredHostsDialog.Designer.cs index ff9b89efb3..584e853602 100644 --- a/GUI/Dialogs/PreferredHostsDialog.Designer.cs +++ b/GUI/Dialogs/PreferredHostsDialog.Designer.cs @@ -198,7 +198,7 @@ private void InitializeComponent() this.Controls.Add(this.Splitter); this.Controls.Add(this.ExplanationLabel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(480, 300); diff --git a/GUI/Dialogs/PreferredHostsDialog.cs b/GUI/Dialogs/PreferredHostsDialog.cs index 2075c843a9..f5740327b8 100644 --- a/GUI/Dialogs/PreferredHostsDialog.cs +++ b/GUI/Dialogs/PreferredHostsDialog.cs @@ -2,11 +2,17 @@ using System.Linq; using System.ComponentModel; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.Configuration; namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class PreferredHostsDialog : Form { public PreferredHostsDialog(IConfiguration config, Registry registry) diff --git a/GUI/Dialogs/RenameInstanceDialog.Designer.cs b/GUI/Dialogs/RenameInstanceDialog.Designer.cs index 8fb053dee3..7c15e463bc 100644 --- a/GUI/Dialogs/RenameInstanceDialog.Designer.cs +++ b/GUI/Dialogs/RenameInstanceDialog.Designer.cs @@ -76,7 +76,7 @@ private void InitializeComponent() this.Controls.Add(this.NameTextBox); this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.Name = "RenameInstanceDialog"; resources.ApplyResources(this, "$this"); this.ResumeLayout(false); diff --git a/GUI/Dialogs/SelectionDialog.Designer.cs b/GUI/Dialogs/SelectionDialog.Designer.cs index 4bf2250f37..bb94fae490 100644 --- a/GUI/Dialogs/SelectionDialog.Designer.cs +++ b/GUI/Dialogs/SelectionDialog.Designer.cs @@ -114,7 +114,7 @@ private void InitializeComponent() this.ClientSize = new System.Drawing.Size(420, 420); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.Name = "SelectionDialog"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; resources.ApplyResources(this, "$this"); diff --git a/GUI/Dialogs/SelectionDialog.cs b/GUI/Dialogs/SelectionDialog.cs index 2baa2b9613..a853cd06dd 100644 --- a/GUI/Dialogs/SelectionDialog.cs +++ b/GUI/Dialogs/SelectionDialog.cs @@ -1,8 +1,14 @@ using System; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class SelectionDialog : Form { private int currentSelected; diff --git a/GUI/Dialogs/SettingsDialog.Designer.cs b/GUI/Dialogs/SettingsDialog.Designer.cs index 7d9573fd6b..912c2f8273 100644 --- a/GUI/Dialogs/SettingsDialog.Designer.cs +++ b/GUI/Dialogs/SettingsDialog.Designer.cs @@ -624,7 +624,7 @@ private void InitializeComponent() this.Controls.Add(this.BehaviourGroupBox); this.Controls.Add(this.MoreSettingsGroupBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SettingsDialog"; diff --git a/GUI/Dialogs/SettingsDialog.cs b/GUI/Dialogs/SettingsDialog.cs index 275c31c4f8..d3b7f5ce4f 100644 --- a/GUI/Dialogs/SettingsDialog.cs +++ b/GUI/Dialogs/SettingsDialog.cs @@ -3,6 +3,9 @@ using System.Windows.Forms; using System.Drawing; using System.Threading.Tasks; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using log4net; using Autofac; @@ -12,6 +15,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class SettingsDialog : Form { private static readonly ILog log = LogManager.GetLogger(typeof(SettingsDialog)); diff --git a/GUI/Dialogs/YesNoDialog.Designer.cs b/GUI/Dialogs/YesNoDialog.Designer.cs index 537ba48a10..190f0470cc 100644 --- a/GUI/Dialogs/YesNoDialog.Designer.cs +++ b/GUI/Dialogs/YesNoDialog.Designer.cs @@ -112,7 +112,7 @@ private void InitializeComponent() this.Controls.Add(this.YesButton); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; this.Name = "YesNoDialog"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; resources.ApplyResources(this, "$this"); diff --git a/GUI/Dialogs/YesNoDialog.cs b/GUI/Dialogs/YesNoDialog.cs index 27b4057731..0593600f4e 100644 --- a/GUI/Dialogs/YesNoDialog.cs +++ b/GUI/Dialogs/YesNoDialog.cs @@ -2,9 +2,15 @@ using System.Drawing; using System.Windows.Forms; using System.Threading.Tasks; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class YesNoDialog : Form { public YesNoDialog() diff --git a/GUI/FlatToolStripRenderer.cs b/GUI/FlatToolStripRenderer.cs index 3213eaa4bc..96f4b6819f 100644 --- a/GUI/FlatToolStripRenderer.cs +++ b/GUI/FlatToolStripRenderer.cs @@ -1,5 +1,8 @@ using System.Drawing; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { @@ -8,6 +11,9 @@ namespace CKAN.GUI /// /// The default Mono one uses a gradient between a hardcoded light color and a system color that Mono doesn't load correctly. /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class FlatToolStripRenderer : ToolStripProfessionalRenderer { diff --git a/GUI/GUIUser.cs b/GUI/GUIUser.cs index b1920e5408..6de67048b6 100644 --- a/GUI/GUIUser.cs +++ b/GUI/GUIUser.cs @@ -1,8 +1,15 @@ +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif + namespace CKAN.GUI { /// /// The GUI implementation of the IUser interface. /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class GUIUser : IUser { public GUIUser(Main main, Wait wait) diff --git a/GUI/Main/Main.Designer.cs b/GUI/Main/Main.Designer.cs index a55cbccfad..7f078e8696 100644 --- a/GUI/Main/Main.Designer.cs +++ b/GUI/Main/Main.Designer.cs @@ -698,7 +698,7 @@ private void InitializeComponent() this.minimizeNotifyIcon.ContextMenuStrip = this.minimizedContextMenuStrip; this.minimizeNotifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.minimizeNotifyIcon_MouseDoubleClick); this.minimizeNotifyIcon.BalloonTipClicked += new System.EventHandler(this.minimizeNotifyIcon_BalloonTipClicked); - this.minimizeNotifyIcon.Icon = Properties.Resources.AppIcon; + this.minimizeNotifyIcon.Icon = EmbeddedImages.AppIcon; resources.ApplyResources(this.minimizeNotifyIcon, "minimizeNotifyIcon"); // // minimizedContextMenuStrip @@ -825,7 +825,7 @@ private void InitializeComponent() this.MinimumSize = new System.Drawing.Size(880, 400); this.Name = "Main"; this.Resize += new System.EventHandler(this.Main_Resize); - this.Icon = Properties.Resources.AppIcon; + this.Icon = EmbeddedImages.AppIcon; resources.ApplyResources(this, "$this"); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); diff --git a/GUI/Main/Main.cs b/GUI/Main/Main.cs index 9c5611d0b6..9c3201beda 100644 --- a/GUI/Main/Main.cs +++ b/GUI/Main/Main.cs @@ -8,6 +8,9 @@ using System.Threading; using System.Windows.Forms; using Timer = System.Windows.Forms.Timer; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using log4net; using Autofac; @@ -21,6 +24,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Main : Form, IMessageFilter { private static readonly ILog log = LogManager.GetLogger(typeof(Main)); diff --git a/GUI/Main/MainInstall.cs b/GUI/Main/MainInstall.cs index 937e22a212..f7a1fbb073 100644 --- a/GUI/Main/MainInstall.cs +++ b/GUI/Main/MainInstall.cs @@ -7,6 +7,9 @@ using CKAN.Extensions; using CKAN.GUI.Attributes; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif // Don't warn if we use our own obsolete properties #pragma warning disable 0618 @@ -19,6 +22,9 @@ namespace CKAN.GUI /// Type expected by InstallMods in DoWorkEventArgs.Argument /// Not a `using` because it's used by other files /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class InstallArgument : Tuple, RelationshipResolverOptions> { public InstallArgument(List changes, RelationshipResolverOptions options) diff --git a/GUI/Main/MainRepo.cs b/GUI/Main/MainRepo.cs index 39ec58cbb2..0b7f26a849 100644 --- a/GUI/Main/MainRepo.cs +++ b/GUI/Main/MainRepo.cs @@ -6,6 +6,9 @@ using System.Windows.Forms; using System.Transactions; using Timer = System.Timers.Timer; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Newtonsoft.Json; using Autofac; @@ -22,6 +25,9 @@ namespace CKAN.GUI using RepoArgument = Tuple; using RepoResult = Tuple, bool>; + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Main { public Timer refreshTimer; diff --git a/GUI/Main/MainWait.cs b/GUI/Main/MainWait.cs index c2b13dd054..babd45d317 100644 --- a/GUI/Main/MainWait.cs +++ b/GUI/Main/MainWait.cs @@ -1,5 +1,8 @@ using System; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.GUI.Attributes; @@ -8,6 +11,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public partial class Main { [ForbidGUICalls] diff --git a/GUI/Model/GUIMod.cs b/GUI/Model/GUIMod.cs index 2d098330af..0ca98f70e1 100644 --- a/GUI/Model/GUIMod.cs +++ b/GUI/Model/GUIMod.cs @@ -4,6 +4,9 @@ using System.Linq; using System.ComponentModel; using System.Runtime.CompilerServices; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using Autofac; @@ -11,6 +14,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public sealed class GUIMod : INotifyPropertyChanged { private CkanModule Mod { get; set; } diff --git a/GUI/Model/ModChange.cs b/GUI/Model/ModChange.cs index 942402836b..9de1daa8b7 100644 --- a/GUI/Model/ModChange.cs +++ b/GUI/Model/ModChange.cs @@ -2,6 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.ComponentModel.DataAnnotations; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using CKAN.Extensions; @@ -34,6 +37,9 @@ public enum GUIModChangeType /// Everything the GUI needs to know about a change, including /// the mod itself, the change we're making, and the reason why. /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class ModChange { public CkanModule Mod { get; private set; } @@ -118,6 +124,9 @@ public virtual string Description : reasons))); } + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class ModUpgrade : ModChange { public ModUpgrade(CkanModule mod, diff --git a/GUI/Model/ModList.cs b/GUI/Model/ModList.cs index 19942e04e2..7766c5af0d 100644 --- a/GUI/Model/ModList.cs +++ b/GUI/Model/ModList.cs @@ -5,6 +5,9 @@ using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using log4net; @@ -34,6 +37,9 @@ public enum GUIModFilter /// The holder of the list of mods to be shown. /// Should be a pure data model and avoid UI stuff, but it's not there yet. /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class ModList { //identifier, row diff --git a/GUI/Model/ModSearch.cs b/GUI/Model/ModSearch.cs index 7073178945..7207e92145 100644 --- a/GUI/Model/ModSearch.cs +++ b/GUI/Model/ModSearch.cs @@ -1,6 +1,9 @@ using System; using System.Linq; using System.Collections.Generic; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { @@ -8,6 +11,9 @@ namespace CKAN.GUI /// An object representing a search to be performed of the mod list. /// Create one with the constructor or Parse(), and use it with Matches(). /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public sealed class ModSearch : IEquatable { /// diff --git a/GUI/Program.cs b/GUI/Program.cs index 4ecc3e570e..ca952a733d 100644 --- a/GUI/Program.cs +++ b/GUI/Program.cs @@ -1,9 +1,15 @@ using System; using System.Linq; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public static class GUI { /// diff --git a/GUI/Properties/EmbeddedImages.cs b/GUI/Properties/EmbeddedImages.cs new file mode 100644 index 0000000000..8d378d1efb --- /dev/null +++ b/GUI/Properties/EmbeddedImages.cs @@ -0,0 +1,70 @@ +using System.Collections.Generic; +using System.Drawing; +using System.Reflection; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif + +namespace CKAN.GUI +{ + /// + /// Provides icons after `dotnet build` completely broke non-string resources + /// + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif + public class EmbeddedImages + { + public static readonly Icon AppIcon = new Icon( + Assembly.GetExecutingAssembly() + .GetManifestResourceStream($"CKAN.ckan.ico")); + + public static Bitmap alert => get("alert"); + public static Bitmap apply => get("apply"); + public static Bitmap backward => get("backward"); + public static Bitmap ballot => get("ballot"); + public static Bitmap collapseAll => get("collapseAll"); + public static Bitmap delete => get("delete"); + public static Bitmap expandAll => get("expandAll"); + public static Bitmap file => get("file"); + public static Bitmap filter => get("filter"); + public static Bitmap folder => get("folder"); + public static Bitmap folderZip => get("folderZip"); + public static Bitmap forward => get("forward"); + public static Bitmap info => get("info"); + public static Bitmap ksp => get("ksp"); + public static Bitmap refresh => get("refresh"); + public static Bitmap resetCollapse => get("resetCollapse"); + public static Bitmap search => get("search"); + public static Bitmap settings => get("settings"); + public static Bitmap smile => get("smile"); + public static Bitmap star => get("star"); + public static Bitmap stop => get("stop"); + public static Bitmap textClear => get("textClear"); + public static Bitmap thumbup => get("thumbup"); + public static Bitmap triToggleBoth => get("triToggleBoth"); + public static Bitmap triToggleNo => get("triToggleNo"); + public static Bitmap triToggleYes => get("triToggleYes"); + public static Bitmap update => get("update"); + + private static Bitmap get(string what) + => cache.TryGetValue(what, out Bitmap bmp) + ? bmp + : add(what); + + private static Bitmap load(string what) + => new Bitmap( + Assembly.GetExecutingAssembly() + .GetManifestResourceStream($"CKAN.GUI.Resources.{what}.png")); + + private static Bitmap add(string what) + { + var newBmp = load(what); + cache.Add(what, newBmp); + return newBmp; + } + + private static readonly Dictionary cache = + new Dictionary(); + } +} diff --git a/GUI/Properties/Resources.Designer.cs b/GUI/Properties/Resources.Designer.cs deleted file mode 100644 index 283aebd76d..0000000000 --- a/GUI/Properties/Resources.Designer.cs +++ /dev/null @@ -1,1244 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. (I WISH!) -// -//------------------------------------------------------------------------------ - -namespace CKAN.GUI.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - public Resources() { } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) - { - resourceMan = new SingleAssemblyResourceManager("CKAN.GUI.Properties.Resources", typeof(Resources).Assembly); - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap alert { - get { - object obj = ResourceManager.GetObject("alert", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap apply { - get { - object obj = ResourceManager.GetObject("apply", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap backward { - get { - object obj = ResourceManager.GetObject("backward", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - public static System.Drawing.Icon AppIcon { - get { - object obj = ResourceManager.GetObject("AppIcon", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - - /// - /// Looks up a localized string similar to CKAN metadata (*.ckan)|*.ckan. - /// - public static string CKANFileFilter { - get { - return ResourceManager.GetString("CKANFileFilter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Export Mod List. - /// - public static string ExportInstalledModsDialogTitle { - get { - return ResourceManager.GetString("ExportInstalledModsDialogTitle", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap file { - get { - object obj = ResourceManager.GetObject("file", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap filter { - get { - object obj = ResourceManager.GetObject("filter", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap folder { - get { - object obj = ResourceManager.GetObject("folder", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap folderZip { - get { - object obj = ResourceManager.GetObject("folderZip", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap forward { - get { - object obj = ResourceManager.GetObject("forward", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap info { - get { - object obj = ResourceManager.GetObject("info", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap ksp { - get { - object obj = ResourceManager.GetObject("ksp", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap stop { - get { - object obj = ResourceManager.GetObject("stop", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap ballot { - get { - object obj = ResourceManager.GetObject("ballot", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap refresh { - get { - object obj = ResourceManager.GetObject("refresh", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap search { - get { - object obj = ResourceManager.GetObject("search", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap settings { - get { - object obj = ResourceManager.GetObject("settings", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap expandAll { - get { - object obj = ResourceManager.GetObject("expandAll", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap collapseAll { - get { - object obj = ResourceManager.GetObject("collapseAll", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap resetCollapse { - get { - object obj = ResourceManager.GetObject("resetCollapse", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap delete { - get { - object obj = ResourceManager.GetObject("delete", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap smile { - get { - object obj = ResourceManager.GetObject("smile", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap star { - get { - object obj = ResourceManager.GetObject("star", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap textClear { - get { - object obj = ResourceManager.GetObject("textClear", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap thumbup { - get { - object obj = ResourceManager.GetObject("thumbup", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap update { - get { - object obj = ResourceManager.GetObject("update", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap triToggleYes { - get { - object obj = ResourceManager.GetObject("triToggleYes", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap triToggleBoth { - get { - object obj = ResourceManager.GetObject("triToggleBoth", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap triToggleNo { - get { - object obj = ResourceManager.GetObject("triToggleNo", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - public static string AboutDialogLabel2Text { - get { return (string)(ResourceManager.GetObject("AboutDialogLabel2Text", resourceCulture)); } - } - - public static string BuildIDFilterDescription { - get { return (string)(ResourceManager.GetObject("BuildIDFilterDescription", resourceCulture)); } - } - public static string CloneFakeKspDialogEnterName { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogEnterName", resourceCulture)); } - } - public static string CloneFakeKspDialogEnterPath { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogEnterPath", resourceCulture)); } - } - public static string CloneFakeKspDialogCloningInstance { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogCloningInstance", resourceCulture)); } - } - public static string CloneFakeKspDialogInstanceNotValid { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogInstanceNotValid", resourceCulture)); } - } - public static string CloneFakeKspDialogDestinationNotEmpty { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogDestinationNotEmpty", resourceCulture)); } - } - public static string CloneFakeKspDialogCloneFailed { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogCloneFailed", resourceCulture)); } - } - public static string CloneFakeKspDialogSuccessfulClone { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogSuccessfulClone", resourceCulture)); } - } - public static string CloneFakeKspDialogCreatingInstance { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogCreatingInstance", resourceCulture)); } - } - public static string CloneFakeKspDialogNameAlreadyUsed { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogNameAlreadyUsed", resourceCulture)); } - } - public static string CloneFakeKspDialogSuccessfulCreate { - get { return (string)(ResourceManager.GetObject("CloneFakeKspDialogSuccessfulCreate", resourceCulture)); } - } - - public static string CompatibleGameVersionsDialogNone { - get { return (string)(ResourceManager.GetObject("CompatibleGameVersionsDialogNone", resourceCulture)); } - } - public static string CompatibleGameVersionsDialogGameUpdated { - get { return (string)(ResourceManager.GetObject("CompatibleGameVersionsDialogGameUpdated", resourceCulture)); } - } - public static string CompatibleGameVersionsDialogVersionDetails { - get { return (string)(ResourceManager.GetObject("CompatibleGameVersionsDialogVersionDetails", resourceCulture)); } - } - public static string CompatibleGameVersionsDialogInvalidFormat { - get { return (string)(ResourceManager.GetObject("CompatibleGameVersionsDialogInvalidFormat", resourceCulture)); } - } - public static string CompatibleGameVersionsDialogErrorTitle { - get { return (string)(ResourceManager.GetObject("CompatibleGameVersionsDialogErrorTitle", resourceCulture)); } - } - - public static string ConfigurationParseError { - get { return (string)(ResourceManager.GetObject("ConfigurationParseError", resourceCulture)); } - } - - public static string GUIModNSlashA { - get { return (string)(ResourceManager.GetObject("GUIModNSlashA", resourceCulture)); } - } - public static string GUIModUnknown { - get { return (string)(ResourceManager.GetObject("GUIModUnknown", resourceCulture)); } - } - public static string GUIModMethodNotCKAN { - get { return (string)(ResourceManager.GetObject("GUIModMethodNotCKAN", resourceCulture)); } - } - public static string GUIModGameCompatibilityLong { - get { return (string)(ResourceManager.GetObject("GUIModGameCompatibilityLong", resourceCulture)); } - } - - public static string MainAutoUpdateFailed { - get { return (string)(ResourceManager.GetObject("MainAutoUpdateFailed", resourceCulture)); } - } - public static string MainQuitWithConflicts { - get { return (string)(ResourceManager.GetObject("MainQuitWithConflicts", resourceCulture)); } - } - public static string MainQuit { - get { return (string)(ResourceManager.GetObject("MainQuit", resourceCulture)); } - } - public static string MainGoBack { - get { return (string)(ResourceManager.GetObject("MainGoBack", resourceCulture)); } - } - public static string MainQuitWithUnmetDeps { - get { return (string)(ResourceManager.GetObject("MainQuitWithUnmetDeps", resourceCulture)); } - } - public static string MainQuitWithUnappliedChanges { - get { return (string)(ResourceManager.GetObject("MainQuitWithUnappliedChanges", resourceCulture)); } - } - public static string MainUpgradingWaitTitle { - get { return (string)(ResourceManager.GetObject("MainUpgradingWaitTitle", resourceCulture)); } - } - public static string MainUpgradingTo { - get { return (string)(ResourceManager.GetObject("MainUpgradingTo", resourceCulture)); } - } - public static string MainDepNotSatisfied { - get { return (string)(ResourceManager.GetObject("MainDepNotSatisfied", resourceCulture)); } - } - public static string MainFilterAll { - get { return (string)(ResourceManager.GetObject("MainFilterAll", resourceCulture)); } - } - public static string MainFilterIncompatible { - get { return (string)(ResourceManager.GetObject("MainFilterIncompatible", resourceCulture)); } - } - public static string MainFilterInstalled { - get { return (string)(ResourceManager.GetObject("MainFilterInstalled", resourceCulture)); } - } - public static string MainFilterUpgradeable { - get { return (string)(ResourceManager.GetObject("MainFilterUpgradeable", resourceCulture)); } - } - public static string MainFilterReplaceable { - get { return (string)(ResourceManager.GetObject("MainFilterReplaceable", resourceCulture)); } - } - public static string MainFilterCached { - get { return (string)(ResourceManager.GetObject("MainFilterCached", resourceCulture)); } - } - public static string MainFilterUncached { - get { return (string)(ResourceManager.GetObject("MainFilterUncached", resourceCulture)); } - } - public static string MainFilterNew { - get { return (string)(ResourceManager.GetObject("MainFilterNew", resourceCulture)); } - } - public static string MainFilterNotInstalled { - get { return (string)(ResourceManager.GetObject("MainFilterNotInstalled", resourceCulture)); } - } - public static string MainFilterCompatible { - get { return (string)(ResourceManager.GetObject("MainFilterCompatible", resourceCulture)); } - } - public static string MainFilterLabel { - get { return (string)(ResourceManager.GetObject("MainFilterLabel", resourceCulture)); } - } - public static string MainFilterTag { - get { return (string)(ResourceManager.GetObject("MainFilterTag", resourceCulture)); } - } - public static string MainFilterUntagged { - get { return (string)(ResourceManager.GetObject("MainFilterUntagged", resourceCulture)); } - } - public static string MainLaunchWithIncompatible { - get { return (string)(ResourceManager.GetObject("MainLaunchWithIncompatible", resourceCulture)); } - } - public static string MainLaunchDontShow { - get { return (string)(ResourceManager.GetObject("MainLaunchDontShow", resourceCulture)); } - } - public static string MainLaunch { - get { return (string)(ResourceManager.GetObject("MainLaunch", resourceCulture)); } - } - public static string MainLaunchFailed { - get { return (string)(ResourceManager.GetObject("MainLaunchFailed", resourceCulture)); } - } - public static string MainModPack { - get { return (string)(ResourceManager.GetObject("MainModPack", resourceCulture)); } - } - public static string MainPlainText { - get { return (string)(ResourceManager.GetObject("MainPlainText", resourceCulture)); } - } - public static string MainMarkdown { - get { return (string)(ResourceManager.GetObject("MainMarkdown", resourceCulture)); } - } - public static string MainBBCode { - get { return (string)(ResourceManager.GetObject("MainBBCode", resourceCulture)); } - } - public static string MainCSV { - get { return (string)(ResourceManager.GetObject("MainCSV", resourceCulture)); } - } - public static string MainTSV { - get { return (string)(ResourceManager.GetObject("MainTSV", resourceCulture)); } - } - public static string MainNotFound { - get { return (string)(ResourceManager.GetObject("MainNotFound", resourceCulture)); } - } - public static string MainCantInstallDLC { - get { return (string)(ResourceManager.GetObject("MainCantInstallDLC", resourceCulture)); } - } - public static string MainLoadingGameInstance { - get { return (string)(ResourceManager.GetObject("MainLoadingGameInstance", resourceCulture)); } - } - public static string MainCorruptedRegistry { - get { return (string)(ResourceManager.GetObject("MainCorruptedRegistry", resourceCulture)); } - } - public static string MainDeleteLockfileYes { - get { return (string)(ResourceManager.GetObject("MainDeleteLockfileYes", resourceCulture)); } - } - public static string MainDeleteLockfileNo { - get { return (string)(ResourceManager.GetObject("MainDeleteLockfileNo", resourceCulture)); } - } - - public static string AllModVersionsInstallPrompt { - get { return (string)(ResourceManager.GetObject("AllModVersionsInstallPrompt", resourceCulture)); } - } - public static string ModpackInstallIncompatiblePrompt { - get { return (string)(ResourceManager.GetObject("ModpackInstallIncompatiblePrompt", resourceCulture)); } - } - public static string AllModVersionsInstallYes { - get { return (string)(ResourceManager.GetObject("AllModVersionsInstallYes", resourceCulture)); } - } - public static string AllModVersionsInstallNo { - get { return (string)(ResourceManager.GetObject("AllModVersionsInstallNo", resourceCulture)); } - } - - public static string MainChangesetUpdateSelected { - get { return (string)(ResourceManager.GetObject("MainChangesetUpdateSelected", resourceCulture)); } - } - public static string MainChangesetReinstall { - get { return (string)(ResourceManager.GetObject("MainChangesetReinstall", resourceCulture)); } - } - public static string MainChangesetUserReinstall { - get { return (string)(ResourceManager.GetObject("MainChangesetUserReinstall", resourceCulture)); } - } - - public static string MainImportTitle { - get { return (string)(ResourceManager.GetObject("MainImportTitle", resourceCulture)); } - } - public static string MainImportFilter { - get { return (string)(ResourceManager.GetObject("MainImportFilter", resourceCulture)); } - } - public static string MainImportWaitTitle { - get { return (string)(ResourceManager.GetObject("MainImportWaitTitle", resourceCulture)); } - } - - public static string MainInstallWaitTitle { - get { return (string)(ResourceManager.GetObject("MainInstallWaitTitle", resourceCulture)); } - } - public static string MainInstallDepNotSatisfied { - get { return (string)(ResourceManager.GetObject("MainInstallDepNotSatisfied", resourceCulture)); } - } - public static string MainInstallNotFound { - get { return (string)(ResourceManager.GetObject("MainInstallNotFound", resourceCulture)); } - } - public static string MainInstallBadMetadata { - get { return (string)(ResourceManager.GetObject("MainInstallBadMetadata", resourceCulture)); } - } - public static string MainInstallFileExists { - get { return (string)(ResourceManager.GetObject("MainInstallFileExists", resourceCulture)); } - } - public static string MainInstallUnownedFileExists { - get { return (string)(ResourceManager.GetObject("MainInstallUnownedFileExists", resourceCulture)); } - } - public static string MainInstallGameDataReverted { - get { return (string)(ResourceManager.GetObject("MainInstallGameDataReverted", resourceCulture)); } - } - public static string MainInstallOpenSettingsPrompt { - get { return (string)(ResourceManager.GetObject("MainInstallOpenSettingsPrompt", resourceCulture)); } - } - public static string MainInstallOpenSettings { - get { return (string)(ResourceManager.GetObject("MainInstallOpenSettings", resourceCulture)); } - } - public static string MainInstallNo { - get { return (string)(ResourceManager.GetObject("MainInstallNo", resourceCulture)); } - } - public static string MainInstallModSuccess { - get { return (string)(ResourceManager.GetObject("MainInstallModSuccess", resourceCulture)); } - } - public static string MainInstallSuccess { - get { return (string)(ResourceManager.GetObject("MainInstallSuccess", resourceCulture)); } - } - public static string MainInstallCancelTooLate { - get { return (string)(ResourceManager.GetObject("MainInstallCancelTooLate", resourceCulture)); } - } - public static string MainInstallCancelAfterInstall { - get { return (string)(ResourceManager.GetObject("MainInstallCancelAfterInstall", resourceCulture)); } - } - public static string MainInstallProcessComplete { - get { return (string)(ResourceManager.GetObject("MainInstallProcessComplete", resourceCulture)); } - } - public static string MainInstallProcessCanceled { - get { return (string)(ResourceManager.GetObject("MainInstallProcessCanceled", resourceCulture)); } - } - public static string MainInstallCanceledManually { - get { return (string)(ResourceManager.GetObject("MainInstallCanceledManually", resourceCulture)); } - } - public static string MainInstallInstallCanceled { - get { return (string)(ResourceManager.GetObject("MainInstallInstallCanceled", resourceCulture)); } - } - public static string MainInstallErrorInstalling { - get { return (string)(ResourceManager.GetObject("MainInstallErrorInstalling", resourceCulture)); } - } - public static string MainInstallUnknownError { - get { return (string)(ResourceManager.GetObject("MainInstallUnknownError", resourceCulture)); } - } - public static string MainInstallKnownError { - get { return (string)(ResourceManager.GetObject("MainInstallKnownError", resourceCulture)); } - } - public static string MainInstallFailed { - get { return (string)(ResourceManager.GetObject("MainInstallFailed", resourceCulture)); } - } - public static string MainInstallProvidedBy { - get { return (string)(ResourceManager.GetObject("MainInstallProvidedBy", resourceCulture)); } - } - public static string MainInstallCantInstallDLC { - get { return (string)(ResourceManager.GetObject("MainInstallCantInstallDLC", resourceCulture)); } - } - - public static string ModInfoNSlashA { - get { return (string)(ResourceManager.GetObject("ModInfoNSlashA", resourceCulture)); } - } - public static string ModInfoVirtual { - get { return (string)(ResourceManager.GetObject("ModInfoVirtual", resourceCulture)); } - } - public static string ModInfoNotIndexed { - get { return (string)(ResourceManager.GetObject("ModInfoNotIndexed", resourceCulture)); } - } - public static string ModInfoNotCached { - get { return (string)(ResourceManager.GetObject("ModInfoNotCached", resourceCulture)); } - } - public static string ModInfoCached { - get { return (string)(ResourceManager.GetObject("ModInfoCached", resourceCulture)); } - } - public static string ModInfoNoDownload { - get { return (string)(ResourceManager.GetObject("ModInfoNoDownload", resourceCulture)); } - } - public static string ModInfoHomepageLabel { - get { return (string)(ResourceManager.GetObject("ModInfoHomepageLabel", resourceCulture)); } - } - public static string ModInfoSpaceDockLabel { - get { return (string)(ResourceManager.GetObject("ModInfoSpaceDockLabel", resourceCulture)); } - } - public static string ModInfoCurseLabel { - get { return (string)(ResourceManager.GetObject("ModInfoCurseLabel", resourceCulture)); } - } - public static string ModInfoRepositoryLabel { - get { return (string)(ResourceManager.GetObject("ModInfoRepositoryLabel", resourceCulture)); } - } - public static string ModInfoBugTrackerLabel { - get { return (string)(ResourceManager.GetObject("ModInfoBugTrackerLabel", resourceCulture)); } - } - public static string ModInfoContinuousIntegrationLabel { - get { return (string)(ResourceManager.GetObject("ModInfoContinuousIntegrationLabel", resourceCulture)); } - } - public static string ModInfoLicenseLabel { - get { return (string)(ResourceManager.GetObject("ModInfoLicenseLabel", resourceCulture)); } - } - public static string ModInfoManualLabel { - get { return (string)(ResourceManager.GetObject("ModInfoManualLabel", resourceCulture)); } - } - public static string ModInfoMetanetkanLabel { - get { return (string)(ResourceManager.GetObject("ModInfoMetanetkanLabel", resourceCulture)); } - } - public static string ModInfoRemoteAvcLabel { - get { return (string)(ResourceManager.GetObject("ModInfoRemoteAvcLabel", resourceCulture)); } - } - public static string ModInfoRemoteSWInfoLabel { - get { return (string)(ResourceManager.GetObject("ModInfoRemoteSWInfoLabel", resourceCulture)); } - } - public static string ModInfoStoreLabel { - get { return (string)(ResourceManager.GetObject("ModInfoStoreLabel", resourceCulture)); } - } - public static string ModInfoSteamStoreLabel { - get { return (string)(ResourceManager.GetObject("ModInfoSteamStoreLabel", resourceCulture)); } - } - public static string ModInfoToolTipReverseRelationships { - get { return (string)(ResourceManager.GetObject("ModInfoToolTipReverseRelationships", resourceCulture)); } - } - public static string DownloadFailed { - get { return (string)(ResourceManager.GetObject("DownloadFailed", resourceCulture)); } - } - public static string ValidatingDownload { - get { return (string)(ResourceManager.GetObject("ValidatingDownload", resourceCulture)); } - } - - public static string MainModListWaitTitle { - get { return (string)(ResourceManager.GetObject("MainModListWaitTitle", resourceCulture)); } - } - public static string MainModListLoadingRegistry { - get { return (string)(ResourceManager.GetObject("MainModListLoadingRegistry", resourceCulture)); } - } - public static string MainModListLoadingInstalled { - get { return (string)(ResourceManager.GetObject("MainModListLoadingInstalled", resourceCulture)); } - } - public static string MainModListLoadingAvailable { - get { return (string)(ResourceManager.GetObject("MainModListLoadingAvailable", resourceCulture)); } - } - public static string MainModListLoadingIncompatible { - get { return (string)(ResourceManager.GetObject("MainModListLoadingIncompatible", resourceCulture)); } - } - public static string MainModListRestoringChangeset { - get { return (string)(ResourceManager.GetObject("MainModListRestoringChangeset", resourceCulture)); } - } - public static string MainModListPreservingNew { - get { return (string)(ResourceManager.GetObject("MainModListPreservingNew", resourceCulture)); } - } - public static string MainModListPopulatingList { - get { return (string)(ResourceManager.GetObject("MainModListPopulatingList", resourceCulture)); } - } - public static string MainModListUpdatingFilters { - get { return (string)(ResourceManager.GetObject("MainModListUpdatingFilters", resourceCulture)); } - } - public static string MainModListCompatible { - get { return (string)(ResourceManager.GetObject("MainModListCompatible", resourceCulture)); } - } - public static string MainModListInstalled { - get { return (string)(ResourceManager.GetObject("MainModListInstalled", resourceCulture)); } - } - public static string MainModListUpgradeable { - get { return (string)(ResourceManager.GetObject("MainModListUpgradeable", resourceCulture)); } - } - public static string MainModListReplaceable { - get { return (string)(ResourceManager.GetObject("MainModListReplaceable", resourceCulture)); } - } - public static string MainModListCached { - get { return (string)(ResourceManager.GetObject("MainModListCached", resourceCulture)); } - } - public static string MainModListUncached { - get { return (string)(ResourceManager.GetObject("MainModListUncached", resourceCulture)); } - } - public static string MainModListNewlyCompatible { - get { return (string)(ResourceManager.GetObject("MainModListNewlyCompatible", resourceCulture)); } - } - public static string MainModListNotInstalled { - get { return (string)(ResourceManager.GetObject("MainModListNotInstalled", resourceCulture)); } - } - public static string MainModListIncompatible { - get { return (string)(ResourceManager.GetObject("MainModListIncompatible", resourceCulture)); } - } - public static string MainModListAll { - get { return (string)(ResourceManager.GetObject("MainModListAll", resourceCulture)); } - } - public static string MainModListUpdatingTray { - get { return (string)(ResourceManager.GetObject("MainModListUpdatingTray", resourceCulture)); } - } - public static string MainModListAutoDetected { - get { return (string)(ResourceManager.GetObject("MainModListAutoDetected", resourceCulture)); } - } - public static string MainModListAutoInstalledToolTip { - get { return (string)(ResourceManager.GetObject("MainModListAutoInstalledToolTip", resourceCulture)); } - } - public static string MainModListUnknownFilter { - get { return (string)(ResourceManager.GetObject("MainModListUnknownFilter", resourceCulture)); } - } - - public static string MainRecommendationsTitle { - get { return (string)(ResourceManager.GetObject("MainRecommendationsTitle", resourceCulture)); } - } - public static string MainRecommendationsNoneFound { - get { return (string)(ResourceManager.GetObject("MainRecommendationsNoneFound", resourceCulture)); } - } - - public static string MainRepoWaitTitle { - get { return (string)(ResourceManager.GetObject("MainRepoWaitTitle", resourceCulture)); } - } - public static string MainRepoContacting { - get { return (string)(ResourceManager.GetObject("MainRepoContacting", resourceCulture)); } - } - public static string LoadingCachedRepoData { - get { return (string)(ResourceManager.GetObject("LoadingCachedRepoData", resourceCulture)); } - } - public static string MainRepoScanning { - get { return (string)(ResourceManager.GetObject("MainRepoScanning", resourceCulture)); } - } - public static string MainRepoUpdating { - get { return (string)(ResourceManager.GetObject("MainRepoUpdating", resourceCulture)); } - } - public static string MainRepoFailedToConnect { - get { return (string)(ResourceManager.GetObject("MainRepoFailedToConnect", resourceCulture)); } - } - public static string MainRepoUpToDate { - get { return (string)(ResourceManager.GetObject("MainRepoUpToDate", resourceCulture)); } - } - public static string MainRepoFailed { - get { return (string)(ResourceManager.GetObject("MainRepoFailed", resourceCulture)); } - } - public static string MainRepoSuccess { - get { return (string)(ResourceManager.GetObject("MainRepoSuccess", resourceCulture)); } - } - public static string MainRepoAutoRefreshPrompt { - get { return (string)(ResourceManager.GetObject("MainRepoAutoRefreshPrompt", resourceCulture)); } - } - public static string MainRepoBalloonTipDetails { - get { return (string)(ResourceManager.GetObject("MainRepoBalloonTipDetails", resourceCulture)); } - } - public static string MainRepoBalloonTipTooltip { - get { return (string)(ResourceManager.GetObject("MainRepoBalloonTipTooltip", resourceCulture)); } - } - - public static string MainTrayIconResume { - get { return (string)(ResourceManager.GetObject("MainTrayIconResume", resourceCulture)); } - } - public static string MainTrayIconPause { - get { return (string)(ResourceManager.GetObject("MainTrayIconPause", resourceCulture)); } - } - public static string MainTrayNoUpdates { - get { return (string)(ResourceManager.GetObject("MainTrayNoUpdates", resourceCulture)); } - } - public static string MainTrayUpdatesAvailable { - get { return (string)(ResourceManager.GetObject("MainTrayUpdatesAvailable", resourceCulture)); } - } - public static string MainWaitPleaseWait { - get { return (string)(ResourceManager.GetObject("MainWaitPleaseWait", resourceCulture)); } - } - public static string MainWaitDone { - get { return (string)(ResourceManager.GetObject("MainWaitDone", resourceCulture)); } - } - - public static string ManageGameInstancesNotValid { - get { return (string)(ResourceManager.GetObject("ManageGameInstancesNotValid", resourceCulture)); } - } - - public static string ManageGameInstancesDirectoryDeleted { - get { return (string)(ResourceManager.GetObject("ManageGameInstancesDirectoryDeleted", resourceCulture)); } - } - - public static string ManageGameInstancesNameColumnInvalid { - get { return (string)(ResourceManager.GetObject("ManageGameInstancesNameColumnInvalid", resourceCulture)); } - } - public static string ManageGameInstancesNameColumnLocked { - get { return (string)(ResourceManager.GetObject("ManageGameInstancesNameColumnLocked", resourceCulture)); } - } - - public static string NewRepoDialogFailed { - get { return (string)(ResourceManager.GetObject("NewRepoDialogFailed", resourceCulture)); } - } - - public static string PluginsDialogFilter { - get { return (string)(ResourceManager.GetObject("PluginsDialogFilter", resourceCulture)); } - } - - public static string SettingsDialogSummmary { - get { return (string)(ResourceManager.GetObject("SettingsDialogSummmary", resourceCulture)); } - } - public static string SettingsDialogSummaryInvalid { - get { return (string)(ResourceManager.GetObject("SettingsDialogSummaryInvalid", resourceCulture)); } - } - public static string SettingsDialogCacheDescrip { - get { return (string)(ResourceManager.GetObject("SettingsDialogCacheDescrip", resourceCulture)); } - } - public static string SettingsDialogDeleteConfirm { - get { return (string)(ResourceManager.GetObject("SettingsDialogDeleteConfirm", resourceCulture)); } - } - public static string SettingsDialogRepoDeleteConfirm { - get { return (string)(ResourceManager.GetObject("SettingsDialogRepoDeleteConfirm", resourceCulture)); } - } - public static string SettingsDialogRepoDeleteDelete { - get { return (string)(ResourceManager.GetObject("SettingsDialogRepoDeleteDelete", resourceCulture)); } - } - public static string SettingsDialogRepoDeleteCancel { - get { return (string)(ResourceManager.GetObject("SettingsDialogRepoDeleteCancel", resourceCulture)); } - } - public static string SettingsDialogRepoAddDuplicateURL { - get { return (string)(ResourceManager.GetObject("SettingsDialogRepoAddDuplicateURL", resourceCulture)); } - } - public static string SettingsDialogUpdateFailed { - get { return (string)(ResourceManager.GetObject("SettingsDialogUpdateFailed", resourceCulture)); } - } - - public static string AddAuthTokenTitle { - get { return (string)(ResourceManager.GetObject("AddAuthTokenTitle", resourceCulture)); } - } - public static string AddAuthTokenHost { - get { return (string)(ResourceManager.GetObject("AddAuthTokenHost", resourceCulture)); } - } - public static string AddAuthTokenToken { - get { return (string)(ResourceManager.GetObject("AddAuthTokenToken", resourceCulture)); } - } - public static string AddAuthTokenAccept { - get { return (string)(ResourceManager.GetObject("AddAuthTokenAccept", resourceCulture)); } - } - public static string AddAuthTokenCancel { - get { return (string)(ResourceManager.GetObject("AddAuthTokenCancel", resourceCulture)); } - } - public static string AddAuthTokenHostRequired { - get { return (string)(ResourceManager.GetObject("AddAuthTokenHostRequired", resourceCulture)); } - } - public static string AddAuthTokenTokenRequired { - get { return (string)(ResourceManager.GetObject("AddAuthTokenTokenRequired", resourceCulture)); } - } - public static string AddAuthTokenInvalidHost { - get { return (string)(ResourceManager.GetObject("AddAuthTokenInvalidHost", resourceCulture)); } - } - public static string AddAuthTokenDupHost { - get { return (string)(ResourceManager.GetObject("AddAuthTokenDupHost", resourceCulture)); } - } - - public static string URLHandlersPrompt { - get { return (string)(ResourceManager.GetObject("URLHandlersPrompt", resourceCulture)); } - } - - public static string UtilCopyLink { - get { return (string)(ResourceManager.GetObject("UtilCopyLink", resourceCulture)); } - } - - public static string StatusInstanceLabelText { - get { return (string)(ResourceManager.GetObject("StatusInstanceLabelText", resourceCulture)); } - } - public static string StatusInstanceLabelTextWithPlayTime { - get { return (string)(ResourceManager.GetObject("StatusInstanceLabelTextWithPlayTime", resourceCulture)); } - } - public static string ModuleLabelListFavourites { - get { return (string)(ResourceManager.GetObject("ModuleLabelListFavourites", resourceCulture)); } - } - public static string ModuleLabelListHidden { - get { return (string)(ResourceManager.GetObject("ModuleLabelListHidden", resourceCulture)); } - } - public static string ModuleLabelListHeld { - get { return (string)(ResourceManager.GetObject("ModuleLabelListHeld", resourceCulture)); } - } - public static string ModuleLabelListGlobal { - get { return (string)(ResourceManager.GetObject("ModuleLabelListGlobal", resourceCulture)); } - } - public static string EditLabelsDialogConfirmDelete { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogConfirmDelete", resourceCulture)); } - } - public static string EditLabelsDialogSavePrompt { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogSavePrompt", resourceCulture)); } - } - public static string EditLabelsDialogNoRecord { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogNoRecord", resourceCulture)); } - } - public static string EditLabelsDialogNameRequired { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogNameRequired", resourceCulture)); } - } - public static string EditLabelsDialogAlreadyExists { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogAlreadyExists", resourceCulture)); } - } - public static string EditLabelsDialogDelete { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogDelete", resourceCulture)); } - } - public static string EditLabelsDialogCancel { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogCancel", resourceCulture)); } - } - public static string EditLabelsDialogSave { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogSave", resourceCulture)); } - } - public static string EditLabelsDialogDiscard { - get { return (string)(ResourceManager.GetObject("EditLabelsDialogDiscard", resourceCulture)); } - } - public static string MainChangesetWarningInstallingModuleWithLabel { - get { return (string)(ResourceManager.GetObject("MainChangesetWarningInstallingModuleWithLabel", resourceCulture)); } - } - public static string EditLabelsToolTipName { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipName", resourceCulture)); } - } - public static string EditLabelsToolTipColor { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipColor", resourceCulture)); } - } - public static string EditLabelsToolTipInstance { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipInstance", resourceCulture)); } - } - public static string EditLabelsToolTipHide { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipHide", resourceCulture)); } - } - public static string EditLabelsToolTipNotifyOnChanges { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipNotifyOnChanges", resourceCulture)); } - } - public static string EditLabelsToolTipRemoveOnChanges { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipRemoveOnChanges", resourceCulture)); } - } - public static string EditLabelsToolTipAlertOnInstall { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipAlertOnInstall", resourceCulture)); } - } - public static string EditLabelsToolTipRemoveOnInstall { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipRemoveOnInstall", resourceCulture)); } - } - public static string EditLabelsToolTipHoldVersion { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipHoldVersion", resourceCulture)); } - } - public static string EditLabelsToolTipMoveUp { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipMoveUp", resourceCulture)); } - } - public static string EditLabelsToolTipMoveDown { - get { return (string)(ResourceManager.GetObject("EditLabelsToolTipMoveDown", resourceCulture)); } - } - public static string MainLabelsUpdateMessage { - get { return (string)(ResourceManager.GetObject("MainLabelsUpdateMessage", resourceCulture)); } - } - public static string MainLabelsUpdateTitle { - get { return (string)(ResourceManager.GetObject("MainLabelsUpdateTitle", resourceCulture)); } - } - public static string MainLabelsUntagged { - get { return (string)(ResourceManager.GetObject("MainLabelsUntagged", resourceCulture)); } - } - - public static string EditModpackBadIdentifier { - get { return (string)(ResourceManager.GetObject("EditModpackBadIdentifier", resourceCulture)); } - } - public static string EditModpackBadName { - get { return (string)(ResourceManager.GetObject("EditModpackBadName", resourceCulture)); } - } - public static string EditModpackBadVersion { - get { return (string)(ResourceManager.GetObject("EditModpackBadVersion", resourceCulture)); } - } - public static string EditModpackBadGameVersions { - get { return (string)(ResourceManager.GetObject("EditModpackBadGameVersions", resourceCulture)); } - } - public static string EditModpackTooltipIdentifier { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipIdentifier", resourceCulture)); } - } - public static string EditModpackTooltipName { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipName", resourceCulture)); } - } - public static string EditModpackTooltipAbstract { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipAbstract", resourceCulture)); } - } - public static string EditModpackTooltipVersion { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipVersion", resourceCulture)); } - } - public static string EditModpackTooltipGameVersionMin { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipGameVersionMin", resourceCulture)); } - } - public static string EditModpackTooltipGameVersionMax { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipGameVersionMax", resourceCulture)); } - } - public static string EditModpackTooltipLicense { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipLicense", resourceCulture)); } - } - public static string EditModpackTooltipIncludeVersions { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipIncludeVersions", resourceCulture)); } - } - public static string EditModpackTooltipDepends { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipDepends", resourceCulture)); } - } - public static string EditModpackTooltipRecommends { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipRecommends", resourceCulture)); } - } - public static string EditModpackTooltipSuggests { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipSuggests", resourceCulture)); } - } - public static string EditModpackTooltipIgnore { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipIgnore", resourceCulture)); } - } - public static string EditModpackTooltipCancel { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipCancel", resourceCulture)); } - } - public static string EditModpackTooltipExport { - get { return (string)(ResourceManager.GetObject("EditModpackTooltipExport", resourceCulture)); } - } - - public static string TriStateToggleYesTooltip { - get { return (string)(ResourceManager.GetObject("TriStateToggleYesTooltip", resourceCulture)); } - } - public static string TriStateToggleBothTooltip { - get { return (string)(ResourceManager.GetObject("TriStateToggleBothTooltip", resourceCulture)); } - } - public static string TriStateToggleNoTooltip { - get { return (string)(ResourceManager.GetObject("TriStateToggleNoTooltip", resourceCulture)); } - } - - public static string ModSearchDescriptionPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchDescriptionPrefix", resourceCulture)); } - } - public static string ModSearchLanguagePrefix { - get { return (string)(ResourceManager.GetObject("ModSearchLanguagePrefix", resourceCulture)); } - } - public static string ModSearchDependsPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchDependsPrefix", resourceCulture)); } - } - public static string ModSearchRecommendsPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchRecommendsPrefix", resourceCulture)); } - } - public static string ModSearchSuggestsPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchSuggestsPrefix", resourceCulture)); } - } - public static string ModSearchConflictsPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchConflictsPrefix", resourceCulture)); } - } - public static string ModSearchTagPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchTagPrefix", resourceCulture)); } - } - public static string ModSearchLabelPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchLabelPrefix", resourceCulture)); } - } - public static string ModSearchYesPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchYesPrefix", resourceCulture)); } - } - public static string ModSearchNoPrefix { - get { return (string)(ResourceManager.GetObject("ModSearchNoPrefix", resourceCulture)); } - } - public static string ModSearchCompatibleSuffix { - get { return (string)(ResourceManager.GetObject("ModSearchCompatibleSuffix", resourceCulture)); } - } - public static string ModSearchInstalledSuffix { - get { return (string)(ResourceManager.GetObject("ModSearchInstalledSuffix", resourceCulture)); } - } - public static string ModSearchCachedSuffix { - get { return (string)(ResourceManager.GetObject("ModSearchCachedSuffix", resourceCulture)); } - } - public static string ModSearchNewlyCompatibleSuffix { - get { return (string)(ResourceManager.GetObject("ModSearchNewlyCompatibleSuffix", resourceCulture)); } - } - public static string ModSearchUpgradeableSuffix { - get { return (string)(ResourceManager.GetObject("ModSearchUpgradeableSuffix", resourceCulture)); } - } - public static string ModSearchReplaceableSuffix { - get { return (string)(ResourceManager.GetObject("ModSearchReplaceableSuffix", resourceCulture)); } - } - public static string EditModSearchTooltipExpandButton { - get { return (string)(ResourceManager.GetObject("EditModSearchTooltipExpandButton", resourceCulture)); } - } - public static string EditModSearchesTooltipAddSearchButton { - get { return (string)(ResourceManager.GetObject("EditModSearchesTooltipAddSearchButton", resourceCulture)); } - } - - public static string ManageModsInstallAllCheckboxTooltip { - get { return (string)(ResourceManager.GetObject("ManageModsInstallAllCheckboxTooltip", resourceCulture)); } - } - - public static string TotalPlayTime { - get { return (string)(ResourceManager.GetObject("TotalPlayTime", resourceCulture)); } - } - - public static string ChangeTypeNone { - get { return (string)(ResourceManager.GetObject("ChangeTypeNone", resourceCulture)); } - } - public static string ChangeTypeInstall { - get { return (string)(ResourceManager.GetObject("ChangeTypeInstall", resourceCulture)); } - } - public static string ChangeTypeRemove { - get { return (string)(ResourceManager.GetObject("ChangeTypeRemove", resourceCulture)); } - } - public static string ChangeTypeUpdate { - get { return (string)(ResourceManager.GetObject("ChangeTypeUpdate", resourceCulture)); } - } - public static string ChangeTypeReplace { - get { return (string)(ResourceManager.GetObject("ChangeTypeReplace", resourceCulture)); } - } - - public static string ModDownloadsFailedMessage { - get { return (string)(ResourceManager.GetObject("ModDownloadsFailedMessage", resourceCulture)); } - } - public static string ModDownloadsFailedColHdr { - get { return (string)(ResourceManager.GetObject("ModDownloadsFailedColHdr", resourceCulture)); } - } - public static string ModDownloadsFailedAbortBtn { - get { return (string)(ResourceManager.GetObject("ModDownloadsFailedAbortBtn", resourceCulture)); } - } - - public static string RepoDownloadsFailedMessage { - get { return (string)(ResourceManager.GetObject("RepoDownloadsFailedMessage", resourceCulture)); } - } - public static string RepoDownloadsFailedColHdr { - get { return (string)(ResourceManager.GetObject("RepoDownloadsFailedColHdr", resourceCulture)); } - } - public static string RepoDownloadsFailedAbortBtn { - get { return (string)(ResourceManager.GetObject("RepoDownloadsFailedAbortBtn", resourceCulture)); } - } - - public static string RelationshipTypeProvides { - get { return (string)(ResourceManager.GetObject("RelationshipTypeProvides", resourceCulture)); } - } - public static string RelationshipTypeDepends { - get { return (string)(ResourceManager.GetObject("RelationshipTypeDepends", resourceCulture)); } - } - public static string RelationshipTypeRecommends { - get { return (string)(ResourceManager.GetObject("RelationshipTypeRecommends", resourceCulture)); } - } - public static string RelationshipTypeSuggests { - get { return (string)(ResourceManager.GetObject("RelationshipTypeSuggests", resourceCulture)); } - } - public static string RelationshipTypeSupports { - get { return (string)(ResourceManager.GetObject("RelationshipTypeSupports", resourceCulture)); } - } - public static string RelationshipTypeConflicts { - get { return (string)(ResourceManager.GetObject("RelationshipTypeConflicts", resourceCulture)); } - } - - public static string AuthorSearchName { - get { return (string)(ResourceManager.GetObject("AuthorSearchName", resourceCulture)); } - } - public static string FilterLinkToolTip { - get { return (string)(ResourceManager.GetObject("FilterLinkToolTip", resourceCulture)); } - } - - public static string FolderContainsManagedFiles { - get { return (string)(ResourceManager.GetObject("FolderContainsManagedFiles", resourceCulture)); } - } - public static string DeleteUnmanagedFileConfirmation { - get { return (string)(ResourceManager.GetObject("DeleteUnmanagedFileConfirmation", resourceCulture)); } - } - public static string DeleteUnmanagedFileDelete { - get { return (string)(ResourceManager.GetObject("DeleteUnmanagedFileDelete", resourceCulture)); } - } - public static string DeleteUnmanagedFileCancel { - get { return (string)(ResourceManager.GetObject("DeleteUnmanagedFileCancel", resourceCulture)); } - } - - public static string PreferredHostsPlaceholder { - get { return (string)(ResourceManager.GetObject("PreferredHostsPlaceholder", resourceCulture)); } - } - public static string PreferredHostsTooltipMoveRight { - get { return (string)(ResourceManager.GetObject("PreferredHostsTooltipMoveRight", resourceCulture)); } - } - public static string PreferredHostsTooltipMoveLeft { - get { return (string)(ResourceManager.GetObject("PreferredHostsTooltipMoveLeft", resourceCulture)); } - } - public static string PreferredHostsTooltipMoveUp { - get { return (string)(ResourceManager.GetObject("PreferredHostsTooltipMoveUp", resourceCulture)); } - } - public static string PreferredHostsTooltipMoveDown { - get { return (string)(ResourceManager.GetObject("PreferredHostsTooltipMoveDown", resourceCulture)); } - } - } -} diff --git a/GUI/Properties/Resources.resx b/GUI/Properties/Resources.resx index de07969f52..aafbbf3c48 100644 --- a/GUI/Properties/Resources.resx +++ b/GUI/Properties/Resources.resx @@ -119,34 +119,6 @@ - ..\..\assets\ckan.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\apply.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\ksp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\stop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\ballot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\update.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\backward.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\filter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\expandAll.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\collapseAll.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\resetCollapse.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\forward.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\textClear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\thumbup.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\smile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\alert.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\folderZip.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\file.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\triToggleYes.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\triToggleNo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\triToggleBoth.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a CKAN metadata (*.ckan)|*.ckan Export Mod List Version {0} diff --git a/GUI/SingleAssemblyResourceManager.cs b/GUI/SingleAssemblyResourceManager.cs index 1f3b4c6709..9781d4aa14 100644 --- a/GUI/SingleAssemblyResourceManager.cs +++ b/GUI/SingleAssemblyResourceManager.cs @@ -10,7 +10,8 @@ namespace CKAN.GUI public class SingleAssemblyResourceManager : ResourceManager { - public SingleAssemblyResourceManager(string basename, Assembly assembly) : base(basename, assembly) + public SingleAssemblyResourceManager(string basename, Assembly assembly) + : base(basename, assembly) { } diff --git a/GUI/TabController.cs b/GUI/TabController.cs index bf8f3f56b1..e06f75ba72 100644 --- a/GUI/TabController.cs +++ b/GUI/TabController.cs @@ -2,10 +2,16 @@ using System.Windows.Forms; using System.Threading.Tasks; using System.Threading; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public class TabController { diff --git a/GUI/URLHandlers.cs b/GUI/URLHandlers.cs index 515528ba89..f92f78a1bf 100644 --- a/GUI/URLHandlers.cs +++ b/GUI/URLHandlers.cs @@ -3,6 +3,9 @@ using System.IO; using System.Reflection; using Microsoft.Win32; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using IniParser; using IniParser.Exceptions; @@ -11,6 +14,9 @@ namespace CKAN.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public static class URLHandlers { private static readonly ILog log = LogManager.GetLogger(typeof(URLHandlers)); @@ -95,6 +101,9 @@ public static void RegisterURLHandler(GUIConfiguration config, IUser user) } } + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif private static void RegisterURLHandler_Win32() { log.InfoFormat("Adding URL handler to registry"); @@ -130,6 +139,9 @@ private static void RegisterURLHandler_Win32() .SetValue("", urlCmd); } + #if NET5_0_OR_GREATER + [SupportedOSPlatform("linux")] + #endif private static void RegisterURLHandler_Linux() { var parser = new FileIniDataParser(); diff --git a/GUI/Util.cs b/GUI/Util.cs index 53c094256a..f90c593d64 100644 --- a/GUI/Util.cs +++ b/GUI/Util.cs @@ -5,12 +5,17 @@ using System.Runtime.InteropServices; using System.Windows.Forms; using Timer = System.Windows.Forms.Timer; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using log4net; namespace CKAN.GUI { - + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif public static class Util { /// diff --git a/Netkan/CKAN-netkan.csproj b/Netkan/CKAN-netkan.csproj index 8706031022..ea5bc06ffd 100644 --- a/Netkan/CKAN-netkan.csproj +++ b/Netkan/CKAN-netkan.csproj @@ -1,9 +1,10 @@ CKAN-NetKAN - ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ - ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ - ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ + ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\obj\ @@ -13,13 +14,12 @@ false true true - Debug;Release + Debug;Release;NoGUI false 7.3 - net48 CKAN.NetKAN.Program ..\assets\ckan.ico - v4.8 + net48;net7.0 512 prompt 4 @@ -36,7 +36,7 @@ - + @@ -44,6 +44,7 @@ + TargetFramework=$(TargetFramework) {3B9AEA22-FA3B-4E43-9283-EABDD81CF271} CKAN-core @@ -60,8 +61,11 @@ - - - + + + diff --git a/Netkan/Processors/QueueHandler.cs b/Netkan/Processors/QueueHandler.cs index dda2ac6b29..d63233c261 100644 --- a/Netkan/Processors/QueueHandler.cs +++ b/Netkan/Processors/QueueHandler.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Text; + using Amazon.SQS; using Amazon.SQS.Model; using log4net; @@ -72,19 +73,19 @@ private QueueAppender GetQueueLogAppender() private string getQueueUrl(string name) { log.DebugFormat("Looking up URL for queue {0}", name); - return client.GetQueueUrl(new GetQueueUrlRequest() { QueueName = name }).QueueUrl; + return client.GetQueueUrlAsync(new GetQueueUrlRequest() { QueueName = name }).Result.QueueUrl; } private void handleMessages(string url, int howMany, int timeoutMinutes) { log.DebugFormat("Looking for messages from {0}", url); - var resp = client.ReceiveMessage(new ReceiveMessageRequest() + var resp = client.ReceiveMessageAsync(new ReceiveMessageRequest() { QueueUrl = url, MaxNumberOfMessages = howMany, VisibilityTimeout = (int)TimeSpan.FromMinutes(timeoutMinutes).TotalSeconds, MessageAttributeNames = new List() { "All" }, - }); + }).Result; if (!resp.Messages.Any()) { log.Debug("No metadata in queue"); @@ -99,7 +100,7 @@ private void handleMessages(string url, int howMany, int timeoutMinutes) var responses = resp.Messages.SelectMany(Inflate).ToList(); for (int i = 0; i < responses.Count; i += howMany) { - client.SendMessageBatch(new SendMessageBatchRequest() + client.SendMessageBatchAsync(new SendMessageBatchRequest() { QueueUrl = outputQueueURL, Entries = responses.GetRange(i, Math.Min(howMany, responses.Count - i)), @@ -113,7 +114,7 @@ private void handleMessages(string url, int howMany, int timeoutMinutes) try { log.Debug("Deleting messages"); - client.DeleteMessageBatch(new DeleteMessageBatchRequest() + client.DeleteMessageBatchAsync(new DeleteMessageBatchRequest() { QueueUrl = url, Entries = resp.Messages.Select(Delete).ToList(), diff --git a/Netkan/Sources/Curse/CurseApi.cs b/Netkan/Sources/Curse/CurseApi.cs index bd826bcf05..bfcb8d820d 100755 --- a/Netkan/Sources/Curse/CurseApi.cs +++ b/Netkan/Sources/Curse/CurseApi.cs @@ -45,50 +45,6 @@ public CurseMod GetMod(string nameOrId) return CurseMod.FromJson(json); } - public static Uri ResolveRedirect(Uri url) - { - Uri redirUrl = url; - int redirects = 0; - HttpWebRequest request = (HttpWebRequest) WebRequest.Create(redirUrl); - request.AllowAutoRedirect = false; - request.UserAgent = Net.UserAgentString; - - HttpWebResponse response; - try - { - response = (HttpWebResponse) request.GetResponse(); - } - catch (WebException e) - { - if (e.Status == WebExceptionStatus.ProtocolError) - { - response = e.Response as HttpWebResponse; - if (response?.StatusCode == HttpStatusCode.Forbidden) - { - throw new Kraken("CKAN blocked by CurseForge"); - } - } - throw; - } - response.Close(); - while (response.Headers["Location"] != null) - { - redirects++; - if (redirects > 6) - { - throw new Kraken("More than 6 redirects when resolving the following url: " + url); - } - - redirUrl = new Uri(redirUrl, response.Headers["Location"]); - request = (HttpWebRequest) WebRequest.Create(redirUrl); - request.AllowAutoRedirect = false; - request.UserAgent = Net.UserAgentString; - response = (HttpWebResponse) request.GetResponse(); - response.Close(); - } - return redirUrl; - } - private string Call(string nameOrId) { // If it's numeric, use the old URL format, diff --git a/Netkan/Sources/Curse/CurseFile.cs b/Netkan/Sources/Curse/CurseFile.cs index 0eeacc8558..bc7a52ba72 100755 --- a/Netkan/Sources/Curse/CurseFile.cs +++ b/Netkan/Sources/Curse/CurseFile.cs @@ -36,7 +36,12 @@ public string GetDownloadUrl() { if (string.IsNullOrWhiteSpace(_downloadUrl)) { - _downloadUrl = CurseApi.ResolveRedirect(new Uri(url + "/file")).ToString(); + var resolved = Net.ResolveRedirect(new Uri(url + "/file")); + if (resolved == null) + { + throw new Kraken($"Too many redirects resolving: {url}/file"); + } + _downloadUrl = resolved.ToString(); } return _downloadUrl; } diff --git a/Netkan/Sources/Curse/CurseMod.cs b/Netkan/Sources/Curse/CurseMod.cs index 3d137a4018..f880e11c64 100755 --- a/Netkan/Sources/Curse/CurseMod.cs +++ b/Netkan/Sources/Curse/CurseMod.cs @@ -49,7 +49,13 @@ public string GetPageUrl() { if (_pageUrl == null) { - _pageUrl = new Uri(Regex.Replace(CurseApi.ResolveRedirect(new Uri(GetProjectUrl())).ToString(), "\\?.*$", "")).ToString(); + var url = new Uri(GetProjectUrl()); + var resolved = Net.ResolveRedirect(url); + if (resolved == null) + { + throw new Kraken($"Too many redirects resolving: {url}"); + } + _pageUrl = new Uri(Regex.Replace(resolved.ToString(), "\\?.*$", "")).ToString(); } return _pageUrl; } diff --git a/Netkan/Transformers/CurseTransformer.cs b/Netkan/Transformers/CurseTransformer.cs index 6b96949ab0..50b61d5714 100755 --- a/Netkan/Transformers/CurseTransformer.cs +++ b/Netkan/Transformers/CurseTransformer.cs @@ -283,7 +283,7 @@ private static string Normalize(string uri) Log.DebugFormat("Escaping {0}", uri); - var escaped = Uri.EscapeUriString(uri); + var escaped = Uri.EscapeDataString(uri); // Square brackets are "reserved characters" that should not appear // in strings to begin with, so C# doesn't try to escape them in case diff --git a/Netkan/Transformers/JenkinsTransformer.cs b/Netkan/Transformers/JenkinsTransformer.cs index 2e8a3ff04a..c9a8b9d5c8 100644 --- a/Netkan/Transformers/JenkinsTransformer.cs +++ b/Netkan/Transformers/JenkinsTransformer.cs @@ -72,7 +72,7 @@ private Metadata TransformOne(Metadata metadata, JObject json, JenkinsBuild buil case 1: JenkinsArtifact artifact = artifacts.Single(); - string download = Uri.EscapeUriString( + string download = Uri.EscapeDataString( $"{build.Url}artifact/{artifact.RelativePath}" ); Log.DebugFormat("Using download URL: {0}", download); @@ -93,7 +93,7 @@ private Metadata TransformOne(Metadata metadata, JObject json, JenkinsBuild buil } var resourcesJson = (JObject)json["resources"]; - resourcesJson.SafeAdd("ci", Uri.EscapeUriString(metadata.Kref.Id)); + resourcesJson.SafeAdd("ci", Uri.EscapeDataString(metadata.Kref.Id)); Log.DebugFormat("Transformed metadata:{0}{1}", Environment.NewLine, json); diff --git a/Netkan/Transformers/SpacedockTransformer.cs b/Netkan/Transformers/SpacedockTransformer.cs index 1b58e86a7d..46972f275a 100644 --- a/Netkan/Transformers/SpacedockTransformer.cs +++ b/Netkan/Transformers/SpacedockTransformer.cs @@ -209,7 +209,7 @@ private static string Normalize(string uri) { Log.DebugFormat("Escaping {0}", uri); - var escaped = Uri.EscapeUriString(uri); + var escaped = Uri.EscapeDataString(uri); // Square brackets are "reserved characters" that should not appear // in strings to begin with, so C# doesn't try to escape them in case diff --git a/Netkan/app.config b/Netkan/app.config index bd9d7e75a7..b786595539 100644 --- a/Netkan/app.config +++ b/Netkan/app.config @@ -1,10 +1,10 @@ - + - \ No newline at end of file + diff --git a/Tests/Core/Repositories/ProgressFilesOffsetsToPercent.cs b/Tests/Core/Repositories/ProgressFilesOffsetsToPercent.cs index 8eba76fb0b..caed02082f 100644 --- a/Tests/Core/Repositories/ProgressFilesOffsetsToPercent.cs +++ b/Tests/Core/Repositories/ProgressFilesOffsetsToPercent.cs @@ -5,7 +5,9 @@ using NUnit.Framework; using CKAN; +#if NETFRAMEWORK using CKAN.Extensions; +#endif namespace Tests.Core.Repositories { diff --git a/Tests/GUI/Model/GUIMod.cs b/Tests/GUI/Model/GUIMod.cs index a32fb6c668..28aae0ef26 100644 --- a/Tests/GUI/Model/GUIMod.cs +++ b/Tests/GUI/Model/GUIMod.cs @@ -1,5 +1,8 @@ using System; using System.Linq; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using NUnit.Framework; @@ -12,6 +15,9 @@ namespace Tests.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif [TestFixture] public class GUIModTests { diff --git a/Tests/GUI/Model/ModList.cs b/Tests/GUI/Model/ModList.cs index 52575d3b67..3c17213adc 100644 --- a/Tests/GUI/Model/ModList.cs +++ b/Tests/GUI/Model/ModList.cs @@ -3,6 +3,9 @@ using System.Linq; using System.ComponentModel; using System.Windows.Forms; +#if NET5_0_OR_GREATER +using System.Runtime.Versioning; +#endif using NUnit.Framework; @@ -14,6 +17,9 @@ namespace Tests.GUI { + #if NET5_0_OR_GREATER + [SupportedOSPlatform("windows")] + #endif [TestFixture] public class ModListTests { diff --git a/Tests/NetKAN/Sources/Github/GithubApiTests.cs b/Tests/NetKAN/Sources/Github/GithubApiTests.cs index f493eac8f0..ef2a074e79 100644 --- a/Tests/NetKAN/Sources/Github/GithubApiTests.cs +++ b/Tests/NetKAN/Sources/Github/GithubApiTests.cs @@ -11,9 +11,9 @@ namespace Tests.NetKAN.Sources.Github [TestFixture] public sealed class GithubApiTests { - // Ironically, despite the fact that these run on travis-ci, which is strongly integrated - // to github, these sometimes cause test failures because github will throw random - // 403s. (Hence we disable them in travis with --exclude=FlakyNetwork) + // Ironically, despite the fact that these run in CI, which is strongly integrated + // with GitHub, these sometimes cause test failures because github will throw random + // 403s. (Hence we disable them in CI with --where="Category!=FlakyNetwork") private string _cachePath; private NetFileCache _cache; diff --git a/Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs b/Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs index 9d4c48ae22..1f8c478b61 100644 --- a/Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs +++ b/Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs @@ -1,9 +1,11 @@ using System; using System.IO; + +using NUnit.Framework; + using CKAN; using CKAN.NetKAN.Services; using CKAN.NetKAN.Sources.Spacedock; -using NUnit.Framework; namespace Tests.NetKAN.Sources.Spacedock { diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 841472a06d..ee48db95c3 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,9 +1,10 @@ CKAN.Tests - ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ - ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ - ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ + ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\obj\ @@ -14,33 +15,13 @@ true true true - Debug;Release;Debug_NetCore;Release_NetCore + Debug;Release;NoGUI false 7.3 IDE1006 - - - - - net7.0 - - - - - net48 - - - - - $(DefaultItemExcludes);NetKAN\**;CmdLine\**;ConsoleUI\**;GUI\**;AutoUpdate\** - - - true - portable - false - - - true + net48;net7.0;net7.0-windows + $(TargetFramework.Replace("-windows", "")) + $(DefaultItemExcludes);AutoUpdate\**;GUI\** @@ -49,8 +30,9 @@ - - + + + @@ -59,9 +41,6 @@ - - - Properties\GlobalAssemblyVersionInfo.cs @@ -71,27 +50,50 @@ - + + TargetFramework=$(BaseTargetFramework) + {3B9AEA22-FA3B-4E43-9283-EABDD81CF271} + CKAN-core + + + TargetFramework=$(TargetFramework) + {E97D81F6-85E2-4F1F-906D-BE21766602E5} + CKAN-CmdLine + + + TargetFramework=$(BaseTargetFramework) + {DA5C7023-9A3B-4204-AE2F-BBA6C388B436} + CKAN-ConsoleUI + + + TargetFramework=$(TargetFramework) + {A79F9D54-315C-472B-928F-713A5860B2BE} + CKAN-GUI + + + TargetFramework=$(TargetFramework) + {E5B1C768-349E-4DAF-A134-56E4ECF1EEEF} + CKAN-AutoUpdateHelper + + + TargetFramework=$(BaseTargetFramework) + {4336F356-33DB-442A-BF74-5E89AF47A5B9} + CKAN-NetKAN + - - - - - - - - - - - PreserveNewest - - - + + + diff --git a/build b/build index a4a8b19371..71aec17d04 100755 --- a/build +++ b/build @@ -19,7 +19,7 @@ if [ $# -gt 1 ]; then done fi -nugetVersion="5.6.0" +nugetVersion="6.8.0" useExperimental=false rootDir=$(dirname $0) scriptFile="$rootDir/build.cake" @@ -61,5 +61,5 @@ if $useExperimental; then fi export PATH="$PATH:$HOME/.dotnet/tools" -dotnet cake "$scriptFile" $cakeArgs $remainingArgs +dotnet cake --verbosity Minimal "$scriptFile" $cakeArgs $remainingArgs exit $? diff --git a/build.cake b/build.cake index 93178cf425..1c349f709f 100644 --- a/build.cake +++ b/build.cake @@ -7,47 +7,42 @@ using System.Text.RegularExpressions; using Semver; -var buildNetCore = "net7.0"; var buildNetFramework = "net48"; var target = Argument("target", "Default"); var configuration = Argument("configuration", "Debug"); -var buildFramework = configuration.EndsWith("NetCore") ? buildNetCore : buildNetFramework; var solution = Argument("solution", "CKAN.sln"); var rootDirectory = Context.Environment.WorkingDirectory; var buildDirectory = rootDirectory.Combine("_build"); var outDirectory = buildDirectory.Combine("out"); var repackDirectory = buildDirectory.Combine("repack"); -var ckanFile = repackDirectory.Combine(configuration).CombineWithFilePath("ckan.exe"); -var netkanFile = repackDirectory.Combine(configuration).CombineWithFilePath("netkan.exe"); +var ckanFile = repackDirectory.Combine(configuration) + .CombineWithFilePath("ckan.exe"); +var netkanFile = repackDirectory.Combine(configuration) + .CombineWithFilePath("netkan.exe"); Task("Default") - .Description("Build ckan.exe and netkan.exe, if not specified otherwise in Debug configuration for .NET Framework.") + .Description("Build ckan.exe and netkan.exe") .IsDependentOn("Ckan") .IsDependentOn("Netkan"); Task("Debug") - .Description("Build ckan.exe and netkan.exe in Debug configuration, if not specified otherwise for .NET Framework.") + .Description("Build ckan.exe and netkan.exe in Debug configuration") .IsDependentOn("Default"); Task("Release") - .Description("Build ckan.exe and netkan.exe in Release configuration, if not specified otherwise for .NET Framework.") + .Description("Build ckan.exe and netkan.exe in Release configuration") .IsDependentOn("Default"); Task("Ckan") - .Description("Build only ckan.exe, if not specified otherwise in Debug configuration for .NET Framework.") - .IsDependentOn("Repack-Ckan") - .IsDependentOn("Build-DotNetCore"); + .Description("Build only ckan.exe") + .IsDependentOn("Repack-Ckan"); Task("Netkan") - .Description("Build only netkan.exe, if not specified otherwise in Debug configuration for .NET Framework.") + .Description("Build only netkan.exe") .IsDependentOn("Repack-Netkan"); -Task("DLL") - .Description("Build only ckan.dll (CKAN-Core) for .NET Core.") - .IsDependentOn("Build-DotNetCore"); - Task("docker-inflator") .Description("Build the Docker image for the Inflator and push it to Dockerhub.") .IsDependentOn("Repack-Netkan") @@ -67,10 +62,10 @@ Task("docker-inflator") DockerBuild( new DockerImageBuildSettings() { - File = dockerFile.ToString(), + File = dockerFile.FullPath, Tag = new string[] { mainTag } }, - inflatorDirectory.ToString() + inflatorDirectory.FullPath ); DockerTag(mainTag, latestTag); DockerPush(latestTag); @@ -119,10 +114,10 @@ Task("docker-metadata") DockerBuild( new DockerImageBuildSettings() { - File = dockerFile.ToString(), + File = dockerFile.FullPath, Tag = new string[] { mainTag } }, - metadataDirectory.ToString() + metadataDirectory.FullPath ); DockerTag(mainTag, latestTag); DockerPush(latestTag); @@ -188,51 +183,76 @@ private void MakeIn(string dir, string args = null) } } -Task("Restore-Nuget") - .Description("Intermediate - Download dependencies with NuGet when building for .NET Framework.") - .WithCriteria(() => buildFramework == buildNetFramework) - .Does(() => -{ - NuGetRestore(solution, new NuGetRestoreSettings - { - ConfigFile = "nuget.config", - EnvironmentVariables = new Dictionary { { "Configuration", configuration } } - }); -}); - -Task("Build-DotNet") - .Description("Intermediate - Call MSBuild to build the CKAN.sln.") - .IsDependentOn("Restore-Nuget") - .IsDependentOn("Generate-GlobalAssemblyVersionInfo") - .WithCriteria(() => buildFramework == buildNetFramework) - .Does(() => MSBuild(solution, - settings => settings.SetConfiguration(configuration))); - -Task("Restore-DotNetCore") - .Description("Intermediate - Download dependencies with NuGet when building for .NET Core.") - .WithCriteria(() => buildFramework == buildNetCore) +Task("Restore") + .Description("Intermediate - Download dependencies") .Does(() => -{ - DotNetRestore(solution, new DotNetRestoreSettings { - ConfigFile = "nuget.config", - EnvironmentVariables = new Dictionary { { "Configuration", configuration } } + var nugetDirectory = buildDirectory.Combine("lib") + .Combine("nuget"); + if (IsRunningOnWindows()) + { + DotNetRestore(solution, new DotNetRestoreSettings + { + PackagesDirectory = nugetDirectory, + EnvironmentVariables = new Dictionary { { "Configuration", configuration } }, + }); + } + else + { + // NuGet is confused by multi-targeting, and + // Mono has no idea what "net7.0" is. Only restore for buildNetFramework. + DotNetRestore(solution, new DotNetRestoreSettings + { + PackagesDirectory = nugetDirectory, + EnvironmentVariables = new Dictionary { { "Configuration", configuration } }, + MSBuildSettings = new DotNetMSBuildSettings() + .SetConfiguration(configuration) + .WithProperty("TargetFramework", + buildNetFramework), + }); + DotNetRestore(solution, new DotNetRestoreSettings + { + PackagesDirectory = nugetDirectory, + EnvironmentVariables = new Dictionary { { "Configuration", "NoGUI" } }, + MSBuildSettings = new DotNetMSBuildSettings() + .SetConfiguration("NoGUI") + .WithProperty("TargetFramework", + "net7.0"), + }); + } }); -}); -Task("Build-DotNetCore") - .Description("Intermediate - Call .NET Core's MSBuild to build the ckan.dll.") - .IsDependentOn("Restore-DotNetCore") +Task("Build") + .Description("Intermediate - Build everything") + .IsDependentOn("Restore") .IsDependentOn("Generate-GlobalAssemblyVersionInfo") - .WithCriteria(() => buildFramework == buildNetCore) .Does(() => -{ - DotNetBuild(solution, new DotNetBuildSettings { - Configuration = configuration, - NoRestore = true + // dotnet build won't let us compile WinForms on non-Windows, + // fall back to mono + if (IsRunningOnWindows()) + { + DotNetBuild(solution, new DotNetBuildSettings + { + Configuration = configuration, + NoRestore = true, + }); + } + else + { + // Mono has no idea what "net7.0" is + MSBuild(solution, + settings => settings.SetConfiguration(configuration) + .WithProperty("TargetFramework", + buildNetFramework)); + DotNetBuild(solution, new DotNetBuildSettings + { + Configuration = "NoGUI", + NoRestore = true, + Framework = "net7.0", + }); + } }); -}); Task("Generate-GlobalAssemblyVersionInfo") .Description("Intermediate - Calculate the version strings for the assembly.") @@ -256,42 +276,62 @@ Task("Generate-GlobalAssemblyVersionInfo") Task("Repack-Ckan") .Description("Intermediate - Merge all the separate DLLs and EXEs to a single executable.") - .WithCriteria(() => buildFramework == buildNetFramework) - .IsDependentOn("Build-DotNet") + .IsDependentOn("Build") .Does(() => { - var cmdLineBinDirectory = outDirectory.Combine("CKAN-CmdLine").Combine(configuration).Combine("bin").Combine(buildNetFramework); + CreateDirectory(repackDirectory.Combine(configuration)); + var cmdLineBinDirectory = outDirectory.Combine("CKAN-CmdLine") + .Combine(configuration) + .Combine("bin") + .Combine(buildNetFramework); var assemblyPaths = GetFiles(string.Format("{0}/*.dll", cmdLineBinDirectory)); assemblyPaths.Add(cmdLineBinDirectory.CombineWithFilePath("CKAN-GUI.exe")); assemblyPaths.Add(cmdLineBinDirectory.CombineWithFilePath("CKAN-ConsoleUI.exe")); assemblyPaths.Add(GetFiles(string.Format( "{0}/*/*.resources.dll", - outDirectory.Combine("CKAN-CmdLine").Combine(configuration).Combine("bin").Combine(buildNetFramework) - ))); + outDirectory.Combine("CKAN-CmdLine") + .Combine(configuration) + .Combine("bin") + .Combine(buildNetFramework)))); + var ckanLogFile = repackDirectory.Combine(configuration) + .CombineWithFilePath($"ckan.log"); + ReportRepacking(ckanFile, ckanLogFile); ILRepack( ckanFile, cmdLineBinDirectory.CombineWithFilePath("CKAN-CmdLine.exe"), assemblyPaths, new ILRepackSettings { - Libs = new List { cmdLineBinDirectory.ToString() }, - TargetPlatform = TargetPlatformVersion.v4 + Libs = new List { cmdLineBinDirectory.FullPath }, + TargetPlatform = TargetPlatformVersion.v4, + Parallel = true, + Verbose = false, + SetupProcessSettings = RepackSilently, + Log = ckanLogFile.FullPath, }); var autoupdateBinDirectory = outDirectory.Combine("CKAN-AutoUpdateHelper") .Combine(configuration) .Combine("bin") .Combine(buildNetFramework); + var updaterFile = repackDirectory.Combine(configuration) + .CombineWithFilePath("AutoUpdater.exe"); + var updaterLogFile = repackDirectory.Combine(configuration) + .CombineWithFilePath($"AutoUpdater.log"); + ReportRepacking(updaterFile, updaterLogFile); ILRepack( - repackDirectory.Combine(configuration) - .CombineWithFilePath("AutoUpdater.exe"), + updaterFile, autoupdateBinDirectory.CombineWithFilePath("CKAN-AutoUpdateHelper.exe"), GetFiles(string.Format("{0}/*/*.resources.dll", autoupdateBinDirectory)), new ILRepackSettings { - Libs = new List { autoupdateBinDirectory.ToString() }, - TargetPlatform = TargetPlatformVersion.v4 + Libs = new List { autoupdateBinDirectory.FullPath }, + TargetPlatform = TargetPlatformVersion.v4, + Parallel = true, + Verbose = false, + SetupProcessSettings = RepackSilently, + Log = updaterLogFile.FullPath, }); CopyFile(ckanFile, buildDirectory.CombineWithFilePath("ckan.exe")); @@ -299,89 +339,72 @@ Task("Repack-Ckan") Task("Repack-Netkan") .Description("Intermediate - Merge all the separate DLLs and EXEs to a single executable.") - .WithCriteria(() => buildFramework == buildNetFramework) - .IsDependentOn("Build-DotNet") + .IsDependentOn("Build") .Does(() => { - var netkanBinDirectory = outDirectory.Combine("CKAN-NetKAN").Combine(configuration).Combine("bin").Combine(buildNetFramework); - var assemblyPaths = GetFiles(string.Format("{0}/*.dll", netkanBinDirectory)); - - ILRepack(netkanFile, netkanBinDirectory.CombineWithFilePath("CKAN-NetKAN.exe"), assemblyPaths, + CreateDirectory(repackDirectory.Combine(configuration)); + var netkanBinDirectory = outDirectory.Combine("CKAN-NetKAN") + .Combine(configuration) + .Combine("bin") + .Combine(buildNetFramework); + var netkanLogFile = repackDirectory.Combine(configuration) + .CombineWithFilePath($"netkan.log"); + ReportRepacking(netkanFile, netkanLogFile); + ILRepack( + netkanFile, + netkanBinDirectory.CombineWithFilePath("CKAN-NetKAN.exe"), + GetFiles(string.Format("{0}/*.dll", + netkanBinDirectory)), new ILRepackSettings { - Libs = new List { netkanBinDirectory.ToString() }, - TargetPlatform = TargetPlatformVersion.v4 + Libs = new List { netkanBinDirectory.FullPath }, + TargetPlatform = TargetPlatformVersion.v4, + Parallel = true, + Verbose = false, + SetupProcessSettings = RepackSilently, + Log = netkanLogFile.FullPath, } ); CopyFile(netkanFile, buildDirectory.CombineWithFilePath("netkan.exe")); }); +private void ReportRepacking(FilePath target, FilePath log) +{ + // ILRepack is extremly noisy by default and has no options to + // make it quieter other than shutting it up completely. + // + using (NormalVerbosity()) + { + Information("Repacking {0}, logging details to {1}...", + rootDirectory.GetRelativePath(target), + rootDirectory.GetRelativePath(log)); + } +} + +private void RepackSilently(ProcessSettings settings) + => settings.SetRedirectStandardOutput(true) + .SetRedirectedStandardOutputHandler(s => "") + .SetRedirectStandardError(true) + .SetRedirectedStandardErrorHandler(s => ""); + Task("Test") - .Description("Run CKANs tests after compilation.") + .Description("Run tests after compilation.") .IsDependentOn("Default") .IsDependentOn("Test+Only"); Task("Test+Only") - .Description("Only run CKANs tests, without compiling beforehand.") - .IsDependentOn("Test-UnitTests+Only") - .IsDependentOn("Test-Executables+Only"); - -Task("Test-UnitTests+Only") - .Description("Intermediate - Only run CKANs unit tests, without compiling beforehand.") - .IsDependentOn("Test-UnitTests+Only-DotNetCore") - .WithCriteria(() => buildFramework == buildNetFramework) - .Does(() => -{ - var where = Argument("where", null); - - var testFile = outDirectory - .Combine("CKAN.Tests") - .Combine(configuration) - .Combine("bin") - .Combine(buildFramework) - .CombineWithFilePath("CKAN.Tests.dll"); - - if (!FileExists(testFile)) - throw new Exception("Test assembly not found: " + testFile); - - var nunitOutputDirectory = buildDirectory.Combine("test/nunit"); - - CreateDirectory(nunitOutputDirectory); - - NUnit3(testFile.FullPath, new NUnit3Settings { - Where = where, - Work = nunitOutputDirectory - }); -}); - -Task("Test-UnitTests+Only-DotNetCore") - .Description("Intermediate - Only run CKANs unit tests using DotNetCoreTest, without compiling beforehand.") - .WithCriteria(() => buildFramework == buildNetCore) - .Does(() => -{ - var where = Argument("where", null); - - var nunitOutputDirectory = buildDirectory.Combine("test/nunit"); - - CreateDirectory(nunitOutputDirectory); - - DotNetTest(solution, new DotNetTestSettings { - NoBuild = true, - Configuration= configuration, - ResultsDirectory = nunitOutputDirectory, - Filter = where - }); -}); + .Description("Run tests without compiling.") + .IsDependentOn("Test-Executables+Only") + .IsDependentOn("Test-UnitTests+Only"); Task("Test-Executables+Only") - .Description("Intermediate - Only test CKANs executables, without compiling them beforhand.") + .Description("Intermediate - Test executables without compiling.") .IsDependentOn("Test-CkanExecutable+Only") .IsDependentOn("Test-NetkanExecutable+Only"); Task("Test-CkanExecutable+Only") - .Description("Intermediate - Only test the ckan.exe, without compiling beforhand.") - .WithCriteria(() => buildFramework == buildNetFramework) + .Description("Intermediate - Test ckan.exe without compiling.") .Does(() => { var output = RunExecutable(ckanFile, "version").FirstOrDefault(); @@ -392,8 +415,7 @@ Task("Test-CkanExecutable+Only") }); Task("Test-NetkanExecutable+Only") - .Description("Intermediate - Only test the netkan.exe, without compiling beforhand.") - .WithCriteria(() => buildFramework == buildNetFramework) + .Description("Intermediate - Test netkan.exe without compiling.") .Does(() => { var output = RunExecutable(netkanFile, "--version").FirstOrDefault(); @@ -403,11 +425,61 @@ Task("Test-NetkanExecutable+Only") } }); +Task("Test-UnitTests+Only") + .Description("Intermediate - Run unit tests without compiling.") + .Does(() => +{ + var where = Argument("where", null); + var nunitOutputDirectory = buildDirectory.Combine("test") + .Combine("nunit"); + CreateDirectory(nunitOutputDirectory); + // Only Mono's msbuild can handle WinForms on Linux, + // but dotnet build can handle multi-targeting on Windows + if (IsRunningOnWindows()) + { + DotNetTest(solution, new DotNetTestSettings + { + Configuration = configuration, + NoBuild = true, + Filter = where, + ResultsDirectory = nunitOutputDirectory, + Verbosity = DotNetVerbosity.Minimal, + }); + } + else + { + DotNetTest(solution, new DotNetTestSettings + { + Configuration = "NoGUI", + NoBuild = true, + Filter = where, + ResultsDirectory = nunitOutputDirectory, + Verbosity = DotNetVerbosity.Minimal, + }); + var testFile = outDirectory.Combine("CKAN.Tests") + .Combine(configuration) + .Combine("bin") + .Combine(buildNetFramework) + .CombineWithFilePath("CKAN.Tests.dll"); + NUnit3(testFile.FullPath, new NUnit3Settings + { + Configuration = configuration, + Where = where, + Work = nunitOutputDirectory, + // Work around System.Runtime.Remoting.RemotingException : Tcp transport error. + Process = NUnit3ProcessOption.InProcess, + }); + } +}); + Task("Version") .Description("Print the current CKAN version.") .Does(() => { - Information(GetVersion().ToString()); + using (NormalVerbosity()) + { + Information(GetVersion().ToString()); + } }); Setup(context => @@ -420,7 +492,6 @@ Setup(context => Warning($"Ignoring configuration argument: '{argConfiguration}'"); configuration = "Release"; - buildFramework = buildNetFramework; } else if (string.Equals(target, "Debug", StringComparison.OrdinalIgnoreCase)) { @@ -428,16 +499,6 @@ Setup(context => Warning($"Ignoring configuration argument: '{argConfiguration}'"); configuration = "Debug"; - buildFramework = buildNetFramework; - } - else if (string.Equals(target, "DLL", StringComparison.OrdinalIgnoreCase)) - { - if (argConfiguration == null || argConfiguration.StartsWith("Debug")) - configuration = "Debug_NetCore"; - else if (argConfiguration.StartsWith("Release")) - configuration = "Release_NetCore"; - - buildFramework = buildNetCore; } }); @@ -447,7 +508,10 @@ Teardown(context => if (quote != null) { - Information(quote); + using (NormalVerbosity()) + { + Information(quote); + } } }); diff --git a/build.ps1 b/build.ps1 index e7e202c1b2..22c19dca6a 100644 --- a/build.ps1 +++ b/build.ps1 @@ -17,7 +17,7 @@ if (($PSVersionTable.PSVersion -lt $minPSVer)) { } # Globals -$NugetVersion = "5.6.0" +$NugetVersion = "6.8.0" $UseExperimental = $false $RootDir = "${PSScriptRoot}" $ScriptFile = "${RootDir}/build.cake" @@ -56,5 +56,5 @@ if ($UseExperimental) { } # Run Cake -dotnet cake "${ScriptFile}" ${cakeArgs} ${RemainingArgs} +dotnet cake --verbosity Minimal "${ScriptFile}" ${cakeArgs} ${RemainingArgs} exit $LASTEXITCODE diff --git a/doc/building.md b/doc/building.md index 5da51cc753..d5265ba034 100644 --- a/doc/building.md +++ b/doc/building.md @@ -5,13 +5,14 @@ as the build system which glues multiple steps together. This document is design how the CKAN build system currently works and how changes to it should be made. ## tl;dr -``` + +```plain > git clone https://github.com/KSP-CKAN/CKAN > cd CKAN > ./build -> _build/repack/ckan.exe version +> _build/ckan.exe version v1.23.45-dev+abcdef -> _build/repack/netkan.exe --version +> _build/netkan.exe --version v1.23.45-dev+abcdef ``` @@ -19,17 +20,21 @@ v1.23.45-dev+abcdef The following are the minimum requirements to build CKAN and NetKAN from source: -### Unix-like Systems +### Unix-like systems + - A POSIX compliant shell interpreter at `/bin/sh` - [Mono](http://www.mono-project.com/) >= 4.0.0 +- [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) - [cURL](https://curl.haxx.se/) accessible in PATH -### Windows Systems +### Windows systems + - PowerShell - MSBuild (usually by installing [Visual Studio](https://www.visualstudio.com/vs/community/)) -- .NET Framework >= 4.5.0 +- [.NET Framework >= 4.8.0](https://dotnet.microsoft.com/en-us/download/dotnet-framework) +- [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) -## Build Directory +## Build directory A core philosophy of the build system is that builds should be "clean", that is it should be easy to restore the source directory to its original state after a build. As such **ALL** build artifacts should be output to a top-level @@ -44,24 +49,24 @@ directory itself, instead use one of the existing or create a new subdirectory. - `_build/cake`: Used to store packages used by Cake. Use of this directory by Cake is controlled by the `cake.config` file in the top-level directory. - - `_build/cake/addins`: Used to store [Cake addins](http://cakebuild.net/addins). - - `_build/cake/modules`: Used to store Cake modules. + - `_build/cake/addins`: Used to store [Cake addins](http://cakebuild.net/addins). + - `_build/cake/modules`: Used to store Cake modules. - `_build/lib`: Used to store packages that are *automatically* resolved by a package manager. - - `_build/lib/nuget`: Used to store packages that are automatically resolved by NuGet. + - `_build/lib/nuget`: Used to store packages that are automatically resolved by NuGet. - `_build/meta`: Used to store source code that is dynamically generated by the build system. This is primarily used to - generate version information that is embeded in the built assemblies. + generate version information that is embedded in the built assemblies. - `_build/out`: Used to store the output of project builds. As CKAN/NetKAN is currently only a .NET project it has no subdirectories. If, however, multiple project types are introduced in the future output should be moved to subdirectories for each project type, e.g. `_build/out/dotnet`. Each .NET project is built to its own subdirectory based on its assembly name. Below that directory is one or more directories for each build configuration (currently either Debug or Release). - - `_build/out/$ASSEMBLY_NAME/$CONFIGURATION/bin`: The final output directory for .NET builds. Usable assemblies are - found here. + - `_build/out/$ASSEMBLY_NAME/$CONFIGURATION/bin/$TARGETFRAMEWORK`: The final output directory for .NET builds. + Usable assemblies are found here. - `_build/out/$ASSEMBLY_NAME/$CONFIGURATION/obj`: Directory used by the build system for intermediate object generation. Developers should not care about the contents in these directories. - `_build/repack`: Used to store the output of [ILRepack](https://github.com/gluck/il-repack). - `_build/test`: Used to store the output of test runners. - - `_build/test/nunit`: Used to store the output of the NUnit test runner. + - `_build/test/nunit`: Used to store the output of the NUnit test runner. - `_build/tools`: Used to store tools downloaded by the bootstraper or Cake. ## Bootstrapper Scripts @@ -69,22 +74,22 @@ directory itself, instead use one of the existing or create a new subdirectory. The primary entry point to the CKAN build system are the two bootstraper scripts in the top level directory `build` and `build.ps1`. Developers use these scripts for all build related operations. -`build` is POSIX shell script for use on Unix-like systems (BSD, Linux, macOS, etc.). `build` is exected by `/bin/sh` -which expected to be a POSIX compatible shell. It is quite intentionally **not** a bash shell script and as such +`build` is POSIX shell script for use on Unix-like systems (BSD, Linux, macOS, etc.). `build` is executed by `/bin/sh` +which is expected to be a POSIX compatible shell. It is quite intentionally **not** a bash shell script and as such contains no [bashisms](https://en.wiktionary.org/wiki/bashism). It can therefore be used on systems where `/bin/sh` is not bash but instead an alternative shell interpreter like dash. Any changes to this script should be careful not to introduce such bashisms that would break this compatibility. -`build.ps1` is a PowerShell script for use on Windows systems. Users on Windows *must* use PowerShell, the old -`cmd.exe` interpreter is not supported. +`build.ps1` is a PowerShell script for use on Windows systems. Users on Windows *must* use PowerShell 3.0 or later; + the old `cmd.exe` interpreter is not supported. Both of these scripts are used to "bootstrap" the build environment. They function identically and as such we will treat them as a singular script (`./build`) for all platforms. The basic operation of the bootstrap scripts are to: 1. Download [NuGet](https://www.nuget.org/) -2. Use NuGet to install packages defined in `packages.config` (currently, only Cake) +2. Install `Cake.Tool` for `dotnet` 3. Parse the command line arguments -4. Execute Cake with the appropriate command line arguments +4. Execute `dotnet cake` with the appropriate command line arguments 5. Quit with the exit code generated by Cake The specifics of each operations are given in the following sections. @@ -93,10 +98,9 @@ The specifics of each operations are given in the following sections. NuGet is the standard .NET package manager. Since nearly every useful .NET tool and library is provided through NuGet it can be used to bootstrap the rest of the build system. Specifically the bootstrapper scripts are used to download -NuGet which is then used to install Cake. The version of Cake to use is stored in `packages.config`, a standard NuGet -file for storing package dependencies. The bootstrapper scripts install all packages defined in `packages.config` so -it can be used to install any other high level packages necessary for the build, although this should not be necessary -that often (if at all) since most other packages can be installed as Cake addins or tools. +NuGet, which Cake then uses to install `Cake.SemVer`, `semver`, `Cake.Docker`, `ILRepack`, and `NUnit.ConsoleRunner`. + +Installation of project dependencies is handled by `dotnet restore`. ## Cake @@ -104,13 +108,13 @@ After Cake is installed by NuGet, the bootstrapper scripts then parse the comman The bootstrapper scripts use the following command line: -``` +```plain ./build [] [...] ``` Which is then used to execute Cake with the following command line: -``` +```plain cake.exe build.cake [--target=] [...] ``` @@ -122,9 +126,8 @@ arguments to Cake as is. ### `build.cake` `build.cake` is the Cake script which does most of the heavy lifting for the build. Cake scripts are C#-like files -which are dynamically compiled by either the Roslyn compiler (on Windows systems) or the Mono script compiler (on -Unix-like systems). Pretty much all the same rules as standard C# apply with the exception of Cake-specific -[preprocessor directives](http://cakebuild.net/docs/fundamentals/preprocessor-directives). +which are dynamically compiled by the Roslyn compiler. Pretty much all the same rules as standard C# apply with the +exception of Cake-specific [preprocessor directives](http://cakebuild.net/docs/fundamentals/preprocessor-directives). The CKAN build script is fairly simply and self-explanatory. Some conventions of note: @@ -142,8 +145,8 @@ The purpose of each defined task is as follows: - `Default`: This is the task executed if none is explicitly specified. Will build CKAN and NetKAN executables. - `Ckan`: Builds *only* the CKAN executable. - `Netkan`: Builds *only* the NetKAN executable. -- `Restore-Nuget`: Restores NuGet dependencies for the entire solution. -- `Build-DotNet`: Builds the solution file using `msbuild` (on Windows systems) or `xbuild` (on Unix-like systems). +- `Restore`: Restores NuGet dependencies for the entire solution. +- `Build`: Builds the solution file using `dotnet build` and `msbuild` (Mono systems only). - `Generate-GlobalAssemblyVersionInfo`: Generates a `GlobalVersionAssemblyInfo.cs` file in `_build/meta` which is linked to by all projects containing dynamically generated version information. - `Repack-Ckan`: Use ILRepack to generate a self-contained `ckan.exe`. @@ -172,50 +175,55 @@ The purpose of each defined task is as follows: The basic operation of the actual build process is as follows: - Restore NuGet packages - - NuGet is executed on the solution file (`CKAN.sln`) which restores the packages for each project. Each project - maintains its own `packages.config` file which defines its dependencies. All packages are stored in - `_build/lib/nuget` across all projects. This is controlled by the `nuget.config` file in the top-level directory. - Under no circumstances should NuGet packages be committed to source control. + - NuGet is executed on the solution file (`CKAN.sln`) which restores the packages for each project. + Each project contains `` entries which defines its dependencies. All packages are stored in + `_build/lib/nuget` across all projects. This is controlled by the `nuget.config` file in the top-level directory. + Under no circumstances should NuGet packages be committed to source control. - The solution is built - - `msbuild` (on Windows systems) and `xbuild` (on Unix-like systems) is executed on the solution file (`CKAN.sln`). - This causes each project file (`.csproj`) to be built producing an assembly in `_build/out`. Each project file - has the following lines which control its output directory. Any new projects should include these lines: - ```xml - ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ - ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ - ``` + - `dotnet build` and `msbuild` (Mono systems only) is executed on the solution file (`CKAN.sln`). + This causes each project file (`.csproj`) to be built producing assemblies in `_build/out`. Each project file + has the following lines which control its output directory. Some VSCode tools build without setting a + configuration, so we use `VSCodeIDE` in the path instead if it's missing. Any new projects should include these lines: + + ```xml + ..\_build\out\$(AssemblyName)\$(Configuration)\bin\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\bin\ + ..\_build\out\$(AssemblyName)\$(Configuration)\obj\ + ..\_build\out\$(AssemblyName)\VSCodeIDE\obj\ + ``` + - Exeutables are repacked - - ILRepack is executed to merge the CKAN executable and all its dependencies and the NetKAN executable and all its - dependencies into singular executable files. This allows the CKAN and NetKAN clients to be distributed as single - files without complex install procedures. These are the "final" output of the build process and are stored in: - `_build/repack/$CONFIGURATION`. + - ILRepack is executed to merge the CKAN executable and all its dependencies, the NetKAN executable and all + its dependencies, and the AutoUpdater executable and all its dependencies into singular executable files. + This allows the CKAN and NetKAN clients to be distributed as single files without complex install procedures. + These are the "final" output of the build process and are stored in: `_build/repack/$CONFIGURATION`. - Unit tests are executed - - The NUnit unit tests in `CKAN.Tests.dll` are executed + - The NUnit unit tests in `CKAN.Tests.dll` are executed. - Smoke tets are executed - - These are simple tests designed to make sure there isn't anything grossly wrong with the build. All they do is - execute the repacked `ckan.exe` and `netkan.exe` and make sure their version output matches the expected output. + - These are simple tests designed to make sure there isn't anything grossly wrong with the build. All they do is + execute the repacked `ckan.exe` and `netkan.exe` and make sure their version output matches the expected output. ## GitHub Workflows GitHub Workflows is the continuous integration (CI) environment that is used to automatically build CKAN and NetKAN. Its configuration is controlled by `build.yml` in the `.github/workflows` directory. Upon every push GitHub will execute the cross -product of mono versions and build configurations. As there are currently five specified mono versions (`5.20`, -`6.4`, `6.6`, `6.8` and `latest`) and two specified build configurations (`Debug`, `Release`), GitHub will execute *six* builds per +product of Mono versions and build configurations. As there are currently four specified Mono versions (`6.8`, `6.10`, `6.12`, +and `latest`) and two specified build configurations (`Debug`, `Release`), GitHub will execute *eight* builds per push. GitHub's operation is pretty simple: - A bunch of packages are installed to make the build work. - Some commands are executed to simulate a graphical environment for testing. - The solution is built using `./build --configuration=$BUILD_CONFIGURATION` -- The solution is tested using `./build test+only --configuration=$BUILD_CONFIGURATION --exclude=FlakyNetwork` - - The `--exclude=FlakyNetwork` argument is used to not execute tests that rely upon a network connection and could +- The solution is tested using `./build test+only --configuration=$BUILD_CONFIGURATION --where="Category!=FlakyNetwork"` + - The `--where="Category!=FlakyNetwork"` argument is used to not execute tests that rely upon a network connection and could thus behave nondeterministically (frustrating behavior for a CI system). - The built executables (`ckan.exe` and `netkan.exe`) are uploaded to Amazon S3 if the following conditions are met: - - All previous steps were successful - - It's on the `master` branch - - The build configuraton is `Release` - - The mono version used is the latest + - All previous steps were successful + - It's on the `master` branch + - The build configuraton is `Release` + - The Mono version used is the latest - A GitHub release is generated if the following conditions are met: - - All previous steps were successful - - The commit is tagged - - The build configuration is `Release` - - The mono version used is the latest + - All previous steps were successful + - The commit is tagged + - The build configuration is `Release` + - The Mono version used is the latest diff --git a/nuget.config b/nuget.config deleted file mode 100644 index ffe415845a..0000000000 --- a/nuget.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - -