mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-14 01:47:30 +00:00
Merge pull request #4158 from keymanapp/fix/windows/4002-tsysinfo-missing-symbolication
fix(windows): sentrytool should fail build on exception and access violation when rewriting executables
This commit is contained in:
commit
22d191f16a
3 changed files with 10 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ begin
|
|||
ExitCode := main;
|
||||
except
|
||||
on E: Exception do
|
||||
begin
|
||||
Writeln(E.ClassName, ': ', E.Message);
|
||||
ExitCode := 1;
|
||||
end;
|
||||
end;
|
||||
end.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue