The method and system that a kind of software client is upgraded by networkTechnical field
The present invention relates to the renewal of software client, the method and system that particularly a kind of software client is upgraded by network.
Background technology
The renewal of software client generally realizes by the Internet, by the renovator program, packaging file and regular file is upgraded, in order to realize the renewal of software client.The renovator program, when upgrading, is the renovator program of utilizing legacy version, if there is defect in the renovator program, software client can't upgrade, therefore, if by after the renovator program updates, renovator program by redaction is upgraded software client, can avoid problems.Simultaneously, the renovator program of legacy version is after upgrading packaging file and regular file, the renewal of software client is corresponding completing, but other renewals relevant to software client can't complete, as revise software bibliographic structure, revise the user configuration item, create shortcut, disk file arranged, the report of user data, eject special bulletin window etc., therefore, existing conventional update mode obviously has defect.
Summary of the invention
For addressing the above problem, the method and system that the object of the present invention is to provide a kind of software client to be upgraded by network, at first upgrade renovator, avoid the renovator of legacy version may have the problem of defect, renovator by redaction is upgraded software client again, comprises the special renewals such as bibliographic structure, shortcut.
The present invention solves the technical scheme that its problem adopts:
A kind of method that software client is upgraded by network comprises:
The renovator program detects self version number, when the renovator program of new version number being detected, the renovator program is upgraded, after the renovator program updates, by the redaction renovator, detected the version number of software client, when software client being detected new version number is arranged, software client is carried out to routine and upgrade.
Described method also comprises:
When the renovator program does not detect the renovator program of new version number, the version number of renovator direct-detection software client, when software client has new version number, carry out routine to software client and upgrade.
When described renovator program is upgraded, download the renovator program of the renovator program replacement legacy version of redaction from network service end.
It is described when software client is upgraded, downloaded the renewal bag of software client from network service end by the renovator program, described renewal bag includes regular file, packaging file and script file, and the renovator program is upgraded software client according to regular file, packaging file and script file successively.
When described renovator program is upgraded software client according to regular file, directly regular file solution from upgrade bag is pressed out, and it is covered to the file of the same name under software client.
When described renovator program is upgraded software client according to packaging file, directly packaging file solution from upgrade bag is pressed out, and by its with software client under the packaging file merging of appointment.
Content for script in described script file is for by interpreter execution script language or in arbitrary operating system execution script program.
The system that a kind of software client is upgraded by network comprises:
The renovator module, detect self version number for the renovator program, and when the renovator program of new version number being detected, the renovator program is upgraded;
The software client update module, for after the renovator program updates, detected the version number of software client by redaction renovator program, when software client being detected new version number is arranged, software client is carried out to routine renewal.
Described software client update module is not also when the renovator program of new version number being detected when the renovator program, version number by renovator direct-detection software client, when software client has new version number, software client is carried out to routine and upgrade.
When described renovator program is upgraded, download the renovator program of the renovator program replacement legacy version of redaction from network service end.
It is described when software client is upgraded, downloaded the renewal bag of software client from network service end by the renovator program, described renewal bag comprises regular file, packaging file and script file, and the renovator program is upgraded software client according to regular file, packaging file and script file successively.
When described renovator program is upgraded software client according to regular file, directly regular file solution from upgrade bag is pressed out, and it is covered to the file of the same name under software client.
When described renovator program is upgraded software client according to packaging file, directly packaging file solution from upgrade bag is pressed out, and by its with software client under the packaging file merging of appointment.
Content for script in described script file is for by interpreter execution script language or in arbitrary operating system execution script program.
The invention has the beneficial effects as follows:
The method and system that a kind of software client that the present invention adopts is upgraded by network, after renovator is upgraded, renovator by redaction is upgraded software client, the problem of avoiding the renovator of legacy version may cause software client to upgrade because of defect; When to software client the time, row upgrades, the renovator of redaction is when upgrading script file, can carry out special operational, as revise software bibliographic structure, revise the user configuration item, create shortcut, disk file arranged, the report of user data, eject special bulletin window etc., make disposable the completing of renewal of software client, reduce and even to eliminate follow-up problem that may generation.
The accompanying drawing explanation
Below in conjunction with accompanying drawing and example, the invention will be further described.
Fig. 1 is that in the method for the invention, software client upgrades schematic diagram;
Fig. 2 is the method for the invention flow chart;
Fig. 3 is that in the method for the invention, renovator upgrades flow chart;
Fig. 4 is that in the method for the invention, software client upgrades flow chart.
Embodiment
Upgrade schematic diagram with reference to software client shown in Fig. 1, software client comprises regular file and packaging file, also comprises renovator program and this software version number file, described software version number file record the version number of software client.Software client, when upgrading, needs to download the corresponding bag that upgrades, and shown in figure, upgrades the regular file and the packaging file that comprise that needs upgrade, also includes renovator program, renovator version number file and software version number file.Conventional software client upgrades, and uses the renovator program of legacy version, if the renovator program has defect, the renewal of software client just can't be carried out.Therefore, at first the present invention is upgraded the renovator program, software client is upgraded afterwards again.
With reference to the method flow diagram shown in Fig. 2, at first the present invention is upgraded the renovator program, detect the version number of renovator program self, if the renovator program of more recent version detected, the renovator program in software client that illustrates has redaction, software client is directly downloaded the renovator program of redaction from network service end, and the renovator program of replacing legacy version.Afterwards, start the renovator program of redaction, by the renovator program detection software client version number of redaction, if new version number is arranged, by the renovator program of redaction, carry out the also routine of software client and upgrade.If the renovator program of more recent version do not detected, the not renewal of renovator program is described, directly by the renovator program, carry out routine and upgrade.
Upgrade flow chart with reference to the renovator shown in Fig. 3, determine by the contrast of renovator version number whether the renovator program needs to upgrade, the renovator program of software client is after startup, the renovator routine access upgrades the renovator version number file on service end, and read out version number wherein, the version number that this version number is the service end renovator, the renovator program reads the version number of self afterwards, both are contrasted, if the version number of service end renovator is less than or equal to this self version number, show that the renovator program is without renewal, now the renovator step of updating finishes.On the contrary, illustrate that the renovator program needs to upgrade, the renovator program of download service end, replace the renovator program of client.Because this renovator program is moved, therefore, the present invention moves to a temp directory by current renovator program (being the renovator program of software client), the redaction renovator downloaded to is moved to the position at former renovator place, with this, completes replacement.
Upgrade flow chart with reference to software client shown in Fig. 4, after the renovator program completes renewal, need the update software client, during concrete the renewal, program can judge whether renovator is upgraded, if do not upgrade, directly enter conventional the renewal, if upgrade, need by the renovator of redaction, software client to be upgraded, now, the renovator program of legacy version can be passed through an independently renovator program of process initiation redaction, after renovator program startup etc. redaction, the operation of early version renovator EP (end of program), after the renovator program of redaction enters conventional renewal process, delete the renovator program of early version.In conventional renewal process, at first the renovator program of redaction accesses the software version number file that upgrades service end, read software version number wherein, and the version number of itself and local software client is contrasted, if local software client release number is more than or equal to the service end software version number, what show that the client uses is newer software product, does not now need software client is upgraded; If local client software version number is less than the service end software version number, show that the software version of client falls behind, need to carry out routine and upgrade.Start conventional renewal process:
The corresponding renewal APMB package of renovator download service end new version software of redaction, upgrading APMB package is a compression or incompressible packaging file, the needed file of current renewal has been stored in the inside packing, comprise regular file, packaging file and script file, renovator is processed these files successively.At first renovator checks in the renewal bag of download whether regular file is arranged, if regular file is arranged, these files is directly replaced to the file of the same name under client directory, afterwards, renovator checks in the renewal bag of download whether packaging file is arranged, if packaging file is arranged, the packaging file under packaging file and client is merged, merge the two kinds of modes that mainly include, a kind of is that the packaging file of the same name under itself and client is merged, and a kind of is that it is merged on last packaging file under client, after above two processes complete, renovator checks to upgrade in bag whether script file is arranged, if script file is arranged, show to upgrade except the data of update software client specifically, also need to carry out other comparatively complicated operations, content for script in script file is for by interpreter execution script language or in arbitrary operating system execution script program, renovator is carried out the script file upgraded in bag can complete specific task, comprise and revise the software product bibliographic structure, revise certain configuration item of user, create shortcut etc., wherein, which kind of task and how operating, by the script file content, determined, renovator only is responsible for carrying out this script.After whole step completes, this renewal process completes, successful update software client.With respect to the renovator that uses legacy version, the problem that the present invention has avoided legacy version may exist defect that software client can't be upgraded, and, also can complete the special renewal in script file, disposable update all, for user's use has later brought convenience.
The invention provides the system that a kind of software client is upgraded by network, comprising:
The renovator module, detect self version number for the renovator program, when the renovator program of new version number being detected, downloads the renovator program of the renovator program replacement legacy version of redaction from network service end, and the renovator program is upgraded;
The software client update module, for after the renovator program updates, detected the version number of software client by redaction renovator program, when software client being detected new version number arranged, software client is carried out to conventional the renewal: downloaded the renewal bag of software client from network service end by the renovator program, described renewal bag comprises regular file, packaging file and script file, and the renovator program is upgraded software client according to regular file, packaging file and script file successively.When the renovator program does not detect the renovator program of new version number, by the version number of renovator direct-detection software client, when software client has new version number, software client is carried out to routine and upgrade.
Wherein, when the renovator program is upgraded software client according to regular file, directly regular file solution from upgrade bag is pressed out, and it is covered to the file of the same name under software client; When the renovator program is upgraded software client according to packaging file, directly packaging file solution from upgrade bag is pressed out, and by its with software client under the packaging file merging of appointment; Content for script in described script file is for by interpreter execution script language or in arbitrary operating system execution script program, and renovator is carried out corresponding operation according to the content in script file, completes renewal.
The above, be preferred embodiment of the present invention, and the present invention is not limited to above-mentioned execution mode, as long as it reaches technique effect of the present invention with identical means, all should belong to protection scope of the present invention.