PDA

View Full Version : Custom pre-requisite script



NewsArchive
04-12-2012, 02:17 AM
Hi Friedrich,

Some time ago you sent me your SBI include script to install SQL Compact -
I've just now had time to properly sit down and have a look at it.... and I
have questions (of course)....

It seems to me that as found it will install BOTH a 32-bit and 64-bit
version on a 64-bit machine?
Pls. see first attached shot for extract - you can see lines 101 & 107 are
not in an if/else clause... why so?

Also, as found, the 64-bit flag is initially set to 0, then later tested for
1 - what do you envisage may change this status?

Lastly, I have simply #included the script into my own in the 'Modify
System' section, as you can see in the second pic - this is a suitable
usage?

TIA
Steve





"Friedrich Linder" wrote in message
news:A921.1330498614.3193@discuss.softvelocity.com ...

Steve,

> What is the recommended way to go about installing my own 'custom
> pre-requisites' in an SB7 install page.
> Examples: some .NET assemblies.... (e.g. SQL Server CE (specific
> version)... VB PowerPack.. etc, etc)

I would suggest to use one of the existing pre-requisites as a starting
point.

BTW, the following is demo for the SQL Server Compact 3.5 redistributable:

http://www.lindersoft.com/publicdownloads/rt_sqlCompactredist.exe

The install image includes the original Microsoft SQL Server Compact 3.5
redistributables (32-bit and 64-bit) and the SetupBuilder .sbi Include
script.

Copy "rt_sqlCompactredist.exe" into your \Runtimes folder under the
SetupBuilder 7 Program Files folder tree. Then start it and the installer
will copy the required SQL Server Compact 3.5 files.

You'll have a new "rt_sqlCompact35.sbi" script in your "core" Include script
folder. Add this to your .sb7 project (see attached screenshot).

It also demonstrates how to package an existing .msi into your installer.

Hope this helps.

Friedrich

NewsArchive
04-12-2012, 02:19 AM
Hi Steve,

> Some time ago you sent me your SBI include script to install SQL Compact -
> I've just now had time to properly sit down and have a look at it.... and
> I have questions (of course)....
>
> It seems to me that as found it will install BOTH a 32-bit and 64-bit
> version on a 64-bit machine?
> Pls. see first attached shot for extract - you can see lines 101 & 107 are
> not in an if/else clause... why so?

This "SQL Server Compact 3.5" redistributable was for a custom script
writing project and the developer compiled two separate versions (32-bit and
64-bit). He wanted to control the SQL Compact deployment with the
%SQLCOMPACT35_64BIT% variable. If set to "0", it deploys the 32-bit SQL
Compact redistributable. If set to "1", it deploys the 32-/64-bit
components.

On a 64-bit computer, you have to install both the 32-bit and the 64-bit
version of the SQL Server Compact 3.5. On a 32-bit computer, you only
install the 32-bit version of SQL Server Compact 3.5.

This is handled in Line 101 (for 32-bit/64-bit) and Lines 103-108 (64-bit).

> Also, as found, the 64-bit flag is initially set to 0, then later tested
> for 1 - what do you envisage may change this status?

You can fully automate this 64-bit deployment detection (see attached
screenshot). On 64-bit Windows, %SQLCOMPACT35_64BIT% is set to "1" and
installs both 32-bit and 64-bit components. On 32-bit Windows,
%SQLCOMPACT35_64BIT% is set to "0" and installs only the 32-bit component.

> Lastly, I have simply #included the script into my own in the 'Modify
> System' section, as you can see in the second pic - this is a suitable
> usage?

Yes, you can do this. In this case, it installs your software and (nearly
at the end of your installation process) it prompts the user for SQL Compact
installation. But you can also do it before you install your own software.
Then you can terminate the install if the user decides to not install the
required SQL Compact (%SQLCOMPACT35_INSTALLIT% returns -2).

Friedrich

NewsArchive
04-13-2012, 01:14 AM
Or this (see attached).

Friedrich

NewsArchive
04-13-2012, 01:14 AM
"On a 64-bit computer, you have to install both the 32-bit and the 64-bit
version of the SQL Server Compact 3.5. "

I did not know that - it explains it all.

Tx

Steve Bywaters