Updatelogic / Deploy for Application [英] Updatelogic / Deploy for Application

查看:59
本文介绍了Updatelogic / Deploy for Application的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello CP'ians,



i有一个关于如何更新程序的问题(自写软件)。



正面,该软件由我编写,最初用于内部目的。

因此我想到了一个自编的软件更新程序,它只会替换过时的.dll和.exe文件。另一方面,这件作品可以转移给我们在日本的朋友。



因此,我想询问我是否采取正确的方式或是否有人可能有比我更好的主意。



描述一下情况:

软件分为不同的部分和应用程序。这就是为什么我必须实现一个分离每个应用程序的更新逻辑。目前我将有3种不同的状态。

状态1:Project-App已安装 - >只更新necessery的东西

状态2:安装了Admin-App - >只更新必要的东西

状态3:两者都安装 - >更新所有内容



我的想法是在构建服务器上提供新文件,以便每个人都可以访问。



目前我正在考虑一个XML文件,它充当配置并存储已安装的内容并知道所需的文件+位置。这可以在安装时初始化。然后我的程序检查是否有可用的更新,如果是,则启动正在复制文件并重新启动程序的更新程序。



现在我解决了几个问题,我不知道有一个安装程序,因为提供的VS不再存在我想我必须自己编写?



另一件事是,我怎么能应付新的添加(模块).dll / .exe / xml中没有列出的任何文件?

- 我认为我的程序总是检查xml是否发生了变化,但这意味着我必须拥有一个xml在服务器上为每个程序提供文件,并且必须手动维护。

那么如何应对?



最后但不是至少,当我们运送程序时,他们无法维护我可以为内部目的做的事情。

那么我该怎么办? VS的补丁是否足够?如果你要在自己的服务器上托管补丁,它会起作用吗?



这就是为什么我会问,我应该选择VS提供的集成工具,比如创建补丁和东西和使用他们的安装程序或你是否有人知道一个更好的主意,更少的MS附加,我错过了什么?



请随时询问您是否需要其他信息

问候和感谢

HobbyProggy

Hello CP'ians,

i got a Question about how to update a program (selfwritten software).

On the forehand, the software is written by me and at first for internal purpose.
Therefore i thought about about a selfwritten software updater that would just replace the outdated .dll and .exe files. On the other side, this piece of work could be transferred to our friends in Japan.

Therefore i wanted to ask if im going the right way or if someone might have a better idea than me.

To describe you the situation:
The software is splitted into different parts and applications. That's why i have to implement a update logic that seperates each application. Currently i would have 3 different states.
State 1: Project-App is installed -> only update necessery stuff for that
State 2: Admin-App is installed -> only update necessary stuff for that
State 3: Both are installed -> update everything

My idea is to provide the new files on a build server, so that everyone has "access".

Currently i am thinking about an XML file that serves as config and stores what has been installed and knows the needed files + location. This could be initialized on installation. Then my Program checks if an update is available, if yes starts the updater which is copying the files and restarts the program.

Now i encouter several problems, i don't have an installer and since the one VS provided isn't there anymore i guess i have to write my own?

Another thing is, how could i cope with new added (modules) .dll/.exe/whatever files that are not listed in the xml?
-I thought that my program always checks if the xml changed, but that means i have to have an xml file on the server for every program and have to maintain it by hand.
So how would one cope with that?

Last but not least, when we ship the program, they can't maintain the stuff i can do for internal purpose.
So what should i go for? Is VS's patchthingy sufficient for that? Does it work if you would host the patches on a own server?

That's why i question, should i go for the integrated tools that VS provides, like creating patches and stuff and using "their installer" or does someone of you know a better idea, less MS attached and am i missing something?

Please feel free to ask if you need additional info
Regards and thanks
HobbyProggy

推荐答案

ClickOnce [ ^ ]可能正是您正在寻找的。但是,如果你想自己写一些东西,这是一个想法。



在组织网络中运行的基于客户端服务器的Windows应用程序中,你可以使用以下命令执行更新逻辑。



1.必须有包含所有DLL文件的名称和版本号的文件。

2.客户端应用程序启动时,在其他任何事情之前,它将#1中的文件内容发送到服务器。 DLL按需加载,所以我建议将其作为第一步。

3.服务器将有一个类似的文件,但有最新的版本细节。

4.服务器将检查版本不匹配,如果

a。版本相同,成功标志将发送到客户端应用程序继续。

b。如果版本不匹配,服务器将把最新文件推送到客户端系统。这将需要具有整个网络特权的用户帐户,这在组织中通常不是问题。一旦推送文件,服务器就会向客户端应用程序发回通知,然后可以根据需要重新启动。



如果您的应用程序部署在客户端网络上,#1到4a保持不变。但是,4b会改变如下。



4b。服务器通知DLL文件已过时并提示用户更新。如果用户选择升级,他们可以将文件从服务器下载到安装目录。在这种情况下,最终用户必须在他的计算机上具有所需的访问权限。



如果您要创建更新的模块,可以有两种方法来处理这个问题。



1.向用户提供更新的安装程序文件。这是可行的解决方案,假设首先运行的组件也发生了变化。

2.如果你有一个即插即用的架构,即使你要添加更新的模块也不会影响启动装配,你可以选择与更新相同的方法。



PS我们应该删除评论链吗?
ClickOnce[^] probably does exactly what you are looking for. However if you looking to write something on your own, here's an idea.

In client server based windows application that runs within the organization network, you can perform updates using following logic.

1. There must be file containing name and version numbers of all your DLL files.
2. When client application starts, before anything else, it sends content of file in #1 to server. DLLs are loaded on demand so I would recommend doing this as step one.
3. Server will have a similar file but with latest version details.
4. Server will check for version mismatch and if
a. Versions are same, success flag is sent to client application to continue.
b. In case of version mismatch, server will then push the latest files to client system. This will require a user account with privileges across the network which is generally not an issue in organizations. Once files are pushed, server sends back notification to client application which can then restart if needed.

In case your application is deployed on client networks, #1 through 4a remain same. However, 4b would change as following.

4b. Server notifies that DLL files are outdated and prompts user to update. If user choses to upgrade, they can download the files from server to the installation directory. In this case end user must have required access on his computer.

If you are creating newer modules, there can be two ways to deal with this.

1. Provide updated installer file to users. This would be viable solution assuming the assembly that runs first is also changed.
2. If you have a plug and play architecture where starting assembly is not affected even if you are adding newer modules you can go with same approach as you would for updates.

P.S. Should we delete the comment chain?


这篇关于Updatelogic / Deploy for Application的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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