* mynsiscallback must return nil and not 0 to avoid warning in some versions of Delphi.
* NSISDialog only uses g_hwndParent if it is valid. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6576 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b28ce8b1d8
commit
4cdb1cf7d1
3 changed files with 13 additions and 4 deletions
|
@ -63,11 +63,10 @@ end;
|
||||||
|
|
||||||
function mynsiscallback(const NSPIM: TNSPIM): Pointer; cdecl;
|
function mynsiscallback(const NSPIM: TNSPIM): Pointer; cdecl;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := nil;
|
||||||
if NSPIM = NSPIM_UNLOAD then
|
if NSPIM = NSPIM_UNLOAD then
|
||||||
begin
|
begin
|
||||||
// Note: Cannot use NSISDialog here because g_hwndParent has been destroyed at this point
|
NSISDialog(PChar('NSPIM_UNLOAD is the final callback, goodbye...'), PChar('mynsiscallback'), MB_OK);
|
||||||
MessageBox(0, PChar('NSPIM_UNLOAD is the final callback, goodbye...'), PChar('mynsiscallback'), MB_OK);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -195,8 +195,12 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure NSISDialog(const text, caption: string; const buttons: integer);
|
procedure NSISDialog(const text, caption: string; const buttons: integer);
|
||||||
|
var
|
||||||
|
hwndOwner: HWND;
|
||||||
begin
|
begin
|
||||||
MessageBox(g_hwndParent, PChar(text), PChar(caption), buttons);
|
hwndOwner := g_hwndParent;
|
||||||
|
if not IsWindow(g_hwndParent) then hwndOwner := 0; // g_hwndParent is not valid in NSPIM_[GUI]UNLOAD
|
||||||
|
MessageBox(hwndOwner, PChar(text), PChar(caption), buttons);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -12,6 +12,12 @@ Released on ?, 201?
|
||||||
|
|
||||||
\S2{} Minor Changes
|
\S2{} Minor Changes
|
||||||
|
|
||||||
|
\b Fixed minor issues in the Pascal NSIS plug-in SDK and removed the extrap global variable
|
||||||
|
|
||||||
|
\S1{v3.0b2-cl} Changelog
|
||||||
|
|
||||||
|
\S2{} Minor Changes
|
||||||
|
|
||||||
\b Windows 10 support
|
\b Windows 10 support
|
||||||
|
|
||||||
\H{v3.0b1} 3.0 Beta 1
|
\H{v3.0b1} 3.0 Beta 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue