From 8302af072864ba4855977575020f92e6b36d54c9 Mon Sep 17 00:00:00 2001 From: WheretIB Date: Fri, 19 Nov 2021 23:01:49 +0200 Subject: [PATCH] Fixed support for Visual Studio 2022, two separate projects are required --- .gitignore | 8 +- .../LuaDebugAttacher_x64.vcxproj | 4 +- LuaDebugHelper_x64/LuaDebugHelper_x64.vcxproj | 4 +- LuaDebugHelper_x86/LuaDebugHelper_x86.vcxproj | 4 +- LuaDkmDebugger.sln | 21 ++++ LuaDkmDebugger/LuaDkmDebugger.csproj | 32 ++--- LuaDkmDebugger/source.extension.vsixmanifest | 6 +- LuaDkmDebugger17/LuaDkmDebugger17.csproj | 112 ++++++++++++++++++ LuaDkmDebugger17/Properties/AssemblyInfo.cs | 33 ++++++ .../source.extension.vsixmanifest | 34 ++++++ .../LuaDkmDebuggerCommon.projitems | 25 ++++ .../LuaDkmDebuggerCommon.shproj | 13 ++ .../LuaDkmDebuggerPackage.cs | 2 +- .../ToolWindows/ScriptListWindow.cs | 0 .../ToolWindows/ScriptListWindowControl.xaml | 0 .../ScriptListWindowControl.xaml.cs | 0 .../ToolWindows/ScriptListWindowState.cs | 0 .../.pkgdef | 0 .../LuaDkmDebugger.vsct | 0 .../license.txt | 2 +- 20 files changed, 268 insertions(+), 32 deletions(-) create mode 100644 LuaDkmDebugger17/LuaDkmDebugger17.csproj create mode 100644 LuaDkmDebugger17/Properties/AssemblyInfo.cs create mode 100644 LuaDkmDebugger17/source.extension.vsixmanifest create mode 100644 LuaDkmDebuggerCommon/LuaDkmDebuggerCommon.projitems create mode 100644 LuaDkmDebuggerCommon/LuaDkmDebuggerCommon.shproj rename {LuaDkmDebugger => LuaDkmDebuggerCommon}/LuaDkmDebuggerPackage.cs (99%) rename {LuaDkmDebugger => LuaDkmDebuggerCommon}/ToolWindows/ScriptListWindow.cs (100%) rename {LuaDkmDebugger => LuaDkmDebuggerCommon}/ToolWindows/ScriptListWindowControl.xaml (100%) rename {LuaDkmDebugger => LuaDkmDebuggerCommon}/ToolWindows/ScriptListWindowControl.xaml.cs (100%) rename {LuaDkmDebugger => LuaDkmDebuggerCommon}/ToolWindows/ScriptListWindowState.cs (100%) rename {LuaDkmDebugger => LuaDkmDebuggerShared}/.pkgdef (100%) rename {LuaDkmDebugger => LuaDkmDebuggerShared}/LuaDkmDebugger.vsct (100%) rename {LuaDkmDebugger => LuaDkmDebuggerShared}/license.txt (96%) diff --git a/.gitignore b/.gitignore index 6e9bcc1..88d1a1f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,14 +9,18 @@ /packages /Debug /LuaDebugHelper_x86/Debug +/LuaDebugHelper_x86/Release *.user *.ilk *.pdb *.dll *.exp *.lib +*.iobj +*.ipdb /LuaDebugAttacher_x64/x64 /LuaDebugHelper_x64/x64 -/LuaDkmDebugger/*.exe -/LuaDebugHelper_x86/Release /builds +/LuaDkmDebugger17/bin +/LuaDkmDebugger17/obj +/LuaDkmDebuggerShared/*.exe diff --git a/LuaDebugAttacher_x64/LuaDebugAttacher_x64.vcxproj b/LuaDebugAttacher_x64/LuaDebugAttacher_x64.vcxproj index c13a64d..c38ab2d 100644 --- a/LuaDebugAttacher_x64/LuaDebugAttacher_x64.vcxproj +++ b/LuaDebugAttacher_x64/LuaDebugAttacher_x64.vcxproj @@ -44,11 +44,11 @@ true - $(SolutionDir)LuaDkmDebugger\ + $(SolutionDir)LuaDkmDebuggerShared\ false - $(SolutionDir)LuaDkmDebugger\ + $(SolutionDir)LuaDkmDebuggerShared\ diff --git a/LuaDebugHelper_x64/LuaDebugHelper_x64.vcxproj b/LuaDebugHelper_x64/LuaDebugHelper_x64.vcxproj index cb373e1..f5a74ba 100644 --- a/LuaDebugHelper_x64/LuaDebugHelper_x64.vcxproj +++ b/LuaDebugHelper_x64/LuaDebugHelper_x64.vcxproj @@ -45,11 +45,11 @@ true - $(SolutionDir)LuaDkmDebugger\ + $(SolutionDir)LuaDkmDebuggerShared\ false - $(SolutionDir)LuaDkmDebugger\ + $(SolutionDir)LuaDkmDebuggerShared\ diff --git a/LuaDebugHelper_x86/LuaDebugHelper_x86.vcxproj b/LuaDebugHelper_x86/LuaDebugHelper_x86.vcxproj index a9e5f40..e23d2ca 100644 --- a/LuaDebugHelper_x86/LuaDebugHelper_x86.vcxproj +++ b/LuaDebugHelper_x86/LuaDebugHelper_x86.vcxproj @@ -45,11 +45,11 @@ true - $(SolutionDir)LuaDkmDebugger\ + $(SolutionDir)LuaDkmDebuggerShared\ false - $(SolutionDir)LuaDkmDebugger\ + $(SolutionDir)LuaDkmDebuggerShared\ diff --git a/LuaDkmDebugger.sln b/LuaDkmDebugger.sln index b0ba37b..37b5f9b 100644 --- a/LuaDkmDebugger.sln +++ b/LuaDkmDebugger.sln @@ -19,7 +19,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaDebugHelper_x64", "LuaDe EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuaDebugAttacher_x64", "LuaDebugAttacher_x64\LuaDebugAttacher_x64.vcxproj", "{4D877B09-CA72-4416-B2F9-B4E243C0D51F}" EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "LuaDkmDebuggerCommon", "LuaDkmDebuggerCommon\LuaDkmDebuggerCommon.shproj", "{0E812732-115F-4F38-A162-7C335EEE87BC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaDkmDebugger17", "LuaDkmDebugger17\LuaDkmDebugger17.csproj", "{2979BE80-DC0A-4096-8A07-439FEA4E4080}" +EndProject Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + LuaDkmDebuggerCommon\LuaDkmDebuggerCommon.projitems*{0e812732-115f-4f38-a162-7c335eee87bc}*SharedItemsImports = 13 + LuaDkmDebuggerCommon\LuaDkmDebuggerCommon.projitems*{2979be80-dc0a-4096-8a07-439fea4e4080}*SharedItemsImports = 4 + LuaDkmDebuggerCommon\LuaDkmDebuggerCommon.projitems*{c3330bb3-cdce-40b5-9dc0-c19db8eb0987}*SharedItemsImports = 4 + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 @@ -101,6 +110,18 @@ Global {4D877B09-CA72-4416-B2F9-B4E243C0D51F}.Release|x64.Build.0 = Release|x64 {4D877B09-CA72-4416-B2F9-B4E243C0D51F}.Release|x86.ActiveCfg = Release|x64 {4D877B09-CA72-4416-B2F9-B4E243C0D51F}.Release|x86.Build.0 = Release|x64 + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Debug|x64.ActiveCfg = Debug|Any CPU + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Debug|x64.Build.0 = Debug|Any CPU + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Debug|x86.ActiveCfg = Debug|x86 + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Debug|x86.Build.0 = Debug|x86 + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Release|Any CPU.Build.0 = Release|Any CPU + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Release|x64.ActiveCfg = Release|Any CPU + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Release|x64.Build.0 = Release|Any CPU + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Release|x86.ActiveCfg = Release|x86 + {2979BE80-DC0A-4096-8A07-439FEA4E4080}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/LuaDkmDebugger/LuaDkmDebugger.csproj b/LuaDkmDebugger/LuaDkmDebugger.csproj index f54a8ed..b29eb0b 100644 --- a/LuaDkmDebugger/LuaDkmDebugger.csproj +++ b/LuaDkmDebugger/LuaDkmDebugger.csproj @@ -46,12 +46,6 @@ - - - - ScriptListWindowControl.xaml - - @@ -92,25 +86,30 @@ - + + .pkgdef true - - Always + + license.txt true - + + LuaDebugAttacher_x64.exe true - + + LuaDebugHelper_x64.dll true - + + LuaDebugHelper_x86.dll true - + + LuaDkmDebugger.vsct LuaDkmDebuggerMenus.ctmenu @@ -120,12 +119,7 @@ LuaDkmDebuggerComponent - - - Designer - MSBuild:Compile - - + + \ No newline at end of file diff --git a/LuaDkmDebugger17/Properties/AssemblyInfo.cs b/LuaDkmDebugger17/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2cbe719 --- /dev/null +++ b/LuaDkmDebugger17/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LuaDkmDebugger17")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LuaDkmDebugger17")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/LuaDkmDebugger17/source.extension.vsixmanifest b/LuaDkmDebugger17/source.extension.vsixmanifest new file mode 100644 index 0000000..2f20ba9 --- /dev/null +++ b/LuaDkmDebugger17/source.extension.vsixmanifest @@ -0,0 +1,34 @@ + + + + + C++ debugger extensions for Lua + This extension adds integrated debugging for Lua scripts executing inside C++ applications with Lua library. + license.txt + https://raw.githubusercontent.com/WheretIB/LuaDkmDebugger/master/CHANGELOG.md + lua, debugger + + + + amd64 + + + amd64 + + + amd64 + + + + + + + + + + + + + + + diff --git a/LuaDkmDebuggerCommon/LuaDkmDebuggerCommon.projitems b/LuaDkmDebuggerCommon/LuaDkmDebuggerCommon.projitems new file mode 100644 index 0000000..0601392 --- /dev/null +++ b/LuaDkmDebuggerCommon/LuaDkmDebuggerCommon.projitems @@ -0,0 +1,25 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 0e812732-115f-4f38-a162-7c335eee87bc + + + LuaDkmDebuggerCommon + + + + + + ScriptListWindowControl.xaml + + + + + + Designer + MSBuild:Compile + + + \ No newline at end of file diff --git a/LuaDkmDebuggerCommon/LuaDkmDebuggerCommon.shproj b/LuaDkmDebuggerCommon/LuaDkmDebuggerCommon.shproj new file mode 100644 index 0000000..7439c0a --- /dev/null +++ b/LuaDkmDebuggerCommon/LuaDkmDebuggerCommon.shproj @@ -0,0 +1,13 @@ + + + + 0e812732-115f-4f38-a162-7c335eee87bc + 14.0 + + + + + + + + diff --git a/LuaDkmDebugger/LuaDkmDebuggerPackage.cs b/LuaDkmDebuggerCommon/LuaDkmDebuggerPackage.cs similarity index 99% rename from LuaDkmDebugger/LuaDkmDebuggerPackage.cs rename to LuaDkmDebuggerCommon/LuaDkmDebuggerPackage.cs index f0bef6e..09ef225 100644 --- a/LuaDkmDebugger/LuaDkmDebuggerPackage.cs +++ b/LuaDkmDebuggerCommon/LuaDkmDebuggerPackage.cs @@ -433,7 +433,7 @@ public async Task GetQuickInfoItemAsync(IAsyncQuickInfoSession se } } - TextExtent leftExtent = textStructureNavigator.GetExtentOfWord(new SnapshotPoint(textBuffer.CurrentSnapshot, lineStartPosition + localPosition - 1)); + TextExtent leftExtent = textStructureNavigator.GetExtentOfWord(new SnapshotPoint(textBuffer.CurrentSnapshot, lineStartPosition + localPosition - 2)); SnapshotSpan leftExtentSpan = leftExtent.Span; if (leftExtentSpan.Start.Position >= lineStartPosition) diff --git a/LuaDkmDebugger/ToolWindows/ScriptListWindow.cs b/LuaDkmDebuggerCommon/ToolWindows/ScriptListWindow.cs similarity index 100% rename from LuaDkmDebugger/ToolWindows/ScriptListWindow.cs rename to LuaDkmDebuggerCommon/ToolWindows/ScriptListWindow.cs diff --git a/LuaDkmDebugger/ToolWindows/ScriptListWindowControl.xaml b/LuaDkmDebuggerCommon/ToolWindows/ScriptListWindowControl.xaml similarity index 100% rename from LuaDkmDebugger/ToolWindows/ScriptListWindowControl.xaml rename to LuaDkmDebuggerCommon/ToolWindows/ScriptListWindowControl.xaml diff --git a/LuaDkmDebugger/ToolWindows/ScriptListWindowControl.xaml.cs b/LuaDkmDebuggerCommon/ToolWindows/ScriptListWindowControl.xaml.cs similarity index 100% rename from LuaDkmDebugger/ToolWindows/ScriptListWindowControl.xaml.cs rename to LuaDkmDebuggerCommon/ToolWindows/ScriptListWindowControl.xaml.cs diff --git a/LuaDkmDebugger/ToolWindows/ScriptListWindowState.cs b/LuaDkmDebuggerCommon/ToolWindows/ScriptListWindowState.cs similarity index 100% rename from LuaDkmDebugger/ToolWindows/ScriptListWindowState.cs rename to LuaDkmDebuggerCommon/ToolWindows/ScriptListWindowState.cs diff --git a/LuaDkmDebugger/.pkgdef b/LuaDkmDebuggerShared/.pkgdef similarity index 100% rename from LuaDkmDebugger/.pkgdef rename to LuaDkmDebuggerShared/.pkgdef diff --git a/LuaDkmDebugger/LuaDkmDebugger.vsct b/LuaDkmDebuggerShared/LuaDkmDebugger.vsct similarity index 100% rename from LuaDkmDebugger/LuaDkmDebugger.vsct rename to LuaDkmDebuggerShared/LuaDkmDebugger.vsct diff --git a/LuaDkmDebugger/license.txt b/LuaDkmDebuggerShared/license.txt similarity index 96% rename from LuaDkmDebugger/license.txt rename to LuaDkmDebuggerShared/license.txt index 0e2f947..5489502 100644 --- a/LuaDkmDebugger/license.txt +++ b/LuaDkmDebuggerShared/license.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020-2020 Vyacheslav Egorov +Copyright (c) 2020-2021 Vyacheslav Egorov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal