提升源码构建的兼容性
This commit is contained in:
parent
6b89071ea1
commit
11b73861b7
|
@ -1,17 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<RootNamespace>RustTools.Core</RootNamespace>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<Platforms>x86;x64;arm64;AnyCPU</Platforms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -5,8 +5,6 @@ using Microsoft.UI.Xaml;
|
|||
|
||||
using RustTools.Activation;
|
||||
using RustTools.Contracts.Services;
|
||||
using RustTools.Core.Contracts.Services;
|
||||
using RustTools.Core.Services;
|
||||
using RustTools.Helpers;
|
||||
using RustTools.Models;
|
||||
using RustTools.Services;
|
||||
|
@ -41,9 +39,9 @@ public partial class App : Application
|
|||
return service;
|
||||
}
|
||||
|
||||
public static WindowEx MainWindow { get; } = new MainWindow();
|
||||
|
||||
public static UIElement? AppTitlebar { get; set; }
|
||||
public static WindowEx MainWindow { get; } = new MainWindow();
|
||||
|
||||
public App()
|
||||
{
|
||||
|
@ -111,27 +109,4 @@ public partial class App : Application
|
|||
|
||||
await App.GetService<IActivationService>().ActivateAsync(args);
|
||||
}
|
||||
|
||||
private Mutex mutex;
|
||||
private void InitializeMutex()
|
||||
{
|
||||
// Mutex name should be unique for your application.
|
||||
string mutexName = "Global\\MyWinUIAppMutex";
|
||||
bool createdNew;
|
||||
|
||||
// Try to create the Mutex. If it fails, another instance is already running.
|
||||
mutex = new Mutex(true, mutexName, out createdNew);
|
||||
if (!createdNew)
|
||||
{
|
||||
// Another instance is already running.
|
||||
Environment.Exit(0); // Exit the current application.
|
||||
}
|
||||
|
||||
// Clean up the Mutex when the application exits.
|
||||
//Current.Exiting += (sender, args) =>
|
||||
//{
|
||||
// mutex.Close();
|
||||
// mutex.Dispose();
|
||||
//};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace RustTools.Core.Contracts.Services;
|
||||
namespace RustTools.Contracts.Services;
|
||||
|
||||
public interface IFileService
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace RustTools.Core.Helpers;
|
||||
namespace RustTools.Helpers;
|
||||
|
||||
public static class Json
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
using RustTools.Core.Helpers;
|
||||
using RustTools.Helpers;
|
||||
|
||||
using Windows.Storage;
|
||||
using Windows.Storage.Streams;
|
||||
|
|
|
@ -44,9 +44,6 @@
|
|||
<PackageReference Include="WinUIEx" Version="2.3.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\RustTools.Core\RustTools.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
@ -88,8 +85,4 @@
|
|||
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="Assets\image\image_24dp_E8EAED_FILL0_wght400_GRAD0_opsz24 (1).svg" />
|
||||
<Content Remove="Assets\创意工坊.svg" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using RustTools.Core.Contracts.Services;
|
||||
using RustTools.Contracts.Services;
|
||||
|
||||
namespace RustTools.Core.Services;
|
||||
namespace RustTools.Services;
|
||||
|
||||
public class FileService : IFileService
|
||||
{
|
|
@ -1,8 +1,6 @@
|
|||
using Microsoft.Extensions.Options;
|
||||
|
||||
using RustTools.Contracts.Services;
|
||||
using RustTools.Core.Contracts.Services;
|
||||
using RustTools.Core.Helpers;
|
||||
using RustTools.Helpers;
|
||||
using RustTools.Models;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ using Microsoft.UI.Xaml.Navigation;
|
|||
using RustTools.muqing;
|
||||
using Newtonsoft.Json;
|
||||
using RustTools.DataList;
|
||||
using RustTools.Core.Helpers;
|
||||
using RustTools.Helpers;
|
||||
using System.Collections.ObjectModel;
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
|
Loading…
Reference in New Issue
Block a user