Best Way For Update Application

爱⌒轻易说出口 提交于 2019-12-20 07:02:05

问题


I am developing a game with WPF technology. I want to add new Features to game every third days . the size of update is important for me. my game needs to internet for start. like an online game. another challenge is size of updates. the most important note : I need to update of the program does not needing stop. what is your suggestion? Does clickonce is good option? thanks for your attentions. give me guideline please.


回答1:


ClickOnce deployment does incremental updates. When you deploy an update, if the date/time stamp and hash of the file are the same as the last version, ClickOnce copies them from the cached version into the new version instead of copying them across the internet.

If you have several projects in one solution, ClickOnce will deploy each of these every time, because they are recompiled and rehashed when you build the solution. BUT if you have projects that you do not think will change a lot, you can put them in a separate solution, build them, and include the dll in the main application. Then it won't be rebuilt and rehashed every time you publish, and won't be copied across the internet again.

As for starting from the internet, you can specify that the application be run online-only, which requires that the user be able to connect to the deploymnet manifest (.application file) and be able to check for updates every time he runs it.

Note that most people set ClickOnce to check for updates and install them before running, which ensures the customer is always running the most recent version.

I'm not certain what this means: "I need to update of the program does not needing stop".

If you want to update a ClickOnce application without forcing the user to close it, you can use the programming APIs to check for an update and install it, but you will have to restart the application in order to install the updates. (Application.Restart()).




回答2:


AS far as I know clickonce won't do what you want.

One option would be to take the source for a file diff application and retrofit it to compare the bytes of your binaries (V1.0 & V1.1 for arguments sake).

You'll then have make an instructions file that explains how to turn V1.0 into V1.1 with the output of this differential program.

You'll then need to write an updater app, that takes the upgrade instructions and turns V1.0 into V1.1 with them.

This way only the changed bytes have been sent over the wire and not the entire program

Have a look at this: http://www.codeproject.com/KB/files/LPTextFileDiff.aspx

Hope this helps :-)



来源:https://stackoverflow.com/questions/3223673/best-way-for-update-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!