Modernize source and object directory checks (#4)

* Use modern output directory name in DbgHelp

* Use modern outut directory name in settings dialog

* Use CMake file to detect source directory

* Use modern symbol file format to detect output directory

Co-authored-by: William Kent <wjk@users.noreply.github.com>
This commit is contained in:
William Kent 2020-03-20 04:39:44 -04:00 committed by GitHub
parent bc151df5a7
commit af9999e73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -344,7 +344,7 @@ namespace DbgHelpAPI
IntPtr hProcess; IntPtr hProcess;
static Random mRandom = new Random(); static Random mRandom = new Random();
static FileMap mFileMap = new FileMap(); static FileMap mFileMap = new FileMap();
string mReactosOutputPath = "output-i386", mReactosSourcePath = "."; string mReactosOutputPath = "output-MinGW-i386", mReactosSourcePath = ".";
public string ReactosOutputPath public string ReactosOutputPath
{ {

View File

@ -6,7 +6,7 @@ namespace DbgHelpAPI
{ {
public class FileMap public class FileMap
{ {
string []mDirectories = new string [] { "output-i386" }; string []mDirectories = new string [] { "output-MinGW-i386" };
Dictionary<string, List<string>> mFileByShortName = new Dictionary<string, List<string>>(); Dictionary<string, List<string>> mFileByShortName = new Dictionary<string, List<string>>();
public string GetFilePathFromShortName(string shortname) public string GetFilePathFromShortName(string shortname)

View File

@ -82,21 +82,21 @@ namespace RosDBG
get { return this["SourceDirectory"].ToString(); } get { return this["SourceDirectory"].ToString(); }
set set
{ {
if (!File.Exists(value + "\\ReactOS-generic.rbuild")) if (!File.Exists(value + "\\toolchain-gcc.cmake"))
MessageBox.Show("Can not find ReactOS sources in this directory!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); MessageBox.Show("Can not find ReactOS sources in this directory!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
this["SourceDirectory"] = value; this["SourceDirectory"] = value;
} }
} }
[CategoryAttribute("Directories"), DescriptionAttribute("Directory settings")] [CategoryAttribute("Directories"), DescriptionAttribute("Directory settings")]
[UserScopedSetting,DefaultSettingValue(".\\output-i386"),Editor(typeof(DirectoryEditor), typeof(UITypeEditor))] [UserScopedSetting,DefaultSettingValue(".\\output-MinGW-i386"),Editor(typeof(DirectoryEditor), typeof(UITypeEditor))]
public string OutputDirectory public string OutputDirectory
{ {
get { return this["OutputDirectory"].ToString(); } get { return this["OutputDirectory"].ToString(); }
set set
{ {
if (!File.Exists(value + "\\ntoskrnl\\ntoskrnl.nostrip.exe")) if (!File.Exists(value + "\\symbols\\ntoskrnl.exe"))
MessageBox.Show("Can not find .nostrip files!\nThe Debugger will not work properly without them.\n\nPlease enable building of .nostrip files in RosBE options." , "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); MessageBox.Show("Can not find symbol files!\nThe Debugger will not work properly without them.\n\nPlease rebuild with -DSEPARATE_DBG=1." , "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
this["OutputDirectory"] = value; this["OutputDirectory"] = value;
} }
} }