您的位置:首页 > Web前端

[References]Installing Multiple CAB Files

2008-02-28 05:33 274 查看

http://channel9.msdn.com/wiki/default.aspx/MobileDeveloper.InstallingMultipleCABFiles

Installing Multiple CAB Files

function LinkMenu(anArray)
{
var src = "";
var h = 0;
var w = 0;

window.event.cancelBubble = 'true';

var menu = document.getElementById("LinkMenu");
if (menu == null)
{
menu = document.createElement("div");
menu.id = 'LinkMenu';
menu.className = 'Menu';
document.body.appendChild(menu);
}
menu.innerHTML = "";
for (var i = 0; i < anArray.length; i++)
{
var pair = anArray[i];
var each = "";
var itemName = 'LinkMenu' + i;
each += '';
each += '' + pair[0] + '';
each += '';
menu.innerHTML += each;
var item = document.getElementById(itemName);
if (item.offsetWidth > w)
w = item.offsetWidth;
h += item.offsetHeight;
}
menu.innerHTML = '' + menu.innerHTML + '';
menu.style.left = window.event.clientX;
menu.style.top = window.event.clientY;
menu.style.height = h;
menu.style.width = w;
timeout = null;
menu.style.display = 'block';
}

var timeout = null;
var tipOffTimeout = null;

function TopicTipOn(anchor, id)
{
var targetY = document.body.scrollTop + window.event.clientY + 18;
var targetX = document.body.scrollLeft + window.event.clientX + 12;

TopicTip.style.left = targetX;
TopicTip.style.top = targetY;
var tip = document.getElementById(id);
TopicTip.innerHTML = tip.innerHTML;
TopicTip.style.display = 'block';
if (tipOffTimeout != null)
window.clearTimeout(tipOffTimeout);
tipOffTimeout = window.setTimeout("TopicTipOff()", 4000, "JScript");
}

function TopicTipOff()
{
if (tipOffTimeout != null)
window.clearTimeout(tipOffTimeout);
tipOffTimeout = null;
TopicTip.style.display = 'none';
}

function MenuClick(url)
{
MenuHide();
window.navigate(url);
}

function MenuIn(obj)
{
if (timeout == null)
return;
window.clearTimeout(timeout);
timeout = null;
}

function MenuOut(obj)
{
timeout = window.setTimeout("MenuTimeout()", 1000, "JScript");
}

function MenuTimeout()
{
MenuHide();
}

function MenuHide()
{
var menu = document.getElementById("LinkMenu");
menu.style.display = 'none';
}

function MenuItemIn(obj)
{
obj.className = 'MenuItemHover';
}

function MenuItemOut(obj)
{
obj.className = 'MenuItemNormal';
}

Summary: Installing multiple CAB files from a single CAB file
Often a mobile device application may require that other software be installed onto the device in addition to the actual application; for example a managed application requires the .NET Compact Framework and might also require SQL Server Everywhere Edition. Each piece of software is normally contained in a separate Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile meaning that the user will have to manually copy each Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile to the device and install them separatly.

Rather then make the user install each Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile individually, it's preferable to package all of the unique Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile into a single master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile and have the master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile handle the details of installing the other Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile instances. Another consideration is that the application installation should only install a Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile if the CAB file's software hasn't already been installed.

You can easily create a master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile that contains multiple CAB files by simply using the Visual Studio 2005 Smart Device CAB project. This Smart Device CAB project acts as the master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile, so you just add all of the desired CAB files to the project. When the master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile is deployed to the device, it will automatically place each individual Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile on the device.

To install each individual Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile requires 2 separate executables

A program that loops through the list of all of the CAB files and uses ShellExecute to install each one individually
A DLL that gets associated with the master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile. All CAB files can optionally have a DLL associated with them. The DLL must expose 4 entry points: Install_Init, Install_Exit, Uninstall_Init, and Uninstall_Exit. In this case the DLL associated with the master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile simply executes the above program from the Install_Exit entry point

Once the master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile, Program and DLL are complete, the install process goes like this:

The master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile is copied to the device
The user initiates the Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABFile install process by using the File Explorer (or similar) to navigate to and tap on the master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile.
The device installs the master Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile just as any other Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABFile by extracting the individual CAB Files and placing them on the device in the location specified in the Visual Studio Smart Device CAB project.
Once all of the individual CAB files are placed on the device, the DLL's Install_Exit entry point (a.k.a. function) is called
The Install_Exit function then launches the program
The program then loops through each Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile and installs them

Note that the first 2 steps that the user manually performs can be automatically performed as part of a desktop MSI as discussed in Click to read this topic
9/29/2006 10:31:50 AM - hedgehogjim
InstallApplication

Like pretty much anything else in programming, the best way to understand the multiple Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile install process is with a sample.

Download Multiple CAB file Install Sample

If you would like information about how to install a Click to read this topic
5/23/2007 3:39:37 PM - hedgehogjim
CABfile to a device from a desktop MSI file...

Checkout the Click to read this topic
9/29/2006 10:31:50 AM - hedgehogjim
InstallApplication entry
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐