WO2009109134A1 - 安装或升级方法和装置 - Google Patents

安装或升级方法和装置 Download PDF

Info

Publication number
WO2009109134A1
WO2009109134A1 PCT/CN2009/070618 CN2009070618W WO2009109134A1 WO 2009109134 A1 WO2009109134 A1 WO 2009109134A1 CN 2009070618 W CN2009070618 W CN 2009070618W WO 2009109134 A1 WO2009109134 A1 WO 2009109134A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction group
installation
current instruction
breakpoint
upgrade
Prior art date
Application number
PCT/CN2009/070618
Other languages
English (en)
French (fr)
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 WO2009109134A1 publication Critical patent/WO2009109134A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging

Definitions

  • the present invention relates to computer network technology, and more particularly to an installation or upgrade method and apparatus. Background technique
  • the programming language and extensible markup language are constantly maturing. In order to enable operators to reuse projects, they need to be installed or upgraded on the host.
  • Embodiments of the present invention provide an installation or upgrade method and apparatus for implementing an adjustable installation or upgrade.
  • An embodiment of the present invention provides an installation or upgrade method, including:
  • An embodiment of the present invention provides an apparatus for installing or upgrading, including:
  • a parsing module configured to obtain an instruction set, where the instruction set includes at least one installation or upgrade operation instruction;
  • An execution module configured to select an instruction group as a current instruction group, and after the current instruction group is finished running, determine whether the current instruction group is set with a breakpoint, and if the current instruction group is set with a breakpoint, perform Debug operation, if the current instruction group does not set a breakpoint, run the next instruction group.
  • the embodiment of the present invention can be debugged by setting a breakpoint for the installation or upgrade instruction group, and can be debugged during the installation or upgrade process, and can be silently installed or upgraded by not setting a breakpoint for the instruction group. Therefore, the embodiment of the present invention can support debugging. And non-debug mode, another way to debug installation or upgrade. DRAWINGS
  • Embodiment 1 is a flow chart of Embodiment 1 of an installation or upgrade method of the present invention
  • Embodiment 2 is a flowchart of Embodiment 2 of a method for installing or upgrading according to the present invention
  • FIG. 3 is a schematic structural view of an embodiment of an installation or upgrade apparatus of the present invention.
  • FIG. 4 is a timing functional diagram of an embodiment of an installation or upgrade apparatus of the present invention. detailed description
  • FIG. 1 is a flowchart of Embodiment 1 of an installation or upgrade method of the present invention, where the embodiment includes:
  • Step 11 Get the instruction group.
  • the secondary developer divides the installation or upgrade operation into at least one installation or upgrade instruction, and one instruction group includes at least one installation or upgrade instruction.
  • Each instruction group has multiple attributes, including but not limited to instruction group name, description, parameters, breakpoint identification, timeout, etc. These attributes can be configured or default values, according to the breakpoint identifier, twice Developers can choose to set or not set breakpoints on the instruction set.
  • the host obtains the installation or upgrade instruction group by parsing the installation or upgrade package, displays these instruction groups and their corresponding configuration items, and executes these instruction groups in sequence.
  • Step 12 Select one of the installation or upgrade instruction groups as the current instruction group and run the current instruction group.
  • Step 13 After the end of the run, judge whether the current command group is set with a breakpoint, and if so, execute step 14; otherwise, go to step 15.
  • the breakpoint can be set by the secondary developer during the secondary development, or can be set by the operator during the installation or upgrade process.
  • the secondary developer can set a breakpoint for each instruction group by selecting the breakpoint identifier, that is, the instruction group acquired during the installation or upgrade process is unbroken. The point is preset to determine; during the installation or upgrade process, by displaying the installation or upgrade instruction group on the interface, the operator can set a breakpoint for the instruction group that has not been run according to the breakpoint identifier of the displayed installation or upgrade instruction group. That is, during the installation or upgrade process, the subsequent instruction group to be executed of the current instruction group can be selectively set by the operator.
  • Step 14 Perform a debugging operation. That is, pause at the breakpoint, debug, such as displaying the value of the variable in the configuration item corresponding to the current instruction group (such as the configuration item is the installation path, the variable value is "D: ⁇ Program"), or modifying the displayed variable value, etc. .
  • Step 15 Call the next instruction group and run it. Repeat step 13 again until all command groups have been run. If all command groups are not set to breakpoints, silent installation or upgrade is achieved.
  • whether the breakpoint is set to the instruction group is selected by the breakpoint identifier. If the breakpoint is set to implement the debug mode, if the breakpoint is not set to implement the non-debug mode, the silent installation is performed. By selecting a breakpoint set by the secondary developer or setting a breakpoint by the operator, it can be debugged by the second developer during the secondary development, and can be debugged by the operator during the installation or upgrade process.
  • FIG. 2 is a flowchart of Embodiment 2 of the method for installing or upgrading the present invention, where the embodiment includes:
  • Step 201 Parsing an installation or upgrade package developed by a secondary developer, obtaining an installation or upgrade instruction and a corresponding configuration item from a configuration file of the installation or upgrade package, and saving, so as to root Operate according to the saved values.
  • the configuration file is developed in the XML format, but the configuration file is not limited to the XML format.
  • the XML configuration file in this embodiment is as follows:
  • the XML configuration file defines three decrees: check.exe, install.exe, and startup.exe, and sets breakpoints for each instruction. These instructions are related to the product being installed or upgraded, and are not limited to the .exe format. And in order to better support internationalization, certain attribute definitions in the configuration file can be in the form of tags to meet the needs of localized installation or upgrade.
  • the labels here are understood as variable identifiers. Different labels can correspond to different languages. The implementation can translate the instruction content into different languages according to different regions, improving readability and comprehension. In the secondary development process, the above instructions and installation or upgrade contents are packaged into installation or upgrade packages.
  • the installation or upgrade package When installing or upgrading a host is to host the installation or upgrade package (similar to a stand-alone application scenario), directly parse the installation or upgrade package to obtain instructions; when installing or upgrading the host is not the host that stores the installation or upgrade package (similar to multi-machine Application scenario), the installation or upgrade package can be transferred to a directory on the installation or upgrade host through the File Transfer Protocol (FTP) or other transport protocol, and then parsed to obtain the instruction.
  • FTP File Transfer Protocol
  • Step 202 Display the configuration item on the interface.
  • Step 203 The operator or the secondary developer can set the configuration item through the interface, save, and then start the installation or upgrade operation. And during installation or upgrade, the operator can change the value of the variable in the configuration item (such as the installation path, etc.) set by the secondary developer, such as the above XML file replacement page (Details ⁇ 26)
  • Step 204 Install or upgrade the host to obtain the parsed installation or upgrade instructions, and run the first installation or upgrade command, such as check.exe for disk space check.
  • Step 205 After the instruction is finished, it is judged whether the current instruction is set with a breakpoint, and if there is a breakpoint, the debugging is suspended. For example, the above check.exe has set a breakpoint during the secondary development, so it needs to be suspended, if there is no breakpoint. , go to step 209. Among them, the instruction breakpoint can be specified by the secondary development default, or can be specified by the operator in real time by setting the breakpoint identifier during installation or upgrade.
  • Step 206 After the pause, the variables that can be modified in the configuration item are displayed on the interface.
  • Variables are defined by secondary development. Variables are read-only and writable. Which one is used is determined by secondary development. The installation or upgrade instructions need to be traceable. For non-repeatable instructions, the identification needs to be identified during the secondary development. The execution module gives corresponding prompt information according to the identification information of the instructions, and guides the operator to perform subsequent operations, such as: Ignore the current instruction, execute the next instruction, and so on.
  • Step 211 The installation or upgrade instruction is executed or the operator cancels the installation or upgrade operation.
  • the host performs an environment cleanup operation, such as deleting temporary files, ending the installation or upgrade operation, and generating an installation or upgrade report.
  • the breakpoint setting in the configuration file is specific to each installation or upgrade instruction.
  • the breakpoint configuration can be relaxed, that is, multiple installation or upgrade instructions can be set. Breakpoints, these multiple installation or upgrade instructions as a group of instructions. The following is a description of setting a breakpoint for multiple instructions.
  • the XML format is still taken as an example, but it is not limited to the XML format and its content. .
  • An example of an XML configuration file when multiple instructions set a breakpoint is as follows:
  • setting a breakpoint for multiple instructions is to set the breakpoint at the step level instead of the command level.
  • Multiple install or upgrade instructions are in the same breakpoint operation step, if there is only one in each step.
  • the installation or upgrade instruction is equivalent to the way one of the above instructions sets a breakpoint. Therefore, in addition to the way to set breakpoints, the rest of the processing flow is consistent with the flow of setting a breakpoint in the above instruction.
  • the installation or upgrade operation sequence is divided into one or more installation or upgrade instructions, and each instruction or each instruction group can be identified by a breakpoint, and according to the breakpoint identifier, whether to set a breakpoint, if the break is set Point, pause at the breakpoint, and you can modify the variable value to re-run the command, silent installation or upgrade without breakpoint, the implementation can support both debugging and non-support
  • the breakpoint and the variable value of the embodiment can establish the default value through the secondary development, and can be set in the operation interface by the operator during the installation or upgrade, that is, the two-layer breakpoint setting and the variable value can be realized. Configuration.
  • FIG. 3 is a schematic structural diagram of an apparatus for installing or upgrading an apparatus according to the present invention.
  • the embodiment includes: an parsing module 1 and an executing module 3.
  • the parsing module 1 is configured to obtain an instruction set, where the instruction set includes at least one installation or upgrade operation instruction; the execution module 3 is configured to select one of the installation or upgrade instruction groups as a current instruction group, and the operation of the current instruction group ends. After that, it is determined whether the current instruction group is set with a breakpoint. If the instruction group is set with a breakpoint, a debugging operation is performed. If the instruction group is not set with a breakpoint, the next instruction group is executed.
  • a breakpoint is set for the instruction group to implement debugging during the installation or upgrade process. If no breakpoint is set for the instruction group, the silent installation is implemented, that is, the embodiment supports both the debug mode and the non-debugable mode. , to achieve another form of debugging.
  • this embodiment may further include a configuration module 2.
  • the parsing module 1 is configured to parse the installation or upgrade package, and obtain an installation or upgrade instruction group and corresponding configuration items thereof;
  • the configuration module 2 is configured to display the installation or upgrade instruction group acquired by the parsing module 1, and display, modify, save, and The variable value in the configuration item corresponding to the instruction group;
  • the execution module 3 is configured to select an installation or upgrade instruction group as the current instruction group, and run the current instruction group according to the variable value corresponding to the current instruction group saved by the configuration module 2, at the current After the operation of the instruction group is finished, it is determined whether the current instruction group is set with a breakpoint. If the instruction group is set with a breakpoint, the debugging operation is performed. If the instruction group is not set with a breakpoint, the next instruction group is executed.
  • the specific process refers to Figure 4 and the following steps:
  • Step 401 The parsing module parses the installation or upgrade package, and obtains an installation or upgrade instruction group and corresponding configuration items.
  • the installation or upgrade package can be on a host that is locally installed or upgraded, or remotely transferred to a host for installation or upgrade via FTP or other protocols.
  • Step 402 The parsing module transmits the obtained instruction group and its corresponding configuration item to the configuration module.
  • the secondary developer can pre-set the value of the variable in the configuration item, that is, set the default value, such as presetting the installation path to "C: ⁇ Program”.
  • Step 403 The configuration module displays the configuration item to the operator. For example, the installation path, the operator can modify the value of the variable in the configuration item as needed, for example, changing "C: ⁇ Program" to "D: ⁇ Program", the configuration module Save the modified variable value in the configuration item of the instruction group.
  • Step 404 The configuration module sends an instruction group as a current instruction group, such as check.exe and its corresponding configuration item to the execution module.
  • Step 405 The execution module runs the current instruction group according to the configuration item of the current instruction group. If the operator does not modify the installation path, install the installation or upgrade content in "C: ⁇ Program”, if the operator is After the variable is modified to "D: ⁇ Program", the installation or upgrade content will be installed in "D: ⁇ Program”.
  • Step 406 The execution module determines whether the current instruction group has a breakpoint after the running of the current instruction group, and the breakpoint may be preset by the secondary developer, or may be set by the operator during the operation, if any Go to step 407, otherwise run the next instruction group.
  • Step 407 The execution module determines whether the current instruction group runs successfully, and returns a debugging instruction.
  • the debugging command can be: If successful, if the check.exe is executed, the D disk space is enough, and the configuration item is returned to the configuration module; if it is unsuccessful, if the check.exe is executed, the D disk space is insufficient, and the configuration module is returned to run.
  • the result information such as "D disk space is not enough”.
  • Step 408 The configuration module displays the configuration item to the operator.
  • the operator can modify the variable value of the configuration item regardless of whether the instruction group runs successfully, such as changing the installation path to "E: ⁇ Program".
  • the configuration module saves the modified values.
  • Step 409 The configuration module sends the modified variable value to the execution module, so that the execution module runs the instruction group according to the modified variable value.
  • Step 410 If the current instruction group (check.exe) runs successfully, if the D disk space is sufficient, the execution module runs the next instruction group according to the new variable value ("E: ⁇ Program"), such as install.exe, if currently The instruction set (check.exe) did not run successfully. If the above D disk space is insufficient, the execution module runs the current instruction set (check.exe) again according to the new variable value ("E: ⁇ Program"). Until all instruction groups run successfully.
  • E: ⁇ Program new variable value
  • the execution module runs the current instruction set (check.exe) again according to the new variable value ("E: ⁇ Program”). Until all instruction groups run successfully.
  • the method includes the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Description

安装或升级方法和装置
技术领域
本发明涉及计算机网络技术, 尤其是一种安装或升级方法和装置。 背景技术
随着计算机科学技术的不断发展,编程语言、可扩展标识语言(extensible Markup Language , 以下简称 XML ) 的不断成熟, 为了使操作人员能够重用 项目, 因此需要在主机进行安装或升级操作。 现有的安装或升级方法主要有 两种: 一种是桌面式单机安装或升级方法, 其主要应用是应用软件的独立安 装; 另一种是多机安装或升级方法, 其主要应用是 Windows系统的升级。
这两种安装或升级方法都是由二次开发人员指定安装或升级内容。 安装 或升级失败后, 依据现有技术, 操作人员要么定位出问题后, 重新执行安装 或升级操作, 要么回滚已有的安装或升级操作。 发明内容
本发明实施例提供一种安装或升级方法和装置, 实现安装或升级的可调 试。
本发明实施例提供一种安装或升级方法, 包括:
获取指令组, 所述指令组至少包括一条安装或升级操作指令;
选取一个指令组作为当前指令组, 并在所述当前指令组运行结束后, 判 断所述当前指令组是否设置有断点, 若所述当前指令组设置有断点, 则进行 调试操作, 若所述当前指令组未设置断点, 则运行下一个指令组。
本发明实施例提供一种安装或升级装置, 包括:
解析模块, 用于获取指令组, 所述指令组至少包括一条安装或升级操作 指令; 执行模块, 用于选取一个指令组作为当前指令组, 并在所述当前指令组运 行结束后, 判断所述当前指令组是否设置有断点, 若所述当前指令组设置有断 点, 则进行调试操作, 若所述当前指令组未设置断点, 则运行下一个指令组。
本发明实施例通过为安装或升级指令组设置断点, 实现安装或升级过程 中的可调试, 并且可以通过不对指令组设置断点, 实现静默式安装或升级, 因此本发明实施例可以支持调试和非调试模式, 实现另一种意义上的可调试 安装或升级。 附图说明
图 1为本发明安装或升级方法实施例一流程图;
图 2为本发明安装或升级方法实施例二流程图;
图 3为本发明安装或升级装置实施例结构示意图;
图 4为本发明安装或升级装置实施例时序功能图。 具体实施方式
下面结合附图和具体实施例进一步说明本发明的技术方案。
图 1为本发明安装或升级方法实施例一流程图, 该实施例包括:
步骤 11 : 获取指令组。 二次开发人员将安装或升级操作划分为至少一个 安装或升级指令, 一个指令组包括至少一个安装或升级指令。 每个指令组有 多种属性, 这些属性包括但不限于指令组名称、 描述、 参数、 断点标识、 超 时时间等, 这些属性可以进行配置也可以釆用默认值, 根据断点标识, 二次 开发人员可以选择对指令组设置或不设置断点。 同时, 为每个指令组配置由 零个或者多个变量组成的配置项, 这些变量包括变量名、 变量值、 默认值等, 由这些变量辅助完成安装或升级, 所有安装或升级指令组和相应的配置项都 保存在配置文件中。 二次开发时, 首先将开发的安装或升级指令对应的配置 项的集合定义为配置文件, 然后将配置文件和安装或升级内容打包, 形成安 装或升级包。 进行安装或升级操作时, 主机通过解析安装或升级包获取安装 或升级指令组, 显示这些指令组及其对应的配置项, 并顺序执行这些指令组。
步骤 12: 选取一个该安装或升级指令组作为当前指令组, 并运行该当前 指令组。
步骤 13: 在运行结束后, 判断该当前指令组是否设置有断点, 若是, 执 行步骤 14; 否则, 执行步骤 15。 其中, 断点可以在二次开发时由二次开发人 员设定, 也可以在安装或升级过程中由操作人员设定。 在二次开发时, 由于 每个指令组都包括断点标识, 二次开发人员可以通过选中断点标识为每个指 令组设置断点, 即在安装或升级过程中获取的指令组有无断点已预设确定; 在安装或升级过程中, 通过将安装或升级指令组显示在界面上, 操作人员可 以根据显示的安装或升级指令组的断点标识为尚未运行的指令组设置断点, 即在安装或升级过程中, 当前指令组的后续的待运行的指令组可以由操作人 员有选择性地进行断点设置。
步骤 14: 进行调试操作。 即在断点处暂停, 进行调试, 如显示与当前指 令组对应的配置项中的变量值 (如配置项为安装路径, 变量值为 "D:\Program" ), 或者修改显示的变量值等。
步骤 15: 调用下一个指令组, 并运行。 再重复执行步骤 13 , 直至所有指 令组运行完毕, 若所有指令组都没有设置断点, 即实现了静默式的安装或升 级。
本实施例通过断点标识选择是否对指令组进行断点设置, 若设置断点实 现可调试模式, 若不设置断点实现非调试模式, 即静默式安装。 通过选择由 二次开发人员设置断点或由操作人员设置断点, 实现既可在二次开发时由二 次开发人员进行调试, 又可在安装或升级过程中由操作人员进行调试。
图 2为本发明安装或升级方法实施例二流程图, 该实施例包括:
步骤 201 : 解析由二次开发人员开发的安装或升级包, 从安装或升级包的 配置文件中获取安装或升级指令及与之对应的配置项, 并进行保存, 以便根 据保存的值进行操作。 其中, 本实施例以 XML格式开发了配置文件, 但配置 文件不限于 XML格式, 本实施例的 XML配置文件举例如下:
<?xml version="1.0" encoding="gb2312"?>
<!—演示将安装划分为 3条指令 >
<exec_list>
<!—指 l: 对磁盘空间进行检查— >
<exec cmd="check.exe" args="${argl}" desc=",, break="true" timeout="60000"> <!--该变量调试的时候可修改 >
<var name="dir" value=",, defauIt="C:\Program files"/>
</exec>
<!—指令 2: 执行目录创建、 文件拷贝、 配置更新等操作— >
<exec cmd="install.exe" args="${arg2}" desc=" " break="false" timeout="60000"/> <! 指令 3: 启动应用程序— >
<exec cmd="startup.exe" args="${arg3}" desc=" " break="false" timeout="60000"/> </exec_list>
该 XML配置文件定义了三条旨令: check.exe、 install.exe和 startup.exe, 并 为每条指令设置了断点, 这些指令与安装或升级的产品有关, 并不限于. exe 格式。 并且为了更好的支持国际化, 在配置文件中的某些属性定义可采取标 签的形式, 以满足对本地化安装或升级的需求。 这里的标签为理解为变量标 识, 不同的标签可以对应不同的语言, 实现才艮据地域不同, 将指令内容翻译 成不同的语言, 提高可读性及理解性。 在二次开发过程中是将上述指令和安 装或升级内容打包成安装或升级包。
当安装或升級主机就是存放安装或升级包的主机时 (类似单机应用场 景), 直接解析安装或升级包获取指令即可; 当安装或升级主机不是存放安装 或升级包的主机时(类似多机应用场景), 可以将安装或升级包通过文件传输 协议(File Transfer Protocol, FTP )或其他传输协议传输到安装或升级主机上 的某个目录下, 再进行解析以获取指令。
步骤 202: 将配置项显示在界面上。
步骤 203: 操作人员或二次开发人员可以通过界面对配置项进行设置, 并 保存, 然后启动安装或升级操作。 并且在安装或升级时, 操作人员可更改二 次开发人员设置的配置项 (如安装路径等) 中的变量值, 比如上述 XML文件 替换页(细则 ^26条) 中二次开发人员将安装路径 (变量)设置为 "dir=C:\Program files" , 操作人 员可以将其更改为 "dir=D:\ Program files"。
步骤 204: 安装或升级主机获取解析后的安装或升级指令, 运行第一条安 装或升级指令, 如进行磁盘空间检查的 check.exe。
步骤 205: 指令运行结束后, 判断当前指令是否设置有断点, 如有断点则 暂停进行调试, 如上述的 check.exe在二次开发时就已经设置了断点因此需要 暂停, 若无断点, 执行步骤 209。 其中, 指令断点可由二次开发默认指定, 也 可在安装或升级时由操作人员通过设置断点标识进行实时指定。
步骤 206: 暂停后, 在界面上显示配置项中可修改的变量。 变量由二次开 发定义, 变量分只读、 可写两种, 使用哪种由二次开发决定。 安装或升级指 令需具有可回溯性, 对于不可重复执行的指令, 在二次开发的时候需要进行 标识, 执行模块根据指令的标识信息给出相应的提示信息, 指导操作人员进 行后续操作, 比如: 忽略当前指令、 执行下一条指令等。
步骤 207: 操作人员判断配置项中的变量值的正确性, 可根据需要进行修 改, 修改后的配置项同样要进行保存。 比如对不正确的配置项, 如 "D盘空 间不足" , 进行修改, 如可以将安装路径更改为 "dir=E:\Program files" 。
步骤 208: 判断当前指令是否成功运行, 若是, 执行步骤 209, 否则, 执 行步骤 210。 根据新的配置项, 如 "dir=E:\Program files" 再次运行该指令 check.exe, 并在运行结束后暂停。
步骤 209: 调用下一条指令, 如 install.exe, 对修改后的配置项, 根据修改 后的配置项, 如 "dir=E:\Program files" 运行下一条指令 (install.exe), 对没有 进行修改的配置项, 根据未修改的配置项, 如 "dir=D:\ Program files" 运行 下一条指令 (install.exe)。
步骤 210: 根据修改后的配置项, "dir=E:\Program files" 重新运行当前 指令。
步骤 211:安装或升级指令都执行完毕或者操作人员取消安装或升级操作 时, 主机进行环境清理操作, 如删除临时文件等, 结束安装或升级操作, 并 生成安装或升级报告。
本实施例中配置文件中的断点设置是具体到每一条安装或升级指令, 可 替代的是, 在实际应用中可以将这个断点配置放宽, 即可以是多条安装或升 级指令才设置一个断点, 将这多条安装或升级指令作为一个指令组。 下面对 多条指令设置一个断点进行描述, 为了和上述一条指令设置一个断点的方式 保持配置文件格式上的统一, 这里仍然以 XML格式为例, 但并不局限于 XML 格式及其内容。 多条指令设置一个断点时的 XML配置文件举例如下:
<?xml version="1.0" encoding="gb2312"?>
<!一将安装划分为 2个步驟 >
<step_Iist>
<! -断 _ 、由原来的指令级别提高到步骤级别— >
<step name=,,准备阶段" desc=" " break="true">
<exec cmd="checkl.exe" args="${argl}" desc=" " timeout="60000"/> <exec cmd="prepare.exe" args="${arg3}" desc=" " timeout="60000"/> <var name="dir" value-" " defauIt="C:\Program files,,/>
</step>
〈! 断点由原来的指令级别提高到步骤级别 >
<step name=,,执行阶段" desc=" " break="false">
<exec cmd="mkdir.exe" args=" " desc=" " timeout="60000"/>
<exec cmd="copy.exe" args=" " desc=" " timeout="60000"/>
<var name="dir" value=" " default="C:\Program files"/>
</step>
</step_list>
从上述 XML文件可以看出, 多条指令设置一个断点就是将断点设置在步 骤级别而非指令级别, 多条安装或升级指令处于同一个断点操作步驟内, 如 果每个步骤中只有一条安装或升级指令, 即等同于上述一条指令设置一个断 点的方式。 因此, 除了设置断点的方式不同, 其余处理流程与上述一条指令 设置一个断点的流程一致。
本实施例, 将安装或升级操作顺序划分为一个或多个安装或升级指令, 对每条指令或每个指令组都可以进行断点标识, 根据断点标识选择是否设置 断点, 若设置断点, 在断点处暂停下来, 并且可以修改变量值以便重新运行 指令, 没有断点即实现静默式安装或升级, 实现既可支持可调试也可支持非
6 ,
换页 细则第 26条) 调试两种模式。 并且, 本实施例的断点和变量值既可以通过二次开发建立默 认值, 又可以通过操作人员在安装或升级时, 在操作界面进行设置, 即可以 实现两层的断点设置及变量值的配置。
图 3为本发明安装或升级装置实施例结构示意图, 该实施例包括: 解析模 块 1和执行模块 3。 解析模块 1用于获取指令组, 所述指令组至少包括一条安装 或升级操作指令;执行模块 3用于选取一个所述安装或升级指令组作为当前指 令组, 并在所述当前指令组运行结束后, 判断所述当前指令组是否设置有断 点, 若所述指令组设置有断点, 则进行调试操作, 若所述指令组未设置断点, 则运行下一个指令组。
本实施例通过为指令组设置断点, 实现安装或升级过程中的可调试, 如 不为指令组设置断点, 实现静默式安装, 即本实施例既支持可调试模式有支 持非可调试模式, 实现另一种形式的可调试。
参照图 4所示的各模块的时序功能图, 本实施例还可以包括配置模块 2。 解析模块 1用于解析安装或升级包, 获取安装或升级指令组及其对应的配置 项; 配置模块 2用于显示解析模块 1获取的安装或升级指令组, 并显示、 修改、 保存与所述指令组对应的配置项中的变量值;执行模块 3用于选取一个安装或 升级指令组作为当前指令组,并根据配置模块 2保存的与当前指令组对应的变 量值运行当前指令组, 在当前指令组运行结束后, 判断所述当前指令组是否 设置有断点, 若所述指令组设置有断点, 则进行调试操作, 若所述指令组未 设置断点, 则运行下一个指令组。 具体流程参照图 4及如下的步骤:
步骤 401 : 解析模块解析安装或升级包, 获取安装或升级指令组及其对应 的配置项。 安装或升级包可以存在本地进行安装或升级操作的主机上, 也可 以通过 FTP或其他协议从远程传输到进行安装或升级操作的主机上。
步骤 402: 解析模块将获取的指令组及其对应的配置项传输给配置模块。 二次开发人员可以对配置项中的变量值进行预先的设置, 即设置默认值, 如 将安装路径预设为 "C:\Program"。 步骤 403: 配置模块向操作人员显示配置项, 如安装路径, 操作人员可以 根据需要对配置项中的变量值进行修改, 如将 " C:\Program " 修改为 "D:\Program" , 配置模块将修改后的变量值保存在指令组的配置项中。
步骤 404: 配置模块发送一个作为当前指令组的指令组, 如 check.exe及其 对应的配置项给执行模块。
步骤 405: 执行模块根据该当前指令组的配置项运行该当前指令组, 如操 作人员没有对安装路径进行修改时,将安装或升级内容安装在 "C:\Program" , 若操作人员在将该变量修改为 "D:\Program" 后, 安装或升级内容将安装在 "D:\Program"。
步骤 406:执行模块在该当前指令组运行结束后判断该当前指令组是否有 断点, 该断点可以是二次开发人员预设的, 也可以是操作人员在操作过程中 设置的, 若有, 执行步骤 407, 否则运行下一个指令组。
步骤 407: 执行模块判断该当前指令组是否成功运行, 并返回调试指令。 其中的调试指令可以为: 若成功, 如执行 check.exe后发现 D盘空间足够, 向配 置模块返回配置项; 若不成功, 如执行 check.exe后发现 D盘空间不够, 向配置 模块返回运行结果信息, 如 "D盘空间不够"。
步骤 408: 配置模块向操作人员显示配置项, 不论指令组是否成功运行, 操作人员都可以对配置项的变量值进行修改, 如将安装路径修改为 "E:\Program"。 配置模块保存修改后的值。
步骤 409: 配置模块将修改后的变量值发送给执行模块, 使执行模块根据 修改后的变量值运行指令组。
步骤 410: 若当前指令组 (check.exe)成功运行, 如上述 D盘空间足够, 执 行模块根据新的变量值( "E:\Program" )运行下一个指令组, 如 install.exe, 若 当前指令组(check.exe )未成功运行, 如上述 D盘空间不足, 执行模块根据新 的变量值( "E:\Program" )再次运行当前指令组(check.exe )。 直至所有的指 令组成功运行。 本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述 的存储介质包括: ROM, RAM, 磁碟或者光盘等各种可以存储程序代码的介 质。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims

权 利 要求
1、 一种安装或升级方法, 其特征在于, 包括:
获取指令组, 所述指令组至少包括一条安装或升级操作指令;
选取一个指令组作为当前指令组, 并在所述当前指令组运行结束后, 判 断所述当前指令组是否设置有断点, 若所述当前指令组设置有断点, 则进行 调试操作, 若所述当前指令组未设置断点, 则运行下一个指令组。
2、 根据权利要求 1所述的安装或升级方法, 其特征在于, 所述获取指令 组包括: 获取有无断点已预设确定的指令组。
3、 根据权利要求 1所述的安装或升级方法, 其特征在于, 还包括: 在当 前指令组运行过程中, 为未运行的指令组有选择性地设置断点。
4、 根据权利要求 1或 2或 3所述的安装或升级方法, 其特征在于, 还包括: 为所述指令组设置变量值, 所述进行调试操作包括:
显示与所述当前指令组对应的变量值; 或者
显示并修改与所述当前指令组对应的变量值。
5、 根据权利要求 1或 2或 3所述的安装或升级方法, 其特征在于, 还包括: 为所述指令组设置变量值, 判断所述当前指令组是否运行成功, 若成功, 则 根据设置的变量值运行下一个指令组, 若不成功, 则修改所述变量值, 并根 据修改后的变量值再次运行当前指令组。
6、 根据权利要求 1所述的安装或升级方法, 其特征在于, 还包括: 当接 收到安装或升级取消请求, 或当所述安装或升级指令组全部运行结束后, 进 行环境清理并生成安装或升级 ·艮告。
7、 根据权利要求 1所述的安装或升级方法, 其特征在于, 所述获取指令 组包括: 从进行安装或升级操作的主机上获取所述指令组, 或者通过文件传 输协议获取所述指令组。
8、 一种安装或升级装置, 其特征在于, 包括:
解析模块, 用于获取指令组, 所述指令组至少包括一条安装或升级操作 指令;
执行模块, 用于选取一个指令组作为当前指令组, 并在所述当前指令组 运行结束后, 判断所述当前指令组是否设置有断点, 若所述当前指令组设置 有断点, 则进行调试操作, 若所述当前指令组未设置断点, 则运行下一个指 令组。
9、 根据权利要求 8所述的安装或升级装置, 其特征在于, 还包括: 配置模块, 用于为所述指令组设置变量值, 显示或修改所述变量值; 所述执行模块具体用于选取一个指令组作为当前指令组, 并根据所述配 置模块保存的与当前指令组对应的变量值运行当前指令组, 在所述当前指令 组运行结束后, 判断所述当前指令组是否设置有断点, 若所述当前指令组设 置有断点, 则进行调试操作, 若所述当前指令组未设置断点, 则运行下一个 指令组。
10、 根据权利要求 9所述安装或升级装置, 其特征在于, 所述配置模块 具体用于, 在接收到执行模块在进行调试操作时发送的调试指令后, 显示与 所述当前指令组对应的变量值, 或者, 显示并修改与所述当前指令组对应的 变量值。
PCT/CN2009/070618 2008-03-03 2009-03-03 安装或升级方法和装置 WO2009109134A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810081635.3 2008-03-03
CNA2008100816353A CN101236507A (zh) 2008-03-03 2008-03-03 安装或升级方法和装置

Publications (1)

Publication Number Publication Date
WO2009109134A1 true WO2009109134A1 (zh) 2009-09-11

Family

ID=39920149

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/070618 WO2009109134A1 (zh) 2008-03-03 2009-03-03 安装或升级方法和装置

Country Status (2)

Country Link
CN (1) CN101236507A (zh)
WO (1) WO2009109134A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236507A (zh) * 2008-03-03 2008-08-06 华为技术有限公司 安装或升级方法和装置
CN108958827B (zh) * 2017-05-25 2021-11-02 贵州白山云科技股份有限公司 一种处理程序升级故障的方法和系统
CN109857787B (zh) * 2019-01-18 2022-04-15 维沃移动通信有限公司 一种展示方法及终端

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1648873A (zh) * 2005-02-01 2005-08-03 苏州超锐微电子有限公司 断点调试功能的实现方法
CN1834940A (zh) * 2005-12-22 2006-09-20 苏州超锐微电子有限公司 一种通过在指令中嵌入计数器实现断点调试功能的方法
CN101236507A (zh) * 2008-03-03 2008-08-06 华为技术有限公司 安装或升级方法和装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1648873A (zh) * 2005-02-01 2005-08-03 苏州超锐微电子有限公司 断点调试功能的实现方法
CN1834940A (zh) * 2005-12-22 2006-09-20 苏州超锐微电子有限公司 一种通过在指令中嵌入计数器实现断点调试功能的方法
CN101236507A (zh) * 2008-03-03 2008-08-06 华为技术有限公司 安装或升级方法和装置

Also Published As

Publication number Publication date
CN101236507A (zh) 2008-08-06

Similar Documents

Publication Publication Date Title
US10684943B2 (en) Generating executable test automation code automatically according to a test case
US8042097B2 (en) Automated semantic-based updates to modified code base
KR101008977B1 (ko) OSGi 서비스 플랫폼 테스트 방법 및 이를 이용한테스트 툴
WO2020134633A1 (zh) 一种应用程序的开发方法、装置及集成开发工具
US10169203B2 (en) Test simulation for software defined networking environments
US20120222006A1 (en) Detecting plug-in and fragment issues with software products
JP2007257046A (ja) 複数osバージョン用ソフトウェア生成装置及び複数osバージョン用ソフトウェア生成支援プログラム
WO2012034440A1 (zh) 一种数据库升级脚本的生成方法和装置
US20090125888A1 (en) Expression-level debugging without format changes
CN104391717B (zh) 一种调试时代码动态更新方法
CN105528231A (zh) 一种基于中间辅助函数的软件动态升级方法及系统
CN102880493B (zh) 一种构件间动态依赖关系的自动分析方法
EP2557496A1 (en) Silent migration of business process binaries
CN103678007B (zh) 一种软件的批量部署方法及系统
CN109471776A (zh) 一种基于以太网的VxWorks操作系统日志收集方法
CN106603289B (zh) 一种lmt配置文件平滑升级方法
JP7115342B2 (ja) デバッグ支援システムおよびデバッグ支援方法
WO2009109134A1 (zh) 安装或升级方法和装置
CN110058849A (zh) 流程图的生成方法、装置、计算机设备以及存储介质
US11573787B1 (en) Hot reloading a running application with an unsaved source code change
EP2535813B1 (en) Method and device for generating an alert during an analysis of performance of a computer application
Yang et al. KernelGPT: Enhanced Kernel Fuzzing via Large Language Models
CN115168175A (zh) 程序错误解决方法、装置、电子设备和存储介质
JPH11110256A (ja) プログラムデバッグ装置、プログラムデバッグ方法及びその方法を記録したコンピュータ読取り可能な記録媒体
CN111611173A (zh) 一种应用于微服务工程接口文档检测的系统和方法

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: 09718498

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09718498

Country of ref document: EP

Kind code of ref document: A1