deploy过程(部署)

deploy过程(部署)

1.创建一个Windows application
    (1)File-New-Project
    (2)
New Project对话框,Project Type栏中选择Visual Basic Project(任意),然后在 Template栏中选择 Windows Application.Name栏中填入My Notepad
    (3)
OK关闭对话框.此项目被添加到了Soulation Explorer.
    (4)
在工具箱中选择Windows Form,把一个Button控件拖到窗口上.
    (5)
双击Button控件来添加控件的事件.在这个事件中添加:
         Shell("Notepad.exe",AppWinStyle.NormalFocus)
    (6)
选择Build-Build My Notepad 生成程序.
2.
创建一个部署项目.
    (1)File--Add Project--New Project
    (2)--Other Project Types--Setup and Deployment--Setup Project -- name:001--ok.
    (3)
在解决方案中选择My Notepad Installer项目,在属性窗口中设置ProductNameMy Notepad.
   
注意: ProductName属性决定程序文件夹及"添加删除"对话框中的名字.
3.
Windows Applation添加到installer
   (1)
选择My Notepad Installer 项目, "File System Editor"中选择Applation Folder节点.
   (2)Action--Add--Project Output
   (3)
Add Project Output Group 对话框,Project下拉列表中选择My Notepad.Ok
   (4)
从表中选择Primary Output,OK
   (5)Built--Built My Notepad Installer.
  Note:
此时即可进行部署,不过此时部署的文件被成为绿色程序.
4.
创建快捷方式.
   (1)
选择 My Notepad Installer .
   (2)
File System Editor,选择 Primary output from My Notepad 节点.
   (3)Action-- Create Shortcut to Primary Output from My Notepad.
  
将创建一个My Notepad的主输出的快捷方式.
  (4)
重新命名 My NOTEPAD.
  (5)
把此快捷方式拖到左面的 User's Desktop folder.
5.
创建文件集.To create file associations for the Windows application ???
   (1).
选择 My Notepad Installer 项目. View-- Editor-- File Types.
   (2)
选择 File Types on Target Machine 节点在 File Types Editor. Action-- Add File Type.
  
一个新的Document Type #1 节点被添加,可重命名 .
   (3)
重命名 New Document Type #1 Vbn.doc.
   (4)
在属性窗口,设置 Extension属性为 vbn.
   (5)
选择 Command属性 ,点击..按钮. 通过Application Folder选择Primary output from My Notepad.Ok.
6.
添加注册表条目
   (1)
选择 My Notepad Installer 项目,View--Editor--Registry.
   (2)
选择HKEY_CURRENT_USER 节点并展开,然后展开Software节点,选择[Manufacturer] 节点
   
注意:[]中的Manufacturer表示是一个属性.它会被部署项目中设置的Manufacturer属性替代.
   (3)Action--New--Key
   (4)
重命名key - UserChoice
   (5)
选择UserChoice Key
   (6)Action--New--String Value
   (7)
重命名TextColor
   (8)
在属性窗口,选择Value属性,输入Black
7.
添加自定义安装对话框.
   (1)
选择My Notepad Installer 项目.View--Editor--User Interface.
   (2)
选择Install下面的Start节点
   (3)Action--Add Dialog
   (4)
Add Dialog 中选择Checkboxes(A)
   (5)
ok
   (6)Action--Move Up
两次,使CheckboxesInstalltaion Folder
   (7)
在属性窗口,设置BannerText属性为Samples
   (8)
设置BodyTextThe Install Samples check box controls whether or not the sample files are installed.   If left unselected, the samples will not be installed.
   (9)
设置 CheckBox1Label 属性为 Install samples?
   (10)
设置 Checkbox2Visible, Checkbox3Visible, and Checkbox4Visible为假. 将隐藏附加选框.
8.
工作在Samples文件夹.
   1.
添加Sample文件夹
     (1)
选择My Notepad Installer项目,View--Editor--File System. Application Folder 必须仍被选择.
     (2)Action-- Add-- Folder.
     (3)
重命名  "New Folder #1" Samples
  2.
添加Sample文件
     (1)
使用Notepad或其他文本编辑器,创建一个文件包含内容"This is a rules.vbn",另存为Rules.vbn.
 
注意:其默认为.text.
     (2)
创建另外一个包含"This is memo.vbn". 另存为 Memo.vbn.
  3.
Installer添加Samples.
     (1)
选择My Notepad Installer项目.View--Editor--File System--选择Sample文件夹
     (2)Action--Add--File,
添加Rules.vbnMemo.vbn文件到Samples文件夹.
     (3)
File System中选择Rules.vbn
     (4)
在属性窗口设置Condition属性为CHECKBOXA1=1,仅当客户选择了后才安装.
     (5)
选择Memo.vbn 文件,在属性窗口中设置Condition属性为CHECKBOXA=1.


9.Adding Launch Conditions
  NOTE:
判断是否存在IE5.0或更高版本.
  (1)
选择My Notepad Installer 项目,view--Editor--Launch Conditions
  (2)
launch Conditon 编辑器中,选择 Requirements on Target Machine 节点.
  (3)Action--Add File Launch Condition
A Search for File1 node is added beneath the Search Target Machine node, and a Condition1 node is added beneath the Launch Conditions node.
  (4)
重命名Search for File1 Search for Internet Explorer
  (5)
设置 FileName属性为 Iexplore.exe, Folder[ProgramFilesFolder],Depth2, MinVersion5.00.
  (6)
选择 Condition1 节点.设置 Message属性为 This program requires Microsoft Internet  Explorer 5.0 or higher. Please install Internet Explorer and rerun the Notepad installer.

10.为部署项目设置可选属性.
  (1)
选择 My Notepad Installer项目.  View--  Property Pages.
  (2)
My Notepad Installer属性页, 选择Bootstrapper下拉列表,选择Windows Installer Bootstrapper.
  (3) Build-- Build My Notepad Installer.
11.
安装项目
   1.
将项目安装在本机.
  
选择My Notepad Installer 项目. Project-- Install.
   Note :
你必须有安装权限.
   2.
部署到其他机器
  
复制相关元件.
12.
测试
   
看是否实现功能.

 

转载于:https://www.cnblogs.com/wangzw/archive/2006/03/15/350596.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值