windows补丁集成安装包制作教程之开始制作(XP为例图片详解) - 天崖飲士的日志 -...

来源:百度文库 编辑:神马文学网 时间:2024/04/29 05:25:41

1.首先需要用的一些文件如图:

XPlodeSelectInstall.x4d

XPlodeExecute.x4e

XPlodeFileOps.x4e

XPlodeRegistry.x4e

XPlode.xml

XPlode.exe

selection文件夹如图:(footer.html;javascript.js;left.html;select-frameset.html;styles.css;title.html;main.html)

images文件夹如图:存放一些图标如:office.png;IE.png;wmp.png等一些在介面里显示的图片;

SEV文件夹如图:主要放一些补丁程序,如果有需要可以自己在里面分类

SE2文件夹如图:

soft文件夹如图:主要放一些软件,我这里放了IE7.0和WMP11等

TEMP文件夹如图:放些安装图标什么的,还有些软件说明一些杂项,呵呵

2.对于些程序我们不要考虑太多,我们只要考虑XPlode.xml文件编写(编写补丁输入)和selection(整体软件框架的美观大小等学过网页设计的人应该知道)文件夹下的文件编写,用记事本打开编就行了.像TEMP下的Licence.txt这些文件自己表述一下好了.还有图标自己去找个好看的吧,呵呵.

XPlode.xml文件代码如下(你在要在里加自己要的补丁就行了):


 
  
  
  
  


   

 

   #XPLODE#\selection\select-frameset.html
   
   
   当前用户#COMPUTERNAME#
   安装XP系统补丁
   安装office2003系统补丁
                        安装IE7.0 程序
   
   安装Media Player补丁
   ----无----
  
   
   
   
   truea
  
 
 

 

 
  

                                         #XPLODE#\SEV\WindowsXP-KB873333-x86-CHS.exe
/Q /N /Z


#XPLODE#\SEV\WindowsXP-KB918118-x86-CHS.exe
/Q /N /Z

 


#XPLODE#\SEV\SE2\office2003-KB914455-FullFile-CHS.exe
/Q /N /Z


#XPLODE#\SEV\SE2\office2003-KB917151-FullFile-CHS.exe
/Q /N /Z


#XPLODE#\SEV\SE2\office2003-KB917334-FullFile-CHS.exe
/Q /N /Z


#XPLODE#\SEV\SE2\office2003-KB918419-FullFile-CHS.exe
/Q /N /Z


#XPLODE#\SEV\SE2\office2003-KB929057-FullFile-CHS.exe
/Q /N /Z


#XPLODE#\SEV\SE2\office2003-KB929064-FullFile-CHS.exe
/Q /N /Z


#XPLODE#\SEV\SE2\office2003-KB923091-FullFile-CHS.exe
/Q /N /Z


#XPLODE#\SEV\SE2\office2003-KB925257-FullFile-CHS.exe
/Q /N /Z




configs="安装IE7.0 程序">
#XPLODE#\soft\IE7.0\IE7和WMP11和Windows Defender破解补丁.bat
/q /n /z

configs="安装IE7.0 程序">
#XPLODE#\soft\IE7.0\IE7-WindowsXP-x86-chs.exe


#XPLODE#\SEV\SE2\IE7-KB928090-WindowsXP-x86-chs.exe
/Q /N /Z

    




#XPLODE#\SEV\WindowsMedia10-KB911564-x86-CHS.exe
/Q /N /Z


#XPLODE#\SEV\WindowsMedia10-KB911565-x86-CHS.exe
/Q /N /Z


#XPLODE#\SEV\WindowsMedia10-KB917734-x86-CHS.exe
/Q /N /Z

configs="安装Media Player补丁">
#XPLODE#\soft\IE7.0\IE7和WMP11和Windows Defender破解补丁.bat
/q /n /z


#XPLODE#\soft\WMP11\Windows Media Player11 简体中文版.exe


    



selection下文件代码如下:

main.html文件:



 
 
 
 
 
  

cellspacing='0' cellpadding='8' >
  


    
   
  

 

left.html文件:



 
 
 
 
 
  


   
    
   
  

  
   
     
   
  

 

title.html文件:

<%@ Language=JavaScript %>

 
 
 
 
 
  

>

   


    
    
   
  
欢迎使用 Windows XP update 2007.05.01

 

footer.html文件:



 
  
  
  
 
 
  


  
   
    
    
    

    
    


   
  

    本程序由 Javenlv 制作 
 

  

 

select-frameset.html文件:



 
 
 
 
 

 
  
  
   
   
  
  
 

javascript.js文件代码:

 

 

// the currently selected item
var current_item = -1;

// variable that holds the list of item+tags
var itemlist = null;

// retrieve the list of configurations
var configs = new Array();
for(var cf = 0; cf < 10; cf++) // max of 10 diff configs
{
 var t = window.external.GetDispInner("config("+cf+")");
 if(t.length)
  configs[configs.length] = t;
}
// add two - All On, All Off
configs[configs.length] = "全部安装";
configs[configs.length] = "全部不安装";

// get the time to delay (in seconds)
var timer = parseFloat(window.external.GetDispInner("delay"));
// default to forever if not specified
if(timer == "") timer = -1;
// timer interval identifier
var timerinterval = null;

// function that automatically checks the required boxes depending on the configuration selected
function loadConfig(config)
{
 // make sure the currently selected item is a valid item
 if(current_item >= 0 && current_item < window.external.GetItemCount())
  parent.left.document.getElementById('item'+current_item).className = "installitem"; // clear the selected class - make it normal bgcolour

 // loop through all the items
 var items = window.external.GetItemCount();
 for(var i = 0; i < items; i++)
 {
  // loop through all the tags
  var tags = window.external.GetTagCount(i);
  for(var t = 0; t < tags; t++)
  {
   // check if this is part of the specified config, and if so, check it to true
   if(itemlist[i][t][4].indexOf(config) != -1)
    itemlist[i][t][3] = true;
   else
    itemlist[i][t][3] = false;
  }
 }
 // set the main text to say that we've loaded a new config
 parent.main.document.getElementById('shell').innerHTML = "当前选项 '"+parent.title.document.getElementById('configs').value +"'
说明:请在左边选择相关安装程序(可选项).如果想要默认安装请在下拉框中选择你所要安装的程序补丁.

例:选择XP系统补丁安装,按右下角Install程序将自动安装你所有的XP系统补丁程序.
如果想自定义安装请按左边的程序图标并选项安装.

@本程序为方便所写,并无商业目的,免费无插件,有问题请联系我!
[--天崖钦居-Javenlv--]
Email:javenlu@126.com
QQ:35820682
MSN:javenlu@hotmail.com.
Blog: http://ljb1314.blog.163.com." 
 
}


// function that updates the timer in the footer
function updateTimer()
{
 parent.footer.document.getElementById('timer').innerHTML = timer.toFixed(1) + " seconds to installation";
 if(timer <= 0)
 {
  clearTimer();
  runInstallation();
  return;
 }
 timer -= 0.1;
}

// function that stops the timer
function clearTimer()
{
 parent.footer.document.getElementById('timer').innerHTML = "";
 clearInterval(timerinterval);
}

// function that loads the display data from the XML
function loadData()
{
 // retrieve the number of items
 var items = window.external.GetItemCount();
 // create the item array
 itemlist = new Array(items);
 // loop through each item
 for(var i = 0; i < items; i++)
 {
  // get the number of tags enclosed by this item
  var tags = window.external.GetTagCount(i);
  // create this item's tag array
  itemlist[i] = new Array(tags);
  // loop through each tag
  for(var t = 0; t < tags; t++)
  {
   // create this tag's information array
   itemlist[i][t] = new Array(5);
   
   // retrieve the data
   itemlist[i][t][0] = window.external.GetTagAttr("display", i, t);
   itemlist[i][t][1] = window.external.GetTagAttr("desc", i, t);
   itemlist[i][t][2] = window.external.GetTagAttr("image", i, t);
   itemlist[i][t][3] = false; // checkbox selected 0 false by default
   itemlist[i][t][4] = window.external.GetTagAttr("configs", i, t) + ",All On";
   
   // check if this tag is part of the first config, and if so, check it to true
   if(itemlist[i][t][4].indexOf(configs[0]) != -1)
    itemlist[i][t][3] = true;
  }
 }
}

 

// function that gets run as soon as the page has finished loading
function loadComplete()
{
 // load the data from the XML
 loadData();
 
 // set up the combobox
 var t = "";
 t += "";
 parent.title.document.getElementById('shell').innerHTML = t;
 
 // enable the right checkboxes for the first config
 loadConfig(configs[0]);
 
 // get the inner HTML of the "shell" element
 var text = parent.left.document.getElementById('shell').innerHTML;
 
 // get the item count of the XML
 var items = window.external.GetItemCount();
 
 // add all the items from the XML to the page
 for(var i = 0; i < items; i++)
  text = addItem(text, i);

 // set the new inner HTML of the "shell" element在左边显示的文本设置
 parent.left.document.getElementById('shell').innerHTML = text;
 
 // set the footer's text
 parent.footer.document.getElementById('footer').innerHTML = "[    ]";
 
 
 
}
function addItem(text, itemno)
{
 // get the various attributes from the XML
 var disp = window.external.GetItemAttr("display", itemno);
 var image = window.external.GetItemAttr("image", itemno);
 
 // set up the item's display layout - name of checkbox ends up being item4 etc.
 text += "

";
 text += "
";
 text += "
";
 text += "
";
 text += "
";
 text += "
";
 text += "
"+disp+"
";
 text += "
 
";

 // return the updated text
 return text;
}
function checkuncheck(itemno, tagno)
{
 // toggle this tag's checked state
 itemlist[itemno][tagno][3] = !itemlist[itemno][tagno][3];
}
function addTag(itemno, tagno)
{
 // get the various attributes from the XML
 var disp = itemlist[itemno][tagno][0];
 var desc = itemlist[itemno][tagno][1];
 var image = itemlist[itemno][tagno][2];
 var checked = itemlist[itemno][tagno][3] == true ? "checked" : "";
 
 // set up the item's display layout - name of checkbox ends up being item4 etc.
 var text = "";
 text += "";
 if(image)
  text += "";
 else
  text += " ";
 text += " "+disp+"";
 text += "";
 text += "";
 text += " "+desc+"";
 text += "";
 text += " ";

 // return the updated text
 return text;
}
function edititem(itemno)
{
 // make sure the currently selected item is a valid item
 if(current_item >= 0 && current_item < window.external.GetItemCount())
  parent.left.document.getElementById('item'+current_item).className = "installitem"; // clear the selected class - make it normal bgcolour
 
 // set the NEW selected item
 current_item = itemno;
 
 // change the bgcolour of the selected item
 parent.left.document.getElementById('item'+current_item).className = "installitemsel";

 // make the table with this item's tags listed
 var text = "

";
 var tags = window.external.GetTagCount(current_item);
 for(var i = 0; i < tags; i++)
  text += addTag(current_item, i);
 text += "
";

 // set the text安装左边选项时在MAIN主窗口显示相应列表
 parent.main.document.getElementById('shell').innerHTML =text;
 
 // clear any delay timer
 clearTimer();
}

 

// function to pause for a number of milliseconds without locking up
function pause(numberMillis) {
 var dialogScript =
    'window.setTimeout(' +
    ' function () { window.close(); }, ' + numberMillis + ');';
 var result =
  window.showModalDialog(
    ' +
  '"