diff --git a/windows/src/buildtools/sentrytool/Keyman.System.AddPdbToPe.pas b/windows/src/buildtools/sentrytool/Keyman.System.AddPdbToPe.pas index f92b815172..0416c8bd54 100644 --- a/windows/src/buildtools/sentrytool/Keyman.System.AddPdbToPe.pas +++ b/windows/src/buildtools/sentrytool/Keyman.System.AddPdbToPe.pas @@ -265,6 +265,9 @@ begin s.SetSize(SectionOffset + SectionRawSize); FillChar((PByte(s.Memory) + SectionOffset)^, SectionRawSize, 0); + nh32 := PImageNtHeaders(NativeUInt(nh32)-NativeUInt(dh)+NativeUInt(s.Memory)); + section := PImageSectionHeader(NativeUInt(section)-NativeUInt(dh)+NativeUInt(s.Memory)); + // Increment the number of sections Inc(nh32.FileHeader.NumberOfSections); @@ -324,6 +327,9 @@ begin s.SetSize(SectionOffset + SectionRawSize); FillChar((PByte(s.Memory) + SectionOffset)^, SectionRawSize, 0); + nh64 := PImageNtHeaders64(NativeUInt(nh64)-NativeUInt(dh)+NativeUInt(s.Memory)); + section := PImageSectionHeader(NativeUInt(section)-NativeUInt(dh)+NativeUInt(s.Memory)); + // Increment the number of sections Inc(nh64.FileHeader.NumberOfSections); diff --git a/windows/src/buildtools/sentrytool/sentrytool.dpr b/windows/src/buildtools/sentrytool/sentrytool.dpr index 20365891db..f1ed8450b6 100644 --- a/windows/src/buildtools/sentrytool/sentrytool.dpr +++ b/windows/src/buildtools/sentrytool/sentrytool.dpr @@ -16,6 +16,9 @@ begin ExitCode := main; except on E: Exception do + begin Writeln(E.ClassName, ': ', E.Message); + ExitCode := 1; + end; end; end. diff --git a/windows/src/desktop/kmconfig/Makefile b/windows/src/desktop/kmconfig/Makefile index 447de763bc..75a3587c18 100644 --- a/windows/src/desktop/kmconfig/Makefile +++ b/windows/src/desktop/kmconfig/Makefile @@ -6,7 +6,7 @@ build: version.res manifest.res #icons $(DELPHI_MSBUILD) kmconfig.dproj /p:Platform=Win32 - $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmconfig.exe -dpr kmconfig.exe + $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmconfig.exe -dpr kmconfig.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmconfig.exe $(COPY) $(WIN32_TARGET_PATH)\kmconfig.exe $(PROGRAM)\desktop if exist $(WIN32_TARGET_PATH)\kmconfig.dbg $(COPY) $(WIN32_TARGET_PATH)\kmconfig.dbg $(DEBUGPATH)\desktop