From 1d12e8778bde982b6456efaabefa239d48d95096 Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Mon, 31 Oct 2022 22:56:44 +0100 Subject: [PATCH] bindings: Rename dotnet project to UnicornEngine Add a few more properties to prepare a nuget package --- bindings/const_generator.py | 4 ++-- bindings/dotnet/UnicornDotNet.sln | 2 +- .../Binding/BindingFactory.fs | 2 +- .../Binding/IBinding.fs | 2 +- .../Binding/MockBinding.fs | 2 +- .../Binding/NativeBinding.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/Arm.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/Arm64.fs | 2 +- .../Const/Common.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/M68k.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/Mips.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/Ppc.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/Riscv.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/S390x.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/Sparc.fs | 2 +- .../Const/TriCore.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Const/X86.fs | 2 +- .../ConvertUtility.fs | 2 +- .../InternalHooks.fs | 2 +- .../{UnicornManaged => UnicornEngine}/Unicorn.fs | 6 +++--- .../UnicornEngine.fsproj} | 12 +++++++++--- .../UnicornEngineException.fs | 2 +- bindings/dotnet/UnicornSamples/ShellcodeSample.cs | 4 ++-- bindings/dotnet/UnicornSamples/UnicornSamples.csproj | 4 ++-- bindings/dotnet/UnicornSamples/X86Sample32.cs | 4 ++-- 25 files changed, 39 insertions(+), 33 deletions(-) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Binding/BindingFactory.fs (84%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Binding/IBinding.fs (97%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Binding/MockBinding.fs (98%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Binding/NativeBinding.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/Arm.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/Arm64.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/Common.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/M68k.fs (97%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/Mips.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/Ppc.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/Riscv.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/S390x.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/Sparc.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/TriCore.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Const/X86.fs (99%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/ConvertUtility.fs (91%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/InternalHooks.fs (97%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/Unicorn.fs (99%) rename bindings/dotnet/{UnicornManaged/UnicornManaged.fsproj => UnicornEngine/UnicornEngine.fsproj} (79%) rename bindings/dotnet/{UnicornManaged => UnicornEngine}/UnicornEngineException.fs (83%) diff --git a/bindings/const_generator.py b/bindings/const_generator.py index 2a74c864..6d529630 100644 --- a/bindings/const_generator.py +++ b/bindings/const_generator.py @@ -90,10 +90,10 @@ template = { 'comment_close': '', }, 'dotnet': { - 'header': "// For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT\n\nnamespace UnicornManaged.Const\n\nopen System\n\n[]\nmodule %s =\n", + 'header': "// For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT\n\nnamespace UnicornEngine.Const\n\nopen System\n\n[]\nmodule %s =\n", 'footer': "\n", 'line_format': ' let UC_%s = %s\n', - 'out_file': os.path.join('dotnet', 'UnicornManaged', 'Const', '%s.fs'), + 'out_file': os.path.join('dotnet', 'UnicornEngine', 'Const', '%s.fs'), # prefixes for constant filenames of all archs - case sensitive 'arm.h': 'Arm', 'arm64.h': 'Arm64', diff --git a/bindings/dotnet/UnicornDotNet.sln b/bindings/dotnet/UnicornDotNet.sln index 90aa5b60..abe168e9 100644 --- a/bindings/dotnet/UnicornDotNet.sln +++ b/bindings/dotnet/UnicornDotNet.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnicornSamples", "UnicornSamples\UnicornSamples.csproj", "{B80B5987-1E24-4309-8BF9-C4F91270F21C}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UnicornManaged", "UnicornManaged\UnicornManaged.fsproj", "{0C21F1C1-2725-4A46-9022-1905F85822A5}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UnicornEngine", "UnicornEngine\UnicornEngine.fsproj", "{0C21F1C1-2725-4A46-9022-1905F85822A5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/bindings/dotnet/UnicornManaged/Binding/BindingFactory.fs b/bindings/dotnet/UnicornEngine/Binding/BindingFactory.fs similarity index 84% rename from bindings/dotnet/UnicornManaged/Binding/BindingFactory.fs rename to bindings/dotnet/UnicornEngine/Binding/BindingFactory.fs index 6ea0b183..30c7f821 100644 --- a/bindings/dotnet/UnicornManaged/Binding/BindingFactory.fs +++ b/bindings/dotnet/UnicornEngine/Binding/BindingFactory.fs @@ -1,4 +1,4 @@ -namespace UnicornManaged.Binding +namespace UnicornEngine.Binding module BindingFactory = diff --git a/bindings/dotnet/UnicornManaged/Binding/IBinding.fs b/bindings/dotnet/UnicornEngine/Binding/IBinding.fs similarity index 97% rename from bindings/dotnet/UnicornManaged/Binding/IBinding.fs rename to bindings/dotnet/UnicornEngine/Binding/IBinding.fs index 7ef6d279..b6c3edc0 100644 --- a/bindings/dotnet/UnicornManaged/Binding/IBinding.fs +++ b/bindings/dotnet/UnicornEngine/Binding/IBinding.fs @@ -1,4 +1,4 @@ -namespace UnicornManaged.Binding +namespace UnicornEngine.Binding open System diff --git a/bindings/dotnet/UnicornManaged/Binding/MockBinding.fs b/bindings/dotnet/UnicornEngine/Binding/MockBinding.fs similarity index 98% rename from bindings/dotnet/UnicornManaged/Binding/MockBinding.fs rename to bindings/dotnet/UnicornEngine/Binding/MockBinding.fs index 7b99c8e5..3eeefe89 100644 --- a/bindings/dotnet/UnicornManaged/Binding/MockBinding.fs +++ b/bindings/dotnet/UnicornEngine/Binding/MockBinding.fs @@ -1,4 +1,4 @@ -namespace UnicornManaged.Binding +namespace UnicornEngine.Binding open System diff --git a/bindings/dotnet/UnicornManaged/Binding/NativeBinding.fs b/bindings/dotnet/UnicornEngine/Binding/NativeBinding.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Binding/NativeBinding.fs rename to bindings/dotnet/UnicornEngine/Binding/NativeBinding.fs index 6be7b2f3..efaccc48 100644 --- a/bindings/dotnet/UnicornManaged/Binding/NativeBinding.fs +++ b/bindings/dotnet/UnicornEngine/Binding/NativeBinding.fs @@ -1,4 +1,4 @@ -namespace UnicornManaged.Binding +namespace UnicornEngine.Binding open System open System.Runtime.InteropServices diff --git a/bindings/dotnet/UnicornManaged/Const/Arm.fs b/bindings/dotnet/UnicornEngine/Const/Arm.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/Arm.fs rename to bindings/dotnet/UnicornEngine/Const/Arm.fs index 08766baf..8a275261 100644 --- a/bindings/dotnet/UnicornManaged/Const/Arm.fs +++ b/bindings/dotnet/UnicornEngine/Const/Arm.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/Arm64.fs b/bindings/dotnet/UnicornEngine/Const/Arm64.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/Arm64.fs rename to bindings/dotnet/UnicornEngine/Const/Arm64.fs index 4c509d03..9e9878a7 100644 --- a/bindings/dotnet/UnicornManaged/Const/Arm64.fs +++ b/bindings/dotnet/UnicornEngine/Const/Arm64.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/Common.fs b/bindings/dotnet/UnicornEngine/Const/Common.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/Common.fs rename to bindings/dotnet/UnicornEngine/Const/Common.fs index 72b5cb3a..73f9663c 100644 --- a/bindings/dotnet/UnicornManaged/Const/Common.fs +++ b/bindings/dotnet/UnicornEngine/Const/Common.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/M68k.fs b/bindings/dotnet/UnicornEngine/Const/M68k.fs similarity index 97% rename from bindings/dotnet/UnicornManaged/Const/M68k.fs rename to bindings/dotnet/UnicornEngine/Const/M68k.fs index b9189d2d..768bc12b 100644 --- a/bindings/dotnet/UnicornManaged/Const/M68k.fs +++ b/bindings/dotnet/UnicornEngine/Const/M68k.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/Mips.fs b/bindings/dotnet/UnicornEngine/Const/Mips.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/Mips.fs rename to bindings/dotnet/UnicornEngine/Const/Mips.fs index 7f85a0cf..d4818783 100644 --- a/bindings/dotnet/UnicornManaged/Const/Mips.fs +++ b/bindings/dotnet/UnicornEngine/Const/Mips.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/Ppc.fs b/bindings/dotnet/UnicornEngine/Const/Ppc.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/Ppc.fs rename to bindings/dotnet/UnicornEngine/Const/Ppc.fs index 1727c157..54a18b3b 100644 --- a/bindings/dotnet/UnicornManaged/Const/Ppc.fs +++ b/bindings/dotnet/UnicornEngine/Const/Ppc.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/Riscv.fs b/bindings/dotnet/UnicornEngine/Const/Riscv.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/Riscv.fs rename to bindings/dotnet/UnicornEngine/Const/Riscv.fs index bf578024..fe61ec2c 100644 --- a/bindings/dotnet/UnicornManaged/Const/Riscv.fs +++ b/bindings/dotnet/UnicornEngine/Const/Riscv.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/S390x.fs b/bindings/dotnet/UnicornEngine/Const/S390x.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/S390x.fs rename to bindings/dotnet/UnicornEngine/Const/S390x.fs index 97f7ec4b..c4bd76e6 100644 --- a/bindings/dotnet/UnicornManaged/Const/S390x.fs +++ b/bindings/dotnet/UnicornEngine/Const/S390x.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/Sparc.fs b/bindings/dotnet/UnicornEngine/Const/Sparc.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/Sparc.fs rename to bindings/dotnet/UnicornEngine/Const/Sparc.fs index 8eb8cc23..8350af5c 100644 --- a/bindings/dotnet/UnicornManaged/Const/Sparc.fs +++ b/bindings/dotnet/UnicornEngine/Const/Sparc.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/TriCore.fs b/bindings/dotnet/UnicornEngine/Const/TriCore.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/TriCore.fs rename to bindings/dotnet/UnicornEngine/Const/TriCore.fs index 0c82fb97..b2c78e2e 100644 --- a/bindings/dotnet/UnicornManaged/Const/TriCore.fs +++ b/bindings/dotnet/UnicornEngine/Const/TriCore.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/Const/X86.fs b/bindings/dotnet/UnicornEngine/Const/X86.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Const/X86.fs rename to bindings/dotnet/UnicornEngine/Const/X86.fs index 8d2fd5b3..5e115b9e 100644 --- a/bindings/dotnet/UnicornManaged/Const/X86.fs +++ b/bindings/dotnet/UnicornEngine/Const/X86.fs @@ -1,6 +1,6 @@ // For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT -namespace UnicornManaged.Const +namespace UnicornEngine.Const open System diff --git a/bindings/dotnet/UnicornManaged/ConvertUtility.fs b/bindings/dotnet/UnicornEngine/ConvertUtility.fs similarity index 91% rename from bindings/dotnet/UnicornManaged/ConvertUtility.fs rename to bindings/dotnet/UnicornEngine/ConvertUtility.fs index 5e455bf7..a453c861 100644 --- a/bindings/dotnet/UnicornManaged/ConvertUtility.fs +++ b/bindings/dotnet/UnicornEngine/ConvertUtility.fs @@ -1,4 +1,4 @@ -namespace UnicornManaged +namespace UnicornEngine open System diff --git a/bindings/dotnet/UnicornManaged/InternalHooks.fs b/bindings/dotnet/UnicornEngine/InternalHooks.fs similarity index 97% rename from bindings/dotnet/UnicornManaged/InternalHooks.fs rename to bindings/dotnet/UnicornEngine/InternalHooks.fs index 36cfc3ce..d9e87954 100644 --- a/bindings/dotnet/UnicornManaged/InternalHooks.fs +++ b/bindings/dotnet/UnicornEngine/InternalHooks.fs @@ -1,4 +1,4 @@ -namespace UnicornManaged +namespace UnicornEngine open System open System.Runtime.InteropServices diff --git a/bindings/dotnet/UnicornManaged/Unicorn.fs b/bindings/dotnet/UnicornEngine/Unicorn.fs similarity index 99% rename from bindings/dotnet/UnicornManaged/Unicorn.fs rename to bindings/dotnet/UnicornEngine/Unicorn.fs index 31decbcd..7d401300 100644 --- a/bindings/dotnet/UnicornManaged/Unicorn.fs +++ b/bindings/dotnet/UnicornEngine/Unicorn.fs @@ -1,11 +1,11 @@ -namespace UnicornManaged +namespace UnicornEngine open System open System.Collections.Generic open System.Runtime.InteropServices open System.Linq -open UnicornManaged.Const -open UnicornManaged.Binding +open UnicornEngine.Const +open UnicornEngine.Binding // exported hooks type CodeHook = delegate of Unicorn * Int64 * Int32 * Object -> unit diff --git a/bindings/dotnet/UnicornManaged/UnicornManaged.fsproj b/bindings/dotnet/UnicornEngine/UnicornEngine.fsproj similarity index 79% rename from bindings/dotnet/UnicornManaged/UnicornManaged.fsproj rename to bindings/dotnet/UnicornEngine/UnicornEngine.fsproj index 1a66562a..c117557c 100644 --- a/bindings/dotnet/UnicornManaged/UnicornManaged.fsproj +++ b/bindings/dotnet/UnicornEngine/UnicornEngine.fsproj @@ -1,11 +1,13 @@  net6.0 - UnicornManaged - UnicornManaged + UnicornEngine.Unicorn + UnicornEngine Copyright © Antonio Parata 2016 https://github.com/unicorn-engine/unicorn - 2.0.0 + .NET bindings for unicorn + 2.0.0 + $(VersionSuffix) 0c21f1c1-2725-4a46-9022-1905f85822a5 true true @@ -15,6 +17,10 @@ 3 + + none + + diff --git a/bindings/dotnet/UnicornManaged/UnicornEngineException.fs b/bindings/dotnet/UnicornEngine/UnicornEngineException.fs similarity index 83% rename from bindings/dotnet/UnicornManaged/UnicornEngineException.fs rename to bindings/dotnet/UnicornEngine/UnicornEngineException.fs index fd582557..68622951 100644 --- a/bindings/dotnet/UnicornManaged/UnicornEngineException.fs +++ b/bindings/dotnet/UnicornEngine/UnicornEngineException.fs @@ -1,4 +1,4 @@ -namespace UnicornManaged +namespace UnicornEngine open System diff --git a/bindings/dotnet/UnicornSamples/ShellcodeSample.cs b/bindings/dotnet/UnicornSamples/ShellcodeSample.cs index 7982e5e4..08ab59b1 100644 --- a/bindings/dotnet/UnicornSamples/ShellcodeSample.cs +++ b/bindings/dotnet/UnicornSamples/ShellcodeSample.cs @@ -3,8 +3,8 @@ using Gee.External.Capstone.X86; using System; using System.Diagnostics; using System.Text; -using UnicornManaged; -using UnicornManaged.Const; +using UnicornEngine; +using UnicornEngine.Const; namespace UnicornSamples { diff --git a/bindings/dotnet/UnicornSamples/UnicornSamples.csproj b/bindings/dotnet/UnicornSamples/UnicornSamples.csproj index bd603441..4ba2d49e 100644 --- a/bindings/dotnet/UnicornSamples/UnicornSamples.csproj +++ b/bindings/dotnet/UnicornSamples/UnicornSamples.csproj @@ -17,9 +17,9 @@ - + {0c21f1c1-2725-4a46-9022-1905f85822a5} - UnicornManaged + UnicornEngine diff --git a/bindings/dotnet/UnicornSamples/X86Sample32.cs b/bindings/dotnet/UnicornSamples/X86Sample32.cs index 24333839..bff69e79 100644 --- a/bindings/dotnet/UnicornSamples/X86Sample32.cs +++ b/bindings/dotnet/UnicornSamples/X86Sample32.cs @@ -3,8 +3,8 @@ using Gee.External.Capstone.X86; using System; using System.Diagnostics; using System.Text; -using UnicornManaged; -using UnicornManaged.Const; +using UnicornEngine; +using UnicornEngine.Const; namespace UnicornSamples {