将 CF 应用程序部署到 Windows 移动设备(使用配置文件)
我有一个基于 CF3.5 构建的应用程序,我正在尝试弄清楚如何将其部署到设备上。我创建了一个部署项目,并且可以很好地部署软件。
但是,该项目有一个 app.config 文件来保存一些运行参数。
我需要做的是生成 CAB 文件,并允许在同步到设备之前更改配置(在设备上更改配置是不可行的)。我遇到的问题是,如果我将其包含在设置项目中,那么它将包含在生成的 CAB 文件中,并最终出现在设备上的应用程序目录中。
我知道CAB文件的内容可以更改,但这是一个相当麻烦的过程。有没有办法让安装程序将名为 app.config 的文件从与 CAB 文件相同的目录复制到程序安装的位置?或者,有更好的方法来做到这一点吗?
I have an application, built on CF3.5 and I’m trying to work out how to deploy this to the device. I’ve created a deployment project, and that deploys the software fine.
However, the project has an app.config file to hold some running parameters.
What I need to be able to do is to produce the CAB file, and allow the config to be changed before it is synced to the device (changing it once it’s on the device is not viable). The problem I have is that if I include this in the set-up project, then it will be included in the produced CAB file and end up in the application directory on the device.
I’m aware that the contents of the CAB file can be changed, but this is quite a cumbersome process. It there a way to have the installation program just copy a file named app.config from the same directory as the CAB file to wherever the program is installed? Alternatively, is there a better way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您可以为您的 CAB 创建一个自定义 setup.dll 并修改app.config 与它一起。
Perhaps you could create a custom setup.dll for your CAB and modify the app.config with it.
您可能想查看Mortscript。这是一种在 Windows Mobile 上运行的脚本语言。
我自己完成了自定义应用程序的一些配置,但是在安装之后。但您也可以先进行一些操作,然后使用相同的脚本安装上限。
You may want to have a look into Mortscript. This is a scripting language that runs on windows mobile.
I have myself done some configuration of a custom application, however AFTER the installation. But you could also manipulate something first, then install the cap with the same script.