WO2013026332A1 - Software installation and upgrade method and device - Google Patents

Software installation and upgrade method and device Download PDF

Info

Publication number
WO2013026332A1
WO2013026332A1 PCT/CN2012/078356 CN2012078356W WO2013026332A1 WO 2013026332 A1 WO2013026332 A1 WO 2013026332A1 CN 2012078356 W CN2012078356 W CN 2012078356W WO 2013026332 A1 WO2013026332 A1 WO 2013026332A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
upgrade
directory
version
main program
Prior art date
Application number
PCT/CN2012/078356
Other languages
French (fr)
Chinese (zh)
Inventor
库宇
魏亚民
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2013026332A1 publication Critical patent/WO2013026332A1/en
Priority to US14/187,792 priority Critical patent/US9606791B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present invention relates to the field of software technologies for data processing devices, and in particular, to a method and an apparatus for software installation and upgrade.
  • BACKGROUND OF THE INVENTION Computer software has evolved over the decades and is slowly integrated into the Internet. Openness and cooperation have become an inevitable trend in the development of Internet technology. The future Internet can be “more integrated” and more shared and harvested. Building a more development platform will give users across the Internet a whole new experience. At the same time, the user's usage habits are constantly changing, the software update frequency is shortened, and the new function is iteratively fast. This requires the software itself to be upgraded enough to better meet the user's needs.
  • the existing computer desktop software installation and upgrade methods are usually: At the time of installation, the main program file can be executed to execute the main program (.exe format) file and the resource file such as the .dll file to be loaded in the same directory.
  • the advantage of this is that the Windows operating system will first load the directory of the .exe file at the same level by default, so that it can quickly find the corresponding resources such as dll files.
  • upgrading a software it usually requires the current main program (.exe) to exit first, and then complete the download and installation process of the upgrade package. Next, the user needs to start the software again to see the upgraded function.
  • the so-called software silent upgrade refers to: In the process of normal use of the software, the software can In order to achieve automatic upgrade, the user does not feel the upgrade process at the front end. After the upgrade is completed, the user can directly use the updated software after starting the software next time. Summary of the invention
  • the main purpose of the present invention is to provide a software installation and upgrade method and device, so as to implement silent upgrade of software, reduce the number of human-computer interactions in the upgrade process, and facilitate users to use the software.
  • a software installation and upgrade method including:
  • the upgrade process is started to download and install the upgrade software.
  • the version directory corresponding to the new version number of the current upgrade software is created, and the version directory of the new version number is placed in the same directory as the old version.
  • the resource file of the new version of the software is placed in the version directory of the new version number.
  • a software installation and upgrade device including:
  • the initial installation module is used for the initial installation of the software.
  • the version directory of the current version number is created, the version directory is placed in the specified directory, and the resource file of the current version software is placed in the version directory;
  • the main program file used to start the running software main program, and when starting the run, search for the latest version directory of the version number in the same directory, and load the version directory;
  • the upgrade process module is used to start when the software is running, download and install the upgrade software after startup, and when installing the upgrade software, create a version directory corresponding to the new version number of the current upgrade software.
  • the version directory of the new version number is placed in the same directory as the old version directory, and the resource file of the new version software is placed in the version directory of the new version number.
  • a storage medium in which is stored a data processing program for performing the method of the present invention.
  • FIG. 1 is a flow chart of a software installation and upgrade method according to the present invention
  • FIG. 2 is a schematic diagram of a directory structure during initial installation of the software according to the present invention
  • FIG. 3 is a schematic diagram of a directory structure after software upgrade and installation according to the present invention
  • FIG. 4 is a detailed implementation of the upgrade process according to the present invention
  • FIG. 5 is a schematic diagram of another embodiment of a software installation and upgrade apparatus according to the present invention
  • FIG. 6 is a schematic diagram of another implementation of the software installation and upgrade apparatus according to the present invention
  • a specific composition diagram The embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the present invention. Example, not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the present invention.
  • the invention is applicable not only to computer software, but also to software on various data processing devices (such as smart phones, tablets, etc.).
  • FIG. 1 is a flow chart of a software installation and upgrade method according to the present invention. Referring to Figure 1, the method includes:
  • Step 101 Create a version directory of the current version number, place the version directory in the specified directory, and place the resource file of the current version software in the version directory.
  • this step may be performed when the software is initially installed, although in other embodiments it may be performed at other times, such as the time specified by the server.
  • Step 102 When the software main program (for example, the main exe program on the computer) starts running, search for the latest version directory of the version number in the specified directory, and load the version directory.
  • the software main program for example, the main exe program on the computer
  • Step 103 After the software main program starts running, start the upgrade process, download and install the upgrade software by the upgrade process, and when the upgrade software is installed, create a version directory corresponding to the new version number of the current upgrade software, and the version of the new version number
  • the directory is placed in a directory at the same level as the old version directory (ie, under the specified directory), and the resource file of the new version software is placed in the version directory of the new version number.
  • the upgrade process After the upgrade process completes the download and installation of the upgrade software, it will automatically exit, and has no effect on the process of the main program.
  • the main program searches for the latest version directory of the version number in the specified directory, and loads the version directory, thereby completing the process of running the upgrade version directory, so that the user can see the updated software function.
  • the entire upgrade process is completely transparent to the user, and the user is not aware of the upgrade process.
  • the specified directory may be a directory of the same level as the main program file of the software, or may be a directory of another level, such as a directory of the upper level of the main program file of the software or a directory of the next level.
  • the specified directory is a directory of the same level as the main program file of the software.
  • FIG. 2 is a schematic diagram of a directory structure during initial installation of the software according to the present invention. See picture
  • the present invention is different from the software installation directory of the prior art.
  • the main program exe file is usually placed in the same directory as the resource file, such as the .dll to be loaded, and the present invention will be outside the main program exe file.
  • the main program exe file 201 shown in Figure 2 is set in the root directory of the software, and the resource files that need to be loaded when the software is running, such as .dll files, are placed in the version directory of the current version number.
  • the version directory 202 is placed in a directory at the same level as the main program exe file 201, such as here in the root directory.
  • the main program exe file 201 is actually just an empty shell, and its function is only to search for the version directory updated with the version number in the same directory, and load the version directory.
  • FIG. 3 is a schematic diagram of a directory structure after the software is upgraded and installed according to the present invention. See picture
  • the upgrade software (usually an upgrade package) is actually decompressed in the installation directory, and all resource files are placed in the version directory corresponding to the new version number of the current upgrade software.
  • the location of the old version directory 202 and the main program exe file 201 are unchanged, so when upgrading, there is no impact on the currently running main program, and when the user next starts, the updated version directory is automatically loaded. Run the new version of the software.
  • the operating system searches for files according to its own directory search order.
  • Windows provides an application programming interface (API) to set the search order of the application loading.
  • API application programming interface
  • the software main program utilizes the API, so that after the main program file is extracted, the operating system searches for the .dll directory order, so that the resource file can be smoothly loaded.
  • the present invention can use the Nullsoft Scriptable Install System (NSIS, Nullsoft Scriptable Install System) script to rewrite the uninstaller to control the uninstallation behavior of the software, as shown in Figure 3, the uninstaller 302 is used to completely uninstall the software.
  • the NSIS is a script-enabled installer for Windows. It is completely free, open source, supports scripts, and can be scripted to control any details of the installation process.
  • the uninstaller 302 generated by the NSIS can be packaged into the main installation package, and the uninstallation of the software can be implemented after the uninstaller 302 is started.
  • the physical operation of the uninstallation is to specify the specified directory and the main program file 201.
  • All files and folders in the same directory are deleted, that is, all files and folders in the root directory of QPlus.exe are deleted, so the entire software (including the software of each version) can be completely removed without leaving traces, and the uninstallation is performed at the same time.
  • the program does not need to be changed in future software upgrades, and its maintenance costs can be reduced to zero.
  • FIG. 4 is a detailed implementation flowchart of the upgrade process of the present invention. Referring to Figure 4, the process includes:
  • Step 401 start the main program, and start running.
  • Step 402 The main program starts the upgrade process.
  • the method may further include: querying whether there is one instance of the software main program running in the current system, and if so, utilizing one of them (for example, usually The first) running main program instance starts the upgrade process; otherwise, the upgrade process is started directly by using the software main program instance.
  • the method may further include: querying whether there is one instance of the software main program running in the current system, and if so, utilizing one of them (for example, usually The first) running main program instance starts the upgrade process; otherwise, the upgrade process is started directly by using the software main program instance. In this way, multiple instances can be restricted from repeating the upgrade query, thereby controlling the frequency of upgrading the query and reducing the amount of client requests to the server.
  • Step 403 After the upgrade process is started, the upgrade process first completes the self-upgrade query process of the upgrade process, that is, the upgrade process interacts with the server to determine whether it is self-upgrading, that is, whether the server has an upgrade program file than the local update version, and if Then download the new version of the upgrade program exe file and exit the upgrade process; otherwise, go to step 404.
  • this step 403 is an optional step. You can skip this step and directly perform step 404.
  • Step 404 The upgrade process interacts with the server to determine whether the software needs to be upgraded, that is, whether the server has a newer version of the upgrade software, and if yes, step 405 is performed; otherwise, the upgrade process is exited.
  • Step 405 Download a new version of the upgrade software.
  • the upgrade software is usually in the form of an upgrade software package, so the new version of the upgrade package can be downloaded.
  • Step 406 Install an upgrade package, create a version directory corresponding to the new version number of the current upgrade software, and place the version directory of the new version number in a directory at the same level as the old version directory, and the resource file of the new version software. Place it in the version directory of the new version number and exit the upgrade process.
  • the method further includes: upgrading the software obtained by the downloading The package performs the MD5 value matching. If the matching is performed, the subsequent steps are performed to perform the software upgrade installation. If the matching does not match, the download fails, the downloaded software upgrade package is deleted, and the software upgrade package is repeatedly downloaded, if the download fails. When the number of times reaches the specified number of times (for example, up to 3 times), the download process ends and the upgrade process is exited.
  • FIG. 5 is a schematic diagram of an implementation of a software installation and upgrade apparatus according to the present invention.
  • the apparatus 500 includes:
  • the initial installation module 501 is used for initial installation of the software. During the initial installation, the version directory of the current version number is created, and the version directory is placed in the specified directory, and the resource file of the current version software is placed in the version directory; Figure 2 shows.
  • the main program file 502 is used to start the running software main program, and when starting to run, search for the latest version directory of the specified version number, and load the version directory.
  • the upgrade process module 503 is configured to start when the software is running, download and install the upgrade software after the startup, and when the upgrade software is installed, create a version directory corresponding to the new version number of the current upgrade software, and place the version directory of the new version number in the In the same directory as the old version directory, the resource file of the new version software is placed in the version directory of the new version number, as shown in FIG. Shown.
  • FIG. 6 is a schematic diagram of another implementation of the software installation and upgrade apparatus according to the present invention.
  • the apparatus in order to completely remove the entire software (including the software of each version) without leaving a trace, the apparatus further includes an uninstalling module 504 for using the specified directory and all the directories in the same directory as the main program file. Files and folders are all deleted.
  • the device may further include a query module 505, configured to query whether there is one instance of the software main program running in the current system, and if so, utilize one of them (for example, usually The running main program instance starts the upgrade process module 503; otherwise, the upgrade process module 503 is directly started by using the software main program instance.
  • FIG. 7 is a schematic diagram of a specific composition of the upgrade process module according to the present invention.
  • the upgrade process module 503 includes:
  • the upgrade process self-upgrade module 701 is configured to first interact with the server to determine whether to upgrade from the server before downloading the upgrade software. If yes, download the new version of the upgrade program file and exit the upgrade process; otherwise, trigger the upgrade process module to download and install.
  • the upgrade software is configured to first interact with the server to determine whether to upgrade from the server before downloading the upgrade software. If yes, download the new version of the upgrade program file and exit the upgrade process; otherwise, trigger the upgrade process module to download and install. The upgrade software.
  • the version upgrade module 702 is configured to interact with the server to determine whether the software needs to be upgraded before downloading the upgrade software. If yes, trigger the download and install the new version of the upgrade package; otherwise, exit the upgrade process.
  • the upgrade software download module 703 is used to download a new version of the upgrade package from the server.
  • the verification module 704 is configured to perform MD5 value matching on the downloaded upgrade package after downloading the upgrade package, and if the matching is performed, triggering the upgrade software installation module to install the upgrade package, if not The matching determines that the download fails, deletes the downloaded upgrade package, and triggers the upgrade software download module to re-download the upgrade package, and if the number of download failures reaches a specified number of times (for example, up to 3 times), exit The upgrade process.
  • the upgrade software installation module 705 is configured to install the downloaded upgrade software package, and at the time of installation, create a version directory corresponding to the new version number of the current upgrade software, and place the version directory of the new version number in the same directory as the old version directory. In the directory of the level, the resource file of the new version of the software is placed in the version directory of the new version number.
  • the upgrade process self-upgrade module 701 and the check module 704 are optional modules, and can be freely selected in other embodiments.
  • Each of the embodiments of the present invention can be implemented by a program executed by a data processing device such as a computer.
  • the program constitutes the invention.
  • programs that are typically stored in a storage medium are executed by directly reading the program out of the storage medium or by installing or copying the program to a storage device (such as a hard disk and or a memory) of the data processing device. Therefore, such a storage medium also constitutes the present invention.
  • the storage medium can use any type of recording method, such as paper storage medium (such as paper tape, etc.), magnetic storage medium (such as floppy disk, hard disk, flash memory, etc.), optical storage medium (such as CD-ROM, etc.), magneto-optical storage medium ( Such as MO, etc.).
  • the present invention also discloses a storage medium in which a computer program is stored, which is used in any of the above embodiments of the present invention.
  • a storage medium in which a computer program is stored, which is used in any of the above embodiments of the present invention.
  • the present invention is particularly applicable to desktop open software.
  • the desktop open software In addition to the usual functions of ordinary software installation and uninstallation, the desktop open software also needs to be combined with the software itself to achieve rapid silent upgrade, which can better meet the basic requirements of the user for software installation and uninstallation. .
  • the user hopes to experience the latest functions of the software, and the operation software upgrade itself is relatively cumbersome, and the present invention can provide a silent upgrade function, which can effectively reduce the user's open software to the desktop. Use the threshold.

Abstract

Disclosed are a software installation and upgrade method and device, the method comprising: creating the version directory of a current version number, placing the version directory under a specified directory, and placing the resource file of the current version software into the version directory; when a main software program starts running, searching for the newest version directory of the version number under the specified directory, and loading the version directory; when the software is running, downloading and installing the upgrade software; creating a version directory corresponding to the new version number, placing the version directory of the new version number under a directory at the same level as the old version directory, and placing the resource file of the new version software into the version directory of the new version number. The device comprises an initial installation module, a main program file and an upgrade process module. The present invention upgrades the software silently, and reduces human-computer interaction time, thus facilitating the use of the software by a user.

Description

一种软件安装及升级方法和装置 技术领域 本发明涉及数据处理设备的软件技术领域, 尤其涉及一种软件安装 及升级的方法和装置。 发明背景 计算机软件经过了几十年的发展, 慢慢地与互联网融合为一体。 开 放与合作已经成为互联网技术发展的必然趋势, 未来的互联网可以 "更 多的融入", 也能更多地分享和收获。 打造一个更加开发平台将使整个 互联网的用户有一个全新的体验。 同时用户的使用习惯不断在变化, 软 件的更新频率不断缩短, 新的功能迭代速度很快, 这就要求软件本身的 升级足够强大, 以便更好的满足用户需求。  TECHNICAL FIELD The present invention relates to the field of software technologies for data processing devices, and in particular, to a method and an apparatus for software installation and upgrade. BACKGROUND OF THE INVENTION Computer software has evolved over the decades and is slowly integrated into the Internet. Openness and cooperation have become an inevitable trend in the development of Internet technology. The future Internet can be “more integrated” and more shared and harvested. Building a more development platform will give users across the Internet a whole new experience. At the same time, the user's usage habits are constantly changing, the software update frequency is shortened, and the new function is iteratively fast. This requires the software itself to be upgraded enough to better meet the user's needs.
现有的计算机桌面软件安装及升级方法通常是: 在安装时, 将主程 序文件, 即可执行主程序 (.exe格式)文件与资源文件比如所需要加载 的. dll文件放在同级目录下, 这样的好处是 Windows操作系统会默认首 先加载 .exe文件同级的目录,方便快速找到相应的资源如 dll文件。在进 行软件升级时, 通常都需要当前主程序 (.exe )先退出, 然后完成升级 软件包的下载和安装过程, 接下来需要用户再次启动软件才可以看到升 级后的功能。  The existing computer desktop software installation and upgrade methods are usually: At the time of installation, the main program file can be executed to execute the main program (.exe format) file and the resource file such as the .dll file to be loaded in the same directory. The advantage of this is that the Windows operating system will first load the directory of the .exe file at the same level by default, so that it can quickly find the corresponding resources such as dll files. When upgrading a software, it usually requires the current main program (.exe) to exit first, and then complete the download and installation process of the upgrade package. Next, the user needs to start the software again to see the upgraded function.
现有的这种软件安装及升级方法的缺点是:  The disadvantages of the existing software installation and upgrade methods are:
升级时必须首先人工退出当前主程序, 才能完整升级软件的安装, 不但导致需要用户进行过多的人机交互操作, 而且严重干扰了用户使用 当前软件, 用户体验不好。 同时, 现有的大多数桌面软件需要用户手工 触发软件升级, 而实际上通过用户操作的数据来看, 用户手动点击软件 升级的比率并不大, 给用户的使用带来了不必要的使用障碍。  When upgrading, you must manually exit the current main program to complete the software installation. This not only requires the user to perform excessive human-computer interaction, but also seriously interferes with the user's current software, and the user experience is not good. At the same time, most of the existing desktop software requires the user to manually trigger the software upgrade. In fact, according to the data of the user operation, the ratio of the user manually clicking the software upgrade is not large, which brings unnecessary use obstacles to the user's use. .
因此, 现有技术无法做到在主程序运行的过程中完成整个软件的静 默升级。 所谓软件静默升级是指: 在正常使用软件的过程中, 该软件可 以做到自动升级, 而用户在前端使用时完全没有感知该升级过程, 升级 完成后, 用户下次启动软件, 就能直接使用更新后的软件。 发明内容 Therefore, the prior art cannot complete the silent upgrade of the entire software during the running of the main program. The so-called software silent upgrade refers to: In the process of normal use of the software, the software can In order to achieve automatic upgrade, the user does not feel the upgrade process at the front end. After the upgrade is completed, the user can directly use the updated software after starting the software next time. Summary of the invention
有鉴于此, 本发明的主要目的在于提供一种软件安装及升级方法和 装置, 以实现软件的静默升级, 减少升级过程中的人机交互次数, 方便 用户使用软件。  In view of this, the main purpose of the present invention is to provide a software installation and upgrade method and device, so as to implement silent upgrade of software, reduce the number of human-computer interactions in the upgrade process, and facilitate users to use the software.
本发明的技术方案是这样实现的:  The technical solution of the present invention is implemented as follows:
一种软件安装及升级方法, 包括:  A software installation and upgrade method, including:
创建当前版本号的版本目录, 将该版本目录放置在指定目录下, 将 当前版本软件的资源文件放置在该版本目录中;  Create a version directory of the current version number, place the version directory in the specified directory, and place the resource file of the current version software in the version directory;
软件主程序开始运行时, 搜索所述指定目录下版本号最新的版本目 录, 并加载该版本目录;  When the software main program starts running, it searches for the latest version directory of the version number in the specified directory, and loads the version directory;
在软件主程序运行时启动升级进程下载并安装升级软件, 在安装升 级软件时, 创建当前升级软件的新版本号对应的版本目录, 将该新版本 号的版本目录放置在与所述旧版本目录同级的目录下, 将新版本软件的 资源文件放置在该新版本号的版本目录中。  When the software main program is running, the upgrade process is started to download and install the upgrade software. When the upgrade software is installed, the version directory corresponding to the new version number of the current upgrade software is created, and the version directory of the new version number is placed in the same directory as the old version. In the same level directory, the resource file of the new version of the software is placed in the version directory of the new version number.
一种软件安装及升级装置, 包括:  A software installation and upgrade device, including:
初始安装模块, 用于软件的初始安装, 在初始安装时, 创建当前版 本号的版本目录, 将该版本目录放置在指定目录下, 将当前版本软件的 资源文件放置在该版本目录中;  The initial installation module is used for the initial installation of the software. During the initial installation, the version directory of the current version number is created, the version directory is placed in the specified directory, and the resource file of the current version software is placed in the version directory;
主程序文件, 用于启动运行软件主程序, 并在开始运行时, 搜索同 级目录下版本号最新的版本目录, 并加载该版本目录;  The main program file, used to start the running software main program, and when starting the run, search for the latest version directory of the version number in the same directory, and load the version directory;
升级进程模块, 用于在软件运行时启动, 启动后下载并安装升级软 件,在安装升级软件时,创建当前升级软件的新版本号对应的版本目录, 将该新版本号的版本目录放置在与所述旧版本目录同级的目录下, 将新 版本软件的资源文件放置在该新版本号的版本目录中。 The upgrade process module is used to start when the software is running, download and install the upgrade software after startup, and when installing the upgrade software, create a version directory corresponding to the new version number of the current upgrade software. The version directory of the new version number is placed in the same directory as the old version directory, and the resource file of the new version software is placed in the version directory of the new version number.
一种存储介质, 其中存储有数据处理程序, 该数据处理程序用于执 行本发明所述的方法。  A storage medium in which is stored a data processing program for performing the method of the present invention.
与现有技术相比, 本发明所提供的方案采用每个版本软件的资源文 件放置在对应的版本目录中, 所有版本目录放置在与软件的可执行文件 同级的目录下, 并且软件的所述可执行文件在开始执行时, 搜索同级目 录下版本号最新的版本目录, 并加载该版本目录。 因此, 本发明可以实 现在正常使用软件的过程中,不用退出软件,就可以做到自动升级安装, 而用户在前端使用时完全感知不到该升级过程, 升级完成后, 用户下次 启动软件, 就能直接使用更新后的软件, 从而实现软件的静默升级, 减 少升级过程中的人机交互次数, 方便用户操作。 附图简要说明 图 1为本发明所述软件安装及升级方法的流程图;  Compared with the prior art, the solution provided by the present invention uses the resource files of each version of the software to be placed in the corresponding version directory, and all the version directories are placed in the same directory as the executable file of the software, and the software is When the executable file starts execution, it searches for the latest version directory of the version number in the same directory, and loads the version directory. Therefore, the present invention can realize the automatic upgrade installation in the process of using the software normally without exiting the software, and the user completely does not perceive the upgrade process when the user uses the front end. After the upgrade is completed, the user starts the software next time. The updated software can be directly used to implement silent upgrade of the software, reducing the number of human-computer interactions during the upgrade process, and facilitating user operations. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flow chart of a software installation and upgrade method according to the present invention;
图 2为本发明所述软件初始安装时的一种目录结构示意图; 图 3为本发明所述软件升级安装后的一种目录结构示意图; 图 4为本发明所述升级过程的一种详细实施流程图;  2 is a schematic diagram of a directory structure during initial installation of the software according to the present invention; FIG. 3 is a schematic diagram of a directory structure after software upgrade and installation according to the present invention; FIG. 4 is a detailed implementation of the upgrade process according to the present invention; Flow chart
图 5为本发明所述的软件安装及升级装置的一种实施示意图; 图 6为本发明所述的软件安装及升级装置的另一种实施示意图; 图 7为本发明所述升级进程模块的一种具体组成示意图。 实施本发明的方式 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案 进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实 施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术 人员在没有做出创造性劳动前提下所获得的所有其他实施例, 都属于本 发明保护的范围。 FIG. 5 is a schematic diagram of another embodiment of a software installation and upgrade apparatus according to the present invention; FIG. 6 is a schematic diagram of another implementation of the software installation and upgrade apparatus according to the present invention; A specific composition diagram. The embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the present invention. Example, not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the present invention.
本发明不但适用于计算机软件, 还可以适用于各种数据处理设备 (如智能手机、 平板电脑等)上的软件。  The invention is applicable not only to computer software, but also to software on various data processing devices (such as smart phones, tablets, etc.).
图 1为本发明所述软件安装及升级方法的流程图。 参见图 1 , 该方 法包括:  1 is a flow chart of a software installation and upgrade method according to the present invention. Referring to Figure 1, the method includes:
步骤 101、 创建当前版本号的版本目录, 将该版本目录放置在指定 目录下, 将当前版本软件的资源文件放置在该版本目录中。  Step 101: Create a version directory of the current version number, place the version directory in the specified directory, and place the resource file of the current version software in the version directory.
在一种优选实施方式中, 本步骤可以在初始安装软件时执行, 当然 在其他实施方式中也可以在其它时机如服务器指定的时机执行。  In a preferred embodiment, this step may be performed when the software is initially installed, although in other embodiments it may be performed at other times, such as the time specified by the server.
步骤 102、 软件主程序 (例如在计算机上为主 exe程序)开始运行 时, 搜索所述指定目录下版本号最新的版本目录, 并加载该版本目录。  Step 102: When the software main program (for example, the main exe program on the computer) starts running, search for the latest version directory of the version number in the specified directory, and load the version directory.
步骤 103、 在软件主程序启动运行后, 启动升级进程, 由升级进程 下载并安装升级软件, 在安装升级软件时, 创建当前升级软件的新版本 号对应的版本目录, 将该新版本号的版本目录放置在与所述旧版本目录 同级的目录下 (即所述指定目录下), 将新版本软件的资源文件放置在 该新版本号的版本目录中。  Step 103: After the software main program starts running, start the upgrade process, download and install the upgrade software by the upgrade process, and when the upgrade software is installed, create a version directory corresponding to the new version number of the current upgrade software, and the version of the new version number The directory is placed in a directory at the same level as the old version directory (ie, under the specified directory), and the resource file of the new version software is placed in the version directory of the new version number.
所述升级进程在完成升级软件的下载和安装后, 会自动退出, 对主 程序的进程完全没有影响。 当主程序下次启动时, 主程序会搜索所述指 定目录下版本号最新的版本目录, 并加载该版本目录, 从而完成运行升 级版本目录的过程, 使用户可以看到更新后的软件功能, 而整个升级过 程对用户来说是完全透明的, 用户察觉不到升级过程的发生。  After the upgrade process completes the download and installation of the upgrade software, it will automatically exit, and has no effect on the process of the main program. When the main program is started next time, the main program searches for the latest version directory of the version number in the specified directory, and loads the version directory, thereby completing the process of running the upgrade version directory, so that the user can see the updated software function. The entire upgrade process is completely transparent to the user, and the user is not aware of the upgrade process.
本发明中, 所述指定目录可以是与软件的主程序文件同级的目录, 或者也可以是其它级别的目录, 例如软件的主程序文件的上一级目录或 下一级目录等。  In the present invention, the specified directory may be a directory of the same level as the main program file of the software, or may be a directory of another level, such as a directory of the upper level of the main program file of the software or a directory of the next level.
在本发明的一种优选实施例中, 所述指定目录是与软件的主程序文 件同级的目录。 下面做详细的说明。 图 2为本发明所述软件初始安装时的一种目录结构示意图。 参见图In a preferred embodiment of the invention, the specified directory is a directory of the same level as the main program file of the software. The following is a detailed description. FIG. 2 is a schematic diagram of a directory structure during initial installation of the software according to the present invention. See picture
2, 本发明与现有技术的软件安装目录不同, 现有技术通常是将主程序 exe文件与资源文件比如所需要加载的 .dll放在同级目录下, 而本发明将 主程序 exe文件外提到更外层目录, 如图 2所示的主程序 exe文件 201 , 设置在了软件的根目录下, 而软件运行时需要加载的资源文件如. dll 文 件都放置在当前版本号的版本目录 202中, 该版本目录 202放置在与所 述主程序 exe文件 201同级的目录下, 例如此处为根目录下。 所述主程 序 exe文件 201实际上只是个空壳, 它的作用只是搜索同级目录下版本 号更新的版本目录, 并加载该版本目录。 2. The present invention is different from the software installation directory of the prior art. In the prior art, the main program exe file is usually placed in the same directory as the resource file, such as the .dll to be loaded, and the present invention will be outside the main program exe file. Referring to the outer directory, the main program exe file 201 shown in Figure 2 is set in the root directory of the software, and the resource files that need to be loaded when the software is running, such as .dll files, are placed in the version directory of the current version number. In 202, the version directory 202 is placed in a directory at the same level as the main program exe file 201, such as here in the root directory. The main program exe file 201 is actually just an empty shell, and its function is only to search for the version directory updated with the version number in the same directory, and load the version directory.
图 3为本发明所述软件升级安装后的一种目录结构示意图。 参见图 FIG. 3 is a schematic diagram of a directory structure after the software is upgraded and installed according to the present invention. See picture
3 , 利用本发明对升级软件进行下载并安装升级后, 升级软件 (通常为 升级软件包) 实际上会在安装目录下解压, 所有资源文件都放置在当前 升级软件的新版本号对应的版本目录 301中, 而旧版本目录 202和主程 序 exe文件 201的位置不变, 因此在升级时, 对当前运行的主程序完全 没有影响, 待用户下次启动时, 自动加载更新的版本目录, 即可运行新 版本的软件。 3. After the upgrade software is downloaded and installed and upgraded by the present invention, the upgrade software (usually an upgrade package) is actually decompressed in the installation directory, and all resource files are placed in the version directory corresponding to the new version number of the current upgrade software. In 301, the location of the old version directory 202 and the main program exe file 201 are unchanged, so when upgrading, there is no impact on the currently running main program, and when the user next starts, the updated version directory is automatically loaded. Run the new version of the software.
本发明在改变了主程序文件的放置目录后, 操作系统会按自身的目 录搜索顺序查找文件, Windows提供了一个应用程序编程接口 (API ) 可以设置应用程序加载. dll资源文件的搜索顺序, 该 API为:  After the present invention changes the placement directory of the main program file, the operating system searches for files according to its own directory search order. Windows provides an application programming interface (API) to set the search order of the application loading. dll resource files. The API is:
BOOLWINAPI SetDllDirectory(LPCTSTR lpPathName)  BOOLWINAPI SetDllDirectory(LPCTSTR lpPathName)
软件主程序利用该 API, 可以使得主程序文件外提后, 操作系统搜 索 .dll的目录顺序不变, 从而可以顺利加载资源文件。  The software main program utilizes the API, so that after the main program file is extracted, the operating system searches for the .dll directory order, so that the resource file can be smoothly loaded.
本发明中, 由于软件本身的静默升级的需要, 当软件多次升级后, 实际上在用户安装目录和所述指定目录(如果该指定目录不是与软件主 程序同级的安装目录) 中会有多个版本目录文件夹, 如果按照现有的桌 面软件的安装、 卸载的过程则通常需要——配对, 例如使用 Microsoft 软件安装(MSI ) 工具制作的安装包, 在卸载软件的时候只能卸载与该 版本匹配的安装目录文件, 而并不能达到整个软件不留痕迹的彻底清 除。 因此本发明可以利用 Nullsoft 脚本安装系统 ( NSIS , Nullsoft Scriptable Install System )脚本重新编写卸载程序来控制软件的卸载行 为, 如图 3 所示的卸载程序 302, 用于完全卸载软件。 所述 NSIS 为 Windows下支持脚本的安装程序, 完全免费, 开放源代码, 支持脚本, 可以通过编写脚本来控制安装过程的任何细节。 所述利用 NSIS生成的 卸载程序 302可打包进主安装包中, 在该卸载程序 302启动后即可实施 对软件的卸载, 卸载的实质操作就是将所述指定目录和与所述主程序文 件 201 同级目录下的所有文件和文件夹全部删除, 即删除 QPlus.exe根 目录下的所有文件以及文件夹, 因此可以将整个软件(包括各个版本的 软件)不留痕迹地彻底清除, 同时该卸载程序在以后的软件升级中无需 变化, 其维护成本可降低为零。 In the present invention, due to the silent upgrade of the software itself, when the software is upgraded multiple times, it is actually in the user installation directory and the specified directory (if the specified directory is not the same as the software main program installation directory) Multiple version directory folders, if you follow the installation and uninstall process of existing desktop software, you usually need to pair - such as the installation package made with Microsoft Software Installation (MSI) tool, you can only uninstall the software when uninstalling the software. This version matches the installation directory file, and it does not reach the entire software without leaving traces. Except. Therefore, the present invention can use the Nullsoft Scriptable Install System (NSIS, Nullsoft Scriptable Install System) script to rewrite the uninstaller to control the uninstallation behavior of the software, as shown in Figure 3, the uninstaller 302 is used to completely uninstall the software. The NSIS is a script-enabled installer for Windows. It is completely free, open source, supports scripts, and can be scripted to control any details of the installation process. The uninstaller 302 generated by the NSIS can be packaged into the main installation package, and the uninstallation of the software can be implemented after the uninstaller 302 is started. The physical operation of the uninstallation is to specify the specified directory and the main program file 201. All files and folders in the same directory are deleted, that is, all files and folders in the root directory of QPlus.exe are deleted, so the entire software (including the software of each version) can be completely removed without leaving traces, and the uninstallation is performed at the same time. The program does not need to be changed in future software upgrades, and its maintenance costs can be reduced to zero.
图 4为本发明所述升级过程的一种详细实施流程图。 参见图 4, 该 流程包括:  FIG. 4 is a detailed implementation flowchart of the upgrade process of the present invention. Referring to Figure 4, the process includes:
步骤 401、 启动主程序, 开始运行。  Step 401, start the main program, and start running.
步骤 402、 主程序启动升级进程。  Step 402: The main program starts the upgrade process.
此处, 由于整个升级过程涉及到与升级服务器的多次交互过程, 为 了尽可能的减少客户端对于服务器的请求量, 要对查询的频率有一定的 控制。 因此在另一种实施例中, 在启动升级进程之前即步骤 402之前, 可以进一步包括: 查询当前系统内是否运行有一个以上所述软件主程序 的实例, 如果是则利用其中一个(例如通常为第一个)运行的主程序实 例启动所述升级进程; 否则直接利用所述软件主程序实例启动所述升级 进程。 利用这种方式, 可以限制多个实例重复进行升级查询, 从而控制 升级查询的频率, 减少客户端对服务器的请求量。  Here, since the entire upgrade process involves multiple interactions with the upgrade server, in order to reduce the client's request for the server as much as possible, the frequency of the query must be controlled. Therefore, in another embodiment, before starting the upgrade process, that is, before step 402, the method may further include: querying whether there is one instance of the software main program running in the current system, and if so, utilizing one of them (for example, usually The first) running main program instance starts the upgrade process; otherwise, the upgrade process is started directly by using the software main program instance. In this way, multiple instances can be restricted from repeating the upgrade query, thereby controlling the frequency of upgrading the query and reducing the amount of client requests to the server.
步骤 403、 启动升级进程后, 升级进程首先会完成一次升级进程自 升级的查询过程, 即升级进程与服务器交互判断是否要自升级, 即判断 服务器是否有比本地更新版本的升级程序文件, 如果是则下载新版本的 升级程序 exe文件, 并退出升级进程; 否则执行步骤 404。 当然本步骤 403为可选步骤, 也可以跳过本步骤, 直接执行步骤 404。 步骤 404、 升级进程与服务器交互判断是否需要升级软件, 即判断 服务器是否有更新版本的升级软件, 如果是则执行步骤 405 , 否则退出 升级进程。 Step 403: After the upgrade process is started, the upgrade process first completes the self-upgrade query process of the upgrade process, that is, the upgrade process interacts with the server to determine whether it is self-upgrading, that is, whether the server has an upgrade program file than the local update version, and if Then download the new version of the upgrade program exe file and exit the upgrade process; otherwise, go to step 404. Of course, this step 403 is an optional step. You can skip this step and directly perform step 404. Step 404: The upgrade process interacts with the server to determine whether the software needs to be upgraded, that is, whether the server has a newer version of the upgrade software, and if yes, step 405 is performed; otherwise, the upgrade process is exited.
步骤 405、 下载新版本的升级软件, 例如升级软件通常是以升级软 件包的形式, 因此可以下载新版本的升级软件包。  Step 405: Download a new version of the upgrade software. For example, the upgrade software is usually in the form of an upgrade software package, so the new version of the upgrade package can be downloaded.
步骤 406、 安装升级软件包, 创建当前升级软件的新版本号对应的 版本目录, 将该新版本号的版本目录放置在与所述旧版本目录同级的目 录下, 将新版本软件的资源文件放置在该新版本号的版本目录中, 之后 退出升级进程。  Step 406: Install an upgrade package, create a version directory corresponding to the new version number of the current upgrade software, and place the version directory of the new version number in a directory at the same level as the old version directory, and the resource file of the new version software. Place it in the version directory of the new version number and exit the upgrade process.
由于升级软件包属于敏感数据, 因此在另一种实施例中, 在下载得 到升级软件包后、 安装升级软件包之前, 即步骤 405和 406之间, 进一 步包括: 对所述下载得到的升级软件包做 MD5值匹配, 如果匹配则执 行后续步骤进行软件升级安装, 如果不匹配则判定本次下载失败, 删除 所述下载的软件升级软件包, 重复下载所述软件升级软件包, 若下载失 败的次数达到指定次数(如最多 3 次), 则结束下载流程, 退出升级进 程。  Since the upgrade package belongs to sensitive data, in another embodiment, after downloading the upgrade package, before installing the upgrade package, that is, between steps 405 and 406, the method further includes: upgrading the software obtained by the downloading The package performs the MD5 value matching. If the matching is performed, the subsequent steps are performed to perform the software upgrade installation. If the matching does not match, the download fails, the downloaded software upgrade package is deleted, and the software upgrade package is repeatedly downloaded, if the download fails. When the number of times reaches the specified number of times (for example, up to 3 times), the download process ends and the upgrade process is exited.
与上述方法对应, 本发明还公开了一种软件安装及升级装置。 图 5 为本发明所述的软件安装及升级装置的一种实施示意图。 参见图 5 , 该 装置 500包括:  Corresponding to the above method, the present invention also discloses a software installation and upgrade device. FIG. 5 is a schematic diagram of an implementation of a software installation and upgrade apparatus according to the present invention. Referring to Figure 5, the apparatus 500 includes:
初始安装模块 501 , 用于软件的初始安装, 在初始安装时, 创建当 前版本号的版本目录, 将该版本目录放置在指定目录下, 将当前版本软 件的资源文件放置在该版本目录中; 如图 2所示。  The initial installation module 501 is used for initial installation of the software. During the initial installation, the version directory of the current version number is created, and the version directory is placed in the specified directory, and the resource file of the current version software is placed in the version directory; Figure 2 shows.
主程序文件 502, 用于启动运行软件主程序, 并在开始运行时, 搜 索所述指定下版本号最新的版本目录, 并加载该版本目录。  The main program file 502 is used to start the running software main program, and when starting to run, search for the latest version directory of the specified version number, and load the version directory.
升级进程模块 503 , 用于在软件运行时启动, 启动后下载并安装升 级软件, 在安装升级软件时, 创建当前升级软件的新版本号对应的版本 目录, 将该新版本号的版本目录放置在与所述旧版本目录同级的目录 下, 将新版本软件的资源文件放置在该新版本号的版本目录中, 如图 3 所示。 The upgrade process module 503 is configured to start when the software is running, download and install the upgrade software after the startup, and when the upgrade software is installed, create a version directory corresponding to the new version number of the current upgrade software, and place the version directory of the new version number in the In the same directory as the old version directory, the resource file of the new version software is placed in the version directory of the new version number, as shown in FIG. Shown.
图 6为本发明所述的软件安装及升级装置的另一种实施示意图。 参 见图 6, 为了将整个软件(包括各个版本的软件)不留痕迹地彻底清除, 该装置进一步包括卸载模块 504, 用于将所述指定目录和与所述主程序 文件同级目录下的所有文件和文件夹全部删除。 为了降低客户端与服务 器的请求量, 该装置还可以进一步包括查询模块 505 , 用于查询当前系 统内是否运行有一个以上所述软件主程序的实例, 如果是则利用其中一 个(例如通常为第一个)运行的主程序实例启动所述升级进程模块 503; 否则直接利用所述软件主程序实例启动所述升级进程模块 503。  FIG. 6 is a schematic diagram of another implementation of the software installation and upgrade apparatus according to the present invention. Referring to FIG. 6, in order to completely remove the entire software (including the software of each version) without leaving a trace, the apparatus further includes an uninstalling module 504 for using the specified directory and all the directories in the same directory as the main program file. Files and folders are all deleted. In order to reduce the request amount of the client and the server, the device may further include a query module 505, configured to query whether there is one instance of the software main program running in the current system, and if so, utilize one of them (for example, usually The running main program instance starts the upgrade process module 503; otherwise, the upgrade process module 503 is directly started by using the software main program instance.
图 7为本发明所述升级进程模块的一种具体组成示意图。参见图 7, 所述升级进程模块 503中包括:  FIG. 7 is a schematic diagram of a specific composition of the upgrade process module according to the present invention. Referring to Figure 7, the upgrade process module 503 includes:
升级进程自升级模块 701 , 用于在下载升级软件之前, 首先与服务 器交互判断是否要自升级, 如果是则下载新版本的升级程序文件, 并退 出升级进程; 否则再触发升级进程模块下载并安装所述升级软件。  The upgrade process self-upgrade module 701 is configured to first interact with the server to determine whether to upgrade from the server before downloading the upgrade software. If yes, download the new version of the upgrade program file and exit the upgrade process; otherwise, trigger the upgrade process module to download and install. The upgrade software.
版本升级模块 702, 用于在下载升级软件之前与服务器交互判断是 否需要升级软件, 如果是则触发下载并安装新版本的升级软件包; 否则 退出升级过程。  The version upgrade module 702 is configured to interact with the server to determine whether the software needs to be upgraded before downloading the upgrade software. If yes, trigger the download and install the new version of the upgrade package; otherwise, exit the upgrade process.
升级软件下载模块 703 , 用于从服务器下载新版本的升级软件包。 校验模块 704, 用于在下载得到升级软件包后、 安装升级软件包之 前, 对所述下载得到的升级软件包做 MD5值匹配, 如果匹配则触发升 级软件安装模块安装升级软件包, 如果不匹配则判定本次下载失败, 删 除所述下载的升级软件包, 并触发所述升级软件下载模块重新下载所述 升级软件包, 若下载失败的次数达到指定次数(如最多 3 次), 则退出 升级过程。  The upgrade software download module 703 is used to download a new version of the upgrade package from the server. The verification module 704 is configured to perform MD5 value matching on the downloaded upgrade package after downloading the upgrade package, and if the matching is performed, triggering the upgrade software installation module to install the upgrade package, if not The matching determines that the download fails, deletes the downloaded upgrade package, and triggers the upgrade software download module to re-download the upgrade package, and if the number of download failures reaches a specified number of times (for example, up to 3 times), exit The upgrade process.
升级软件安装模块 705 , 用于安装所下载的升级软件包, 在安装时, 创建当前升级软件的新版本号对应的版本目录, 将该新版本号的版本目 录放置在与所述旧版本目录同级的目录下, 将新版本软件的资源文件放 置在该新版本号的版本目录中。 当然, 所述升级进程自升级模块 701和所述校验模块 704是可选模 块, 在其他实施例中可以自由选择。 The upgrade software installation module 705 is configured to install the downloaded upgrade software package, and at the time of installation, create a version directory corresponding to the new version number of the current upgrade software, and place the version directory of the new version number in the same directory as the old version directory. In the directory of the level, the resource file of the new version of the software is placed in the version directory of the new version number. Of course, the upgrade process self-upgrade module 701 and the check module 704 are optional modules, and can be freely selected in other embodiments.
本发明的每一个实施例可以通过由数据处理设备如计算机执行的 程序来实现。 显然, 程序构成了本发明。 此外, 通常存储在一个存储介 质中的程序通过直接将程序读取出存储介质或者通过将程序安装或复 制到数据处理设备的存储设备(如硬盘和或内存) 中执行。 因此, 这样 的存储介质也构成了本发明。 存储介质可以使用任何类型的记录方式, 例如纸张存储介质(如纸带等)、 磁存储介质(如软盘、 硬盘、 闪存等)、 光存储介质 (如 CD-ROM等)、 磁光存储介质 (如 MO等)等。  Each of the embodiments of the present invention can be implemented by a program executed by a data processing device such as a computer. Obviously, the program constitutes the invention. In addition, programs that are typically stored in a storage medium are executed by directly reading the program out of the storage medium or by installing or copying the program to a storage device (such as a hard disk and or a memory) of the data processing device. Therefore, such a storage medium also constitutes the present invention. The storage medium can use any type of recording method, such as paper storage medium (such as paper tape, etc.), magnetic storage medium (such as floppy disk, hard disk, flash memory, etc.), optical storage medium (such as CD-ROM, etc.), magneto-optical storage medium ( Such as MO, etc.).
因此本发明还公开了一种存储介质, 其中存储有计算机程序, 该计 算机程序用于本发明上述方法的任何一种实施例。 以有效的降低后期对于软件升级的运营和维护成本, 并且具有升级进程 自升级等强有力的能力。  Accordingly, the present invention also discloses a storage medium in which a computer program is stored, which is used in any of the above embodiments of the present invention. In order to effectively reduce the operation and maintenance costs for software upgrades in the later period, and have the powerful ability to upgrade the self-upgrade.
本发明尤其可以适用于桌面开放软件, 桌面开放软件除了具有普通 软件安装, 卸载的通常功能外, 还需结合软件自身特点实现快速静默升 级, 可以更好的满足用户对于软件安装以及卸载的基本要求。 用户在使 用软件的过程中, 希望可以体验到软件最新的功能, 而操作软件升级本 身有是一件相对繁瑣的事情, 而本发明可以提供静默升级的功能, 可以 有效降低用户对桌面开放软件的使用门槛。  The present invention is particularly applicable to desktop open software. In addition to the usual functions of ordinary software installation and uninstallation, the desktop open software also needs to be combined with the software itself to achieve rapid silent upgrade, which can better meet the basic requirements of the user for software installation and uninstallation. . In the process of using the software, the user hopes to experience the latest functions of the software, and the operation software upgrade itself is relatively cumbersome, and the present invention can provide a silent upgrade function, which can effectively reduce the user's open software to the desktop. Use the threshold.
以上所揭露的仅为本发明一种较佳实施例而已, 当然不能以此来限 定本发明之权利范围, 因此依本发明权利要求所作的等同变化, 仍属本 发明所涵盖的范围。  The above is only a preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.

Claims

权利要求书 Claim
1、 一种软件安装及升级方法, 其特征在于, 包括:  A software installation and upgrade method, characterized in that:
创建当前版本号的版本目录, 将该版本目录放置在指定目录下, 将 当前版本软件的资源文件放置在该版本目录中;  Create a version directory of the current version number, place the version directory in the specified directory, and place the resource file of the current version software in the version directory;
软件主程序开始运行时, 搜索所述指定目录下版本号最新的版本目 录, 并加载该版本目录;  When the software main program starts running, it searches for the latest version directory of the version number in the specified directory, and loads the version directory;
在软件主程序运行时启动升级进程下载并安装升级软件, 在安装升 级软件时, 创建当前升级软件的新版本号对应的版本目录, 将该新版本 号的版本目录放置在与所述旧版本目录同级的目录下, 将新版本软件的 资源文件放置在该新版本号的版本目录中。  When the software main program is running, the upgrade process is started to download and install the upgrade software. When the upgrade software is installed, the version directory corresponding to the new version number of the current upgrade software is created, and the version directory of the new version number is placed in the same directory as the old version. In the same level directory, the resource file of the new version of the software is placed in the version directory of the new version number.
2、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 在卸载软件时, 将所述指定目录和与所述主程序文件同级目录下的所有 文件和文件夹全部删除。  2. The method according to claim 1, wherein the method further comprises: deleting all of the specified directories and all files and folders in the same directory as the main program file when the software is uninstalled.
3、根据权利要求 1或 2所述的方法,其特征在于,所述指定目录为: 与软件的主程序文件同级的目录或其它级别的目录。  The method according to claim 1 or 2, wherein the specified directory is: a directory of the same level as the main program file of the software or a directory of another level.
4、根据权利要求 1所述的方法,其特征在于,在启动升级进程之前, 进一步包括: 查询当前系统内是否运行有一个以上所述软件主程序的实 例, 如果是则利用其中一个运行的主程序实例启动所述升级进程; 否则 直接利用所述软件主程序实例启动所述升级进程。  The method according to claim 1, wherein before starting the upgrade process, the method further comprises: querying whether there is one instance of the software main program running in the current system, and if so, using one of the running mains The program instance starts the upgrade process; otherwise, the upgrade process is started directly by using the software main program instance.
5、根据权利要求 1所述的方法, 其特征在于, 所述升级进程在启动 之后、 下载升级软件之前, 首先与服务器交互判断是否要自升级, 如果 是则下载新版本的升级程序文件, 并退出升级进程; 否则再下载并安装 所述升级软件。  The method according to claim 1, wherein the upgrade process first interacts with the server to determine whether to self-upgrade after starting the upgrade software, and if yes, downloading a new version of the upgrade program file, and Exit the upgrade process; otherwise download and install the upgrade software.
6、根据权利要求 1所述的方法, 其特征在于, 该方法在下载升级软 件之前, 进一步包括: 与服务器交互判断是否需要升级软件, 如果是则 下载并安装新版本的升级软件; 否则退出升级进程。 6. The method of claim 1 wherein the method is downloading upgrade soft Before the device, the method further includes: interacting with the server to determine whether the software needs to be upgraded, and if so, downloading and installing the new version of the upgrade software; otherwise, exiting the upgrade process.
7、根据权利要求 1所述的方法, 其特征在于, 在下载得到升级软件 后、 安装升级软件之前, 进一步包括: 对所述下载得到的升级软件做 MD5值匹配,如果匹配则安装升级软件,如果不匹配则判定本次下载失 败, 删除所述下载的升级软件, 并重新下载所述升级软件, 若下载失败 的次数达到指定次数, 则结束下载流程。  The method according to claim 1, wherein after the upgrade software is downloaded and the upgrade software is installed, the method further includes: performing MD5 value matching on the upgraded software obtained by the downloading, and installing the upgrade software if the matching is performed, If it does not match, it is determined that the download fails, the downloaded upgrade software is deleted, and the upgrade software is re-downloaded. If the number of download failures reaches a specified number of times, the download process is ended.
8、 一种软件安装及升级装置, 其特征在于, 包括: 8. A software installation and upgrade apparatus, characterized in that:
初始安装模块, 用于软件的初始安装, 在初始安装时, 创建当前版 本号的版本目录, 将该版本目录放置在指定目录下, 将当前版本软件的 资源文件放置在该版本目录中;  The initial installation module is used for the initial installation of the software. During the initial installation, the version directory of the current version number is created, the version directory is placed in the specified directory, and the resource file of the current version software is placed in the version directory;
主程序文件, 用于启动运行软件主程序, 并在开始运行时, 搜索所 述指定目录下版本号最新的版本目录, 并加载该版本目录;  a main program file, used to start the running software main program, and when starting to run, search for the latest version directory of the version number in the specified directory, and load the version directory;
升级进程模块, 用于在软件运行时启动, 启动后下载并安装升级软 件,在安装升级软件时,创建当前升级软件的新版本号对应的版本目录, 将该新版本号的版本目录放置在与所述旧版本目录同级的目录下, 将新 版本软件的资源文件放置在该新版本号的版本目录中。  The upgrade process module is used to start when the software is running, download and install the upgrade software after startup, and when installing the upgrade software, create a version directory corresponding to the new version number of the current upgrade software, and place the version directory of the new version number in In the same level directory of the old version directory, the resource file of the new version software is placed in the version directory of the new version number.
9、根据权利要求 8所述的装置, 其特征在于, 该装置进一步包括卸 载模块, 用于将所述指定目录和与所述主程序文件同级目录下的所有文 件和文件夹全部删除。  The apparatus according to claim 8, characterized in that the apparatus further comprises an uninstalling module for deleting all of the specified directories and all files and folders in the same directory as the main program file.
10、 根据权利要求 8或 9所述的方法, 其特征在于, 所述指定目录  10. The method according to claim 8 or 9, wherein the specified directory
11、根据权利要求 8所述的装置, 其特征在于, 该装置进一步包括: 查询模块, 用于查询当前系统内是否运行有一个以上所述软件主程序的 实例, 如果是则利用其中一个运行的主程序实例启动所述升级进程模 块; 否则直接利用所述软件主程序实例启动所述升级进程模块。 The device according to claim 8, wherein the device further comprises: a query module, configured to query whether there is more than one software main program running in the current system For example, if yes, the upgrade process module is started by using one of the running main program instances; otherwise, the upgrade process module is directly started by using the software main program instance.
12、 根据权利要求 8所述的装置, 其特征在于, 所述升级进程模块 中包括升级进程自升级模块, 用于在下载升级软件之前, 首先与服务器 交互判断是否要自升级, 如果是则下载新版本的升级程序文件, 并退出 升级进程; 否则再触发升级进程模块下载并安装所述升级软件。  The apparatus according to claim 8, wherein the upgrade process module includes an upgrade process self-upgrade module, and is configured to first interact with the server to determine whether to upgrade from the server before downloading the upgrade software, and if so, download The new version of the upgrade program file, and exit the upgrade process; otherwise trigger the upgrade process module to download and install the upgrade software.
13、 根据权利要求 8所述的装置, 其特征在于, 所述升级进程模块 中包括版本升级模块, 用于在下载升级软件之前与服务器交互判断是否 需要升级软件, 如果是则触发下载并安装新版本的升级软件; 否则退出 升级过程。  The apparatus according to claim 8, wherein the upgrade process module includes a version upgrade module, configured to interact with the server to determine whether the software needs to be upgraded before downloading the upgrade software, and if so, trigger downloading and installing a new one. Version of the upgrade software; otherwise exit the upgrade process.
14、 根据权利要求 8所述的装置, 其特征在于, 所述升级进程模块 中包括校验模块, 用于在下载得到升级软件后、 安装升级软件之前, 对 所述下载得到的升级软件做 MD5值匹配, 如果匹配则触发所述升级进 程模块安装升级软件, 如果不匹配则判定本次下载失败, 删除所述下载 的升级软件, 并触发升级进程模块重新下载所述升级软件, 若下载失败 的次数达到指定次数, 则退出升级过程。  The apparatus according to claim 8, wherein the upgrade process module includes a verification module, configured to perform MD5 on the downloaded upgrade software after downloading the upgrade software and before installing the upgrade software. The value matches, if it matches, the upgrade process module is installed to install the upgrade software. If it does not match, it is determined that the download fails, the downloaded upgrade software is deleted, and the upgrade process module is triggered to re-download the upgrade software, if the download fails. When the number of times reaches the specified number, the upgrade process is exited.
15、 一种存储介质, 其特征在于, 其中存储有数据处理程序, 该数 据处理程序用于执行所述权利要求 1至 6任一项所述的方法。  A storage medium, characterized in that a data processing program is stored therein, the data processing program for performing the method of any one of claims 1 to 6.
PCT/CN2012/078356 2011-08-23 2012-07-09 Software installation and upgrade method and device WO2013026332A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/187,792 US9606791B2 (en) 2011-08-23 2014-02-24 Controlled method and apparatus to securely install and update software

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110243128.7A CN102955702B (en) 2011-08-23 2011-08-23 A kind of software is installed and upgrade method and device
CN201110243128.7 2011-08-23

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/187,792 Continuation-In-Part US9606791B2 (en) 2011-08-23 2014-02-24 Controlled method and apparatus to securely install and update software

Publications (1)

Publication Number Publication Date
WO2013026332A1 true WO2013026332A1 (en) 2013-02-28

Family

ID=47745916

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/078356 WO2013026332A1 (en) 2011-08-23 2012-07-09 Software installation and upgrade method and device

Country Status (3)

Country Link
US (1) US9606791B2 (en)
CN (1) CN102955702B (en)
WO (1) WO2013026332A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147712A (en) * 2017-05-05 2017-09-08 腾讯科技(深圳)有限公司 Update the method and device of web application
CN110609704A (en) * 2019-09-19 2019-12-24 聚好看科技股份有限公司 Method, device and system for adjusting gray scale of service program version
CN113760306A (en) * 2020-10-26 2021-12-07 北京京东乾石科技有限公司 Method and device for installing software, electronic equipment and storage medium
CN114416133A (en) * 2021-12-30 2022-04-29 武汉卓目科技有限公司 Embedded file data updating method and system
CN115129333A (en) * 2022-09-02 2022-09-30 城云科技(中国)有限公司 Npm resource packet management method, device and system suitable for micro front-end framework

Families Citing this family (48)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2808787A4 (en) * 2012-01-24 2016-12-14 Sony Interactive Entertainment Inc Information processing device and information processing system
US10095501B2 (en) * 2013-03-15 2018-10-09 Oracle International Corporation Deployment and activation of updates on target hosts
US9128793B2 (en) * 2013-05-14 2015-09-08 Tencent Technology (Shenzhen) Company Limited Method, system and server for downloading installation package
CN103942067B (en) * 2014-03-31 2017-11-03 广东欧珀移动通信有限公司 Smart machine clears up the method and device of software installation APMB package automatically
CN104007992A (en) * 2014-06-09 2014-08-27 广州华多网络科技有限公司 Methods and devices for program updating and starting
US9619244B2 (en) * 2014-09-05 2017-04-11 Xiaomi Inc. Method and system for upgrading an electronic device
CN105468395B (en) * 2014-09-10 2019-11-05 阿里巴巴集团控股有限公司 Update method, apparatus and system
CN105653300B (en) * 2014-11-12 2019-06-28 鸿富锦精密电子(天津)有限公司 Name-oriented application system upgrading system and method
US10078619B2 (en) * 2014-12-16 2018-09-18 International Business Machines Corporation Dynamic association of application workload tiers to infrastructure elements in a cloud computing environment
CN105786538B (en) * 2014-12-24 2019-12-06 深圳市贰陆陆科技有限公司 software upgrading method and device based on android system
CN106155723B (en) * 2015-04-13 2020-12-22 腾讯科技(深圳)有限公司 Method and device for upgrading service application program, terminal and computer storage medium
CN104978224B (en) * 2015-07-06 2018-11-20 张兆琦 A kind of application management method towards more hardware platforms
CN105094919A (en) * 2015-08-13 2015-11-25 海信集团有限公司 Application program starting method
CN105117265B (en) * 2015-09-17 2019-02-15 珠海豹趣科技有限公司 A kind of method, apparatus and terminal of document upgrading
CN105243141B (en) * 2015-10-12 2019-08-16 上海斐讯数据通信技术有限公司 A kind of APP method for managing resource and mobile terminal
CN105302604B (en) * 2015-10-30 2018-10-23 北京奇虎科技有限公司 The method for updating edition and device of application program
CN105677428A (en) * 2016-01-12 2016-06-15 北京小米移动软件有限公司 Upgrading method and device for terminal and terminal
CN107193576A (en) * 2016-03-15 2017-09-22 阿里巴巴集团控股有限公司 The update method and device of a kind of application program for mobile terminal
CN107239295B (en) * 2016-03-29 2020-12-25 腾讯科技(深圳)有限公司 Software upgrading method and software upgrading device
US10216510B2 (en) * 2016-06-04 2019-02-26 Airwatch Llc Silent upgrade of software with dependencies
CN106484471A (en) * 2016-09-30 2017-03-08 宁波方太厨具有限公司 The loading method of program curing in a kind of communication module
CN106445609A (en) * 2016-09-30 2017-02-22 广东欧珀移动通信有限公司 Automatic updating method of application program and mobile terminal
CN108008970A (en) * 2016-10-27 2018-05-08 腾讯科技(深圳)有限公司 Application upgrade method and device
US10229404B1 (en) 2016-12-16 2019-03-12 Worldpay, Llc Systems and methods for network configurations of pin pads
CN106886422A (en) * 2017-04-07 2017-06-23 广州华多网络科技有限公司 Method for upgrading software and device, electronic equipment
CN107357613B (en) * 2017-06-28 2020-09-04 广州酷狗计算机科技有限公司 Application updating method and device and computer readable storage medium
CN107423096A (en) * 2017-07-26 2017-12-01 郑州云海信息技术有限公司 A kind of method and device for realizing software installation
CN109582327A (en) * 2017-09-29 2019-04-05 北京国双科技有限公司 Update method and device
CN108021427A (en) * 2017-11-23 2018-05-11 国家电网公司 Information system deployment and updating management method based on Docker
CN108459868A (en) * 2018-03-29 2018-08-28 武汉斗鱼网络科技有限公司 A kind of software start-up method, device, terminal and storage medium
CN108762800A (en) * 2018-05-23 2018-11-06 北京五八信息技术有限公司 The dynamic updating method and device of application program
US10868709B2 (en) 2018-09-10 2020-12-15 Oracle International Corporation Determining the health of other nodes in a same cluster based on physical link information
CN110045975A (en) * 2019-05-05 2019-07-23 厦门天锐科技股份有限公司 A kind of method for upgrading software
CN110515642B (en) * 2019-09-02 2022-04-29 杭州行至云起科技有限公司 Application program upgrading method and system
CN110659052B (en) * 2019-09-30 2023-03-10 深圳市九洲电器有限公司 Method and system for updating system software in network equipment and readable storage medium
CN110737454A (en) * 2019-10-17 2020-01-31 腾讯科技(深圳)有限公司 Software project updating method and device, computer equipment and storage medium
CN110764805B (en) * 2019-10-28 2024-01-23 腾讯科技(深圳)有限公司 Client non-inductive upgrading method, device, terminal and storage medium
CN110806888A (en) * 2019-12-23 2020-02-18 北京奇艺世纪科技有限公司 Application program upgrading method and device and electronic equipment
JP2021121896A (en) * 2020-01-31 2021-08-26 キヤノン株式会社 Information processor and program
CN111736863A (en) * 2020-05-22 2020-10-02 深圳市鸿合创新信息技术有限责任公司 Software upgrading method and device and electronic equipment
CN111782197B (en) * 2020-08-03 2023-12-29 网易(杭州)网络有限公司 Resource release method and device
CN112612485A (en) * 2020-12-25 2021-04-06 交控科技股份有限公司 Upgrading method for deploying tool client
CN112947983B (en) * 2021-04-15 2024-03-15 网易(杭州)网络有限公司 Application program updating method and device, electronic equipment and storage medium
CN113238777B (en) * 2021-05-20 2023-08-22 网易(杭州)网络有限公司 Application program updating method, device, equipment and storage medium
CN115080141A (en) * 2022-06-02 2022-09-20 珠海金山数字网络科技有限公司 Data processing method and system
CN116069353B (en) * 2022-11-30 2024-02-02 广州力麒智能科技有限公司 Update guide preposition method, device, equipment and storage medium
CN116009912B (en) * 2022-12-26 2023-08-18 郑州云智信安安全技术有限公司 Construction method for automatically generating upgrade package aiming at private network environment
CN117555579A (en) * 2024-01-11 2024-02-13 杭州实在智能科技有限公司 Software construction updating method and system based on PyInstaller platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1904837A (en) * 2006-08-04 2007-01-31 华为技术有限公司 Method and system for software multi-version upgrading
CN1979418A (en) * 2005-12-07 2007-06-13 英业达股份有限公司 Dynamic updating programe method
CN101859250A (en) * 2009-04-07 2010-10-13 盛趣信息技术(上海)有限公司 Online game client system
WO2010130734A1 (en) * 2009-05-13 2010-11-18 International Business Machines Corporation System and method for building and updating a runtime environment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5732275A (en) * 1996-01-11 1998-03-24 Apple Computer, Inc. Method and apparatus for managing and automatically updating software programs
US6282709B1 (en) * 1997-11-12 2001-08-28 Philips Electronics North America Corporation Software update manager
US7779406B2 (en) * 1999-04-16 2010-08-17 Microsoft Corporation Method and system for managing lifecycles of deployed applications
US6912711B1 (en) * 2000-05-25 2005-06-28 International Business Machines Corporation Method of applying an update to a contained collection of program and data files based upon versions
US7814476B2 (en) * 2002-10-31 2010-10-12 Oracle America, Inc. Systems and methods for updating software
US7673297B1 (en) * 2003-09-03 2010-03-02 The Directv Group, Inc. Automatic software update detection and flexible installer for set-top boxes
US7313792B2 (en) * 2003-09-08 2007-12-25 Microsoft Corporation Method and system for servicing software
KR101075676B1 (en) * 2004-11-20 2011-10-21 삼성전자주식회사 Software download apparatus and method for mobile terminal equipment
US8245216B2 (en) * 2005-10-11 2012-08-14 Oracle International Corporation Patch management system
US20120246630A1 (en) * 2011-03-23 2012-09-27 Secure By Design System and Method for Automating Installation and Updating of Third Party Software

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1979418A (en) * 2005-12-07 2007-06-13 英业达股份有限公司 Dynamic updating programe method
CN1904837A (en) * 2006-08-04 2007-01-31 华为技术有限公司 Method and system for software multi-version upgrading
CN101859250A (en) * 2009-04-07 2010-10-13 盛趣信息技术(上海)有限公司 Online game client system
WO2010130734A1 (en) * 2009-05-13 2010-11-18 International Business Machines Corporation System and method for building and updating a runtime environment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147712A (en) * 2017-05-05 2017-09-08 腾讯科技(深圳)有限公司 Update the method and device of web application
CN110609704A (en) * 2019-09-19 2019-12-24 聚好看科技股份有限公司 Method, device and system for adjusting gray scale of service program version
CN110609704B (en) * 2019-09-19 2023-03-21 聚好看科技股份有限公司 Method, device and system for adjusting gray scale of service program version
CN113760306A (en) * 2020-10-26 2021-12-07 北京京东乾石科技有限公司 Method and device for installing software, electronic equipment and storage medium
CN114416133A (en) * 2021-12-30 2022-04-29 武汉卓目科技有限公司 Embedded file data updating method and system
CN115129333A (en) * 2022-09-02 2022-09-30 城云科技(中国)有限公司 Npm resource packet management method, device and system suitable for micro front-end framework

Also Published As

Publication number Publication date
US20140173578A1 (en) 2014-06-19
US9606791B2 (en) 2017-03-28
CN102955702A (en) 2013-03-06
CN102955702B (en) 2016-08-10

Similar Documents

Publication Publication Date Title
WO2013026332A1 (en) Software installation and upgrade method and device
US10235149B2 (en) Preinstalled application management method for mobile terminal and mobile terminal
KR101963912B1 (en) Application compatibility with library operating systems
AU2011329096B2 (en) Networked recovery system
US8234359B2 (en) System and method for remotely re-imaging a computer system
US8701104B2 (en) System and method for user agent code patch management
EP2786279A2 (en) Deployment of a driver or an application on a client device having a write-filter
WO2006099465A2 (en) System and method for automatically uploading updates
CN107220074B (en) Method and device for accessing and upgrading supporting layer software function
EP2805233B1 (en) Installation engine and package format for parallelizable, reliable installations
CN110750280B (en) Android platform-based application upgrading method and system and storage medium
CN102053848A (en) Automatic installation method for Linux operating system
JP4828842B2 (en) Reinstallation software creation method, reinstallation software creation program, installation method, installation program, and computer device
US9940334B2 (en) Image forming apparatus and control method thereof
WO2017101381A1 (en) Method for upgrading mobile terminal, and terminal
US20100077405A1 (en) Program startup apparatus and method
CN113204351A (en) Embedded system package management method and using method thereof
WO2016037314A1 (en) Software version upgrade method, apparatus and device
WO2023030142A1 (en) Application upgrade method, electronic device, chip and readable storage medium
KR20120069123A (en) Method and system for providing firmware over the air service
TWI575459B (en) Terminal device and system upgrading method thereof
CN116185442A (en) VoIP phone upgrading method and device based on android system
CN115061707A (en) Cross-network-segment application deployment method and terminal
CN110704086A (en) OTA (over the air) upgrading method, OTA upgrading equipment and OTA storing medium
JP2018032119A (en) Information processing apparatus, method for controlling information processing apparatus, and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12826019

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 200814)

122 Ep: pct application non-entry in european phase

Ref document number: 12826019

Country of ref document: EP

Kind code of ref document: A1