Marius
Posts: 11
Joined: Wed Jun 18, 2008 3:16 pm

Software Prerequisite, directx9c

I'm trying to create an installer for a commercial game, but I'm running out of time as we approach deadline, so I'm trying to turn here for some fast solutions to my problems.

We need to be absolutely sure directx9c will install on the target computer if it's not already installed. So far I've not been successful in testing if it will install or not. Does anyone have reasonable solution on how to test this?

Also, I first tried to link the directx_jun2008_redist.exe to the Software Prerequisite, but I later found out this package only extracts it's contents to a location the user has to choose. So I can't do this and be sure the user will manage to install directx. Then I tried to extract these files into it's own folder next to the installer files, and to link the DXSETUP.exe located in this folder to the Software Prerequisite. This didn't work either, as advanced installer simply copied this DXSETUP.exe and placed the copy next to the install files. When running the DXSETUP.exe file from there, it can't find dsetup.dll and thus fails to install directx. Anyone have a solution to this?
Marius
Posts: 11
Joined: Wed Jun 18, 2008 3:16 pm

Re: Software Prerequisite, directx9c

I'd really appreciate a quick response to this if anyone has some suggestions to the above problems.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: Software Prerequisite, directx9c

Hi,

If you use "File In Package" as location for your prerequisite make sure you link all additional files in "New Prerequisite->Files" tab. So after you extract the files add them to "Files" tab and point DXSETUP.exe as the primary file (executed to install DirectX).

For more details please see:
http://www.advancedinstaller.com/user-g ... rties.html
http://www.advancedinstaller.com/user-g ... files.html

If you encounter any problem please let us know.

Best Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
Marius
Posts: 11
Joined: Wed Jun 18, 2008 3:16 pm

Re: Software Prerequisite, directx9c

gigi wrote:Hi,

If you use "File In Package" as location for your prerequisite make sure you link all additional files in "New Prerequisite->Files" tab. So after you extract the files add them to "Files" tab and point DXSETUP.exe as the primary file (executed to install DirectX).

For more details please see:
http://www.advancedinstaller.com/user-g ... rties.html
http://www.advancedinstaller.com/user-g ... files.html

If you encounter any problem please let us know.

Best Regards,
Gigi
Probably solves my problem, but all the files linked to DXSETUP.exe was now extracted from it's folder, and placed in the root folder of my install files, resulting in a messy organization of the root. I don't want this. I've seen on other game DVDs that they keep all the directx files in a folder, rather than having them on the DVD root. Is there a way to achieve this?

Edit: Found a way to do it, just had to add a folder to the Prerequisite Properties. It then placed all the directx files linked to DXSETUP.exe (including the exe file) in that folder. Exactly what I wanted :)

A few more things: Is there a way to always install a directx prerequisite, even if target computer already have the required version?

I also encountered another problem. The directx installer starts as it should when I run the game's .exem but the game installation didn't start after that. Directx installs when i run the .exe file, and the game installs if I run the .msi file for some reason.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: Software Prerequisite, directx9c

Hi Marius,
Is there a way to always install a directx prerequisite, even if target computer already have the required version?
Yes, this is possible, but why would you want to do this? In the "Install Conditions" tab of the "New Prerequisite" dialog you can specify a detection criteria that will never be fulfilled, even if DirectX exists. For instance, you can use a "File Version" criteria specifying the "File To Find":

Code: Select all

[SystemFolder]file-foobar.dll
which is unlikely to exist. However, the Bootstrapper will report an error that the Prerequisite has failed to install.
I also encountered another problem. The directx installer starts as it should when I run the game's .exem but the game installation didn't start after that. Directx installs when i run the .exe file, and the game installs if I run the .msi file for some reason.
I cannot reproduce this. After building the package, if you are using the option "Leave install files outside" in the Media page, "Bootstrapper" tab, AI will generate an EXE bootstrapper, a MSI package and any prerequisites will be copied next to the EXE bootstrapper (in the folder that you specify in the "Properties" tab of the "New Prerequisite" dialog).

Launching the EXE bootstrapper will first check whether the Prerequisites are installed and launch the corresponding installer if their are not. After all the Prerequisites are installed, the EXE Bootstrapper will launch the MSI representing your main installation package. Isn't this the behaviour that you get?

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
Marius
Posts: 11
Joined: Wed Jun 18, 2008 3:16 pm

Re: Software Prerequisite, directx9c

Ionut wrote:Hi Marius,
Is there a way to always install a directx prerequisite, even if target computer already have the required version?
Yes, this is possible, but why would you want to do this? In the "Install Conditions" tab of the "New Prerequisite" dialog you can specify a detection criteria that will never be fulfilled, even if DirectX exists. For instance, you can use a "File Version" criteria specifying the "File To Find":

Code: Select all

[SystemFolder]file-foobar.dll
which is unlikely to exist. However, the Bootstrapper will report an error that the Prerequisite has failed to install.
I think this is similar to what I tried to do when I encountered the problem described below. I created a criteria with a regestry value that didn't exist. So I believe the application install never launched because the prerequisite never was met.

As for why I want to do this: Our game requires a D3DX9_37.dll file, which according to our programmers only are available in directx_jun2008_redist.exe. Which means that it is required to be installed on the target computer. And since Microsoft doesn't increase their registry value version number on the different dx9c resists it's impossible to simply just search for the version number.
Ionut wrote:
I also encountered another problem. The directx installer starts as it should when I run the game's .exem but the game installation didn't start after that. Directx installs when i run the .exe file, and the game installs if I run the .msi file for some reason.
I cannot reproduce this. After building the package, if you are using the option "Leave install files outside" in the Media page, "Bootstrapper" tab, AI will generate an EXE bootstrapper, a MSI package and any prerequisites will be copied next to the EXE bootstrapper (in the folder that you specify in the "Properties" tab of the "New Prerequisite" dialog).

Launching the EXE bootstrapper will first check whether the Prerequisites are installed and launch the corresponding installer if their are not. After all the Prerequisites are installed, the EXE Bootstrapper will launch the MSI representing your main installation package. Isn't this the behaviour that you get?

Regards,
Ionut
As mentioned above, I think my package's behavior was because I had made a registry search for a value that didn't exist, and I probably messed up something when trying to do this. Your method did work though, so now it should fulfill our requirements for the installer. Thanks allot for your help.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: Software Prerequisite, directx9c

Hi Marius,
I created a criteria with a regestry value that didn't exist. So I believe the application install never launched because the prerequisite never was met.
If after the Prerequisite is installed the registry value does still not exist, the Bootstrapper will assume that the installation of the Prerequisite has failed and you will have to click "Back" and then "Finish" to launch the main MSI.
As for why I want to do this: Our game requires a D3DX9_37.dll file, which according to our programmers only are available in directx_jun2008_redist.exe. Which means that it is required to be installed on the target computer. And since Microsoft doesn't increase their registry value version number on the different dx9c resists it's impossible to simply just search for the version number.
This is easy to accomplish, by using an additional detection condition for your DirectX Prerequisite. In the "Edit Prerequisite" dialog, "Install Conditions" tab, click "New" and create a "File Version" search criteria, specifying the "File To Find" as [SystemFolder]D3DX9_37.dll (or something appropriate). You can leave the "Minimum" field empty if there are no versions restrictions and a detection is sufficient.

Then select the option "Install if any of the above searches fail" in the "Install Conditions" tab such that the Bootstrapper will check both conditions (Registry Value and File Version) and install the Prerequisite if either of the conditions is not met.

Some links that might prove useful:
http://www.advancedinstaller.com/forums ... f=2&t=2245
http://www.computerhope.com/directx.htm

Hope this helps.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”