From 8ff2c5e1d0d2d7156481aba162cc4932b18c60d0 Mon Sep 17 00:00:00 2001 From: MistEO Date: Fri, 2 Dec 2022 00:14:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-definition.json | 2 +- src/Cpp/Sample.vcxproj | 4 ++-- src/Cpp/Sample.vcxproj.filters | 8 ------- src/Dart/lib/maa_core.dart | 2 +- .../MaaAssistantArknights/maa/asst_widows.go | 2 +- src/Java/Maaj/Readme.md | 2 +- src/MeoAssistant/MaaCore.vcxproj | 18 +++++++-------- src/MeoAsstGui/Main/AsstProxy.cs | 22 +++++++++---------- src/MeoAsstGui/Main/SettingsViewModel.cs | 4 ++-- src/MeoAsstGui/Main/VersionUpdateViewModel.cs | 4 ++-- src/Python/asst.py | 2 +- src/SyncRes/SyncRes.vcxproj | 3 +++ 12 files changed, 33 insertions(+), 40 deletions(-) diff --git a/package-definition.json b/package-definition.json index 4bf3a22f5b..52bf073d5c 100644 --- a/package-definition.json +++ b/package-definition.json @@ -13,7 +13,7 @@ "type": "MaaCore", "configuration": { "include": [ - "MeoAssistant.dll" + "MaaCore.dll" ] } }, diff --git a/src/Cpp/Sample.vcxproj b/src/Cpp/Sample.vcxproj index 38f23bc720..05276fb0c7 100644 --- a/src/Cpp/Sample.vcxproj +++ b/src/Cpp/Sample.vcxproj @@ -76,7 +76,7 @@ true true true - MeoAssistant.lib;%(AdditionalDependencies) + MaaCore.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) true @@ -100,7 +100,7 @@ true true true - MeoAssistant.lib;%(AdditionalDependencies) + MaaCore.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) true diff --git a/src/Cpp/Sample.vcxproj.filters b/src/Cpp/Sample.vcxproj.filters index 16f0113df2..0f3e9f63c8 100644 --- a/src/Cpp/Sample.vcxproj.filters +++ b/src/Cpp/Sample.vcxproj.filters @@ -5,14 +5,6 @@ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - diff --git a/src/Dart/lib/maa_core.dart b/src/Dart/lib/maa_core.dart index 00c8f366af..d90503638d 100644 --- a/src/Dart/lib/maa_core.dart +++ b/src/Dart/lib/maa_core.dart @@ -55,7 +55,7 @@ class MaaCore implements MaaCoreInterface { if (Platform.isLinux) { return 'libMeoAssistant.so'; } else if (Platform.isWindows) { - return 'MeoAssistant.dll'; + return 'MaaCore.dll'; } return 'libMeoAssistant.dylib'; } diff --git a/src/Golang/MaaAssistantArknights/maa/asst_widows.go b/src/Golang/MaaAssistantArknights/maa/asst_widows.go index 4926e59f26..ed436f8d8e 100644 --- a/src/Golang/MaaAssistantArknights/maa/asst_widows.go +++ b/src/Golang/MaaAssistantArknights/maa/asst_widows.go @@ -7,7 +7,7 @@ import ( // 之后抽象成和Linux调用方式保持一致 先这么拆 const ( - loadDLL = "MeoAssistant.dll" + loadDLL = "MaaCore.dll" sep = string(os.PathSeparator) ) diff --git a/src/Java/Maaj/Readme.md b/src/Java/Maaj/Readme.md index 0117c06453..090dcca550 100644 --- a/src/Java/Maaj/Readme.md +++ b/src/Java/Maaj/Readme.md @@ -34,7 +34,7 @@ ```text MeoAssistantArknights_v3.9.0-beta.8 │ MeoAsstGui.exe - │ MeoAssistant.dll + │ MaaCore.dll │ ... └───Java-HTTP │ Maa-HTTP-0.0.1.jar diff --git a/src/MeoAssistant/MaaCore.vcxproj b/src/MeoAssistant/MaaCore.vcxproj index a0ff824415..6c902a4f0b 100644 --- a/src/MeoAssistant/MaaCore.vcxproj +++ b/src/MeoAssistant/MaaCore.vcxproj @@ -311,20 +311,19 @@ - xcopy /e /y /i /c "$(ProjectDir)..\..\resource" "$(TargetDir)resource" - xcopy /e /y /i /c "$(ProjectDir)..\..\3rdparty\resource" "$(TargetDir)resource" - Copy resource + + - xcopy /e /y /i /c "$(ProjectDir)..\..\3rdparty\bin" "$(TargetDir)" - Copy 3rd party dll + + @@ -364,20 +363,19 @@ - xcopy /e /y /i /c "$(ProjectDir)..\..\resource" "$(TargetDir)resource" - xcopy /e /y /i /c "$(ProjectDir)..\..\3rdparty\resource" "$(TargetDir)resource" - Copy resource + + - xcopy /e /y /i /c "$(ProjectDir)..\..\3rdparty\bin" "$(TargetDir)" - Copy 3rd party dll + + diff --git a/src/MeoAsstGui/Main/AsstProxy.cs b/src/MeoAsstGui/Main/AsstProxy.cs index 45fc40ad15..e014d0805f 100644 --- a/src/MeoAsstGui/Main/AsstProxy.cs +++ b/src/MeoAsstGui/Main/AsstProxy.cs @@ -61,7 +61,7 @@ namespace MeoAsstGui } } - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern unsafe bool AsstLoadResource(byte* dirname); private static unsafe bool AsstLoadResource(string dirname) @@ -72,16 +72,16 @@ namespace MeoAsstGui } } - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern AsstHandle AsstCreate(); - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern AsstHandle AsstCreateEx(CallbackDelegate callback, IntPtr custom_arg); - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern void AsstDestroy(AsstHandle handle); - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern unsafe bool AsstSetInstanceOption(AsstHandle handle, AsstInstanceOptionKey key, byte* value); private static unsafe bool AsstSetInstanceOption(AsstHandle handle, AsstInstanceOptionKey key, string value) @@ -92,7 +92,7 @@ namespace MeoAsstGui } } - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern unsafe bool AsstConnect(AsstHandle handle, byte* adb_path, byte* address, byte* config); private static unsafe bool AsstConnect(AsstHandle handle, string adb_path, string address, string config) @@ -105,7 +105,7 @@ namespace MeoAsstGui } } - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern unsafe AsstTaskId AsstAppendTask(AsstHandle handle, byte* type, byte* task_params); private static unsafe AsstTaskId AsstAppendTask(AsstHandle handle, string type, string task_params) @@ -117,7 +117,7 @@ namespace MeoAsstGui } } - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern unsafe bool AsstSetTaskParams(AsstHandle handle, AsstTaskId id, byte* task_params); private static unsafe bool AsstSetTaskParams(AsstHandle handle, AsstTaskId id, string task_params) @@ -128,13 +128,13 @@ namespace MeoAsstGui } } - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern bool AsstStart(AsstHandle handle); - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern bool AsstStop(AsstHandle handle); - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern unsafe void AsstLog(byte* level, byte* message); /// diff --git a/src/MeoAsstGui/Main/SettingsViewModel.cs b/src/MeoAsstGui/Main/SettingsViewModel.cs index 8a2188b087..4f1f7bb05c 100644 --- a/src/MeoAsstGui/Main/SettingsViewModel.cs +++ b/src/MeoAsstGui/Main/SettingsViewModel.cs @@ -37,7 +37,7 @@ namespace MeoAsstGui private readonly IContainer _container; private readonly IMaaHotKeyManager _maaHotKeyManager; - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern IntPtr AsstGetVersion(); private static readonly string s_versionId = Marshal.PtrToStringAnsi(AsstGetVersion()); @@ -2270,4 +2270,4 @@ namespace MeoAsstGui return false; } } -} +} \ No newline at end of file diff --git a/src/MeoAsstGui/Main/VersionUpdateViewModel.cs b/src/MeoAsstGui/Main/VersionUpdateViewModel.cs index 91e2a9907c..01f01cb71e 100644 --- a/src/MeoAsstGui/Main/VersionUpdateViewModel.cs +++ b/src/MeoAsstGui/Main/VersionUpdateViewModel.cs @@ -48,7 +48,7 @@ namespace MeoAsstGui _windowManager = windowManager; } - [DllImport("MeoAssistant.dll")] + [DllImport("MaaCore.dll")] private static extern IntPtr AsstGetVersion(); private static string AddContributorLink(string text) @@ -901,4 +901,4 @@ namespace MeoAsstGui Process.Start(e.Parameter.ToString()); } } -} +} \ No newline at end of file diff --git a/src/Python/asst.py b/src/Python/asst.py index 388bdd2b8f..91846e5bfd 100644 --- a/src/Python/asst.py +++ b/src/Python/asst.py @@ -33,7 +33,7 @@ class Asst: ``user_dir``: 用户数据(日志、调试图片等)写入文件夹路径 """ if platform.system().lower() == 'windows': - Asst.__libpath = pathlib.Path(path) / 'MeoAssistant.dll' + Asst.__libpath = pathlib.Path(path) / 'MaaCore.dll' os.environ["PATH"] += os.pathsep + str(path) Asst.__lib = ctypes.WinDLL(str(Asst.__libpath)) elif platform.system().lower() == 'darwin': diff --git a/src/SyncRes/SyncRes.vcxproj b/src/SyncRes/SyncRes.vcxproj index d356060e4b..37afe4f7c2 100644 --- a/src/SyncRes/SyncRes.vcxproj +++ b/src/SyncRes/SyncRes.vcxproj @@ -18,6 +18,9 @@ 10.0 SyncRes + + true + Application