The following procedure helps you create a script and a cabinet file so that you can prepare the UNIX component for your IEAK package. For an example, see UNIX Component and Script Sample.
Compress the program if needed. You can use formats such as .tar and .gz.
If you are familar with writing setup programs, you can add setup functionality to your compiled program instead of writing a script.
Your script can use the following default parameters; no custom parameters can be specified:
Argument 1 ($1) is the location of the installation.
Argument 2 ($2) [install_dir]/[target] is the target destination of the component (the place where you want the cabinet files to be located).
Argument 3 ($3) is an integer that represents whether silent mode is used [0=standard installation/1=silent installation]. It is not used in the example below, but you can use it in your setup script.
The current folder (default folder) when the script is run is the user's home folder. This is important, because the files are extracted to the root folder of the installation.
A script must contain the characters #! and the path to the script interpreter on the first line. If Setup encounters #! on the first line of the script, it processes the file by using dos2unix, which converts line-terminating characters (from the Windows and MS-DOS platforms) to the UNIX equivalent. Without this process, a script created on a personal computer will not be able to run.
The sample script shown below specifies the target location and decompresses the executable file.
#!/bin/sh
|
|
cd $2
|
# Go to the location of the zip file.
|
mkdir <directory name>
|
# Create an installation folder.
|
mv <compressed component> <directory name>
|
# Move the zip file into that folder.
|
cd <directory name>
|
# Switch to that folder.
|
gunzip <compressed component>
|
# Unzip the component.
|
chmod +x <uncompressed component>
|
# Assign "execute" or other needed permissions to this file, so it can be run as a program.
|
cd $1/bin
|
# Switch to the Internet Explorer bin folder.
|
ln -s ../<directory name>/<uncompressed component executable>
|
# Create a link to the executable program.
|
"cabarc n <program name.cab> <compressed component> + <script name>"
Component
The friendly name of the component you plan to install.
Location
The location of the cabinet file on your Windows 95, Windows 98, or Windows NT 4.0 computer.
Program
The name of the installation script <script name>. No additional parameters can be specified.
When you install your customized IEAK package, it decompresses the cabinet file, runs the script, and installs your component before it customizes the browser. After the setup script has run, it is deleted automatically.