Skip to content

Commit e2fe26b

Browse files
Merge pull request #15 from davidrule/Main-w/Icon
x32DBg support + fix some issues. Reviewed and merged.
2 parents ebeb380 + f821c5c commit e2fe26b

17 files changed

Lines changed: 2909 additions & 2846 deletions

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DotNetPlugin.Impl/DotNetPlugin.Impl.csproj merge=ours
2+
DotNetPlugin.Stub/PluginMain.cs merge=ours
3+
DotNetPlugin.Stub/Attributes.DllExport.cs merge=ours
4+
.github/workflows/build-x86.yml merge=ours
5+
.github/workflows/build-x64.yml merge=ours

.github/workflows/build-x64.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build x64 Plugin
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- '**/*.cs'
8+
- '**/*.csproj'
9+
- 'Directory.Build.props'
10+
- '.github/workflows/build-x64.yml'
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
env:
16+
NUGET_PACKAGES: ${{ github.workspace }}\\packages
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup MSBuild
22+
uses: microsoft/setup-msbuild@v2
23+
24+
- name: Setup .NET SDK
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: '8.0.x'
28+
29+
- name: Restore
30+
run: msbuild x64DbgMCPServer.sln /t:Restore /p:Platform=x64 /p:Configuration=Debug /p:RestorePackagesPath="${{ env.NUGET_PACKAGES }}" /p:BaseIntermediateOutputPath=.cache\\obj\\
31+
32+
- name: Build x64 Debug
33+
run: msbuild x64DbgMCPServer.sln /t:Rebuild /p:Platform=x64 /p:Configuration=Debug /p:RestorePackagesPath="${{ env.NUGET_PACKAGES }}" /p:BaseIntermediateOutputPath=.cache\\obj\\ /p:BaseOutputPath=.cache\\bin\\
34+
35+
- name: Upload artifact (dp64)
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: AgentSmithers_x64DbgMCP_x64Plugin
39+
path: |
40+
bin\\x64\\Debug\\**\\*.dp64
41+
bin\\x64\\Debug\\**\\*.dll
42+
bin\\x64\\Debug\\**\\*.pdb
43+
if-no-files-found: error
44+
45+
- name: Cleanup caches
46+
if: always()
47+
run: |
48+
Remove-Item -Recurse -Force .cache -ErrorAction SilentlyContinue
49+
Remove-Item -Recurse -Force packages -ErrorAction SilentlyContinue
50+

.github/workflows/build-x86.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build x86 Plugin
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- '**/*.cs'
8+
- '**/*.csproj'
9+
- 'Directory.Build.props'
10+
- '.github/workflows/build-x86.yml'
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
env:
16+
NUGET_PACKAGES: ${{ github.workspace }}\\packages
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup MSBuild
22+
uses: microsoft/setup-msbuild@v2
23+
24+
- name: Setup .NET SDK
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: '8.0.x'
28+
29+
- name: Restore
30+
run: msbuild x64DbgMCPServer.sln /t:Restore /p:Platform=x86 /p:Configuration=Debug /p:RestorePackagesPath="${{ env.NUGET_PACKAGES }}" /p:BaseIntermediateOutputPath=.cache\\obj\\
31+
32+
- name: Build x86 Debug
33+
run: msbuild x64DbgMCPServer.sln /t:Rebuild /p:Platform=x86 /p:Configuration=Debug /p:RestorePackagesPath="${{ env.NUGET_PACKAGES }}" /p:BaseIntermediateOutputPath=.cache\\obj\\ /p:BaseOutputPath=.cache\\bin\\
34+
35+
- name: Upload artifact (dp32)
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: AgentSmithers_x64DbgMCP_x32Plugin
39+
path: |
40+
bin\\x86\\Debug\\**\\*.dp32
41+
bin\\x86\\Debug\\**\\*.dll
42+
bin\\x86\\Debug\\**\\*.pdb
43+
if-no-files-found: error
44+
45+
- name: Cleanup caches
46+
if: always()
47+
run: |
48+
Remove-Item -Recurse -Force .cache -ErrorAction SilentlyContinue
49+
Remove-Item -Recurse -Force packages -ErrorAction SilentlyContinue

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,4 +388,9 @@ FodyWeavers.xsd
388388
*.sln.iml
389389

390390
!DotNetPlugin.Impl/NativeBindings/Win32/
391-
!DotNetPlugin.Stub/NativeBindings/Win32/
391+
!DotNetPlugin.Stub/NativeBindings/Win32/
392+
393+
# CI and local build caches
394+
.cache/
395+
**/.cache/
396+
packages/

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<PluginName>AgentSmithersx64dbgMCPServer</PluginName>
3+
<PluginName>MCP - Agent Smithers</PluginName>
44
<PluginAssemblyName>x64DbgMCPServer</PluginAssemblyName>
55

66
<PluginRootNamespace>DotNetPlugin</PluginRootNamespace>

DotNetPlugin.Impl/DotNetPlugin.Impl.csproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
<ItemGroup>
3636
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.18.2" />
3737
<PackageReference Include="System.Text.Json" Version="9.0.4" />
38+
<PackageReference Include="UnmanagedExports.Repack" Version="1.0.4">
39+
<IncludeAssets>build</IncludeAssets>
40+
</PackageReference>
3841
</ItemGroup>
3942

4043
<ItemGroup>
@@ -87,7 +90,13 @@
8790
</Target>
8891

8992
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
90-
<Exec Command="xcopy /Y /I &quot;$(TargetDir)*.*&quot; &quot;C:\Users\User\Desktop\x96\release\x64\plugins\x64DbgMCPServer&quot;&#xD;&#xA;rem start cmd /c C:\Users\User\Desktop\x96\release\x96dbg.exe" />
93+
<!-- You can update the path to x96dbg here -->
94+
<PropertyGroup>
95+
<X96DbgRootPath>C:\Users\User\Desktop\x96\release</X96DbgRootPath>
96+
</PropertyGroup>
97+
98+
<Exec Condition="'$(Platform)'=='x64' AND Exists('$(X96DbgRootPath)')" Command="xcopy /Y /I &quot;$(TargetDir)*.*&quot; &quot;$(X96DbgRootPath)\x64\plugins\x64DbgMCPServer&quot;" />
99+
<Exec Condition="'$(Platform)'=='x86' AND Exists('$(X96DbgRootPath)')" Command="xcopy /Y /I &quot;$(TargetDir)*.*&quot; &quot;$(X96DbgRootPath)\x32\plugins\x64DbgMCPServer&quot;" />
91100
</Target>
92101

93102
</Project>

0 commit comments

Comments
 (0)