自动更新使用谷歌代码 [英] AutoUpdate using Google Code

查看:179
本文介绍了自动更新使用谷歌代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让我的软件自动更新自身,但我并没有广泛的网页设计技巧,也没有任何可用的网站/在线托管。我想这样做在C#/ WPF。

I want to make my software autoupdate itself, but I don't have extensive webdesign skills, nor any available website/online hosting. I want to do it in C#/WPF.

所以,我想知道是否有可能是一个办法使用谷歌代码,干净的东西,使自动更新服务。 。我猜,我不去想它的第一个

So I was wondering if there could be a way to make an autoupdate service using google code, something clean. I'm guessing I'm not the first one to think of it.

我会做这种方式:

1)使用web浏览器(默默)并导航到我的谷歌代码页。在该页面中我会把我在这里进入最新版本号的字段。 (我需要以某种方式找到在页面的内容,这个数字)。

1) Use a WebBrowser (silently) and navigate to my google code page. On that page I'd put a field where I enter the latest version number. (I need to somehow find that number in the page's content).

2)我比较这个数字到当前安装的版本(我可以把CURRENT_VER_NUMBER在*。 TXT的软件,例如文件夹)。

2) I compare that number to the version currently installed (I could put the CURRENT_VER_NUMBER in a *.txt in the software's folder for example).

3)如果我的结论是一个新的版本,我从我的谷歌代码项目的下载选项卡下载,将它解压缩,覆盖在安装目录中的文件,然后重新启动应用程序。

3) If I conclude that a new version is available, I download it from the "Downloads" tab of my google code project, unzip it, overwrite the files in the installation directory, and restart the app.

首先,将这项工作罚款?当我imaginate它,它听起来就像肮脏的代码。

First of all, would that work fine? When I imaginate it, it sounds like dirty code.

然后,我不知道如何导航到下载选项卡,甚至更少如何选择最新的版本有(也许做了非常严格的文件命名),并下载。

Then, I wouldn't know how to navigate to the downloads tab, even less how to select the latest version there (maybe by doing a very strict file naming), and download it.

和最后但并非最不重要的,如果应用程序已经以执行更新检查运行,我不能覆盖该文件,而无需退出应用程序,这是否意味着我必须做出某种主应用程序执行开始我的软件之前的检查?听起来脏得= /

And last but not least, If the application is already running in order to perform the update check, I couldn't overwrite the files without quitting the application, does that mean I have to make some kind of "master app" that performs the check before starting my software? Sounds dirty too =/

任何投入是非常受欢迎的,

Any input is very welcome,

有一个愉快的一天。

推荐答案

我遇到了一些问题,但总体来说并没有那么难。我想的办法是干净的,所以我把它在那里,如果有谁想达到类似的东西。

I ran into a few problems, but overall it was not so hard. I think the approach is clean so I'm putting it out there if anyone ever wants to achieve something similar.

您得看看:的 https://code.google.com/p/theomniscientchimp/ ,其中完整的源代码是可用的,当然调整你的项目。

You'll have to check out: https://code.google.com/p/theomniscientchimp/ where the full source is available, and of course adjust it for your project.

感谢在我原来的职位的评论,让我觉得有信心,我在做正确=)

Thanks for the comments on my original post, made me feel confident i was doing it right =)

这篇关于自动更新使用谷歌代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆