mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-21 11:20:58 +00:00
Changed: the editor will now show more detailed messages when unable to initialize DirectX 9.
Updated Inno Setup file.
This commit is contained in:
parent
b68ecf502e
commit
375f857eb8
2 changed files with 23 additions and 10 deletions
|
@ -58,6 +58,7 @@ Source: Plugins\ColorPicker.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
||||||
Source: Plugins\CommentsPanel.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
Source: Plugins\CommentsPanel.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
||||||
Source: Plugins\NodesViewer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
Source: Plugins\NodesViewer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
||||||
Source: Plugins\SoundPropagationMode.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
Source: Plugins\SoundPropagationMode.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
||||||
|
Source: Plugins\StairSectorBuilder.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
||||||
Source: Plugins\TagExplorer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
Source: Plugins\TagExplorer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
||||||
Source: Plugins\TagRange.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
Source: Plugins\TagRange.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
||||||
Source: Plugins\VisplaneExplorer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
Source: Plugins\VisplaneExplorer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
|
||||||
|
@ -77,7 +78,7 @@ Name: {app}\Builder.pdb; Type: files
|
||||||
Name: {app}\Builder.xml; Type: files
|
Name: {app}\Builder.xml; Type: files
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKLM; Subkey: SOFTWARE\CodeImp\GZDoom Builder\; ValueType: string; ValueName: Location; ValueData: {app}; Flags: uninsdeletevalue
|
Root: HKLM; Subkey: SOFTWARE\MaxED\GZDoom Builder\; ValueType: string; ValueName: Location; ValueData: {app}; Flags: uninsdeletevalue
|
||||||
|
|
||||||
[Messages]
|
[Messages]
|
||||||
ReadyLabel2a=Continue to begin with the installation, or click Back if you want to review or change any settings.
|
ReadyLabel2a=Continue to begin with the installation, or click Back if you want to review or change any settings.
|
||||||
|
@ -114,6 +115,7 @@ var
|
||||||
MajorVer, MinorVer: Integer;
|
MajorVer, MinorVer: Integer;
|
||||||
StartPos: Integer;
|
StartPos: Integer;
|
||||||
TempStr, VerStr: string;
|
TempStr, VerStr: string;
|
||||||
|
HasRequiredDll : Boolean;
|
||||||
begin
|
begin
|
||||||
if (RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\DirectX', 'Version', VerStr)) then begin
|
if (RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\DirectX', 'Version', VerStr)) then begin
|
||||||
(* Extract major version *)
|
(* Extract major version *)
|
||||||
|
@ -126,7 +128,10 @@ begin
|
||||||
(* Extract minor version *)
|
(* Extract minor version *)
|
||||||
MinorVer := StrToInt(Copy(TempStr, 1, StartPos - 1));
|
MinorVer := StrToInt(Copy(TempStr, 1, StartPos - 1));
|
||||||
|
|
||||||
Result := (MajorVer > 4) or ((MajorVer = 4) and (MinorVer >= 9));
|
//mxd. The DX version alone is not accurate enough...
|
||||||
|
HasRequiredDll := FileExists(ExpandConstant('{syswow64}\d3dx9_43.dll'));
|
||||||
|
|
||||||
|
Result := ((MajorVer > 4) or ((MajorVer = 4) and (MinorVer >= 9))) and HasRequiredDll;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
Result := false;
|
Result := false;
|
||||||
|
@ -135,7 +140,11 @@ end;
|
||||||
|
|
||||||
function CheckVCIsInstalled(): Boolean;
|
function CheckVCIsInstalled(): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9BE518E6-ECC6-35A9-88E4-87755C07200F}');
|
//mxd. Any VC++ 2008 package will do, I assume...
|
||||||
|
//mxd. Registry values gartered from http://blogs.msdn.com/b/astebner/archive/2009/01/29/9384143.aspx
|
||||||
|
Result := RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}') or
|
||||||
|
RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A25302D-30C0-39D9-BD6F-21E6EC160475}') or
|
||||||
|
RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// When the wizard initializes
|
// When the wizard initializes
|
||||||
|
@ -290,7 +299,7 @@ begin
|
||||||
// See the return codes here: http://support.microsoft.com/kb/177430
|
// See the return codes here: http://support.microsoft.com/kb/177430
|
||||||
tempfile := RemoveBackslash(GetTempDir()) + '\dxwebsetup.exe';
|
tempfile := RemoveBackslash(GetTempDir()) + '\dxwebsetup.exe';
|
||||||
FileCopy(ExpandConstant('{tmp}\dxwebsetup.exe'), tempfile, false);
|
FileCopy(ExpandConstant('{tmp}\dxwebsetup.exe'), tempfile, false);
|
||||||
Exec(tempfile, '/silent', '', SW_SHOW, ewWaitUntilTerminated, errorcode);
|
Exec(tempfile, '/Q', '', SW_SHOW, ewWaitUntilTerminated, errorcode);
|
||||||
|
|
||||||
if(errorcode = 1) then begin
|
if(errorcode = 1) then begin
|
||||||
// Success, but restart needed!
|
// Success, but restart needed!
|
||||||
|
@ -342,8 +351,12 @@ end;
|
||||||
//Remove configs?
|
//Remove configs?
|
||||||
procedure DeinitializeUninstall();
|
procedure DeinitializeUninstall();
|
||||||
begin
|
begin
|
||||||
if MsgBox('Delete program configuration files?', mbConfirmation, MB_YESNO) = IDYES then
|
if MsgBox('Delete map restore data and program configuration files?', mbConfirmation, MB_YESNO) = IDYES then
|
||||||
begin
|
begin
|
||||||
|
// Remove restore data
|
||||||
|
DelTree(ExpandConstant('{localappdata}\Doom Builder\Restore'), True, True, True);
|
||||||
|
|
||||||
|
// Remove configs
|
||||||
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZBuilder.cfg'));
|
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZBuilder.cfg'));
|
||||||
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZBuilder.log'));
|
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZBuilder.log'));
|
||||||
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZCrash.txt'));
|
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZCrash.txt'));
|
||||||
|
|
|
@ -651,8 +651,8 @@ namespace CodeImp.DoomBuilder
|
||||||
// Start Direct3D
|
// Start Direct3D
|
||||||
General.WriteLogLine("Starting Direct3D graphics driver...");
|
General.WriteLogLine("Starting Direct3D graphics driver...");
|
||||||
try { D3DDevice.Startup(); }
|
try { D3DDevice.Startup(); }
|
||||||
catch(Direct3D9NotFoundException) { AskDownloadDirectX(); return; }
|
catch(Direct3D9NotFoundException e) { AskDownloadDirectX(e.Message); return; }
|
||||||
catch(Direct3DX9NotFoundException) { AskDownloadDirectX(); return; }
|
catch(Direct3DX9NotFoundException e) { AskDownloadDirectX(e.Message); return; }
|
||||||
|
|
||||||
// Load plugin manager
|
// Load plugin manager
|
||||||
General.WriteLogLine("Loading plugins...");
|
General.WriteLogLine("Loading plugins...");
|
||||||
|
@ -770,7 +770,7 @@ namespace CodeImp.DoomBuilder
|
||||||
}
|
}
|
||||||
|
|
||||||
// This asks the user to download DirectX
|
// This asks the user to download DirectX
|
||||||
private static void AskDownloadDirectX()
|
private static void AskDownloadDirectX(string message)
|
||||||
{
|
{
|
||||||
// Cancel loading map from command-line parameters, if any.
|
// Cancel loading map from command-line parameters, if any.
|
||||||
// This causes problems, because when the window is shown, the map will
|
// This causes problems, because when the window is shown, the map will
|
||||||
|
@ -778,8 +778,8 @@ namespace CodeImp.DoomBuilder
|
||||||
CancelAutoMapLoad();
|
CancelAutoMapLoad();
|
||||||
|
|
||||||
// Ask the user to download DirectX
|
// Ask the user to download DirectX
|
||||||
if(MessageBox.Show("This application requires the latest version of Microsoft DirectX 9.0 installed on your computer." + Environment.NewLine +
|
if(MessageBox.Show("Unable to initialize DirectX: " + message + Environment.NewLine + Environment.NewLine +
|
||||||
"Do you want to install and/or update Microsoft DirectX 9.0 now?", "DirectX Error", MessageBoxButtons.YesNo,
|
"Do you want to install and/or update Microsoft DirectX 9.0 now?", "DirectX 9.0 Error", MessageBoxButtons.YesNo,
|
||||||
MessageBoxIcon.Exclamation) == DialogResult.Yes)
|
MessageBoxIcon.Exclamation) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
// Go to DirectX End-User Runtime Web Installer page (mxd)
|
// Go to DirectX End-User Runtime Web Installer page (mxd)
|
||||||
|
|
Loading…
Reference in a new issue