diff options
author | Emily Maré (emileet) | 2020-06-01 00:08:35 +1000 |
---|---|---|
committer | Emily Maré (emileet) | 2020-06-01 00:08:35 +1000 |
commit | d8c0be2f9c9a3a3b57e89f23d3798e4c6e96d673 (patch) | |
tree | 44f625a13420541015bf40be23724335b8d442de | |
download | aur-d8c0be2f9c9a3a3b57e89f23d3798e4c6e96d673.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 52 | ||||
-rw-r--r-- | linux-native-plugin-path.patch | 26 | ||||
-rw-r--r-- | linux-windows-sections.patch | 42 |
5 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..57272809bd08 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = reclass.net-git + pkgdesc = ReClass.NET is a reverse-engineering tool for dissecting data structures in memory + pkgver = 1.2.r140.g534b684 + pkgrel = 1 + url = https://github.com/ReClassNET/reclass.net-git + arch = x86_64 + license = MIT + makedepends = git + makedepends = mono-msbuild + depends = mono + provides = reclass.net + source = git+https://github.com/ReClassNET/ReClass.NET.git + source = linux-native-plugin-path.patch + source = linux-windows-sections.patch + sha256sums = SKIP + sha256sums = 78d3136c874a2c43042cf4685aa8520a25145c09e7118d3c1724df5a10caf613 + sha256sums = 66d87fec0d6f330ba518cd7d97abaeeb6fb2c2f3232fb7229d13264a54aeaa15 + +pkgname = reclass.net-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..7334925ab911 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!*.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7c35782d9fa4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Emily Maré (emileet) <emileet@plsnobully.me> + +pkgname=reclass.net-git +_pkgname=ReClass.NET +pkgver=1.2.r140.g534b684 +pkgrel=1 +pkgdesc="ReClass.NET is a reverse-engineering tool for dissecting data structures in memory" +arch=('x86_64') +license=('MIT') +url="https://github.com/ReClassNET/${pkgname}" +provides=('reclass.net') +depends=('mono') +makedepends=('git' 'mono-msbuild') +source=("git+https://github.com/ReClassNET/ReClass.NET.git" + "linux-native-plugin-path.patch" + "linux-windows-sections.patch") +sha256sums=('SKIP' + '78d3136c874a2c43042cf4685aa8520a25145c09e7118d3c1724df5a10caf613' + '66d87fec0d6f330ba518cd7d97abaeeb6fb2c2f3232fb7229d13264a54aeaa15') + +pkgver() { + cd ${_pkgname} + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd ${_pkgname} + + local src + for src in ${source[@]}; do + src=${src%%::*} + src=${src##*/} + [[ ${src} = *.patch ]] || continue + echo "applying patch ${src}..." + patch -Np1 < ../${src} + done +} + +build() { + cd ${_pkgname} + make release +} + +package() { + cd ${_pkgname} + + mkdir -p ${pkgdir}/usr/lib/${_pkgname}/Plugins + + install -Dm755 ${_pkgname}/bin/Release/x64/${_pkgname}.exe ${pkgdir}/usr/bin/${_pkgname} + install -Dm755 NativeCore/Unix/build/release/NativeCore.so -t ${pkgdir}/usr/lib + install -Dm644 LICENSE -t ${pkgdir}/usr/share/licenses/${_pkgname} +} diff --git a/linux-native-plugin-path.patch b/linux-native-plugin-path.patch new file mode 100644 index 000000000000..18010aa638d8 --- /dev/null +++ b/linux-native-plugin-path.patch @@ -0,0 +1,26 @@ +diff --git a/ReClass.NET/Core/InternalCoreFunctions.cs b/ReClass.NET/Core/InternalCoreFunctions.cs +index 0e1494b..dde7e50 100644 +--- a/ReClass.NET/Core/InternalCoreFunctions.cs ++++ b/ReClass.NET/Core/InternalCoreFunctions.cs +@@ -13,7 +13,7 @@ namespace ReClassNET.Core + internal class InternalCoreFunctions : NativeCoreWrapper, IInternalCoreFunctions, IDisposable + { + private const string CoreFunctionsModuleWindows = "NativeCore.dll"; +- private const string CoreFunctionsModuleUnix = "NativeCore.so"; ++ private const string CoreFunctionsModuleUnix = "/usr/lib/NativeCore.so"; + + private readonly IntPtr handle; + +diff --git a/ReClass.NET/Forms/MainForm.cs b/ReClass.NET/Forms/MainForm.cs +index 19a9162..6972c80 100644 +--- a/ReClass.NET/Forms/MainForm.cs ++++ b/ReClass.NET/Forms/MainForm.cs +@@ -99,7 +99,7 @@ namespace ReClassNET.Forms + + GlobalWindowManager.AddWindow(this); + +- pluginManager.LoadAllPlugins(Path.Combine(Application.StartupPath, Constants.PluginsFolder), Program.Logger); ++ pluginManager.LoadAllPlugins(Path.Combine("/usr/lib/ReClass.NET/", Constants.PluginsFolder), Program.Logger); + + toolStrip.Items.AddRange(NodeTypesBuilder.CreateToolStripButtons(ReplaceSelectedNodesWithType).ToArray()); + changeTypeToolStripMenuItem.DropDownItems.AddRange(NodeTypesBuilder.CreateToolStripMenuItems(ReplaceSelectedNodesWithType, false).ToArray()); diff --git a/linux-windows-sections.patch b/linux-windows-sections.patch new file mode 100644 index 000000000000..fe6c74a94d74 --- /dev/null +++ b/linux-windows-sections.patch @@ -0,0 +1,42 @@ +diff --git a/ReClass.NET/Core/CoreFunctionsManager.cs b/ReClass.NET/Core/CoreFunctionsManager.cs +index 92af4d6..09018a0 100644 +--- a/ReClass.NET/Core/CoreFunctionsManager.cs ++++ b/ReClass.NET/Core/CoreFunctionsManager.cs +@@ -86,6 +86,10 @@ namespace ReClassNET.Core + { + var c1 = callbackSection == null ? null : (EnumerateRemoteSectionCallback)delegate (ref EnumerateRemoteSectionData data) + { ++ var module_name = Path.GetFileName(data.ModulePath); ++ var separator_pos = data.ModulePath.LastIndexOf('\\'); ++ if (separator_pos != -1) module_name = data.ModulePath.Substring(separator_pos + 1); ++ + callbackSection(new Section + { + Start = data.BaseAddress, +@@ -95,20 +99,24 @@ namespace ReClassNET.Core + Protection = data.Protection, + Type = data.Type, + ModulePath = data.ModulePath, +- ModuleName = Path.GetFileName(data.ModulePath), ++ ModuleName = module_name, + Category = data.Category + }); + }; + + var c2 = callbackModule == null ? null : (EnumerateRemoteModuleCallback)delegate (ref EnumerateRemoteModuleData data) + { ++ var name = Path.GetFileName(data.Path); ++ var separator_pos = data.Path.LastIndexOf('\\'); ++ if (separator_pos != -1) name = data.Path.Substring(separator_pos + 1); ++ + callbackModule(new Module + { + Start = data.BaseAddress, + End = data.BaseAddress.Add(data.Size), + Size = data.Size, + Path = data.Path, +- Name = Path.GetFileName(data.Path) ++ Name = name + }); + }; + |