博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年9月04日周六_Deploying to windows_4.3

Posted on 2010-09-12 16:35  星尘的天空  阅读(308)  评论(0编辑  收藏  举报

/*************************************************************/

//Developing mobile applications using the Mobile SDK

//Deploying to windows

//201094

/************************************************************/

 

Your windows based mobile application can be distributed to windows based pc's through a number of means. This topic will look at three methods including xcopy, ClickOnce and windows installer, providing an overview and information relevant to mobile applications deployment. For more in depth information on these deployment methods you should read the MSDN topic Deploying .NET Framework applications.

你的基于Windows mobile 应用通过若干种方法部署到基于windowsPC计算机上。 这个题目将窥探三中方法,包括:Xcopy,单击一次,windows下安装,提供一个对mobile应用部署的概述和信息。关于这些部署方法更深入的信息,你应该查看MSDN的题目:Deploying .NET 架构程序。

 

xcopy

The xcopy deployment method simply involves copying the application executable, the mobile SDK libraries and any other dependant files to a target directory on the target windows based machine. The application is then run from the target directory. You must also ensure the .NET 2.0 framework is installed on the machine.

The other deployment methods are in reality smarter and more user friendly versions of the xcopy deployment and are recommended for enterprise environments where you have to install on a large number of machines.

Xcopy 部署方法就是:简单的拷贝应用程序的可执行文件,mobile SDK类库和任何其他的依赖的文件到目标计算机中的目标目录。然后应用就从目标的目录中运行。 还有,你必须保证.NET Framwork 2.0已经安装到你的计算机中。其他的部署方法实际上比Xcopy部署方法更加聪明和更加用户友好,并且推荐用于需要在很多计算机上安装的企业环境。

ClickOnce

ClickOnce is a new deployment technology provided with the .NET Framework which offers many advantages over the traditional windows installer including a choice of deploying mechanisms (web, file or media based), incremental(增值、增加) updates and greater security. Visual Studio provides full support for publishing and updating applications deployed with ClickOnce. Like windows installer, ClickOnce creates a setup executable that the user runs via a web page or file location which in turn installs the application.

There are two requirements when creating Windows based mobile SDK applications with ClickOnce. Firstly the applications must be granted full trust permissions. Secondly you should sign the ClickOnce manifest with an appropriate certificate(证()书,执照). During development a temporary(暂时的、临时的) certificate is generated and assigned but for release applications you should obtain an appropriate(合适、专有的) certificate. The MSDN help topic referenced above contains more details on these requirements.

The following steps show you how to setup and publish a windows based mobile application to a disk path via ClickOnce.

Click Once 是一个新部署技术,它是由.NET Framwork提供,Click once 提供了很多比传统windows安装更先进的技术,包括:一个部署机制的选择(网络、文件、或者基于多媒体),增加更新,和超级安全。 VS提供了用于和click once 一起部署的publishing updating 应用程序的完全支持。比如:windows 安装,Click Once 创建了一个setup 可执行文件,用户可以通过一个web页面或者文件位置安装应用程序。

当使用ClickOnce创建基于windowsmobile SDK应用程序,这里有两个要求。第一:应用应该授予安全信任许可。第二:你应该为click once 签署一个名称的合适的证书。当部署一个临时的证书可以生成和签署的时候,但是对于应用的发行,你必须获取一个专有的证书。MSDN帮助题目中对于涉及上面的话题包含更多关于这些要求的详细信息。

下面的步骤向你展示了如何通过click once安装和发布一个基于windowsmobile 应用到一个磁盘路径。

*   Open your windows based mobile project in Visual Studio.

*   Display the project properties for your application.

*   In the Security Tab, check Enable ClickOnce Security Settings and set to This is a full trust application.

*   Select the Publishing Tab.

*   Enter a Publishing Location file path. If you wish other to install from this location, this should be a shared path.

*   For Install Mode and Settings, select The Application is available offline.

*   Click Application Files and verify the required files are included.

*   Click Prerequisites(先决条件). Check all applicable(适当的、合适的) prerequisite packages for your application. You can include a check for the .NET Framework.

*   Click Options. Enter a publisher name and product. These are used to create the program name under the start menu when installed.

*   Click Publish Now to publish the application to the disk path.

VS中打开你的基于windowsmobile工程。

展开你的应用的工程属性

Srcurity 页签,选中Enable ClickOnce Security Settings,并设置这是一个完全信任的应用。

选择publishing Tab

输入一个发布位置文件路径。如果你希望其他人从这个位置安装,你应该设置它为可分享的路径

对于Install Mode and Settings,选择The Application is available offline

单击应用程序文件,核实(证实)需要的文件已经包含了。

单击选角条件。选择所有用于你的应用的适当的先决条件包,你还应该选中. NET Framework.

单击Options,输入一个出版商的名称和产品。 这是用于当安装的时候创建在【开始】菜单中程序的名称。

单击“Publish Now”发布应用到磁盘路径。

Navigate to the published disk path and run the setup.exe file located there. This will install the application on your machine. You can run the application via the Windows Start -> Programs menu item. Uninstall the application via windows add/remove programs.

找到发布的磁盘路径和在此处运行安装安装文件(setUp.ext)。这将会安装应用到你的计算机中。 你可以通过windows->Programes菜单项运行此程序。通过widnows add/remove programes来卸载此应用程序。

Windows Installer

The Windows installer allows you to create a deployment package consisting of a setup executable and supported files. These are distributed to the user who then runs the executable and installs the application via a wizard. The deployment package is created via a setup project within Visual Studio.

The windows installer has no prerequisites other than those mentioned in the title page. You include the executable, the mobile SDK libraries and any supporting files in you're setup package.

Windows 安装

Windows 安装允许你创建一个部署包,它包括一个setUp可执行文件和支持的文件。 他们将会被分发给那些通过一个向导运行可执行文件,安装应用程序的用户。这个部署包是在通过VS里面的一个setup工程创建的。

Widows安装没有先决安装条件,除了这些在标题页面中提到的。包括可执行文件,mobile SDK类库和任何在安装文件中用于支持的文件。

The following steps show you how to create a deployment package for a windows based mobile application using the windows installer.

下面的步骤向你展示了如何使用windows installer 创建一个基于windows的移动应用部署包:

*   Open your windows based mobile project in Visual Studio.

*   Right-click on your solution in the Solution Explorer . Click Add then New Project.

*   In the Add New Project dialog box, in the Project Types pane长方块, open the Other Project Types node, click Setup and Deployment Projects, then click Setup Wizard in the Templates pane.

*   Click OK to close the dialog box.
The Setup Wizard dialog box opens.

*   Click Next when you have read the introduction screen.

*   On the Choose Project Type panel, select Create a setup for a Windows application and click Next.

*   On the Choose project outputs to include panel, check Primary output from.... and click Next.

*   On the Choose files to include panel, click Add , then navigate to the bin output directory for your compiled application. Select the native windows mobile library (ESRIMobile92.dll) and click Open. The file is added to the panel. Click Next.

*   Review the Create Project panel and click Finish.
The setup project is added to your solution.

*   Examine the properties for the setup project. The Manufacturer and ProductName properties determine the program files menu and submenu items when the application is installed. Change these to meet your requirements.

*   Build the solution, click Build from the main menu then Build Solution.

*   VS中打开你的基于windowsmobile 工程

*   在你解决方法管理器上右击,单击“Add”,然后选择“New Project

*   在“Add New Project”对话框中,在“Project Type”长方框中,打开“Other Porject Type”节点,单击Setup and Deployment Projects,然后在模板长方块中单击“Setup     Wizard

*   单击【OK】选择对话框,出现Setup Wizard 对话框。

*   当你阅读完介绍信息后,单击“Next”

*   Choose Project Type选项中,选择Create a setup for a Windows application 然后单击【Next

*   Choose project outputs to include 方块中,选中Primary output from.... 然后单击【Next

*   Choose files to include方块中,单击Add,然后导航到编译你应用程序的输出目录“Bin”。选择native windows mobile library (ESRIMobile92.dll),然后单击【ipen】,这个文件就被添加到panel中,接着单击【Next

*   重新查看Create Project panel ,然后单击【Finish】,setUp工程已经添加到你的解决犯法管理器中

*   检查setup工程的属性,Manufacturer ProductName属性决定应用程序安装的时候节目文件菜单和子菜单项的内功。 修改这些来满足你的需求。

*   编译solution,单击主菜单中【Build】,然后编译解决方案

*    

The deployment package can be found under setup project output directory and usually consists of a setup.exe and setup.msi files. To install the application on this computer you can simply run the setup.exe file. These files can be deployed to other computers via shared directories or media.

Included in the developer kit contains a sample for deploying your own ArcGIS Mobile based application on Windows platform. The Windows sample will build MSI installer that includes a sample application and ArcGIS Mobile runtime required to run ArcGIS Mobile based application on Windows platform. The instructions on how to build and use the sample are included in the SDK.

部署文件包可以在setup工程输出目下找到,通常它包含一个setup.exe文件和setup.msi文件。 为了安装程序到本地计算机,你只需要简单的运行setup.exe文件即可。 这些文件可以通过分享目录或者媒介(中间方法)部署到其他的计算机中。

在开发包中包含一个用于部署你自己的基于ArcGIS Mobile的应用到windows 平台的例子。 Windows 例子将创建MSI安装文件,它包含一个实例应用程序和ArcGIS Mobile Runtime,她是在windows平台下运行基于ArcGIS Mobile应用要求的支持的文件。SDK中包含如何创建和使用sample的介绍。