Skip to content

Commit c2e4146

Browse files
plugin manager now still checks for version information on dlls and exe files (managed code)
1 parent c7611cb commit c2e4146

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

NativeCore/ReClassNET_Plugin.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#pragma once
2-
#ifndef __RECLASS_NET_PLUGIN_H__
3-
#define __RECLASS_NET_PLUGIN_H__
42

53
#include <type_traits>
64
#include <algorithm>
@@ -12,7 +10,7 @@
1210
// OS Specific
1311

1412
#ifdef __linux__
15-
#define __stdcall
13+
#define __stdcall __attribute__((__stdcall__))
1614
#endif
1715

1816
// Types
@@ -293,5 +291,3 @@ inline char16_t* str16cpy(char16_t* destination, const char16_t* source, size_t
293291
}
294292
return destination;
295293
}
296-
297-
#endif

ReClass.NET/Memory/ProcessInfo.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@ public ProcessInfo(IntPtr id, string name, string path)
2626
{
2727
using (var i = NativeMethods.GetIconForFile(Path))
2828
{
29-
if (i == null)
30-
{
31-
return null;
32-
}
33-
34-
return i.ToBitmap();
29+
return i?.ToBitmap();
3530
}
3631
});
3732
}

ReClass.NET/Plugins/PluginManager.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ public void LoadAllPlugins(string path, ILogger logger)
3939

4040
var directory = new DirectoryInfo(path);
4141

42-
LoadPlugins(directory.GetFiles("*.dll"), logger);
42+
LoadPlugins(directory.GetFiles("*.dll"), logger, true);
4343

44-
LoadPlugins(directory.GetFiles("*.exe"), logger);
44+
LoadPlugins(directory.GetFiles("*.exe"), logger, true);
4545

46-
LoadPlugins(directory.GetFiles("*.so"), logger);
46+
LoadPlugins(directory.GetFiles("*.so"), logger, false);
4747
}
4848
catch (Exception ex)
4949
{
5050
logger.Log(ex);
5151
}
5252
}
5353

54-
private void LoadPlugins(IEnumerable<FileInfo> files, ILogger logger)
54+
private void LoadPlugins(IEnumerable<FileInfo> files, ILogger logger, bool checkProductName)
5555
{
5656
// TODO: How to include plugin infos for unix files as they don't have embedded version info.
5757

@@ -65,10 +65,10 @@ private void LoadPlugins(IEnumerable<FileInfo> files, ILogger logger)
6565
{
6666
fvi = FileVersionInfo.GetVersionInfo(fi.FullName);
6767

68-
/*if (fvi.ProductName != PluginInfo.PluginName && fvi.ProductName != PluginInfo.PluginNativeName)
68+
if (checkProductName && fvi.ProductName != PluginInfo.PluginName && fvi.ProductName != PluginInfo.PluginNativeName)
6969
{
7070
continue;
71-
}*/
71+
}
7272
}
7373
catch
7474
{

0 commit comments

Comments
 (0)