CN113360170B - Method and system for dynamically updating different versions of tool - Google Patents

Method and system for dynamically updating different versions of tool Download PDF

Info

Publication number
CN113360170B
CN113360170B CN202110683722.1A CN202110683722A CN113360170B CN 113360170 B CN113360170 B CN 113360170B CN 202110683722 A CN202110683722 A CN 202110683722A CN 113360170 B CN113360170 B CN 113360170B
Authority
CN
China
Prior art keywords
tool
version
file
server
folder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110683722.1A
Other languages
Chinese (zh)
Other versions
CN113360170A (en
Inventor
刘德建
柳旭辉
陈宏展
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Tianqing Online Interactive Technology Co Ltd
Original Assignee
Fujian Tianqing Online Interactive Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Tianqing Online Interactive Technology Co Ltd filed Critical Fujian Tianqing Online Interactive Technology Co Ltd
Priority to CN202110683722.1A priority Critical patent/CN113360170B/en
Publication of CN113360170A publication Critical patent/CN113360170A/en
Application granted granted Critical
Publication of CN113360170B publication Critical patent/CN113360170B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method for dynamically updating different versions of a tool, which comprises the following steps: step S1, setting a tool folder on a server, and adding tools and corresponding configuration files to the tool folder; step S2, traversing a tool folder on the server to obtain a tool list on the server; s3, acquiring a tool folder path and a configuration file according to the selected tool; s4, acquiring a version file corresponding to the selected tool according to the tool folder path and the configuration file; and S5, comparing the version file corresponding to the selected tool with the version of the server, and downloading and updating the tool program. The invention can dynamically download and update a plurality of versions of the tool according to the configuration file, thereby improving the working efficiency.

Description

Method and system for dynamically updating different versions of tool
Technical Field
The invention relates to the technical field of computer communication, in particular to a method and a system for dynamically updating different versions of a tool.
Background
For many tool software, the problem of version update and upgrade cannot be avoided as long as the product is still within the life cycle, but with the update iteration of the tool version, the update rate and the version convergence speed of the new version update need to be solved, and with the continuous development of the requirement, the update of the tool software is expected to be lighter and faster, so that it is often expected that the new version can be directly acquired when the software is started, and the update can be automatically completed in the background.
In addition, many tool software now needs to release corresponding software versions for different platforms. For example, PC version, android version, IOS version, and proprietary versions are required to be supported, but when different versions of the update tool are performed, a download needs to be performed by knowing the download address of each version, and a distinction needs to be made between downloading and updating, which is inconvenient and troublesome for the tool to manage.
The existing processing mode technology mainly has the following defects:
1. the downloading addresses of different platform versions in the tool need to be known for downloading, so that the addresses of all tool versions need to be known, and the downloading is very inconvenient. When adding a new tool or a new platform of a tool is performed, a re-modification procedure needs to be performed, which is very troublesome.
2. The version can not be updated conveniently, the version needs to be updated by comparison, the version can not be automatically compared directly through software, and the version can be updated through software in one step.
Disclosure of Invention
In order to overcome the problems, the invention aims to provide a method for dynamically updating different versions of a tool, which realizes downloading the versions of different platforms of the tool and provides an efficient and quick tool downloading mode.
The invention is realized by adopting the following scheme: a method of dynamically updating different versions of a tool, the method comprising the steps of:
step S1, setting a tool folder on a server, and adding tools and corresponding configuration files to the tool folder;
step S2, traversing a tool folder on the server to obtain a tool list on the server;
s3, acquiring a tool folder path and a configuration file according to the selected tool;
s4, acquiring a version file corresponding to the selected tool according to the tool folder path and the configuration file;
and S5, comparing the version file corresponding to the selected tool with the version of the server, and downloading and updating the tool program.
Further, the step S1 is further specifically: on a server, respectively placing tool files to be released and updated in respective tool folders, adding configuration files to each tool folder, and storing tools and version files of different platform versions in each tool folder for downloading and updating the tool versions; the configuration file mainly carries out version file paths of different platform versions of the configuration tool.
Further, the step S2 is further specifically: traversing the tool folders on the server, reading configuration files of all the tool folders, setting all different versions of the tools on the tool list, and acquiring the tool list of all the different versions of the tools on the server so that a user can select tools needing downloading and updating.
Further, the step S3 is further specifically: and selecting a tool which needs to be downloaded and updated from the tool list, and acquiring a folder path corresponding to the tool and a corresponding configuration file thereof from the server according to the selected tool name.
Further, the step S4 is further specifically: and reading a specific version file path from the configuration file according to the corresponding platform of the selection tool, and acquiring the specific version file according to the version file path.
Further, the step S5 is further specifically: after the version file corresponding to the tool is read, a corresponding tool file path is obtained through the version file, whether the tool file exists or not is judged according to the downloaded tool file path, if the tool file does not exist, the latest version is downloaded, if the tool file does not exist, the version of the current tool is obtained and is compared with the version of the server, if the tool file does not exist, the version of the tool is updated to the latest version, and otherwise, the downloading is ended.
The invention also provides a system for dynamically updating different versions of the tool, which comprises a tool folder setting module, a traversing module, a configuration file acquisition module, a version file acquisition module and a version comparison module;
the tool folder setting module is used for setting a tool folder on the server and adding tools and corresponding configuration files to the tool folder;
the traversing module is used for traversing the tool folder on the server and acquiring a tool list on the server;
the configuration file acquisition module acquires a tool folder path and a configuration file according to the selected tool;
the version file acquisition module acquires a version file corresponding to the selected tool according to the tool folder path and the configuration file;
and the version comparison module is used for comparing the version file corresponding to the selected tool with the version of the server and downloading and updating the tool program.
Further, the implementation manner of the step tool folder setting module is further specifically as follows: on a server, respectively placing tool files to be released and updated in respective tool folders, adding configuration files to each tool folder, and storing tools and version files of different platform versions in each tool folder for downloading and updating the tool versions; the configuration file mainly carries out version file paths of different platform versions of the configuration tool.
Further, the implementation manner of the traversing module is further specifically as follows: traversing the tool folders on the server, reading configuration files of all the tool folders, setting all different versions of the tools on the tool list, and acquiring the tool list of all the different versions of the tools on the server so that a user can select tools needing downloading and updating.
Further, the implementation manner of the configuration file acquisition module is further specifically as follows: and selecting a tool which needs to be downloaded and updated from the tool list, and acquiring a folder path corresponding to the tool and a corresponding configuration file thereof from the server according to the selected tool name.
Further, the implementation manner of the version file obtaining module is further specifically as follows: and reading a specific version file path from the configuration file according to the corresponding platform of the selection tool, and acquiring the specific version file according to the version file path.
Further, the implementation manner of the version comparison module is more specifically as follows: after the version file corresponding to the tool is read, a corresponding tool file path is obtained through the version file, whether the tool file exists or not is judged according to the downloaded tool file path, if the tool file does not exist, the latest version is downloaded, if the tool file does not exist, the version of the current tool is obtained and is compared with the version of the server, if the tool file does not exist, the version of the tool is updated to the latest version, and otherwise, the downloading is ended.
The invention has the beneficial effects that: the method can dynamically download and update a plurality of versions of the tool according to the configuration file, and can download the versions of different platforms of the tool only by modifying the configuration file without modifying program codes, thereby providing an efficient and quick tool downloading mode.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
FIG. 2 is a flow chart of the method for obtaining version files according to the present invention.
Fig. 3 is a system schematic block diagram of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, a method for dynamically updating different versions of a tool according to the present invention includes the following steps:
step S1, setting a tool folder on a server, and adding tools and corresponding configuration files to the tool folder;
step S2, traversing a tool folder on the server to obtain a tool list on the server;
s3, acquiring a tool folder path and a configuration file according to the selected tool;
s4, acquiring a version file corresponding to the selected tool according to the tool folder path and the configuration file;
and S5, comparing the version file corresponding to the selected tool with the version of the server, and downloading and updating the tool program.
The invention is further described with reference to the following specific examples:
1. adding tools and corresponding configuration files on a server;
and on the server, respectively placing the tool files to be released and updated in respective tool folders, adding configuration files to each tool folder, and enabling each tool folder to have tools with different platform versions and version files for downloading and updating the tool versions.
2. Traversing a server folder to obtain a tool list on a server;
traversing the tool folders on the server, reading configuration files of all the tool folders, setting all different versions of the tools on the tool list, and acquiring the tool list of all the different versions of the tools on the server so that a user can select tools needing downloading and updating.
3. Acquiring a tool folder and a configuration file according to the selected tool;
and selecting a tool which needs to be downloaded and updated from the tool list, and acquiring a folder path corresponding to the tool and a corresponding configuration file thereof from the server according to the selected tool name.
4. Acquiring a corresponding version file according to the configuration file;
and reading a specific version file name from the configuration file according to the corresponding platform of the selection tool, and acquiring a specific version file path according to the version file name.
5. Comparing versions, and downloading an update program;
referring to fig. 2, step 5 of the present invention is further specifically: after the version file corresponding to the tool is read, a corresponding tool file path is obtained through the version file, whether the tool file exists or not is judged according to the downloaded tool file path, if the tool file does not exist, the latest version is downloaded, if the tool file does not exist, the version of the current tool is obtained, the version of the current tool is compared with the version of the server, if the version of the current tool is not the version of the server (the version of the server is the latest version), the version of the tool is updated to the latest version, and otherwise, the downloading is ended.
In summary, the method mainly comprises the steps of pre-setting up a server for storing all needed tools, setting configuration files of different versions for specific tools, and then selecting corresponding platform versions for dynamic selection and downloading according to the configuration files. Even if a new tool or another platform version of the original tool is added, only the configuration file is modified, program codes are not required to be modified, a driver is really configured, and the tool is dynamically selected, downloaded and updated through the configuration file.
Referring to fig. 3, the invention also provides a system for dynamically updating different versions of a tool, which comprises a tool folder setting module, a traversing module, a configuration file acquisition module, a version file acquisition module and a version comparison module;
the tool folder setting module is used for setting a tool folder on the server and adding tools and corresponding configuration files to the tool folder;
the traversing module is used for traversing the tool folder on the server and acquiring a tool list on the server;
the configuration file acquisition module acquires a tool folder path and a configuration file according to the selected tool;
the version file acquisition module acquires a version file corresponding to the selected tool according to the tool folder path and the configuration file;
and the version comparison module is used for comparing the version file corresponding to the selected tool with the version of the server and downloading and updating the tool program.
The implementation mode of the step tool folder setting module is further specifically as follows: on a server, respectively placing tool files to be released and updated in respective tool folders, adding configuration files to each tool folder, and storing tools and version files of different platform versions in each tool folder for downloading and updating the tool versions; the configuration file mainly carries out version file paths of different platform versions of the configuration tool.
The implementation mode of the traversing module is further specifically as follows: traversing the tool folders on the server, reading configuration files of all the tool folders, setting all different versions of the tools on the tool list, and acquiring the tool list of all the different versions of the tools on the server so that a user can select tools needing downloading and updating.
The implementation mode of the configuration file acquisition module is further specifically as follows: and selecting a tool which needs to be downloaded and updated from the tool list, and acquiring a folder path corresponding to the tool and a corresponding configuration file thereof from the server according to the selected tool name.
The implementation mode of the version file acquisition module is further specifically as follows: and reading a specific version file path from the configuration file according to the corresponding platform of the selection tool, and acquiring the specific version file according to the version file path.
The implementation mode of the version comparison module is further specifically as follows: after the version file corresponding to the tool is read, a corresponding tool file path is obtained through the version file, whether the tool file exists or not is judged according to the downloaded tool file path, if the tool file does not exist, the latest version is downloaded, if the tool file does not exist, the version of the current tool is obtained and is compared with the version of the server, if the tool file does not exist, the version of the tool is updated to the latest version, and otherwise, the downloading is ended.
The actual application scene of the invention is as follows:
firstly, adding all tool folders and corresponding tool files which need to be released and updated in a server, adding configuration files to each tool folder, and mainly configuring version file addresses of different platform versions of the tool. Tools such as a skill editor, a checkpoint editor, a resource editor, etc. are deployed on the server, all with versions of the corresponding platform, such as a PC-side version, a hand-tour version, and proprietary versions. Then, these tools corresponding to the platform version are all placed in the corresponding tool folder, and a configuration file is set, for example, a PC version and a hand game version of the skill editor are placed in a skill editor (skileditor) folder, and a configuration file is set, where the configuration file is ver.ini, and the format is as follows:
[SkillEditor_PC]
file=pc/s3ver.dat
[SkillEditor_Mobile]
file=mobile/s3ver.dat
[SkillEditor_TPS]
File=tps/s3ver.dat
then, by traversing the folders on the server, the configuration files of all tool folders are read, and a complete tool list is formed according to the configuration files, for example, from the above configuration, two tools, namely SkillEditor_PC and SkillEditor_Mobile, can be read and added to the tool list.
In the tool list, a tool which needs to be downloaded or updated is selected, and a corresponding server path and a configuration file can be obtained according to the name of the tool, for example, a tool of selecting a skill editor (SkillEditor_PC) of a PC version, wherein the obtained server path is a SkillEditor folder, and the configuration file is ver.ini under the SkillEditor folder.
After the configuration file is read, a version file corresponding to the tool can be obtained according to the configuration file, for example, the file SkillEditor_PC is read, the configuration file ver.ini is read, the obtained version file of the SkillEditor_PC is PC/s3ver.dat, namely, the version file is the s3ver.dat file under the SkillEditor/PC path, and the version file mainly comprises configuration information such as names, version numbers and the like of all files in the tool and is used for comparing the version and downloading the files during downloading and updating. The version file format is as follows:
and finally judging whether the tool file exists according to the selected downloading path, if not, downloading the tool file to the latest version, if so, acquiring the folder version of the current tool path, comparing the folder version with the server version, and if not, updating the tool file to the latest version (the server version is the latest version).
The foregoing description is only of the preferred embodiments of the invention, and all changes and modifications that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (8)

1. A method for dynamically updating different versions of a tool, comprising: the method comprises the following steps:
step S1, setting a tool folder on a server, and adding tools and corresponding configuration files to the tool folder; the step S1 is further specifically: on a server, respectively placing tool files to be released and updated in respective tool folders, adding configuration files to each tool folder, and storing tools and version files of different platform versions in each tool folder for downloading and updating the tool versions; the configuration file mainly configures version file paths of different platform versions of the tool;
step S2, traversing a tool folder on the server to obtain a tool list on the server; the step S2 is further specifically: traversing the tool folders on the server, reading configuration files of all the tool folders, setting all different versions of tools on a tool list, and acquiring the tool lists of all the different versions of the tools on the server so that a user can select tools needing to be downloaded and updated;
s3, acquiring a tool folder path and a configuration file according to the selected tool;
s4, acquiring a version file corresponding to the selected tool according to the tool folder path and the configuration file;
s5, comparing the version file corresponding to the selected tool with the version of the server, and downloading and updating the tool program; then selecting a corresponding platform version according to the configuration file for dynamic selection and downloading; even if a new tool or another platform version of the original tool is added, only the configuration file needs to be modified, and the program code does not need to be modified.
2. A method for dynamically updating different versions of a tool according to claim 1, wherein: the step S3 is further specifically: and selecting a tool which needs to be downloaded and updated from the tool list, and acquiring a folder path corresponding to the tool and a corresponding configuration file thereof from the server according to the selected tool name.
3. A method for dynamically updating different versions of a tool according to claim 1, wherein: the step S4 is further specifically: and reading a specific version file path from the configuration file according to the corresponding platform of the selection tool, and acquiring the specific version file according to the version file path.
4. A method for dynamically updating different versions of a tool according to claim 1, wherein: the step S5 is further specifically: after the version file corresponding to the tool is read, a corresponding tool file path is obtained through the version file, whether the tool file exists or not is judged according to the downloaded tool file path, if the tool file does not exist, the latest version is downloaded, if the tool file does not exist, the version of the current tool is obtained and is compared with the version of the server, if the tool file does not exist, the version of the tool is updated to the latest version, and otherwise, the downloading is ended.
5. A system for dynamically updating different versions of a tool, comprising: the system comprises a tool folder setting module, a traversing module, a configuration file acquisition module, a version file acquisition module and a version comparison module;
the tool folder setting module is used for setting a tool folder on the server and adding tools and corresponding configuration files to the tool folder; the implementation mode of the step tool folder setting module is further specifically as follows: on a server, respectively placing tool files to be released and updated in respective tool folders, adding configuration files to each tool folder, and storing tools and version files of different platform versions in each tool folder for downloading and updating the tool versions; the configuration file mainly configures version file paths of different platform versions of the tool;
the traversing module is used for traversing the tool folder on the server and acquiring a tool list on the server; the implementation mode of the traversing module is further specifically as follows: traversing the tool folders on the server, reading configuration files of all the tool folders, setting all different versions of tools on a tool list, and acquiring the tool lists of all the different versions of the tools on the server so that a user can select tools needing to be downloaded and updated;
the configuration file acquisition module acquires a tool folder path and a configuration file according to the selected tool;
the version file acquisition module acquires a version file corresponding to the selected tool according to the tool folder path and the configuration file;
the version comparison module is used for comparing the version files corresponding to the selected tools with the version of the server and downloading and updating the tool program; then selecting a corresponding platform version according to the configuration file for dynamic selection and downloading; even if a new tool or another platform version of the original tool is added, only the configuration file needs to be modified, and the program code does not need to be modified.
6. The system for dynamically updating different versions of a tool according to claim 5, wherein: the implementation mode of the configuration file acquisition module is further specifically as follows: and selecting a tool which needs to be downloaded and updated from the tool list, and acquiring a folder path corresponding to the tool and a corresponding configuration file thereof from the server according to the selected tool name.
7. The system for dynamically updating different versions of a tool according to claim 5, wherein: the implementation mode of the version file acquisition module is further specifically as follows: and reading a specific version file path from the configuration file according to the corresponding platform of the selection tool, and acquiring the specific version file according to the version file path.
8. The system for dynamically updating different versions of a tool according to claim 5, wherein: the implementation mode of the version comparison module is further specifically as follows: after the version file corresponding to the tool is read, a corresponding tool file path is obtained through the version file, whether the tool file exists or not is judged according to the downloaded tool file path, if the tool file does not exist, the latest version is downloaded, if the tool file does not exist, the version of the current tool is obtained and is compared with the version of the server, if the tool file does not exist, the version of the tool is updated to the latest version, and otherwise, the downloading is ended.
CN202110683722.1A 2021-06-21 2021-06-21 Method and system for dynamically updating different versions of tool Active CN113360170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110683722.1A CN113360170B (en) 2021-06-21 2021-06-21 Method and system for dynamically updating different versions of tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110683722.1A CN113360170B (en) 2021-06-21 2021-06-21 Method and system for dynamically updating different versions of tool

Publications (2)

Publication Number Publication Date
CN113360170A CN113360170A (en) 2021-09-07
CN113360170B true CN113360170B (en) 2023-11-17

Family

ID=77535316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110683722.1A Active CN113360170B (en) 2021-06-21 2021-06-21 Method and system for dynamically updating different versions of tool

Country Status (1)

Country Link
CN (1) CN113360170B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012062063A1 (en) * 2010-11-12 2012-05-18 中兴通讯股份有限公司 Method and apparatus for generating and uninstalling software installation package
CN103701856A (en) * 2013-11-29 2014-04-02 四川长虹电器股份有限公司 Method for defining and acquiring upgrade package of terminal equipment
CN105224317A (en) * 2015-09-14 2016-01-06 上海斐讯数据通信技术有限公司 A kind of APK is applied to the method and system in Android project source code
CN112799716A (en) * 2021-02-09 2021-05-14 广州锦行网络科技有限公司 Code management method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012062063A1 (en) * 2010-11-12 2012-05-18 中兴通讯股份有限公司 Method and apparatus for generating and uninstalling software installation package
CN103701856A (en) * 2013-11-29 2014-04-02 四川长虹电器股份有限公司 Method for defining and acquiring upgrade package of terminal equipment
CN105224317A (en) * 2015-09-14 2016-01-06 上海斐讯数据通信技术有限公司 A kind of APK is applied to the method and system in Android project source code
CN112799716A (en) * 2021-02-09 2021-05-14 广州锦行网络科技有限公司 Code management method and system

Also Published As

Publication number Publication date
CN113360170A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN105657191B (en) Application increment upgrading method and system based on Android system
JP5235837B2 (en) Content providing method for mobile communication terminal
CN104991793A (en) Method, device and system used for application program subpackage
CN107870771B (en) Application program construction and upgrading method and system
CN104066077A (en) OTA downloading and upgrading method and device thereof
CN110750286B (en) Management method, device, system, equipment and medium for upgrading Mbn through OTA
CN106371881B (en) Method and system for updating program version in server
CN108563440B (en) Automatic adding method and device of list controller codes and readable storage medium
CN103678319A (en) Resource file updating method, device and system and server
CN108345467B (en) Version tree file updating method and device
CN106873966B (en) Application program development method and device
CN112615747B (en) Method and device for automatically deploying and configuring network equipment
CN112631622A (en) Application installation method and device, server and computer readable medium
CN110543324A (en) Plug-in increment updating method and device for application program
CN113360170B (en) Method and system for dynamically updating different versions of tool
CN105119944A (en) Application starting method and related device
CN101877071A (en) Data updating method, device and system
CN106648578A (en) Desktop layout sharing method, sending terminal and receiving terminal
CN113434164B (en) Cloud configuration updating method and system for setting item of vehicle-mounted entertainment host
CN111770487B (en) Access Point Name (APN) information configuration method, equipment and medium
JP2007026318A (en) Mobile phone, system and method for generating program, and system and method for updating program
CN116225549A (en) Resource loading method, device, medium and equipment
CN113961220A (en) Automatic program updating method and device
CN108121551A (en) A kind of basis of software data updating method and system
KR100538627B1 (en) Method for partupgrading sofrware of wireless terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant