WO2012062063A1 - Method and apparatus for generating and uninstalling software installation package - Google Patents

Method and apparatus for generating and uninstalling software installation package Download PDF

Info

Publication number
WO2012062063A1
WO2012062063A1 PCT/CN2011/071141 CN2011071141W WO2012062063A1 WO 2012062063 A1 WO2012062063 A1 WO 2012062063A1 CN 2011071141 W CN2011071141 W CN 2011071141W WO 2012062063 A1 WO2012062063 A1 WO 2012062063A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
installation
information
service
business
Prior art date
Application number
PCT/CN2011/071141
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 WO2012062063A1 publication Critical patent/WO2012062063A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for generating and uninstalling a software installation package.
  • BACKGROUND With the rapid development of the mobile communication industry, the standards and platforms of mobile phones are increasing, and the corresponding businesses are also increasing. Therefore, there are more and more related tests to be carried out on mobile phone production lines, and corresponding mobile phone production test softwares are also numerous.
  • the same business software of each system and platform generally has some commonalities, and different services of the same standard platform have similarities for the operation of mobile phones, in order to facilitate the uniformity of software operation style and the convenience of development and maintenance of software teams.
  • plug-in software architecture As well as the expansion of new features, more and more enterprises are beginning to use plug-in software architecture, the entire system is divided into a number of functionally independent small modules, each module is independently developed and maintained.
  • the startup program and the public plug-in are generally released as separate versions of the platform software, and the business software plug-ins are separately released.
  • the platform software version can be packaged with some mainstream packaging tools, but for business software, traditional packaging tools cannot meet the requirements.
  • the business software needs to be installed in the installation directory where the platform software is located.
  • different business softwares have certain requirements on the version of the platform software.
  • the platform version may be too low to support its related functions, resulting in software. Cannot run normally; Again, you need to support the business software version to upgrade to the high version, and sometimes the high version needs to fall back to the lower version due to instability; finally, different business software may contain the same file, but the file version Not necessarily the same, it is necessary to ensure the compatibility of different business software installed, and the business software can be uninstalled without affecting the normal use of other business software.
  • the traditional packaging method is to collect all the files that need to be packaged and then merge them, and then release all the files directly to the user-specified installation directory when the user installs.
  • the business software packaged by the user needs to judge the platform software directory by itself, and then set the business software installation directory, which increases the complexity of the operation and is prone to errors.
  • the main program will be caused.
  • the plugin could not be found, and the plugin could not be loaded properly.
  • all the files corresponding to the post-installation version directly overwrite the files of the first-installed version, and the compatibility of the plug-in business software cannot be guaranteed.
  • the business software packaged by the traditional packaging method will be uninstalled. Delete all the files included in the business software. This may result in the deletion of files of the same name in other business software in the same directory, which may affect the use of other business software.
  • a primary object of the present invention is to provide a method and apparatus for generating and uninstalling a software installation package to solve at least one of the above problems.
  • a method for generating a software installation package including: obtaining version information of a service software, a file to be packaged, and file information to be packaged, a version information of the service software, and a configuration file to be packaged.
  • the version information of the service software includes at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number;
  • the file information to be packaged includes at least one of the following: a current file path, The file name, the file size, the installed platform main program path, and the file version number;
  • the configuration file information includes at least one of the following: a configuration file size, a configuration file name, and a path where the configuration file is located;
  • the tail structure information includes at least one of the following : The file size of the installation unit, the total number of files to be packed, and the constant information of the positioning tail structure.
  • the method further comprises: executing the software installation package of the business software according to the following steps: reading the installation information of the local platform software from the registry; reading the information corresponding to the configuration file and the configuration file from the software installation package of the business software Determine whether the currently installed business software can run on the local platform software. If not, it prompts the user that the local platform software version is too low, and needs to install a higher version of the platform software to exit the installation; if the currently installed business software can be localized If the platform software is running, it continues to determine whether a higher version of the currently installed service software has been installed locally. If yes, it prompts whether it is necessary to install a lower version of the business software than the current version. If necessary, the business software to be installed this time.
  • the service software conflicting with the service software is recorded in the service software uninstall configuration file, if not, exit the installation; if there is no higher version of the business software than the currently installed business software, continue to judge the local installation directory Whether there is this business
  • the piece contains a later version of the file, and if not, The service software is installed and the information corresponding to the service software is written into the service software installation configuration file. If a higher version file of the file included in the service software exists in the local installation directory, it is prompted whether to uninstall all the files containing the high version.
  • the business software if yes, writes the business software installed and the business software that conflicts with the business software into the business software uninstallation configuration file, and if not, installs the business software and the information corresponding to the business software Write to the business software installation configuration file.
  • the method further includes: reading the tail structure information of the currently running service software; determining whether the tail structure information is complete Correct, if no, the prompt file format is incorrect, the installation is finished, and if so, the step of reading the configuration file information and the configuration file is determined.
  • the method further includes: naming the version information of the read service software according to the predetermined service software.
  • the rule generates the service software name and compares it with the name of the service software currently being installed.
  • a software uninstallation method including: loading a service software installation configuration file, reading current installed service software information from a service software installation configuration file; and determining the current service software uninstallation configuration file according to the service software Whether the secondary uninstallation is to install new business software, if not, all the currently installed business software is displayed, so that the user selects the business software to be uninstalled from all the business software, and responds to the operation of the user to select the business software to be uninstalled.
  • the selected service software is uninstalled one by one. If the user selects cancel, the uninstallation is exited.
  • the user is prompted to confirm whether the uninstallation is to install a new one.
  • the service software if not, displays all the currently installed business software, so that the user selects the business software to be uninstalled from all the business software, and uninstalls the selected business software one by one in response to the user selecting the operation of the business software to be uninstalled. If the user selects Cancel to exit the uninstall; if to confirm this is to uninstall the installation of a new business software, and will be All the business software conflicting with the new business software is displayed, so that the user selects the business software that needs to be uninstalled from all the business softwares that conflict with the new business software, and responds to the operation of the business software that the user needs to uninstall, one by one.
  • a device for generating a software installation package includes: an obtaining module, configured to obtain version information of a service software, a file to be packaged, and information about a file to be packaged, according to version information of the service software. And the file to be packaged generates a configuration file and records information corresponding to the configuration file; a module for creating a software installation package, writing the installation unit at the head of the software installation package; and writing a module for installing the software installation package After the unit, the information corresponding to the configuration file, the configuration file, the information to be packaged, the file to be packaged, and the information about the tail structure are written.
  • the version information of the service software includes at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number;
  • the file information to be packaged includes at least one of the following: a current file path, File name, file size, installed platform main program path, file version number;
  • configuration file information includes at least one of the following: the size of the configuration file, the configuration file name, the path where the configuration file is located;
  • the tail structure information includes at least the following —: The file size of the installation unit, the total number of files to be packed, and the constant information of the positioning tail structure.
  • the installation unit includes: a first installation subunit, configured to read installation information of the platform software from the registry; a second installation subunit, configured to read information corresponding to the configuration file and a configuration file;
  • the subunit is configured to determine whether the currently installed service software can run on the local platform software, and if not, prompt the user that the local platform software version is too low, and need to install a high version of the platform software to exit the installation;
  • the fourth installation subunit when the currently installed business software can run on the local platform software, determine whether a higher version of the currently installed business software is installed locally, and if so, whether it is necessary to install a business software lower than the current version, If necessary, the business software to be installed and the business software conflicting with the business software are recorded in the business software uninstall configuration file, and if not, the installation is exited;
  • the fifth installation subunit is configured to determine whether a higher version file of the file included in the service software exists in the local installation directory when there is no local version of the service software than the currently installed service software,
  • the installation unit further includes: a seventh installation subunit, configured to read tail structure information of the currently running service software; and an eighth installation subunit, configured to determine whether the tail structure information is complete and correct, if no , the file format is incorrect, and the installation is finished.
  • the installation unit further includes: a ninth installation subunit, configured to generate the service software name according to the predetermined service software naming rule according to the version information of the read service software, and compare with the service software name currently being installed, If they are inconsistent, the current service software version information is incorrect and the installation is exited.
  • the tenth installation subunit is used to read the currently installed service software information and display it to the user to confirm whether to install. If not, exit the installation.
  • the eleventh installation subunit is configured to determine whether the local platform software is running, and if so, prompts to close the platform software and loop to determine whether the platform software is running.
  • a software uninstalling apparatus including: a reading module, configured to read a service software installation configuration file, and obtain current installed service software information; and a first determining module, configured to determine the present Whether the secondary uninstallation installation is to install new business software; the second judgment module is used to prompt the user to confirm whether the uninstallation is to install new business software; the first uninstallation module is configured to display all the currently installed business software.
  • the second uninstalling module Displaying all business software that conflicts with the new business software to enable users to interact with the new business
  • the business software that needs to be uninstalled is selected among all the business softwares that conflict with the software, and the selected business software is uninstalled one by one in response to the operation of the business software that the user selects to uninstall, and the uninstallation is exited if the user selects cancel.
  • the utility model puts the relevant complex logic judgment of the installation into the installation unit, and packages the installation unit to the head of the file at the time of packaging, and adds corresponding information to let the program automatically process the solution, and solves the operation of installing the service software.
  • Complex, error-prone issues that increase the flexibility of switching between versions of business software and ensure compatibility of all installed business software.
  • FIG. 1 is a schematic flowchart of a method for generating a software installation package according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a software installation package according to an embodiment of the present invention
  • FIG. 3 is a software installation of an example of the present invention.
  • FIG. 4 is a schematic flowchart of a method for installing a software installation package according to an example of the present invention.
  • FIG. 5 is a schematic flowchart of a method for uninstalling a software installation package according to an example of the present invention
  • FIG. 7 is a schematic structural diagram of an apparatus for unloading a software installation package according to an embodiment of the present invention.
  • FIG. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
  • FIG. 1 is a schematic flow chart of a method for generating a software installation package according to an embodiment of the present invention. As shown in FIG.
  • a method for generating a software installation package includes: In step S102, the version information of the service software, the file to be packaged, and the file to be packaged are obtained, and the configuration file is generated according to the version information of the service software and the file to be packaged, and the information corresponding to the configuration file is recorded. Step S104, creating a software installation package, and writing an installation unit (or an installer, an installation unit program) of the business software at the head of the software installation package. Step S106: After the installation unit of the software installation package, the information corresponding to the configuration file, the configuration file, the information to be packaged, the file to be packaged, and the structure of the tail structure are sequentially written to generate a software installation package of the service software.
  • the installation unit is packaged into the head of the file at the time of packaging, the installation unit contains the relevant complex logic judgment of the installation, and corresponding information is written in the subsequent part of the software installation package, and the software is installed.
  • the entire installation process can be automatically processed by the installation unit to ensure the normal use of all installed business software, which can not only match the platform software and business software, but also ensure the compatibility and service of all installed business software. Flexibility to switch between versions of the software. The above method will be described in detail below with reference to FIG.
  • the version information of the service software may further include at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number;
  • the file information to be packaged may further include At least one of the following: a current file path, a file name, a file size, a platform main program path after installation, and a file version number;
  • the configuration file information may further include at least one of the following: a configuration file size, a configuration file name, and a configuration file
  • the trailing structure information may further include at least one of the following: a file size of the mounting unit, a total number of files to be packed, and constant information of the positioning tail structure.
  • the step of performing the software installation package for generating the service software by the installation unit may further include, but is not limited to: Step 1: reading the installation information of the local platform software from the registry; Step 2, reading from the software installation package Take the information corresponding to the configuration file and the configuration file; Step 3: Determine whether the currently installed service software can run on the local platform software.
  • Step 4 if the currently installed service The software can run on the local platform software, and then continue to determine whether the local version of the currently installed business software is installed. If the user is prompted to install a lower version of the business software than the current version, if the user selects the required software, the user will The secondary installation business software and the business software conflicting with the business software are recorded in the business software uninstallation configuration file, and if not, the installation is exited; Step 5, if there is no local version of the service than the currently installed business software The software continues to determine whether there is a higher version file of the file included in the service software in the local installation directory.
  • Step 6 If not, the service software is installed and the information corresponding to the service software is written into the service software installation configuration file; Step 6 If the local installation If there is a higher version file of the file included in the service software, the user is prompted to uninstall all the business software containing the high version file. If the user selects yes, the business software installed this time and the business software conflict with the service software. The service software is written in the service software uninstall configuration file. If no, the service software is installed and the corresponding information of the service software is written into the service software installation configuration file. By performing the above steps, the above installation unit can install the generated software installation package on the corresponding platform.
  • step 4 is gathered between 1 and 2, and the following processing may be further included: Step 7: reading the tail structure information of the currently running service software; Step 8: determining whether the tail structure information is complete and correct If no, the prompt file format is incorrect, the installation is finished, and if yes, it is determined to proceed to step 2.
  • Step 9 the version information of the read service software is generated according to a predetermined service software naming rule, and the current service software name is generated.
  • Step 10 If they are consistent, read the currently installed service software information and display it to the user to confirm whether to install, if not, exit the installation; Step 11, if installed, determine whether the local platform software is running, and if so, Then the user is prompted to close the platform software, and then the loop determines whether the platform software is running. If the platform software is not running, it is determined to perform step 3.
  • the method for uninstalling the software installation package includes (hereinafter, the following software installation package uninstallation method will be described in detail with reference to FIG. 5): Step 1: Load the service software installation configuration file, and install and configure the service software from the service software. The currently installed business software information is read in the file. Step 2: According to the service software uninstallation configuration file, determine whether the uninstallation is to install new business software. If not, display all the currently installed business software, so that the user selects the business software to be uninstalled from all the business software. The selected business software is then uninstalled one by one in response to the user selecting the operation of the business software to be uninstalled, and if the user selects the cancellation, the uninstallation is exited.
  • Step 3 If it is determined according to the service software uninstallation configuration file that the uninstallation is to install a new service software, the user is prompted again to confirm whether the uninstallation is to install a new service software. If the user selects No, the currently installed version is displayed. All the business software, so that the user selects the business software to be uninstalled from all the business software, and then uninstalls the selected business software one by one in response to the operation of the user selecting the business software to be uninstalled, and if the user selects cancel, exits the uninstallation.
  • Step 4 If it is confirmed that the uninstallation is to install a certain business software, all the business softwares that conflict with the new business software are all displayed, so that the user selects from all the business softwares that conflict with the new business software.
  • the business software that needs to be uninstalled is then uninstalled one by one in response to the user selecting the operation of the business software to be uninstalled, and if the user selects cancel, the uninstallation is exited.
  • intelligent uninstallation of each service software can be realized, and ensuring that the uninstallation of each service software does not affect the normal use of other business software.
  • the above preferred embodiments will be described in detail below with reference to the examples and Figs. 3, 4, and 5. It should be noted that since the normal software development high version is a further extension of the function on the basis of the low version, it satisfies the compatibility of the high version to the low version. Therefore, in the embodiment of the present invention, the high version of the platform software must meet the compatibility version.
  • FIG. 3 is a schematic flow chart of a method for generating a software installation package according to an example of the present invention.
  • the packaging process of the software installation package includes the following steps: Step S302: Collect relevant version information of the packaged service software, including the format, platform, service type, service software version number, and applicable platform version number of the service software.
  • Step S304 Collect the file to be packaged, including the file name, the corresponding file path, and the path of the file relative to the platform main program.
  • Step S306 Generate a configuration file according to the information collected in the previous two steps, and record the name of the currently generated configuration file and the path where it is located.
  • the configuration file name is generated according to the information collected in step S302 according to a certain rule, and the content of the configuration file includes all the contents collected in step S302 and step S304.
  • Step S308 Obtain the version number of each collected file to be packaged. For the plug-in, the version number is set in the program, and for the text configuration file, the version number is recorded in the text.
  • Step S310 Create an installation package program in a preset directory, where the installation package name is generated according to a certain rule according to the information collected in step S302.
  • Step S312 Write the installation unit to the head of the installation package.
  • Step S314 The configuration file information and the configuration file are sequentially written in the back of the installation unit.
  • the configuration file information mainly records the size of the configuration file, and is convenient for positioning the location and size of the file when the configuration file is read.
  • Step S316 The collected file information to be packaged and the file to be packaged are sequentially written to the configuration file, and the file information to be packaged includes the corresponding file name, size, relative platform main program path, and file version number.
  • Step S318 Write the tail structure information at the end of the package file, mainly including the file size of the installation unit, the total number of packaged files, and a constant information for positioning the tail structure itself.
  • a software installation package is generated. As shown in Figure 2, the installation unit is packaged in the head of the business software, which contains all the logical processing of the installation process. After the packaged business software is started, the installation unit is triggered to run, as shown in Figure 4, the operation steps are as follows: Step S402: Read the installation information of the platform software from the registry, determine whether the platform software has been installed, and if not installed, prompt the user to install the platform software first, and exit the business software installation; if the platform software is installed, obtain the current platform software. installation path.
  • Step S404 Read the tail structure information of the currently running service software, obtain the size of the installation unit in the service software, the total number of packaged files, and the constant information for locating the tail structure.
  • Step S406 Step S404 is read to determine whether the information of the tail structure is complete and correct (mainly, whether the constant information of the read tail structure is correct), and if the related information is incorrect, the service software is considered to be incompletely packaged.
  • Step S408 If the related information is completely met, the service software is considered to be completely packaged, and the process proceeds to step S410.
  • Step S410 The service software is packaged completely, and the configuration file information is started to be read, because the file is attached to the installation unit, and the configuration file information is found by moving the installation unit corresponding to the size byte from the beginning of the service software. Get the relevant information and get the size of the configuration file.
  • Step S414 The service software version information read in step S412 is generated according to the business software naming rule, and then compared with the service software name currently being installed.
  • Step S416 The version information recorded by the software is inconsistent with the version information described by the software name itself, prompting the user that the currently used service software version information is incorrect, and the error is returned. This step mainly prevents the software name from being modified, and the user software installed by the user is caused. Or the version is not what you expected.
  • Step S418 Read the currently installed service software information from the service software installation configuration file in the platform software installation directory, including the installed service software name, the corresponding version number, all files included in the business software, and relative to the platform.
  • Step S420 Display the installation information of the current service software to the user for confirmation, including the mobile phone system, platform, service type, version number, and applicable platform version number corresponding to the service software. If the user selects to install, proceed to step S422, otherwise the user selects Cancel to exit the installation. Step S422: determining whether the platform software is running, if it is running, proceeding to step S424, otherwise proceeding to step S426. Step S424: The user is prompted to close the platform software, and then proceeds to step S422.
  • Step S426 determining whether the currently installed service software can be run on the local platform software, by reading the version of the locally installed platform software from the registry, and then comparing with the platform version applicable to the business software, if the local platform software version If the service software is not running on the local platform software, go to step S428. Otherwise, if the local platform software version is higher than or equal to the platform version applicable to the service software, the service software can be run on the local platform. On the version, go to step 4 to gather S430. Step S428: Prompt the user to the local platform software version, the user needs to install the high version of the platform software, and the error returns.
  • Step S430 Determine whether a higher version of the currently installed service software is installed in the local area, and the current service software installation information has been read in step S418, and it can be checked whether the same service software has been installed, if the same business software is installed. Then, the version number is compared. If the same service software is installed locally and the local version is higher than the currently installed service software version, go to step S432; otherwise, if the service software is not installed locally, or the locally installed service software and current The business software version is the same or 4 ⁇ is the service software version, and the process proceeds to step S436; Step S432: Ask the user whether to continue to install the current low-level service software.
  • Step S434 Record the service software to be installed and the service software that conflicts with the service software (that is, the service software that is installed locally and has a higher version than the service software) in the service software uninstall configuration file, so that the next uninstallation is convenient. Smart recognition, exit this installation.
  • Step S436 If there is no higher version of the currently installed service software, the method further determines whether there is a higher version of the file included in the service software in the local installation directory. For example, another locally installed business software contains an X file, and The currently installed business software also contains X files, and the local X file version is higher than the currently installed X file version.
  • Step S438 Install the business software, and read the first file information from the configuration file in the business software.
  • the file information records the name, relative path, file size, and version number of the corresponding file, from the first file information.
  • the file that reads the corresponding file length and size is the first file, and is released to the corresponding directory (the file is calculated by the platform software installation path obtained in step S402 and the relative path recorded in the file information here). Release directory).
  • Step S440 Write the installed service software related information into the service software installation configuration file, including the business software name, the version number, each file included in the business software, and the relative path of each file relative to the platform main program.
  • the configuration file is encrypted. At this point, the business software installation is successful and ends.
  • Step S442 Ask the user whether to uninstall all the business software containing the high version file, for example, the local file X is the same as the current business software, and the local X version is relatively high, and ask the user whether to delete all the business software containing X. If yes, go to step S446, and go to step S444.
  • Step S444 Install the business software, the basic processing is the same as step S438, the difference is that when the file is released, it is judged if the local existence is higher than the file version. If the file with the same name is skipped, the file is not released, and then the next file is read. After the installation is completed, the process proceeds to step S440.
  • Step S446 Write the business software that is installed this time and the business software that conflicts with the service software (that is, all the business software that contains the same high-version file as the service software) into the service software uninstall configuration file, so as to facilitate Intelligent identification when uninstalling, exit this installation.
  • the business software that failed the last installation and the business software that conflicts with it are recorded in the business software uninstallation configuration file, that is, the last record is cleared every time a new record is written, so as to prevent multiple software installations continuously. Recording multiple records causes logical confusion, so each time you uninstall, you can only intelligently identify the business software that failed to install last time.
  • the corresponding unloading method is as shown in FIG. 5.
  • the uninstalling method mainly includes: Step S502: Loading a service software installation configuration file from the platform installation directory, and reading and parsing the currently installed business software information, including the service software name and version number. , all files included in the business software, the corresponding version number, and the relative path of the file.
  • Step S504 Determine whether the uninstallation is to install a certain service software. By loading the uninstallation configuration file of the business software, read and parse the related information, and check whether the business software A that failed the last installation is recorded in the file.
  • Step S506 The prompt information and the user confirm whether the uninstallation is to install the business software A. If the user selects "Yes”, go to step S508, select "No", and then go to step S510. Step S508: All the business softwares that conflict with the business software A are displayed, and all are selected by default. After the user further selects the determination, the process goes to step S512.
  • Step S510 Display all the currently installed service software, and wait for the user to select the service software to be uninstalled, and go to step S512.
  • Step S512 If the user selects the service software that needs to be uninstalled and determines to go to step S514, otherwise if the user cancels, go to step S516.
  • Step S514 Unloading the software that the user selects to uninstall one by one. When uninstalling each service software, it is judged one by one whether the file included in the service software exists in other installed business software, and if not, the file is not deleted, if not If it exists, delete the corresponding file in the corresponding directory.
  • FIG. 6 is a schematic structural diagram of a device for generating a software installation package according to an embodiment of the present invention.
  • the device for generating a software installation package according to an embodiment of the present invention includes: an obtaining module 62, configured to obtain version information of a service software, a file to be packaged, and information to be packaged, and version information of the service software and The package file generates a configuration file and records the information corresponding to the configuration file.
  • Create module 64 set to create a software installation package, write the installation unit at the head of the software installation package.
  • the writing module 66 is configured to sequentially write the information corresponding to the configuration file, the configuration file, the information to be packaged, the file to be packaged, and the information of the tail structure after the installation unit of the software installation package.
  • the software installation package generated by the above device has a special structure, and the packaged complex logic is installed to determine the installation unit to be packaged to the head of the file for automatic processing, and correspondingly written in the subsequent part of the software installation package. Information.
  • the entire installation process can be automatically processed by the installation unit to ensure the normal use of all installed business software, which can not only match the platform software and the business software, but also ensure that all the installation software is installed. Compatibility and flexibility to switch between versions of business software.
  • the version information of the service software may further include at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number;
  • the file information to be packaged may further include at least one of the following : current file path, file name, file size, platform main program path after installation, file version number;
  • configuration file information may further include at least one of the following: configuration file size, configuration file name, path where the configuration file is located; tail structure
  • the volume information may further include at least one of the following: a file size of the installation unit, a total number of files to be packed, and constant information of the positioning tail structure. The above information is the information that the installation unit needs when installing the software installation package.
  • the above-described mounting unit may further include (not shown in the following sub-unit drawings):
  • the first installation subunit is configured to read installation information of the platform software from the registry;
  • the second installation subunit is configured to read information corresponding to the configuration file and the configuration file;
  • the third installation subunit is set to determine the current installation.
  • the business software can run on the local platform software, if not, it prompts the user that the local platform software version is too low, and needs to install a high version of the platform software to exit the installation;
  • the fourth installation subunit is set to the currently installed business software.
  • the business software When running on the local platform software, it is determined whether a higher version of the currently installed business software is installed locally, and if so, whether it is necessary to install a business software lower than the current version, and if necessary, the current installation is required.
  • the business software and the business software that conflicts with the business software are recorded in the business software uninstall configuration file. If not, the installation is exited; the fifth installation subunit is set to have no higher version locally than the currently installed business software.
  • the business software determine whether the local installation directory is The higher version file of the file included in the service software, if not, the service software is installed and the corresponding information of the business software is written into the service software installation configuration file; the sixth installation subunit is set to the local installation directory.
  • the above-mentioned mounting unit may further include (not shown in the following sub-unit drawings): a seventh installation sub-unit, configured to read the tail structure information of the currently running service software; the eighth installation sub-unit, Set to determine whether the tail structure information is complete and correct. If not, the file format is incorrect and the installation ends.
  • the above-mentioned installation unit may further include (not shown in the following sub-unit diagram): the ninth installation sub-unit is configured to generate the service according to the predetermined service software naming rules according to the version information of the read service software. The software name is compared with the name of the business software currently being installed. If they are inconsistent, the current service software version information is incorrect and the installation is exited.
  • the tenth installation subunit is configured to read the currently installed business software information and display it to the user to confirm whether the installation is performed. If not, the installation is exited; the eleventh installation subunit is set to determine whether the local platform software is running, If yes, it prompts to close the platform software and loop to determine if the platform software is running.
  • FIG. 7 is a schematic structural diagram of an unloading apparatus of a software installation package according to an embodiment of the present invention.
  • the uninstalling apparatus of the software installation package includes: a reading module 702, configured to read a service software installation configuration file, and obtain information about currently installed business software; and a first determining module 704, configured to determine the current time Whether the uninstallation installation is to install a certain business software; the first determining module 706 is configured to prompt the user to confirm whether the uninstallation is to install new business software; the first uninstalling module 708 is configured to display all the services currently installed.
  • the second uninstalling module 710 And setting, to display, all the business software conflicting with the new business software, so that the user selects the business software that needs to be uninstalled from all the business software that conflicts with the new business software, and responds to the operation of the business software that the user needs to uninstall, Uninstall the selected business software one by one, if the user chooses If you choose to cancel, exit the uninstall.
  • the unloading device is relatively independent, and the user can independently operate the device.
  • the device is preferably packaged and distributed together in the platform software.
  • the modules, units, and sub-units of the present invention described above may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed on a network composed of multiple computing devices. Alternatively, they may also be implemented by program code executable by a computing device, and thus the division of the above modules, units, subunits is only a preferred example.
  • the device for generating the software installation package is mainly used for: (A) collecting packaged software version information and file information to be packaged, wherein the service software version information includes the service name and version number of the service software.
  • the file information to be packaged includes the name and relative path of the file; (B) generating a corresponding configuration file according to the collected information, recording the path and name of the corresponding configuration file; (C) creating the packaged software, the header Write to the installation unit program, and then write the configuration file and each file to be packaged in turn, wherein the configuration file and each file to be packaged are written to the file content after the file information is first written, and the package software writes the mark structure at the end Information, records the size and number of related files, and is used to indicate that the file is fully packaged.
  • the installation unit is the installation program written by the package software header, mainly for: (A) reading the installation information of the platform software from the registry, obtaining the installation path of the platform software; (B) reading the package software tail structure Body information, determine the integrity of the packaged software; (C) read the configuration file to determine the correctness of the packaged software version information; (D) read the locally installed business software information from the business software installation configuration file; (E) Determine whether the platform software is running. If the platform software is running, prompt the user to close the platform software, and confirm the service software installation information with the user after confirming that the platform software is not running; (F) After the user confirms the information and starts the installation, determine the current Whether the platform software version meets the requirements of the business software.
  • the user is prompted to install the high version platform software; (G) determine whether the business software to be installed has a higher version locally, if it is already installed. For later versions of the business software, if the user needs to fall back to the version, this will be installed this time.
  • the software and the conflicting local high-level software are recorded in the uninstall configuration file for the intelligent judgment of the program when the user subsequently uninstalls, and prompt the user to uninstall the corresponding high version software first, if the user does not need to roll back the lower version, Stop the installation of the software; (H) Determine whether there is a higher version of each file included in the business software to be installed. If it does not exist, install it directly.
  • the above-mentioned unloading device is used for implementing intelligent and flexible uninstallation of service software, and is mainly used for: (A) reading a service software installation configuration file, and acquiring current installed service software information; (B) reading a service software uninstallation configuration file, and determining Whether the uninstallation installation is to install a certain business software, and if so, all the business software that conflicts with the business software is displayed for the user to select and confirm. If the uninstallation is not for installing a business software, all the locally installed services are displayed. Business software for users to choose to confirm (C) uninstalling one by one according to the business software selected by the user to be uninstalled.
  • the normal use can not only match the platform software and the business software, but also ensure the compatibility of all installed business software and the flexibility of switching between versions of the business software, and can realize the intelligent uninstallation of each business software to ensure each business.
  • Software uninstallation does not affect the normal use of other business software.
  • the present invention is mainly directed to the special requirements of the business software installation based on the secondary development of the plug-in technology, putting all the installation logic judgment and processing into the installation unit program, and packaging the installation unit program at the head of the file.
  • the files required for other packaging are attached, so that the installation unit program is automatically started after the business software is started, and the software is automatically installed according to the user's requirements.
  • the intelligent processing for installing and uninstalling multiple business software is solved by the method of configuration file recording.
  • the configuration file is encrypted accordingly.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any particular combination of hardware and software.

Landscapes

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

Abstract

The present invention discloses a method and an apparatus for generating and uninstalling a software installation package. The method for generating the software installation package includes: obtaining the version information of service software, files to be packaged and information about the files to be packaged; generating a configuration file according to the version information of the service software and the files to be packaged, and recording the information corresponding to the configuration file (S102); creating a software installation package and writing an installation unit of the service software into the header of the software installation package (SI 04); writing the information corresponding to the configuration file, the configuration file, the information about the files to be packaged, the files to be packaged and tail structure information in sequence behind the installation unit of the software installation package, and generating the software installation package for the service software (SI 06). With the technical solutions of the present invention, the entire installation process can be automatically treated by the installation unit, and normal usages of all the installed service software can be ensured. The match between platform software and service software can be satisfied, and compatibility of all the installed service software and flexibility of switching between each version of the service software can be ensured.

Description

软件安装包的生成、 卸载方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种软件安装包的生成、 卸载方 法及装置。 背景技术 随着移动通讯业的迅猛发展, 手机的制式、 平台不断增加, 相应的业务 也是不断增多, 因此手机生产线要进行的相关测试也越来越多, 对应的手机 生产测试软件也是名目繁多。 各制式、 各平台的相同业务软件一般都具有一 些共同性, 而同一制式平台的不同业务对于手机的操作也有共同之处, 为了 便于软件操作风格的统一性、 软件团队的开发与维护的方便性以及新功能的 扩展, 越来越多的企业都开始釆用插件式的软件架构, 将整个系统分割成许 多功能独立的小模块, 每个模块进行独立开发维护。 对于生产线软件, 基于 插件类的开发方式, 软件版本发布时一般是将启动程序和公共插件作为平台 软件单独发布版本, 而各业务软件插件单独发布版本。 平台软件版本可以釆用一些主流的打包工具进行打包, 但是对于业务软 件, 传统打包工具则无法满足要求。 首先业务软件需要安装到平台软件所在 的安装目录下; 其次, 不同的业务软件对平台软件的版本有一定的要求, 对 于某一业务软件可能存在过低的平台版本不支持其相关功能, 导致软件无法 正常运行; 再次, 需要支持业务软件 氏版本升级到高版本, 而有时候高版 本由于不稳定又需要回退到低版本; 最后, 不同业务软件之间可能含有相同 的文件, 但是文件版本又不一定相同, 需要确保安装的不同的业务软件的兼 容性, 并且卸载业务软件时能不影响其它业务软件的正常使用。 传统的打包方式是将所有需要打包的文件收集后进行合并, 然后用户安 装时再将所有文件直接释放到用户指定的安装目录下。 通过这种方式打包的 业务软件, 用户安装时需要自己判断查找平台软件目录, 然后再设定业务软 件安装目录, 增加了操作的复杂性, 并且容易出错, 一旦安装目录设置错误, 会导致主程序无法找到插件, 而不能正常加载插件。 另外传统打包软件安装 时总是后安装版本对应的所有文件直接覆盖先安装版本的文件, 无法保证插 件类业务软件的兼容性。 并且通过传统打包方式打包的业务软件在卸载时会 删除该业务软件包含的所有文件, 这样可能会导致同目录下别的业务软件中 的同名文件被删除, 而影响别的业务软件的使用。 发明内容 本发明的主要目的在于提供一种软件安装包的生成、 卸载方法及装置, 以至少解决上述问题之一。 根据本发明的一方面, 提供了一种软件安装包的生成方法, 包括: 获取 业务软件的版本信息、 待打包文件及待打包文件信息, 居业务软件的版本 信息及待打包文件生成配置文件并记录该配置文件对应的信息; 创建软件安 装包, 在软件安装包的头部写入业务软件的安装单元; 在软件安装包的安装 单元后依次写入配置文件对应的信息、 配置文件、 待打包文件信息、 待打包 文件、 尾部结构体信息, 生成业务软件的软件安装包。 优选地, 业务软件的版本信息包括业务软件对应的以下信息至少之一: 手机制式、 平台、 业务类型、 业务软件版本号、 平台版本号; 待打包文件信 息包括以下至少之一: 当前文件路径、 文件名称、 文件大小、 安装后的平台 主程序路径、 文件版本号; 配置文件信息包括以下至少之一: 配置文件大小、 配置文件名称、 配置文件所在的路径; 尾部结构体信息包括以下至少之一: 安装单元的文件大小、 待打包文件的总个数、 定位尾部结构体的常量信息。 优选地, 该方法还包括: 按照以下步骤执行业务软件的软件安装包: 从 注册表中读取本地平台软件的安装信息; 从业务软件的软件安装包中读取配 置文件对应的信息及配置文件; 判断当前安装的业务软件是否能够在本地平 台软件上运行, 如果否, 则提示用户本地平台软件版本过低, 需要安装高版 本的平台软件, 退出安装; 如果当前安装的业务软件能够在本地的平台软件上运行, 则继续判断本 地是否已安装了当前安装业务软件的更高版本, 如果是, 则提示是否需要安 装比当前版本低的业务软件, 如果需要, 则将本次要安装的业务软件以及与 该业务软件冲突的业务软件记录在业务软件卸载配置文件中, 如果不需要, 则退出安装; 如果本地没有比当前安装的业务软件的更高版本的业务软件, 则继续判 断本地安装目录下是否存在该业务软件包含的文件的更高版本文件,如果否, 则安装该业务软件并将该业务软件对应的信息写入业务软件安装配置文件 中; 如果本地安装目录下存在该业务软件包含的文件的更高版本文件, 则提 示是否卸载所有含有该高版本文件的业务软件, 如果是, 则将本次安装的业 务软件以及与该业务软件相冲突的业务软件写入业务软件卸载配置文件中, 如果否, 则安装该业务软件并将该业务软件对应的信息写入业务软件安装配 置文件中。 优选地, 从注册表中读取平台软件的安装信息之后, 读取配置文件信息 及配置文件之前, 还包括: 读取当前运行的业务软件的尾部结构体信息; 判 断该尾部结构体信息是否完整正确, 如果否, 则提示文件格式不正确, 结束 安装, 如果是, 则确定执行读取配置文件信息及配置文件的步骤。 优选地, 在读取配置文件信息及配置文件之后, 在判断当前安装的业务 软件是否能够在本地平台软件上运行之前, 还包括: 将读取到的业务软件的 版本信息按照预定的业务软件命名规则生成业务软件名, 与目前正在安装的 业务软件名进行比较, 如果不一致, 则提示当前使用的业务软件版本信息有 误, 退出安装; 如果一致, 则读取目前已安装的业务软件信息并显示给用户 以确认是否安装, 如果否, 则退出安装; 如果安装, 则判断本地平台软件是否正在运行, 如果是, 则提示关闭平 台软件, 之后循环判断平台软件是否正在运行, 如果该平台软件未在运行, 则确定执行判断当前安装的业务软件能否运行在本地的平台软件上的步骤。 根据本发明的另一方面, 提供了一种软件卸载方法, 包括: 加载业务软 件安装配置文件, 从业务软件安装配置文件中读取当前已安装的业务软件信 息;根据业务软件卸载配置文件判断本次卸载是否是为了安装新的业务软件, 如果否, 则显示目前已安装的所有业务软件, 以使用户从所有业务软件中选 择需要卸载的业务软件, 响应于用户选择需要卸载的业务软件的操作, 逐个 卸载选择的业务软件, 如果用户选择了取消则退出卸载; 如果根据业务软件 卸载配置文件判断本次卸载是为了安装新的业务软件, 则再次提示用户确认 本次卸载是否是为了安装新的业务软件, 如果否, 则显示目前已安装的所有 业务软件, 以使用户从所有业务软件中选择需要卸载的业务软件, 响应于用 户选择需要卸载的业务软件的操作, 逐个卸载选择的业务软件, 如果用户选 择了取消则退出卸载; 如果确认本次卸载是为了安装新的业务软件, 则将与 该新的业务软件冲突的所有业务软件全部显示出来, 以使用户从与该新的业 务软件冲突的所有业务软件中选择需要卸载的业务软件, 响应于用户选择需 要卸载的业务软件的操作, 逐个卸载选择的业务软件, 如果用户选择了取消 则退出卸载。 根据本发明的又一个方面, 提供了一种软件安装包的生成装置, 包括: 获取模块, 用于获取业务软件的版本信息、 待打包文件及待打包文件信息, 才艮据业务软件的版本信息及待打包文件生成配置文件并记录该配置文件对应 的信息; 创建模块, 用于创建软件安装包, 在软件安装包的头部写入安装单 元; 写入模块, 用于在软件安装包的安装单元后依次写入配置文件对应的信 息、 配置文件、 待打包文件信息、 待打包文件、 尾部结构体信息。 优选地, 业务软件的版本信息包括业务软件对应的以下信息至少之一: 手机制式、 平台、 业务类型、 业务软件版本号、 平台版本号; 待打包文件信 息包括以下至少之一: 当前文件路径、 文件名称、 文件大小、 安装后的平台 主程序路径、 文件版本号; 配置文件信息包括以下至少之一: 配置文件的大 小、 配置文件名称、 配置文件所在的路径; 尾部结构体信息包括以下至少之 —: 安装单元的文件大小、 待打包文件的总个数、 定位尾部结构体的常量信 息。 优选地, 上述安装单元包括: 第一安装子单元, 用于从注册表中读取平台软件的安装信息; 第二安装子单元, 用于读取配置文件对应的信息及配置文件; 第三安装子单元, 用于判断当前安装的业务软件是否能够在本地平台软 件上运行,, 如果否, 则提示用户本地平台软件版本过低, 需要安装高版本的 平台软件, 退出安装; 第四安装子单元, 用于在当前安装的业务软件能够在本地的平台软件上 运行时, 判断本地是否已安装了当前安装业务软件的更高版本, 如果是, 则 提示是否需要安装比当前版本低的业务软件, 如果需要, 则将本次要安装的 业务软件以及与该业务软件冲突的业务软件记录在业务软件卸载配置文件 中, 如果不需要, 则退出安装; 第五安装子单元, 用于在本地没有比当前安装的业务软件的更高版本的 业务软件时, 判断本地安装目录下是否存在该业务软件包含的文件的更高版 本文件, 如果否, 则安装该业务软件并将该业务软件对应的信息写入业务软 件安装配置文件中; 第六安装子单元, 用于在本地安装目录下存在该业务软件包含的文件的 更高版本文件时, 提示用户是否卸载所有含有该高版本文件的业务软件, 如 果是, 则将本次安装的业务软件以及与该业务软件相冲突的业务软件写入业 务软件卸载配置文件中, 如果否, 则安装该业务软件并将该业务软件对应的 信息写入业务软件安装配置文件中。 优选地, 上述安装单元还包括: 第七安装子单元, 用于读取当前运行的业务软件的尾部结构体信息; 第八安装子单元, 用于判断该尾部结构体信息是否完整正确, 如果否, 则提示文件格式不正确, 结束安装。 优选地, 上述安装单元还包括: 第九安装子单元, 用于将读取到的业务软件的版本信息按照预定的业务 软件命名规则生成业务软件名, 与目前正在安装的业务软件名进行比较, 如 果不一致, 则提示当前使用的业务软件版本信息有误, 退出安装; 第十安装子单元, 用于读取目前已安装的业务软件信息并显示给用户以 确认是否安装, 如果否, 则退出安装; 第十一安装子单元, 用于判断本地平台软件是否正在运行, 如果是, 则 提示关闭平台软件, 并循环判断平台软件是否正在运行。 根据本发明的再一个方面, 提供了一种软件卸载装置, 包括: 读取模块, 用于读取业务软件安装配置文件, 获取当前已安装的业务软件信息; 第一判 断模块, 用于判断本次卸载安装是否是为了安装新的业务软件; 第二判断模 块, 用于再次提示用户确认本次卸载是否是为了安装新的业务软件; 第一卸 载模块, 用于显示目前已安装的所有业务软件, 以使用户从所有业务软件中 选择需要卸载的业务软件, 响应于用户选择需要卸载的业务软件的操作, 逐 个卸载选择的业务软件, 如果用户选择了取消则退出卸载; 第二卸载模块, 用于显示与该新的业务软件冲突的所有业务软件, 以使用户从与该新的业务 软件冲突的所有业务软件中选择需要卸载的业务软件, 响应于用户选择需要 卸载的业务软件的操作, 逐个卸载选择的业务软件, 如果用户选择了取消则 退出卸载。 通过本发明, 釆用将安装的相关复杂逻辑判断放入安装单元, 在打包的 时候将安装单元打包到文件的头部并增加相应的信息来让程序自动处理的方 案, 解决了安装业务软件操作复杂, 容易出错的问题, 进而提高了业务软件 各版本之间切换的灵活性, 确保了所有安装业务软件的兼容性。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部 分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的 不当限定。 在附图中: 图 1是 居本发明实施例的软件安装包的生成方法的流程示意图; 图 2是 居本发明实施例的软件安装包的结构示意图; 图 3是 居本发明实例的软件安装包的生成方法的流程示意图; 图 4是 居本发明实例的软件安装包的安装方法流程示意图; 图 5是根据本发明实例的软件安装包的卸载方法流程示意图; 图 6是 居本发明实施例的软件安装包的生成装置的结构示意图; 图 7是 居本发明实施例的软件安装包的卸载装置的结构示意图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。 图 1是 居本发明实施例的软件安装包的生成方法的流程示意图。 如图 1所示, 居本发明实施例的软件安装包的生成方法包括: 步骤 S 102 , 获取业务软件的版本信息、 待打包文件及待打包文件信息, 才艮据业务软件的版本信息及待打包文件生成配置文件并记录该配置文件对应 的信息。 步骤 S 104, 创建软件安装包, 在软件安装包的头部写入业务软件的安装 单元 (或称为安装程序、 安装单元程序)。 步骤 S 106, 在软件安装包的安装单元后依次写入配置文件对应的信息、 配置文件、 待打包文件信息、 待打包文件、 尾部结构体信息, 生成业务软件 的软件安装包。 通过上述方法, 在打包的时候将安装单元打包到文件的头部, 该安装单 元中包含着安装的相关复杂逻辑判断, 并相应的在软件安装包后续部分写入 相应的信息, 在安装该软件安装包时, 整个安装过程可以由该安装单元自动 进行处理, 保证了所有安装的业务软件的正常使用, 既能满足平台软件与业 务软件的匹配, 又可确保所有安装业务软件的兼容性以及业务软件各版本之 间切换的灵活性。 下文中将结合图 3对上述方法进行详细描述。 优选地, 在上述方法中, 业务软件的版本信息可以进一步包括业务软件 对应的以下信息至少之一: 手机制式、 平台、 业务类型、 业务软件版本号、 平台版本号; 待打包文件信息可以进一步包括以下至少之一: 当前文件路径、 文件名称、 文件大小、 安装后的平台主程序路径、 文件版本号; 配置文件信 息可以进一步包括以下至少之一: 配置文件大小、 配置文件名称、 配置文件 所在的路径; 尾部结构体信息可以进一步包括以下至少之一: 安装单元的文 件大小、 待打包文件的总个数、 定位尾部结构体的常量信息。 上述信息即安装单元在安装软件安装包时需要的信息, 可以根据实际情 况选取其中的一个或多个, 也可以添加更多的信息。 打包完成后, 生成的软 件安装包的结构如图 2所示。 优选地, 通过安装单元执行生成业务软件的软件安装包的步 4聚可以进一 步包括但不限于: 步骤 1 , 从注册表中读取本地平台软件的安装信息; 步骤 2, 从软件安装包中读取配置文件对应的信息及配置文件; 步骤 3 , 判断当前安装的业务软件是否能够在本地平台软件上运行, 如 果不能, 则提示用户本地平台软件版本过低, 需要安装高版本的平台软件, 退出安装; 步骤 4, 如果当前安装的业务软件能够在本地的平台软件上运行, 则继 续判断本地是否已安装了当前安装业务软件的更高版本, 如果是提示用户是 否需要安装比当前版本低的业务软件, 如果用户选择需要, 则将本次要安装 的业务软件以及与该业务软件冲突的业务软件记录在业务软件卸载配置文件 中, 如果不需要, 则退出安装; 步骤 5 , 如果本地没有比当前安装的业务软件的更高版本的业务软件, 则继续判断本地安装目录下是否存在该业务软件包含的文件的更高版本文 件, 如果否, 则安装该业务软件并将该业务软件对应的信息写入业务软件安 装配置文件中; 步骤 6, 如果本地安装目录下存在该业务软件包含的文件的更高版本文 件, 则提示用户是否卸载所有含有该高版本文件的业务软件, 如果用户选择 是, 则将本次安装的业务软件以及与该业务软件相冲突的业务软件写入业务 软件卸载配置文件中, 如果否, 则安装该业务软件并将该业务软件对应的信 息写入业务软件安装配置文件中。 上述安装单元通过执行上述步骤, 即可将上述生成的软件安装包, 安装 在相应的平台上。 在安装过程中, 进行了多次判断与选择, 既保证了所有安 装的业务软件的正常使用, 又能满足平台软件与业务软件的匹配, 同时也可 确保所有安装业务软件的兼容性以及业务软件各版本之间切换的灵活性。 优选地, 步 4聚 1和步 4聚 2之间, 还可以进一步包括以下处理: 步骤 7, 读取当前运行的业务软件的尾部结构体信息; 步骤 8, 判断该尾部结构体信息是否完整正确, 如果否, 则提示文件格 式不正确, 结束安装, 如果是, 则确定进行步骤 2。 优选地, 在步 4聚 2和步 4聚 3之间, 还可以进一步包括以下处理: 步骤 9, 将读取到的业务软件的版本信息按照预定的业务软件命名规则 生成业务软件名, 与目前正在安装的业务软件名进行比较, 如果不一致, 则 提示当前使用的业务软件版本信息有误, 退出安装; 步骤 10, 如果一致, 则读取目前已安装的业务软件信息并显示给用户以 确认是否安装, 如果否, 则退出安装; 步骤 11 , 如果安装, 则判断本地平台软件是否正在运行, 如果是, 则提 示用户关闭平台软件, 之后循环判断平台软件是否正在运行, 如果该平台软 件未在运行, 则确定执行步骤 3。 通过在整个安装流程中添加上述步骤, 可以使整个流程更为严密完整, 确保软件安装包被正确、 完整的安装。 下文中将结合图 4对上述软件安装包 安装方法进行详细描述。 才艮据本发明实施例的软件安装包的卸载方法包括 (下文中将结合图 5对 下述软件安装包卸载方法进行详细描述): 步骤 1 , 加载业务软件安装配置文件, 从业务软件安装配置文件中读取 当前已安装的业务软件信息。 步骤 2, 根据业务软件卸载配置文件判断本次卸载是否是为了安装新的 业务软件, 如果否, 则显示目前已安装的所有业务软件, 以使用户从所有业 务软件中选择需要卸载的业务软件, 然后响应于用户选择需要卸载的业务软 件的操作, 逐个卸载选择的业务软件, 如果用户选择了取消, 则退出卸载。 步骤 3 , 如果根据业务软件卸载配置文件判断本次卸载是为了安装新的 业务软件, 则再次提示用户确认本次卸载是否是为了安装新的业务软件, 如 果用户选择否, 则显示目前已安装的所有业务软件, 以使用户从所有业务软 件中选择需要卸载的业务软件, 然后响应于用户选择需要卸载的业务软件的 操作, 逐个卸载选择的业务软件, 如果用户选择了取消, 则退出卸载。 步骤 4, 如果确认本次卸载是为了安装某个业务软件, 则将与该新的业 务软件冲突的所有业务软件全部显示出来, 以使用户从与该新的业务软件冲 突的所有业务软件中选择需要卸载的业务软件, 然后响应于用户选择需要卸 载的业务软件的操作, 逐个卸载选择的业务软件, 如果用户选择了取消, 则 退出卸载。 通过上述卸载方法, 即可实现各业务软件的智能卸载, 确保各业务软件 的卸载不会影响其它业务软件的正常使用。 下面结合实例以及图 3、 图 4、 图 5对上述优选实施例进行详细说明。 需要说明的是, 由于通常的软件开发高版本都是在低版本基础上功能的进一 步扩展, 满足高版本对低版本的各种兼容。 因此在本发明实施例中, 平台软 件高版本一定满足兼容氏版本, 例如某个业务软件适用的平台版本为 V1.0, 则 V1.0以上的平台版本一定满足业务软件的正常使用;对于每个插件或者文 件版本亦如此, 高版本一定是兼容低版本的。 但是反之低版本不一定能兼容 高版本。 图 3是 居本发明实例的软件安装包的生成方法的流程示意图。 如图 3 所示, 软件安装包的打包过程包括: 步骤 S302: 收集打包业务软件的相关版本信息, 包含业务软件的制式、 平台、 业务类型、 业务软件版本号和适用的平台版本号。 步骤 S304: 收集待打包的文件, 包括文件名、 对应的文件路径以及该文 件相对于平台主程序的路径。 步骤 S306: 才艮据前两步收集的信息生成配置文件, 并且记录当前生成的 配置文件名称及所在的路径。 这里配置文件命名根据步骤 S302收集的信息 按一定规则生成, 配置文件的内容包含步骤 S302和步骤 S304收集的所有内 容。 步骤 S308: 获取收集到的各个待打包文件的版本号, 对于插件, 其版本 号在程序中设置, 对于文本配置文件, 其版本号在文本中记录。 步骤 S310: 在预先设定的目录下创建安装包程序, 其中安装包命名根据 步骤 S302收集的信息按照一定规则生成。 步骤 S312: 将安装单元写入安装包的头部。 步骤 S314: 紧接着在安装单元的后面依次写入配置文件信息和配置文 件, 配置文件信息里主要记录了配置文件的大小, 便于读取配置文件时定位 文件的位置和大小。 步骤 S316:依次将收集的待打包文件信息和待打包文件写入到配置文件 后面, 待打包文件信息包含该对应文件名称、 大小、 相对平台主程序路径、 文件版本号。 步骤 S318: 在打包文件尾部写入尾部结构体信息, 主要包含安装单元的 文件大小、 打包文件的总个数以及定位该尾部结构体本身的一个常量信息。 上述打包步骤完成后, 就会生成一个软件安装包。 如图 2所示, 安装单 元被打包在业务软件的头部, 其中包含了安装过程的所有逻辑处理, 启动打 包好的业务软件后, 即触发安装单元运行, 如图 4所示, 运行步骤如下: 步骤 S402: 从注册表中读取平台软件的安装信息, 判断平台软件是否已 安装, 若未安装, 提示用户先安装平台软件, 退出业务软件安装; 若已安装 平台软件, 获取当前平台软件的安装路径。 步骤 S404: 读取当前运行的业务软件的尾部结构体信息, 获得该业务软 件中安装单元的大小、打包文件的总个数以及定位该尾部结构体的常量信息。 步骤 S406: 居步骤 S404读取情况判断尾部结构体信息是否完整正确 (主要看读取到的定位尾部结构体的常量信息是否正确), 若相关信息不正确, 认为该业务软件打包不完整, 进入步骤 S408; 若相关信息完全符合, 则认为 该业务软件打包完整, 进入步骤 S410。 步骤 S408: 该业务软件打包不完整, 提示用户文件格式不正确, 返回错 误, 结束安装。 步骤 S410: 该业务软件打包完整, 开始读取配置文件信息, 因为该文件 是附在安装单元后面的, 从业务软件的起始处往后移动安装单元对应大小字 节即找到配置文件信息, 读取相关信息, 获取到配置文件的大小。 步 4聚 S412: 再往后读取对应配置文件大小字节的内容即为配置文件, 从 配置文件中可以获取到该业务软件的相关版本信息, 包含该业务软件对应的 手机制式、 平台、 业务类型、 业务软件版本号以及该业务软件适用的平台软 件版本。 步骤 S414: 将步骤 S412读取到的业务软件版本信息按照业务软件命名 规则生成业务软件名, 然后和目前正在安装的业务软件名进行比较, 若不一 致, 则认为软件名中的版本号信息被修改过, 软件描述不正确, 进入步骤 S416; 否则进入步骤 S418。 步骤 S416:软件内部记录的版本信息与软件名本身描述的版本信息不一 致, 提示用户当前使用的业务软件版本信息有误, 错误返回, 这一步主要防 止软件名被修改过, 导致用户安装的业务软件或版本不是自己所期望的。 步骤 S418:从平台软件安装目录下的业务软件安装配置文件中读取目前 已安装的业务软件信息, 包含已安装的业务软件名称、 对应的版本号、 业务 软件包含的所有文件及其相对于平台主程序的相对路径 (每次安装好一个业 务软件都会把对应的安装信息写入业务软安装配置文件中, 以便于安装和卸 载时查找目前的业务软件安装信息)。 步骤 S420: 显示当前业务软件的安装信息给用户进行确认, 包含该业务 软件对应的手机制式、 平台、 业务类型、 版本号、 适用的平台版本号, 如果 用户选择安装, 进入步骤 S422 , 否则用户选择取消则退出安装。 步骤 S422:判断平台软件是否正在运行,若正在运行,则进入步骤 S424, 否则进入步骤 S426。 步骤 S424: 提示用户关闭平台软件, 然后进入步骤 S422。 步骤 S426: 判断当前安装的业务软件能否运行在本地的平台软件上, 通 过从注册表中读取本地当前安装平台软件的版本, 然后与业务软件适用的平 台版本进行比较, 如果本地平台软件版本低于业务软件适用的平台版本, 则 认为业务软件无法运行在本地平台软件上, 进入步骤 S428, 否则本地平台软 件版本高于或者等于业务软件适用的平台版本, 则认为业务软件能运行在本 地平台版本上, 进入步 4聚 S430。 步骤 S428: 提示用户本地平台软件版本过氏, 用户需要安装高版本的平 台软件, 错误返回。 步骤 S430: 判断本地是否已安装了当前安装业务软件的更高版本, 步骤 S418中已读取到了目前的业务软件安装信息,可以查看是否已安装了相同的 业务软件, 若安装了相同的业务软件再进行版本号的比较, 如果本地已安装 了相同的业务软件并且本地版本高于当前安装的业务软件版本, 进入步骤 S432; 否则, 如果本地未安装该业务软件, 或者本地安装的业务软件和当前 业务软件版本相同或者 4氐于该业务软件版本, 进入步骤 S436; 步骤 S432: 询问用户是否继续安装当前的低版本业务软件, 如果用户选 择"是", 进入步骤 S434, 选择"否"则退出业务软件的安装。 步骤 S434:将本次要安装的业务软件以及与该业务软件冲突的业务软件 (即本地已安装的比该业务软件版本高的业务软件)记录在业务软件卸载配置 文件中, 便于下次卸载时智能识别, 退出本次安装。 步骤 S436: 本地不存在当前安装业务软件的更高版本, 则继续判断本地 安装目录下是否存在该业务软件包含的文件的更高版本, 例如, 本地安装的 别的业务软件中含有 X文件, 而当前安装的业务软件中也含有 X文件, 并且 本地的 X文件版本要比当前安装的 X文件版本高。 如果不存在, 则进入步骤 S438, 否则进入步骤 S442。 步骤 S438: 安装业务软件, 从业务软件中的配置文件后面开始读取第一 个文件信息, 文件信息中记录了对应文件的名称、 相对路径、 文件大小和版 本号, 从第一个文件信息后面位置读取对应文件长度大小的文件即为第一个 文件, 将其释放到相应的目录下(由步骤 S402获取到的平台软件安装路径和 此处的文件信息中记录的相对路径来计算该文件的释放目录)。 紧接着从第一 个文件的尾部开始读第二个文件信息 ... ...依次类推, 读取所有的文件, 将其 释放到对应的目录下。 这里通过计数累计, 当读取的文件个数与尾部文件结 构体信息中记录的文件个数相同时, 说明文件读取释放完毕, 转步骤 S440。 步骤 S440: 将安装的业务软件相关信息写入业务软件安装配置文件中, 包含业务软件名称、 版本号、 业务软件包含的各个文件以及各文件相对于平 台主程序的相对路径。 为防止该安装配置文件被随意篡改, 对该配置文件进 行相关加密操作。 至此, 业务软件安装成功, 结束。 步骤 S442: 询问用户是否卸载所有含有该高版本文件的业务软件, 例如 本地存在与当前业务软件相同的文件 X, 且本地的 X版本比较高, 询问用户 是否删除所有包含 X的业务软件。 如果"是,,, 则进入步骤 S446, "否"则进入 步骤 S444。 步骤 S444: 安装业务软件, 基本处理过程同步骤 S438差不多, 区别在 于释放文件的时候判断如果本地存在比该文件版本更高的同名文件, 则跳过 该文件不释放, 接着读取下一个文件。 安装完成后转步骤 S440。 步骤 S446:将本次安装的业务软件以及与该业务软件相冲突的业务软件 (即所有包含与该业务软件相同的高版本文件的业务软件)写入记录在业务软 件卸载配置文件中, 便于下次卸载时智能识别, 退出本次安装。 需要说明的是, 业务软件卸载配置文件中仅记录最近一次安装失败的业 务软件和与其冲突的业务软件,即每次写入新的记录时都会清空上次的记录, 以防止连续安装多个软件记录多条记录导致逻辑混乱的现象发生, 所以每次 卸载时仅仅能智能识别其上次安装失败的业务软件。 对应的卸载方法如图 5所示, 该卸载方法主要包括: 步骤 S502: 从平台安装目录下加载业务软件安装配置文件, 读取并解析 当前已安装的业务软件信息, 包含业务软件名称、 版本号、 业务软件包含的 所有文件、 对应的版本号以及文件的相对路径。 步骤 S504: 判断本次卸载是否是为了安装某个业务软件。 通过加载业务 软件的卸载配置文件, 读取并解析相关信息, 查看该文件中是否记录了上次 安装失败的业务软件 A。 如果是, 则说明上次业务软件 A由于有版本冲突而 未安装成功, 读取到与业务软件 A冲突的所有业务软件, 转步骤 S506; 否 则, 如果该卸载配置文件中内容为空, 则说明上次未出现某个业务软件安装 失败的情况, 转步 4聚 S510。 步骤 S506:提示信息与用户确认本次卸载是否是为了安装业务软件 A? 如果用户选择"是", 转步骤 S508, 选择"否", 则转步骤 S510。 步骤 S508: 将与业务软件 A冲突的所有业务软件全部显示出来, 默认 全部选择, 待用户进一步选择确定, 转步骤 S512。 步骤 S510: 显示目前已安装的所有业务软件, 待用户从中选择需要卸载 的业务软件, 转步骤 S512。 步骤 S512: 若用户选择了需要卸载的业务软件并确定则转步骤 S514, 否则如果用户取消则转步骤 S516。 步骤 S514:逐个卸载用户选择卸载的软件,在卸载每个业务软件的时候, 逐个判断该业务软件包含的文件是否在其它已安装的业务软件中也存在, 若 存在则不删除该文件, 若不存在, 则到相应目录下删除对应的文件。 每卸载 完一个业务软件后, 更新一次业务软件安装配置表, 删除已卸载软件对应的 记录, 同时更新当前业务软件信息。 步骤 S516: 退出本次卸载。 图 6是 居本发明实施例的软件安装包的生成装置的结构示意图。 如图 6所示, 居本发明实施例的软件安装包的生成装置包括: 获取模块 62 , 设置为获取业务软件的版本信息、 待打包文件及待打包文 件信息, 居业务软件的版本信息及待打包文件生成配置文件并记录该配置 文件对应的信息。 创建模块 64 , 设置为创建软件安装包, 在软件安装包的头部写入安装单 元。 写入模块 66 ,设置为在软件安装包的安装单元后依次写入配置文件对应 的信息、 配置文件、 待打包文件信息、 待打包文件、 尾部结构体信息。 上述装置生成的软件安装包具有特殊的结构, 在打包的时候将包含安装 的相关复杂逻辑判断安装单元打包到文件的头部来让程序自动处理, 并相应 的在软件安装包后续部分写入相应的信息。 在安装该软件安装包时, 整个安 装过程可以由该安装单元自动进行处理, 保证了所有安装的业务软件的正常 使用, 既能满足平台软件与业务软件的匹配, 又可确保所有安装业务软件的 兼容性以及业务软件各版本之间切换的灵活性。 优选地, 上述业务软件的版本信息可以进一步包括业务软件对应的以下 信息至少之一: 手机制式、 平台、 业务类型、 业务软件版本号、 平台版本号; 待打包文件信息可以进一步包括以下至少之一: 当前文件路径、 文件名称、 文件大小、 安装后的平台主程序路径、 文件版本号; 配置文件信息可以进一 步包括以下至少之一: 配置文件大小、 配置文件名称、 配置文件所在的路径; 尾部结构体信息可以进一步包括以下至少之一: 安装单元的文件大小、 待打 包文件的总个数、 定位尾部结构体的常量信息。 上述信息即安装单元在安装软件安装包时需要的信息, 根据实际情况选 取其中的一个或多个, 也可以添加更多的信息。 优选地, 上述安装单元可以进一步包括(下述子单元附图中未示出): 第一安装子单元, 设置为从注册表中读取平台软件的安装信息; 第二安装子单元, 设置为读取配置文件对应的信息及配置文件; 第三安装子单元, 设置为判断当前安装的业务软件是否能够在本地平台 软件上运行, 如果否, 则提示用户本地平台软件版本过低, 需要安装高版本 的平台软件, 退出安装; 第四安装子单元, 设置为在当前安装的业务软件能够在本地的平台软件 上运行时, 判断本地是否已安装了当前安装业务软件的更高版本, 如果是, 则提示是否需要安装比当前版本低的业务软件, 如果需要, 则将本次要安装 的业务软件以及与该业务软件冲突的业务软件记录在业务软件卸载配置文件 中, 如果不需要, 则退出安装; 第五安装子单元, 设置为在本地没有比当前安装的业务软件的更高版本 的业务软件时, 判断本地安装目录下是否存在该业务软件包含的文件的更高 版本文件, 如果否, 则安装该业务软件并将该业务软件对应的信息写入业务 软件安装配置文件中; 第六安装子单元, 设置为在本地安装目录下存在该业务软件包含的文件 的更高版本文件时, 提示用户是否卸载所有含有该高版本文件的业务软件, 如果是, 则将本次安装的业务软件以及与该业务软件相冲突的业务软件写入 业务软件卸载配置文件中, 如果否, 则安装该业务软件并将该业务软件对应 的信息写入业务软件安装配置文件中。 优选地, 上述安装单元还可以进一步包括 (下述子单元附图中未示出): 第七安装子单元, 设置为读取当前运行的业务软件的尾部结构体信息; 第八安装子单元,设置为判断该尾部结构体信息是否完整正确,如果否, 则提示文件格式不正确, 结束安装。 优选地, 上述安装单元还可以进一步包括 (下述子单元附图中未示出): 第九安装子单元, 设置为将读取到的业务软件的版本信息按照预定的业 务软件命名规则生成业务软件名, 与目前正在安装的业务软件名进行比较, 如果不一致, 则提示当前使用的业务软件版本信息有误, 退出安装; 第十安装子单元, 设置为读取目前已安装的业务软件信息并显示给用户 以确认是否安装, 如果否, 则退出安装; 第十一安装子单元, 设置为判断本地平台软件是否正在运行, 如果是, 则提示关闭平台软件, 并循环判断平台软件是否正在运行。 在具体实施过程中, 安装单元即可通过上述子单元完成软件安装包的整 个安装过程。 图 7是 居本发明实施例的软件安装包的卸载装置的结构示意图。 如图 7所示, 该软件安装包的卸载装置包括: 读取模块 702 , 设置为读取业务软件安装配置文件, 获取当前已安装的 业务软件信息; 第一判断模块 704 , 设置为判断本次卸载安装是否是为了安装某个业务 软件; 第一判断模块 706 , 设置为再次提示用户确认本次卸载是否是为了安装 新的业务软件; 第一卸载模块 708 , 设置为显示目前已安装的所有业务软件, 以使用户 从所有业务软件中选择需要卸载的业务软件, 响应于用户选择需要卸载的业 务软件的操作,逐个卸载选择的业务软件,如果用户选择了取消则退出卸载; 第二卸载模块 710 , 设置为显示该新的业务软件冲突的所有业务软件, 以使用户从与该新的业务软件冲突的所有业务软件中选择需要卸载的业务软 件, 响应于用户选择需要卸载的业务软件的操作,逐个卸载选择的业务软件, 如果用户选择了取消则退出卸载。 卸载装置相对比较独立, 用户启用该装置即可独立运行, 为了方便管理, 该装置最好统一在平台软件中一起打包发布。 在具体实施过程中, 上述的本发明的各模块、 单元、 子单元可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计 算装置所组成的网络上, 可选地, 它们也可以用计算装置可执行的程序代码 来实现, 因此上述模块、 单元、 子单元的划分只是一种优选的例子。 从整体上来说, 上述软件安装包的生成装置, 主要是用于: (A)收集打包 业务软件版本信息和待打包的文件信息, 其中, 业务软件版本信息包含该业 务软件的业务名称和版本号以及该业务软件适用的平台版本, 待打包文件信 息包含文件的名称及相对路径; (B)根据收集信息生成对应的配置文件, 记录 对应配置文件路径和名称; (C)创建打包软件, 头部写入安装单元程序, 后面 依次写入配置文件和待打包的各个文件, 其中, 配置文件和待打包的各文件 都是先写入文件信息后写入文件内容, 打包软件尾部写入标志结构体信息, 记录相关文件大小和个数, 并用于标志该文件已完整打包。 安装单元即为打包软件头部写入的安装程序, 主要是用于: (A)从注册表 中读取平台软件的安装信息, 获取平台软件的安装路径; (B)读取打包软件尾 部结构体信息, 判断打包软件的完整性; (C)读取配置文件, 判断打包软件版 本信息的正确性;(D)从业务软件安装配置文件中读取本地已安装的业务软件 信息; (E)判断平台软件是否正在运行, 若平台软件正在运行中, 提示用户关 闭平台软件, 在确认平台软件未运行后与用户确认业务软件安装信息; (F) 在用户确认信息并启动安装后, 判定当前的平台软件版本是否满足业务软件 需求, 若平台软件版本低于业务软件需求, 则提示用户安装高版本平台软件; (G)判断要安装的业务软件在本地是否已有更高版本,若已安装了更高版本的 业务软件, 如果用户需要回退到氏版本, 则将本次安装的业务软件以及与之 冲突的本地存在的高版本软件记录在卸载配置文件中, 供用户后续卸载时程 序的智能判断, 并且提示用户先卸载对应高版本软件, 如果用户不需回退低 版本, 则停止软件的安装; (H)判断要安装的业务软件包含的各文件在本地是 否存在更高版本, 若不存在则可直接安装, 若存在, 则需要用户确认是否需 要卸载含有高版本文件的各业务软件, 如果需要卸载, 则将本次要安装的业 务软件及与之冲突的所有业务软件记录在卸载配置文件, 如果不需要卸载, 则安装业务软件的时候当遇到本地版本比业务软件中文件版本高时, 对应文 件跳过去不释放。 (I)当安装完所有的业务软件, 将文件都释放到对应目录下 后, 在安装配置文件中记录下本次安装的业务软件名称、 版本号、 该业务软 件包含的所有文件及其对应的路径。 上述卸载装置用于实现业务软件的智能灵活卸载, 主要是用于: (A)读取 业务软件安装配置文件, 获取当前已安装的业务软件信息; (B)读取业务软件 卸载配置文件, 判断本次卸载安装是否是为了安装某个业务软件, 如果是则 显示所有与该业务软件冲突的业务软件, 供用户选择确认, 如果本次卸载不 是为了安装某业务软件, 则显示本地已安装的所有业务软件供用户选择确认 要卸载的软件; (C)根据用户选择要卸载的业务软件逐个进行卸载, 卸载每个 业务软件的时候, 逐个判断该业务软件包含的文件是否在本地已安装的其它 业务软件中也存在, 若存在则不删除该文件, 若不存在, 则到相应目录下删 除对应的文件。 卸载完成后更新业务软件安装配置文件和卸载配置文件。 从以上的描述中, 可以看出, 相较于现有技术, 本发明提供的方法及装 置可以使业务软件自动安装在平台软件所在目录下, 无需用户选择设置, 且 能保证所有安装的业务软件的正常使用, 既能满足平台软件与业务软件的匹 配, 又可确保所有安装业务软件的兼容性以及业务软件各版本之间切换的灵 活性, 并且可以实现各业务软件的智能卸载, 确保各业务软件的卸载不会影 响其它业务软件的正常使用。 综上所述, 本发明主要针对基于插件技术二次开发的业务软件安装的特 殊需求, 将其所有安装逻辑判断及处理放入安装单元程序中, 并将安装单元 程序打包在文件的头部, 而将其它打包需要的文件附加其后, 从而在启动业 务软件后自动启动安装单元程序, 让软件按自动按用户需求进行安装。 对于 多个业务软件的安装、卸载的智能处理则是通过配置文件记录的方法来解决, 为了防止配置文件被恶意更改, 对配置文件进行了相应的加密处理。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可 以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布 在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程 序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来执行, 并 且在某些情况下, 可以以不同于此处的顺序执行所示出或描述的步骤, 或者 将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作 成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬件和软件 结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的^"神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。  TECHNICAL FIELD The present invention relates to the field of communications, and in particular to a method and apparatus for generating and uninstalling a software installation package. BACKGROUND With the rapid development of the mobile communication industry, the standards and platforms of mobile phones are increasing, and the corresponding businesses are also increasing. Therefore, there are more and more related tests to be carried out on mobile phone production lines, and corresponding mobile phone production test softwares are also numerous. The same business software of each system and platform generally has some commonalities, and different services of the same standard platform have similarities for the operation of mobile phones, in order to facilitate the uniformity of software operation style and the convenience of development and maintenance of software teams. As well as the expansion of new features, more and more enterprises are beginning to use plug-in software architecture, the entire system is divided into a number of functionally independent small modules, each module is independently developed and maintained. For the production line software, based on the development method of the plug-in class, when the software version is released, the startup program and the public plug-in are generally released as separate versions of the platform software, and the business software plug-ins are separately released. The platform software version can be packaged with some mainstream packaging tools, but for business software, traditional packaging tools cannot meet the requirements. First, the business software needs to be installed in the installation directory where the platform software is located. Secondly, different business softwares have certain requirements on the version of the platform software. For a certain service software, the platform version may be too low to support its related functions, resulting in software. Cannot run normally; Again, you need to support the business software version to upgrade to the high version, and sometimes the high version needs to fall back to the lower version due to instability; finally, different business software may contain the same file, but the file version Not necessarily the same, it is necessary to ensure the compatibility of different business software installed, and the business software can be uninstalled without affecting the normal use of other business software. The traditional packaging method is to collect all the files that need to be packaged and then merge them, and then release all the files directly to the user-specified installation directory when the user installs. In this way, the business software packaged by the user needs to judge the platform software directory by itself, and then set the business software installation directory, which increases the complexity of the operation and is prone to errors. Once the installation directory is set incorrectly, the main program will be caused. The plugin could not be found, and the plugin could not be loaded properly. In addition, when the traditional package software is installed, all the files corresponding to the post-installation version directly overwrite the files of the first-installed version, and the compatibility of the plug-in business software cannot be guaranteed. And the business software packaged by the traditional packaging method will be uninstalled. Delete all the files included in the business software. This may result in the deletion of files of the same name in other business software in the same directory, which may affect the use of other business software. SUMMARY OF THE INVENTION A primary object of the present invention is to provide a method and apparatus for generating and uninstalling a software installation package to solve at least one of the above problems. According to an aspect of the present invention, a method for generating a software installation package is provided, including: obtaining version information of a service software, a file to be packaged, and file information to be packaged, a version information of the service software, and a configuration file to be packaged. Record the information corresponding to the configuration file; create a software installation package, write the installation unit of the business software at the head of the software installation package; write the information corresponding to the configuration file, the configuration file, and the package to be packaged after the installation unit of the software installation package File information, files to be packaged, tail structure information, software installation packages for generating business software. Preferably, the version information of the service software includes at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number; the file information to be packaged includes at least one of the following: a current file path, The file name, the file size, the installed platform main program path, and the file version number; the configuration file information includes at least one of the following: a configuration file size, a configuration file name, and a path where the configuration file is located; the tail structure information includes at least one of the following : The file size of the installation unit, the total number of files to be packed, and the constant information of the positioning tail structure. Preferably, the method further comprises: executing the software installation package of the business software according to the following steps: reading the installation information of the local platform software from the registry; reading the information corresponding to the configuration file and the configuration file from the software installation package of the business software Determine whether the currently installed business software can run on the local platform software. If not, it prompts the user that the local platform software version is too low, and needs to install a higher version of the platform software to exit the installation; if the currently installed business software can be localized If the platform software is running, it continues to determine whether a higher version of the currently installed service software has been installed locally. If yes, it prompts whether it is necessary to install a lower version of the business software than the current version. If necessary, the business software to be installed this time. And the service software conflicting with the service software is recorded in the service software uninstall configuration file, if not, exit the installation; if there is no higher version of the business software than the currently installed business software, continue to judge the local installation directory Whether there is this business The piece contains a later version of the file, and if not, The service software is installed and the information corresponding to the service software is written into the service software installation configuration file. If a higher version file of the file included in the service software exists in the local installation directory, it is prompted whether to uninstall all the files containing the high version. The business software, if yes, writes the business software installed and the business software that conflicts with the business software into the business software uninstallation configuration file, and if not, installs the business software and the information corresponding to the business software Write to the business software installation configuration file. Preferably, after reading the installation information of the platform software from the registry, before reading the configuration file information and the configuration file, the method further includes: reading the tail structure information of the currently running service software; determining whether the tail structure information is complete Correct, if no, the prompt file format is incorrect, the installation is finished, and if so, the step of reading the configuration file information and the configuration file is determined. Preferably, after the configuration file information and the configuration file are read, before determining whether the currently installed service software can be run on the local platform software, the method further includes: naming the version information of the read service software according to the predetermined service software. The rule generates the service software name and compares it with the name of the service software currently being installed. If it is inconsistent, it prompts that the currently used service software version information is incorrect and exits the installation; if it is consistent, reads the currently installed business software information and displays Give the user to confirm whether to install, if not, exit the installation; if it is installed, judge whether the local platform software is running, if yes, prompt to close the platform software, then loop to determine whether the platform software is running, if the platform software is not After running, it is determined to perform the step of judging whether the currently installed business software can run on the local platform software. According to another aspect of the present invention, a software uninstallation method is provided, including: loading a service software installation configuration file, reading current installed service software information from a service software installation configuration file; and determining the current service software uninstallation configuration file according to the service software Whether the secondary uninstallation is to install new business software, if not, all the currently installed business software is displayed, so that the user selects the business software to be uninstalled from all the business software, and responds to the operation of the user to select the business software to be uninstalled. The selected service software is uninstalled one by one. If the user selects cancel, the uninstallation is exited. If the uninstallation configuration file is determined according to the service software uninstallation configuration file, the user is prompted to confirm whether the uninstallation is to install a new one. The service software, if not, displays all the currently installed business software, so that the user selects the business software to be uninstalled from all the business software, and uninstalls the selected business software one by one in response to the user selecting the operation of the business software to be uninstalled.If the user selects Cancel to exit the uninstall; if to confirm this is to uninstall the installation of a new business software, and will be All the business software conflicting with the new business software is displayed, so that the user selects the business software that needs to be uninstalled from all the business softwares that conflict with the new business software, and responds to the operation of the business software that the user needs to uninstall, one by one. Uninstall the selected business software, and if the user chooses to cancel, exit the uninstallation. According to still another aspect of the present invention, a device for generating a software installation package includes: an obtaining module, configured to obtain version information of a service software, a file to be packaged, and information about a file to be packaged, according to version information of the service software. And the file to be packaged generates a configuration file and records information corresponding to the configuration file; a module for creating a software installation package, writing the installation unit at the head of the software installation package; and writing a module for installing the software installation package After the unit, the information corresponding to the configuration file, the configuration file, the information to be packaged, the file to be packaged, and the information about the tail structure are written. Preferably, the version information of the service software includes at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number; the file information to be packaged includes at least one of the following: a current file path, File name, file size, installed platform main program path, file version number; configuration file information includes at least one of the following: the size of the configuration file, the configuration file name, the path where the configuration file is located; the tail structure information includes at least the following —: The file size of the installation unit, the total number of files to be packed, and the constant information of the positioning tail structure. Preferably, the installation unit includes: a first installation subunit, configured to read installation information of the platform software from the registry; a second installation subunit, configured to read information corresponding to the configuration file and a configuration file; The subunit is configured to determine whether the currently installed service software can run on the local platform software, and if not, prompt the user that the local platform software version is too low, and need to install a high version of the platform software to exit the installation; the fourth installation subunit , when the currently installed business software can run on the local platform software, determine whether a higher version of the currently installed business software is installed locally, and if so, whether it is necessary to install a business software lower than the current version, If necessary, the business software to be installed and the business software conflicting with the business software are recorded in the business software uninstall configuration file, and if not, the installation is exited;  The fifth installation subunit is configured to determine whether a higher version file of the file included in the service software exists in the local installation directory when there is no local version of the service software than the currently installed service software, if not, install The service software writes the information corresponding to the service software into the service software installation configuration file; the sixth installation subunit is configured to prompt the user whether a higher version file of the file included in the service software exists in the local installation directory Uninstall all the business software that contains the high-level version file. If yes, write the business software installed and the business software that conflicts with the business software into the service software uninstall configuration file. If not, install the business software and The information corresponding to the service software is written into the service software installation configuration file. Preferably, the installation unit further includes: a seventh installation subunit, configured to read tail structure information of the currently running service software; and an eighth installation subunit, configured to determine whether the tail structure information is complete and correct, if no , the file format is incorrect, and the installation is finished. Preferably, the installation unit further includes: a ninth installation subunit, configured to generate the service software name according to the predetermined service software naming rule according to the version information of the read service software, and compare with the service software name currently being installed, If they are inconsistent, the current service software version information is incorrect and the installation is exited. The tenth installation subunit is used to read the currently installed service software information and display it to the user to confirm whether to install. If not, exit the installation. The eleventh installation subunit is configured to determine whether the local platform software is running, and if so, prompts to close the platform software and loop to determine whether the platform software is running. According to still another aspect of the present invention, a software uninstalling apparatus is provided, including: a reading module, configured to read a service software installation configuration file, and obtain current installed service software information; and a first determining module, configured to determine the present Whether the secondary uninstallation installation is to install new business software; the second judgment module is used to prompt the user to confirm whether the uninstallation is to install new business software; the first uninstallation module is configured to display all the currently installed business software. In order to enable the user to select the business software to be uninstalled from all the business software, in response to the user selecting the operation of the business software to be uninstalled, uninstalling the selected business software one by one, and exiting the uninstallation if the user selects canceling; the second uninstalling module, Displaying all business software that conflicts with the new business software to enable users to interact with the new business The business software that needs to be uninstalled is selected among all the business softwares that conflict with the software, and the selected business software is uninstalled one by one in response to the operation of the business software that the user selects to uninstall, and the uninstallation is exited if the user selects cancel. Through the invention, the utility model puts the relevant complex logic judgment of the installation into the installation unit, and packages the installation unit to the head of the file at the time of packaging, and adds corresponding information to let the program automatically process the solution, and solves the operation of installing the service software. Complex, error-prone issues that increase the flexibility of switching between versions of business software and ensure compatibility of all installed business software. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 1 is a schematic flowchart of a method for generating a software installation package according to an embodiment of the present invention; FIG. 2 is a schematic structural diagram of a software installation package according to an embodiment of the present invention; FIG. 3 is a software installation of an example of the present invention. FIG. 4 is a schematic flowchart of a method for installing a software installation package according to an example of the present invention; FIG. 5 is a schematic flowchart of a method for uninstalling a software installation package according to an example of the present invention; FIG. 7 is a schematic structural diagram of an apparatus for unloading a software installation package according to an embodiment of the present invention. FIG. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. FIG. 1 is a schematic flow chart of a method for generating a software installation package according to an embodiment of the present invention. As shown in FIG. 1, a method for generating a software installation package according to an embodiment of the present invention includes:  In step S102, the version information of the service software, the file to be packaged, and the file to be packaged are obtained, and the configuration file is generated according to the version information of the service software and the file to be packaged, and the information corresponding to the configuration file is recorded. Step S104, creating a software installation package, and writing an installation unit (or an installer, an installation unit program) of the business software at the head of the software installation package. Step S106: After the installation unit of the software installation package, the information corresponding to the configuration file, the configuration file, the information to be packaged, the file to be packaged, and the structure of the tail structure are sequentially written to generate a software installation package of the service software. Through the above method, the installation unit is packaged into the head of the file at the time of packaging, the installation unit contains the relevant complex logic judgment of the installation, and corresponding information is written in the subsequent part of the software installation package, and the software is installed. When the package is installed, the entire installation process can be automatically processed by the installation unit to ensure the normal use of all installed business software, which can not only match the platform software and business software, but also ensure the compatibility and service of all installed business software. Flexibility to switch between versions of the software. The above method will be described in detail below with reference to FIG. Preferably, in the above method, the version information of the service software may further include at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number; the file information to be packaged may further include At least one of the following: a current file path, a file name, a file size, a platform main program path after installation, and a file version number; the configuration file information may further include at least one of the following: a configuration file size, a configuration file name, and a configuration file The trailing structure information may further include at least one of the following: a file size of the mounting unit, a total number of files to be packed, and constant information of the positioning tail structure. The above information is the information that the installation unit needs when installing the software installation package. You can select one or more of them according to the actual situation, or you can add more information. After the packaging is completed, the structure of the generated software installation package is as shown in Figure 2. Preferably, the step of performing the software installation package for generating the service software by the installation unit may further include, but is not limited to: Step 1: reading the installation information of the local platform software from the registry; Step 2, reading from the software installation package Take the information corresponding to the configuration file and the configuration file;  Step 3: Determine whether the currently installed service software can run on the local platform software. If not, prompt the user that the local platform software version is too low, and install a high version of the platform software to exit the installation; Step 4, if the currently installed service The software can run on the local platform software, and then continue to determine whether the local version of the currently installed business software is installed. If the user is prompted to install a lower version of the business software than the current version, if the user selects the required software, the user will The secondary installation business software and the business software conflicting with the business software are recorded in the business software uninstallation configuration file, and if not, the installation is exited; Step 5, if there is no local version of the service than the currently installed business software The software continues to determine whether there is a higher version file of the file included in the service software in the local installation directory. If not, the service software is installed and the information corresponding to the service software is written into the service software installation configuration file; Step 6 If the local installation If there is a higher version file of the file included in the service software, the user is prompted to uninstall all the business software containing the high version file. If the user selects yes, the business software installed this time and the business software conflict with the service software. The service software is written in the service software uninstall configuration file. If no, the service software is installed and the corresponding information of the service software is written into the service software installation configuration file. By performing the above steps, the above installation unit can install the generated software installation package on the corresponding platform. During the installation process, multiple judgments and selections have been made to ensure the normal use of all installed business software, to match the platform software and business software, and to ensure the compatibility of all installed business software and business software. Flexibility to switch between versions. Preferably, step 4 is gathered between 1 and 2, and the following processing may be further included: Step 7: reading the tail structure information of the currently running service software; Step 8: determining whether the tail structure information is complete and correct If no, the prompt file format is incorrect, the installation is finished, and if yes, it is determined to proceed to step 2. Preferably, between step 4 and step 4, the following processing may be further included: Step 9, the version information of the read service software is generated according to a predetermined service software naming rule, and the current service software name is generated. If the business software names being installed are compared, if they are inconsistent, the current service software version information is incorrect and the installation is exited.  Step 10: If they are consistent, read the currently installed service software information and display it to the user to confirm whether to install, if not, exit the installation; Step 11, if installed, determine whether the local platform software is running, and if so, Then the user is prompted to close the platform software, and then the loop determines whether the platform software is running. If the platform software is not running, it is determined to perform step 3. By adding the above steps throughout the installation process, the entire process can be made more rigorous and complete, ensuring that the software installation package is properly and completely installed. The above software installation package installation method will be described in detail below with reference to FIG. The method for uninstalling the software installation package according to the embodiment of the present invention includes (hereinafter, the following software installation package uninstallation method will be described in detail with reference to FIG. 5): Step 1: Load the service software installation configuration file, and install and configure the service software from the service software. The currently installed business software information is read in the file. Step 2: According to the service software uninstallation configuration file, determine whether the uninstallation is to install new business software. If not, display all the currently installed business software, so that the user selects the business software to be uninstalled from all the business software. The selected business software is then uninstalled one by one in response to the user selecting the operation of the business software to be uninstalled, and if the user selects the cancellation, the uninstallation is exited. Step 3: If it is determined according to the service software uninstallation configuration file that the uninstallation is to install a new service software, the user is prompted again to confirm whether the uninstallation is to install a new service software. If the user selects No, the currently installed version is displayed. All the business software, so that the user selects the business software to be uninstalled from all the business software, and then uninstalls the selected business software one by one in response to the operation of the user selecting the business software to be uninstalled, and if the user selects cancel, exits the uninstallation. Step 4: If it is confirmed that the uninstallation is to install a certain business software, all the business softwares that conflict with the new business software are all displayed, so that the user selects from all the business softwares that conflict with the new business software. The business software that needs to be uninstalled is then uninstalled one by one in response to the user selecting the operation of the business software to be uninstalled, and if the user selects cancel, the uninstallation is exited. Through the above uninstallation method, intelligent uninstallation of each service software can be realized, and ensuring that the uninstallation of each service software does not affect the normal use of other business software.  The above preferred embodiments will be described in detail below with reference to the examples and Figs. 3, 4, and 5. It should be noted that since the normal software development high version is a further extension of the function on the basis of the low version, it satisfies the compatibility of the high version to the low version. Therefore, in the embodiment of the present invention, the high version of the platform software must meet the compatibility version. For example, the platform version applicable to a certain service software is V1.0, and the platform version above V1.0 must satisfy the normal use of the business software; The same is true for plugins or file versions, and higher versions must be compatible with lower versions. However, the lower version is not necessarily compatible with the high version. FIG. 3 is a schematic flow chart of a method for generating a software installation package according to an example of the present invention. As shown in Figure 3, the packaging process of the software installation package includes the following steps: Step S302: Collect relevant version information of the packaged service software, including the format, platform, service type, service software version number, and applicable platform version number of the service software. Step S304: Collect the file to be packaged, including the file name, the corresponding file path, and the path of the file relative to the platform main program. Step S306: Generate a configuration file according to the information collected in the previous two steps, and record the name of the currently generated configuration file and the path where it is located. The configuration file name is generated according to the information collected in step S302 according to a certain rule, and the content of the configuration file includes all the contents collected in step S302 and step S304. Step S308: Obtain the version number of each collected file to be packaged. For the plug-in, the version number is set in the program, and for the text configuration file, the version number is recorded in the text. Step S310: Create an installation package program in a preset directory, where the installation package name is generated according to a certain rule according to the information collected in step S302. Step S312: Write the installation unit to the head of the installation package. Step S314: The configuration file information and the configuration file are sequentially written in the back of the installation unit. The configuration file information mainly records the size of the configuration file, and is convenient for positioning the location and size of the file when the configuration file is read. Step S316: The collected file information to be packaged and the file to be packaged are sequentially written to the configuration file, and the file information to be packaged includes the corresponding file name, size, relative platform main program path, and file version number.  Step S318: Write the tail structure information at the end of the package file, mainly including the file size of the installation unit, the total number of packaged files, and a constant information for positioning the tail structure itself. After the above packaging step is completed, a software installation package is generated. As shown in Figure 2, the installation unit is packaged in the head of the business software, which contains all the logical processing of the installation process. After the packaged business software is started, the installation unit is triggered to run, as shown in Figure 4, the operation steps are as follows: Step S402: Read the installation information of the platform software from the registry, determine whether the platform software has been installed, and if not installed, prompt the user to install the platform software first, and exit the business software installation; if the platform software is installed, obtain the current platform software. installation path. Step S404: Read the tail structure information of the currently running service software, obtain the size of the installation unit in the service software, the total number of packaged files, and the constant information for locating the tail structure. Step S406: Step S404 is read to determine whether the information of the tail structure is complete and correct (mainly, whether the constant information of the read tail structure is correct), and if the related information is incorrect, the service software is considered to be incompletely packaged. Step S408: If the related information is completely met, the service software is considered to be completely packaged, and the process proceeds to step S410. Step S408: The service software package is incomplete, prompting the user that the file format is incorrect, returning an error, and ending the installation. Step S410: The service software is packaged completely, and the configuration file information is started to be read, because the file is attached to the installation unit, and the configuration file information is found by moving the installation unit corresponding to the size byte from the beginning of the service software. Get the relevant information and get the size of the configuration file. Step 4: S412: The content of the corresponding configuration file size byte is read as a configuration file, and the relevant version information of the service software can be obtained from the configuration file, including the mobile phone standard, platform, and service corresponding to the service software. Type, business software version number, and platform software version to which the business software is applicable. Step S414: The service software version information read in step S412 is generated according to the business software naming rule, and then compared with the service software name currently being installed. If not, the version number information in the software name is modified. If the software description is incorrect, go to step S416; otherwise, go to step S418.  Step S416: The version information recorded by the software is inconsistent with the version information described by the software name itself, prompting the user that the currently used service software version information is incorrect, and the error is returned. This step mainly prevents the software name from being modified, and the user software installed by the user is caused. Or the version is not what you expected. Step S418: Read the currently installed service software information from the service software installation configuration file in the platform software installation directory, including the installed service software name, the corresponding version number, all files included in the business software, and relative to the platform. The relative path of the main program (each time a business software is installed, the corresponding installation information will be written into the service soft installation configuration file, so that the current business software installation information can be found during installation and uninstallation). Step S420: Display the installation information of the current service software to the user for confirmation, including the mobile phone system, platform, service type, version number, and applicable platform version number corresponding to the service software. If the user selects to install, proceed to step S422, otherwise the user selects Cancel to exit the installation. Step S422: determining whether the platform software is running, if it is running, proceeding to step S424, otherwise proceeding to step S426. Step S424: The user is prompted to close the platform software, and then proceeds to step S422. Step S426: determining whether the currently installed service software can be run on the local platform software, by reading the version of the locally installed platform software from the registry, and then comparing with the platform version applicable to the business software, if the local platform software version If the service software is not running on the local platform software, go to step S428. Otherwise, if the local platform software version is higher than or equal to the platform version applicable to the service software, the service software can be run on the local platform. On the version, go to step 4 to gather S430. Step S428: Prompt the user to the local platform software version, the user needs to install the high version of the platform software, and the error returns. Step S430: Determine whether a higher version of the currently installed service software is installed in the local area, and the current service software installation information has been read in step S418, and it can be checked whether the same service software has been installed, if the same business software is installed. Then, the version number is compared. If the same service software is installed locally and the local version is higher than the currently installed service software version, go to step S432; otherwise, if the service software is not installed locally, or the locally installed service software and current The business software version is the same or 4氐 is the service software version, and the process proceeds to step S436;  Step S432: Ask the user whether to continue to install the current low-level service software. If the user selects "Yes", go to step S434, and select "No" to exit the installation of the service software. Step S434: Record the service software to be installed and the service software that conflicts with the service software (that is, the service software that is installed locally and has a higher version than the service software) in the service software uninstall configuration file, so that the next uninstallation is convenient. Smart recognition, exit this installation. Step S436: If there is no higher version of the currently installed service software, the method further determines whether there is a higher version of the file included in the service software in the local installation directory. For example, another locally installed business software contains an X file, and The currently installed business software also contains X files, and the local X file version is higher than the currently installed X file version. If not, the process goes to step S438, otherwise to step S442. Step S438: Install the business software, and read the first file information from the configuration file in the business software. The file information records the name, relative path, file size, and version number of the corresponding file, from the first file information. The file that reads the corresponding file length and size is the first file, and is released to the corresponding directory (the file is calculated by the platform software installation path obtained in step S402 and the relative path recorded in the file information here). Release directory). Then read the second file information from the end of the first file... and so on, read all the files and release them to the corresponding directory. Here, by counting the accumulation, when the number of files read is the same as the number of files recorded in the tail file structure information, the file reading release is completed, and the flow proceeds to step S440. Step S440: Write the installed service software related information into the service software installation configuration file, including the business software name, the version number, each file included in the business software, and the relative path of each file relative to the platform main program. To prevent the installation configuration file from being arbitrarily tampered with, the configuration file is encrypted. At this point, the business software installation is successful and ends. Step S442: Ask the user whether to uninstall all the business software containing the high version file, for example, the local file X is the same as the current business software, and the local X version is relatively high, and ask the user whether to delete all the business software containing X. If yes, go to step S446, and go to step S444. Step S444: Install the business software, the basic processing is the same as step S438, the difference is that when the file is released, it is judged if the local existence is higher than the file version. If the file with the same name is skipped, the file is not released, and then the next file is read. After the installation is completed, the process proceeds to step S440.  Step S446: Write the business software that is installed this time and the business software that conflicts with the service software (that is, all the business software that contains the same high-version file as the service software) into the service software uninstall configuration file, so as to facilitate Intelligent identification when uninstalling, exit this installation. It should be noted that only the business software that failed the last installation and the business software that conflicts with it are recorded in the business software uninstallation configuration file, that is, the last record is cleared every time a new record is written, so as to prevent multiple software installations continuously. Recording multiple records causes logical confusion, so each time you uninstall, you can only intelligently identify the business software that failed to install last time. The corresponding unloading method is as shown in FIG. 5. The uninstalling method mainly includes: Step S502: Loading a service software installation configuration file from the platform installation directory, and reading and parsing the currently installed business software information, including the service software name and version number. , all files included in the business software, the corresponding version number, and the relative path of the file. Step S504: Determine whether the uninstallation is to install a certain service software. By loading the uninstallation configuration file of the business software, read and parse the related information, and check whether the business software A that failed the last installation is recorded in the file. If yes, it indicates that the last service software A is not successfully installed due to a version conflict, and all service software conflicting with the service software A is read, and the process goes to step S506; otherwise, if the content of the uninstall configuration file is empty, the description is The last time there was no installation failure of a business software, go to 4 S510. Step S506: The prompt information and the user confirm whether the uninstallation is to install the business software A. If the user selects "Yes", go to step S508, select "No", and then go to step S510. Step S508: All the business softwares that conflict with the business software A are displayed, and all are selected by default. After the user further selects the determination, the process goes to step S512. Step S510: Display all the currently installed service software, and wait for the user to select the service software to be uninstalled, and go to step S512. Step S512: If the user selects the service software that needs to be uninstalled and determines to go to step S514, otherwise if the user cancels, go to step S516. Step S514: Unloading the software that the user selects to uninstall one by one. When uninstalling each service software, it is judged one by one whether the file included in the service software exists in other installed business software, and if not, the file is not deleted, if not If it exists, delete the corresponding file in the corresponding directory. Per uninstall After completing a business software, update the business software installation configuration table, delete the records corresponding to the uninstalled software, and update the current business software information. Step S516: Exit this uninstallation. FIG. 6 is a schematic structural diagram of a device for generating a software installation package according to an embodiment of the present invention. As shown in FIG. 6, the device for generating a software installation package according to an embodiment of the present invention includes: an obtaining module 62, configured to obtain version information of a service software, a file to be packaged, and information to be packaged, and version information of the service software and The package file generates a configuration file and records the information corresponding to the configuration file. Create module 64, set to create a software installation package, write the installation unit at the head of the software installation package. The writing module 66 is configured to sequentially write the information corresponding to the configuration file, the configuration file, the information to be packaged, the file to be packaged, and the information of the tail structure after the installation unit of the software installation package. The software installation package generated by the above device has a special structure, and the packaged complex logic is installed to determine the installation unit to be packaged to the head of the file for automatic processing, and correspondingly written in the subsequent part of the software installation package. Information. When the software installation package is installed, the entire installation process can be automatically processed by the installation unit to ensure the normal use of all installed business software, which can not only match the platform software and the business software, but also ensure that all the installation software is installed. Compatibility and flexibility to switch between versions of business software. Preferably, the version information of the service software may further include at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number; the file information to be packaged may further include at least one of the following : current file path, file name, file size, platform main program path after installation, file version number; configuration file information may further include at least one of the following: configuration file size, configuration file name, path where the configuration file is located; tail structure The volume information may further include at least one of the following: a file size of the installation unit, a total number of files to be packed, and constant information of the positioning tail structure. The above information is the information that the installation unit needs when installing the software installation package. You can select one or more of them according to the actual situation, and you can add more information. Preferably, the above-described mounting unit may further include (not shown in the following sub-unit drawings):  The first installation subunit is configured to read installation information of the platform software from the registry; the second installation subunit is configured to read information corresponding to the configuration file and the configuration file; and the third installation subunit is set to determine the current installation. Whether the business software can run on the local platform software, if not, it prompts the user that the local platform software version is too low, and needs to install a high version of the platform software to exit the installation; the fourth installation subunit is set to the currently installed business software. When running on the local platform software, it is determined whether a higher version of the currently installed business software is installed locally, and if so, whether it is necessary to install a business software lower than the current version, and if necessary, the current installation is required. The business software and the business software that conflicts with the business software are recorded in the business software uninstall configuration file. If not, the installation is exited; the fifth installation subunit is set to have no higher version locally than the currently installed business software. When the business software is used, determine whether the local installation directory is The higher version file of the file included in the service software, if not, the service software is installed and the corresponding information of the business software is written into the service software installation configuration file; the sixth installation subunit is set to the local installation directory. When there is a higher version file of the file included in the service software, the user is prompted to uninstall all the business software containing the high version file, and if so, the business software installed this time and the business software that conflicts with the business software. The service software uninstallation configuration file is written. If no, the service software is installed and the corresponding information of the service software is written into the service software installation configuration file. Preferably, the above-mentioned mounting unit may further include (not shown in the following sub-unit drawings): a seventh installation sub-unit, configured to read the tail structure information of the currently running service software; the eighth installation sub-unit, Set to determine whether the tail structure information is complete and correct. If not, the file format is incorrect and the installation ends. Preferably, the above-mentioned installation unit may further include (not shown in the following sub-unit diagram): the ninth installation sub-unit is configured to generate the service according to the predetermined service software naming rules according to the version information of the read service software. The software name is compared with the name of the business software currently being installed. If they are inconsistent, the current service software version information is incorrect and the installation is exited.  The tenth installation subunit is configured to read the currently installed business software information and display it to the user to confirm whether the installation is performed. If not, the installation is exited; the eleventh installation subunit is set to determine whether the local platform software is running, If yes, it prompts to close the platform software and loop to determine if the platform software is running. In the specific implementation process, the installation unit can complete the entire installation process of the software installation package through the above subunits. FIG. 7 is a schematic structural diagram of an unloading apparatus of a software installation package according to an embodiment of the present invention. As shown in FIG. 7, the uninstalling apparatus of the software installation package includes: a reading module 702, configured to read a service software installation configuration file, and obtain information about currently installed business software; and a first determining module 704, configured to determine the current time Whether the uninstallation installation is to install a certain business software; the first determining module 706 is configured to prompt the user to confirm whether the uninstallation is to install new business software; the first uninstalling module 708 is configured to display all the services currently installed. Software, so that the user selects the business software that needs to be uninstalled from all the business softwares, and in response to the user selecting the operation of the business software that needs to be uninstalled, uninstalls the selected business software one by one, and exits the uninstallation if the user selects canceling; the second uninstalling module 710 And setting, to display, all the business software conflicting with the new business software, so that the user selects the business software that needs to be uninstalled from all the business software that conflicts with the new business software, and responds to the operation of the business software that the user needs to uninstall, Uninstall the selected business software one by one, if the user chooses If you choose to cancel, exit the uninstall. The unloading device is relatively independent, and the user can independently operate the device. To facilitate management, the device is preferably packaged and distributed together in the platform software. In the specific implementation process, the modules, units, and sub-units of the present invention described above may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed on a network composed of multiple computing devices. Alternatively, they may also be implemented by program code executable by a computing device, and thus the division of the above modules, units, subunits is only a preferred example.  As a whole, the device for generating the software installation package is mainly used for: (A) collecting packaged software version information and file information to be packaged, wherein the service software version information includes the service name and version number of the service software. And the platform version to which the business software is applicable, the file information to be packaged includes the name and relative path of the file; (B) generating a corresponding configuration file according to the collected information, recording the path and name of the corresponding configuration file; (C) creating the packaged software, the header Write to the installation unit program, and then write the configuration file and each file to be packaged in turn, wherein the configuration file and each file to be packaged are written to the file content after the file information is first written, and the package software writes the mark structure at the end Information, records the size and number of related files, and is used to indicate that the file is fully packaged. The installation unit is the installation program written by the package software header, mainly for: (A) reading the installation information of the platform software from the registry, obtaining the installation path of the platform software; (B) reading the package software tail structure Body information, determine the integrity of the packaged software; (C) read the configuration file to determine the correctness of the packaged software version information; (D) read the locally installed business software information from the business software installation configuration file; (E) Determine whether the platform software is running. If the platform software is running, prompt the user to close the platform software, and confirm the service software installation information with the user after confirming that the platform software is not running; (F) After the user confirms the information and starts the installation, determine the current Whether the platform software version meets the requirements of the business software. If the platform software version is lower than the service software requirement, the user is prompted to install the high version platform software; (G) determine whether the business software to be installed has a higher version locally, if it is already installed. For later versions of the business software, if the user needs to fall back to the version, this will be installed this time. The software and the conflicting local high-level software are recorded in the uninstall configuration file for the intelligent judgment of the program when the user subsequently uninstalls, and prompt the user to uninstall the corresponding high version software first, if the user does not need to roll back the lower version, Stop the installation of the software; (H) Determine whether there is a higher version of each file included in the business software to be installed. If it does not exist, install it directly. If it exists, you need to confirm whether you need to uninstall each file containing the high version file. If the business software needs to be uninstalled, the business software to be installed and all the business software that conflicts with it are recorded in the uninstall configuration file. If the uninstallation is not required, the local software version is encountered when the business software is installed. When the file version is high, the corresponding file skips and is not released. (I) After installing all the business software and releasing the files to the corresponding directory, record the business software name, version number, all files included in the business software and their corresponding files in the installation configuration file. path. The above-mentioned unloading device is used for implementing intelligent and flexible uninstallation of service software, and is mainly used for: (A) reading a service software installation configuration file, and acquiring current installed service software information; (B) reading a service software uninstallation configuration file, and determining Whether the uninstallation installation is to install a certain business software, and if so, all the business software that conflicts with the business software is displayed for the user to select and confirm. If the uninstallation is not for installing a business software, all the locally installed services are displayed. Business software for users to choose to confirm (C) uninstalling one by one according to the business software selected by the user to be uninstalled. When uninstalling each business software, it is judged one by one whether the files included in the business software are also present in other locally installed business software, if If it exists, the file will not be deleted. If it does not exist, delete the corresponding file in the corresponding directory. Update the business software installation configuration file and uninstall the configuration file after the uninstallation is completed. From the above description, it can be seen that, compared with the prior art, the method and device provided by the present invention can enable the service software to be automatically installed in the directory where the platform software is located, without requiring the user to select settings, and can ensure all installed business software. The normal use can not only match the platform software and the business software, but also ensure the compatibility of all installed business software and the flexibility of switching between versions of the business software, and can realize the intelligent uninstallation of each business software to ensure each business. Software uninstallation does not affect the normal use of other business software. In summary, the present invention is mainly directed to the special requirements of the business software installation based on the secondary development of the plug-in technology, putting all the installation logic judgment and processing into the installation unit program, and packaging the installation unit program at the head of the file. The files required for other packaging are attached, so that the installation unit program is automatically started after the business software is started, and the software is automatically installed according to the user's requirements. The intelligent processing for installing and uninstalling multiple business software is solved by the method of configuration file recording. In order to prevent the configuration file from being maliciously changed, the configuration file is encrypted accordingly. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any particular combination of hardware and software. The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 Claim
1. 一种软件安装包的生成方法, 包括: 1. A method for generating a software installation package, comprising:
获取业务软件的版本信息、 待打包文件及待打包文件信息, 根据 所述业务软件的版本信息及待打包文件生成配置文件并记录该配置文 件对应的信息;  Obtaining the version information of the service software, the file to be packaged, and the information to be packaged, generating a configuration file according to the version information of the service software and the file to be packaged, and recording information corresponding to the configuration file;
创建软件安装包, 在所述软件安装包的头部写入所述业务软件的 安装单元;  Creating a software installation package, and writing an installation unit of the business software at a header of the software installation package;
在所述软件安装包的所述安装单元后依次写入所述配置文件对应 的信息、 所述配置文件、 所述待打包文件信息、 所述待打包文件、 尾 部结构体信息, 生成所述业务软件的软件安装包。  After the installation unit of the software installation package, the information corresponding to the configuration file, the configuration file, the to-be-packaged file information, the to-be-packaged file, and the tail structure information are sequentially written to generate the service. Software installation package for the software.
2. 根据权利要求 1所述的方法, 其中, 2. The method according to claim 1, wherein
所述业务软件的版本信息包括所述业务软件对应的以下信息至少 之一: 手机制式、 平台、 业务类型、 业务软件版本号、 平台版本号; 所述待打包文件信息包括以下至少之一: 当前文件路径、 文件名 称、 文件大小、 安装后的平台主程序路径、 文件版本号;  The version information of the service software includes at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number; and the file information to be packaged includes at least one of the following: File path, file name, file size, platform main program path after installation, file version number;
所述配置文件信息包括以下至少之一: 配置文件大小、 配置文件 名称、 配置文件所在的路径;  The configuration file information includes at least one of the following: a configuration file size, a configuration file name, and a path where the configuration file is located;
所述尾部结构体信息包括以下至少之一: 所述安装单元的文件大 小、 所述待打包文件的总个数、 定位所述尾部结构体的常量信息。  The tail structure information includes at least one of: a file size of the installation unit, a total number of files to be packed, and constant information for positioning the tail structure.
3. 根据权利要求 2所述的方法, 其中, 所述方法还包括: 按照以下步骤 执行所述业务软件的软件安装包: The method according to claim 2, wherein the method further comprises: performing a software installation package of the service software according to the following steps:
从注册表中读取本地平台软件的安装信息;  Read the installation information of the local platform software from the registry;
从所述业务软件的软件安装包中读取所述配置文件对应的信息及 所述配置文件;  Reading information corresponding to the configuration file and the configuration file from a software installation package of the service software;
判断当前安装的业务软件是否能够在所述本地平台软件上运行, 如果否, 则提示用户本地平台软件版本过低, 需要安装高版本的平台 软件, 退出安装; 如果所述当前安装的业务软件能够在本地的平台软件上运行, 则 继续判断本地是否已安装了当前安装业务软件的更高版本, 如果是, 则提示是否需要安装比当前版本低的业务软件, 如果需要, 则将本次 要安装的业务软件以及与该业务软件冲突的业务软件记录在业务软件 卸载配置文件中, 如果不需要, 则退出安装; Determining whether the currently installed service software can run on the local platform software; if not, prompting the user that the local platform software version is too low, and installing a higher version of the platform software, and exiting the installation; If the currently installed service software can run on the local platform software, continue to determine whether a higher version of the currently installed service software is installed locally, and if so, whether it is required to install a service software lower than the current version. If necessary, the business software to be installed and the business software conflicting with the business software are recorded in the business software uninstall configuration file, and if not, the installation is exited;
如果本地没有比当前安装的业务软件的更高版本的业务软件, 则 继续判断本地安装目录下是否存在该业务软件包含的文件的更高版本 文件, 如果否, 则安装该业务软件并将该业务软件对应的信息写入业 务软件安装配置文件中;  If there is no higher version of the business software than the currently installed service software, it is determined whether there is a higher version file of the file included in the service software in the local installation directory, and if not, the service software is installed and the service is installed. The information corresponding to the software is written into the service software installation configuration file;
如果本地安装目录下存在该业务软件包含的文件的更高版本文 件, 则提示是否卸载所有含有该高版本文件的业务软件, 如果是, 则 将本次安装的业务软件以及与该业务软件相冲突的业务软件写入业务 软件卸载配置文件中, 如果否, 则安装该业务软件并将该业务软件对 应的信息写入业务软件安装配置文件中。  If there is a higher version file of the file included in the service software in the local installation directory, it is prompted whether to uninstall all the business software containing the high version file, and if so, the business software installed this time and the business software conflict with the service software. The service software is written into the service software uninstall configuration file. If no, the service software is installed and the corresponding information of the service software is written into the service software installation configuration file.
4. 根据权利要求 3所述的方法, 其中, 所述从注册表中读取平台软件的 安装信息之后, 所述读取所述配置文件信息及所述配置文件之前, 还 包括: The method according to claim 3, wherein, after the reading the installation information of the platform software from the registry, the reading the configuration file information and the configuration file, the method further includes:
读取当前运行的业务软件的尾部结构体信息;  Reading the tail structure information of the currently running business software;
判断该尾部结构体信息是否完整正确, 如果否, 则提示文件格式 不正确, 结束安装, 如果是, 则确定执行所述读取所述配置文件信息 及所述配置文件的步 4聚。  It is determined whether the information of the tail structure is complete and correct. If not, the file format is incorrect, and the installation is terminated. If yes, it is determined to perform the step of reading the configuration file information and the configuration file.
5. 根据权利要求 3所述的方法, 其中, 在所述读取所述配置文件信息及 所述配置文件之后, 在所述判断当前安装的业务软件是否能够在所述 本地平台软件上运行之前, 还包括: The method according to claim 3, wherein, after the reading the profile information and the configuration file, before determining whether the currently installed service software can be run on the local platform software , Also includes:
将读取到的所述业务软件的版本信息按照预定的业务软件命名规 则生成业务软件名, 与目前正在安装的业务软件名进行比较, 如果不 一致, 则提示当前使用的业务软件版本信息有误, 退出安装;  The version information of the service software that is read is generated according to a predetermined business software naming rule, and is compared with the service software name currently being installed. If the information is inconsistent, the current service software version information is incorrect. Exit the installation;
如果一致, 则读取目前已安装的业务软件信息并显示给用户以确 认是否安装, 如果否, 则退出安装;  If they are consistent, the currently installed business software information is read and displayed to the user to confirm whether the installation is performed. If not, the installation is exited;
如果安装, 则判断所述本地平台软件是否正在运行, 如果是, 则 提示关闭平台软件, 之后循环判断平台软件是否正在运行, 如果该平 台软件未在运行, 则确定执行所述判断当前安装的业务软件能否运行 在本地的平台软件上的步骤。 If installed, it is determined whether the local platform software is running, and if so, prompting to close the platform software, and then periodically determining whether the platform software is running, if the level is If the software is not running, it is determined to perform the step of determining whether the currently installed service software can run on the local platform software.
6. —种用于权利要求 1至 5任一项所述的软件安装包的软件卸载方法, 包括: 6. A software uninstallation method for a software installation package according to any one of claims 1 to 5, comprising:
加载业务软件安装配置文件, 从所述业务软件安装配置文件中读 取当前已安装的业务软件信息;  Loading a business software installation configuration file, and reading the currently installed business software information from the business software installation configuration file;
根据业务软件卸载配置文件判断本次卸载是否是为了安装新的业 务软件, 如果否, 则显示目前已安装的所有业务软件, 以使用户从所 述所有业务软件中选择需要卸载的业务软件, 响应于用户选择需要卸 载的业务软件的操作, 逐个卸载所述选择的业务软件, 如果用户选择 了取消则退出卸载;  According to the service software uninstallation configuration file, it is determined whether the uninstallation is to install new business software. If not, all the currently installed business softwares are displayed, so that the user selects the business software to be uninstalled from all the business softwares, and responds. When the user selects the operation of the business software that needs to be uninstalled, the selected business software is uninstalled one by one, and if the user selects the cancellation, the uninstallation is exited;
如果根据业务软件卸载配置文件判断本次卸载是为了安装新的业 务软件,则再次提示用户确认本次卸载是否是为了安装新的业务软件, 如果否, 则显示目前已安装的所有业务软件, 以使用户从所述所有业 务软件中选择需要卸载的业务软件, 响应于用户选择需要卸载的业务 软件的操作, 逐个卸载所述选择的业务软件, 如果用户选择了取消则 退出卸载;  If the uninstallation is based on the service software uninstallation configuration file, the user is prompted to confirm whether the uninstallation is to install new business software. If not, all the currently installed business software is displayed. Having the user select the service software that needs to be uninstalled from all the service softwares, and in response to the user selecting the operation of the service software that needs to be uninstalled, uninstalling the selected service software one by one, and exiting the uninstallation if the user selects cancellation;
如果确认本次卸载是为了安装新的业务软件, 则将与该新的业务 软件冲突的所有业务软件全部显示出来, 以使用户从所述与该新的业 务软件冲突的所有业务软件中选择需要卸载的业务软件, 响应于用户 选择需要卸载的业务软件的操作, 逐个卸载所述选择的业务软件, 如 果用户选择了取消则退出卸载。  If it is confirmed that the uninstallation is to install new business software, all the business softwares that conflict with the new business software are all displayed, so that the user selects from all the business softwares that conflict with the new business software. The uninstalled business software, in response to the user selecting an operation of the business software to be uninstalled, uninstalls the selected business software one by one, and exits the uninstallation if the user selects cancel.
7. 一种软件安装包的生成装置, 包括: 7. A device for generating a software installation package, comprising:
获取模块, 设置为获取业务软件的版本信息、 待打包文件及待打 包文件信息, 居所述业务软件的版本信息及待打包文件生成配置文 件并记录该配置文件对应的信息; 创建模块, 设置为创建软件安装包, 在所述软件安装包的头部写 入安装单元;  The obtaining module is configured to obtain the version information of the service software, the file to be packaged, and the information to be packaged, the version information of the service software and the configuration file to be packaged, and record the corresponding information of the configuration file; Creating a software installation package, and writing the installation unit at the head of the software installation package;
写入模块, 设置为在所述软件安装包的所述安装单元后依次写入 所述配置文件对应的信息、 所述配置文件、 所述待打包文件信息、 所 述待打包文件、 尾部结构体信息, 生成所述业务软件的软件安装包。 a writing module, configured to sequentially write information corresponding to the configuration file, the configuration file, the to-be-packaged file information, the to-be-packaged file, and the tail structure after the installation unit of the software installation package Information, a software installation package that generates the business software.
8. 根据权利要求 7所述的装置, 其中, 8. The apparatus according to claim 7, wherein
所述业务软件的版本信息包括业务软件对应的以下信息至少之 一: 手机制式、 平台、 业务类型、 业务软件版本号、 平台版本号;  The version information of the service software includes at least one of the following information corresponding to the service software: a mobile phone system, a platform, a service type, a service software version number, and a platform version number;
所述待打包文件信息包括以下至少之一: 当前文件路径、 文件名 称、 文件大小、 安装后的平台主程序路径、 文件版本号;  The file information to be packaged includes at least one of the following: a current file path, a file name, a file size, a platform main program path after installation, and a file version number;
所述配置文件信息包括以下至少之一: 配置文件的大小、 配置文 件名称、 配置文件所在的路径;  The configuration file information includes at least one of the following: a size of the configuration file, a configuration file name, and a path where the configuration file is located;
所述尾部结构体信息包括以下至少之一: 所述安装单元的文件大 小、 所述待打包文件的总个数、 定位所述尾部结构体的常量信息。  The tail structure information includes at least one of: a file size of the installation unit, a total number of files to be packed, and constant information for positioning the tail structure.
9. 根据权利要求 8所述的装置, 其中, 所述安装单元包括: 9. The device according to claim 8, wherein the installation unit comprises:
第一安装子单元, 设置为从注册表中读取平台软件的安装信息; 第二安装子单元, 设置为读取所述配置文件对应的信息及所述配 置文件;  a first installation subunit, configured to read installation information of the platform software from the registry; a second installation subunit, configured to read information corresponding to the configuration file and the configuration file;
第三安装子单元, 设置为判断当前安装的业务软件是否能够在所 述本地平台软件上运行, 如果否, 则提示用户本地平台软件版本过低, 需要安装高版本的平台软件, 退出安装;  The third installation subunit is configured to determine whether the currently installed service software can run on the local platform software. If not, the user is prompted that the local platform software version is too low, and a high version of the platform software needs to be installed to exit the installation;
第四安装子单元, 设置为在所述当前安装的业务软件能够在本地 的平台软件上运行时, 判断本地是否已安装了当前安装业务软件的更 高版本, 如果是, 则提示是否需要安装比当前版本低的业务软件, 如 果需要, 则将本次要安装的业务软件以及与该业务软件冲突的业务软 件记录在业务软件卸载配置文件中, 如果不需要, 则退出安装;  a fourth installation subunit, configured to determine whether a higher version of the currently installed service software is installed locally when the currently installed service software is executable on the local platform software, and if yes, whether the installation ratio is required If the service software of the current version is low, the service software to be installed and the service software conflicting with the service software are recorded in the service software uninstall configuration file, and if not, the installation is exited;
第五安装子单元, 设置为在本地没有比当前安装的业务软件的更 高版本的业务软件时, 判断本地安装目录下是否存在该业务软件包含 的文件的更高版本文件, 如果否, 则安装该业务软件并将该业务软件 对应的信息写入业务软件安装配置文件中;  The fifth installation subunit is configured to determine whether a higher version file of the file included in the service software exists in the local installation directory when there is no higher version of the business software than the currently installed service software, and if not, install The business software writes information corresponding to the business software into the business software installation configuration file;
第六安装子单元, 设置为在本地安装目录下存在该业务软件包含 的文件的更高版本文件时, 提示用户是否卸载所有含有该高版本文件 的业务软件, 如果是, 则将本次安装的业务软件以及与该业务软件相 冲突的业务软件写入业务软件卸载配置文件中, 如果否, 则安装该业 务软件并将该业务软件对应的信息写入业务软件安装配置文件中。  The sixth installation subunit is configured to prompt the user to uninstall all the business software containing the high version file when the higher version file of the file included in the service software exists in the local installation directory, and if yes, the installation is performed. The service software and the business software that conflicts with the service software are written into the service software uninstall configuration file. If not, the service software is installed and the corresponding information of the service software is written into the service software installation configuration file.
23 P41331 23 P41331
10. 根据权利要求 9所述的装置, 其中, 所述安装单元还包括: 第七安装子单元, 设置为读取当前运行的业务软件的尾部结构体 信息; The device according to claim 9, wherein the installation unit further comprises: a seventh installation subunit, configured to read tail structure information of the currently running service software;
第八安装子单元, 设置为判断该尾部结构体信息是否完整正确, 如果否, 则提示文件格式不正确, 结束安装。  The eighth installation subunit is set to determine whether the information of the tail structure is complete and correct. If not, the file format is incorrect, and the installation is ended.
11. 根据权利要求 9所述的装置, 其中, 所述安装单元还包括: The device according to claim 9, wherein the installation unit further comprises:
第九安装子单元, 设置为将读取到的所述业务软件的版本信息按 照预定的业务软件命名规则生成业务软件名, 与目前正在安装的业务 软件名进行比较, 如果不一致, 则提示当前使用的业务软件版本信息 有误, 退出安装;  The ninth installation subunit is configured to generate the service software name according to the predetermined service software naming rule according to the version information of the read service software, and compare with the service software name currently being installed, if not, prompt the current use The business software version information is incorrect, and the installation is exited;
第十安装子单元, 设置为读取目前已安装的业务软件信息并显示 给用户以确认是否安装, 如果否, 则退出安装;  The tenth installation subunit is configured to read the currently installed business software information and display it to the user to confirm whether the installation is performed, and if not, exit the installation;
第十一安装子单元,设置为判断所述本地平台软件是否正在运行, 如果是, 则提示关闭平台软件, 并循环判断平台软件是否正在运行。  The eleventh installation subunit is configured to determine whether the local platform software is running, and if so, prompt to close the platform software, and cyclically determine whether the platform software is running.
12. 一种用于卸载权利要求 1至 5任一项所述的安装包程序的软件卸载装 置, 包括: 12. A software uninstallation apparatus for uninstalling the installation package program of any one of claims 1 to 5, comprising:
读取模块, 设置为读取业务软件安装配置文件, 获取当前已安装 的业务软件信息; 第一判断模块, 设置为判断本次卸载安装是否是为了安装新的业 务软件;  The reading module is configured to read the business software installation configuration file to obtain the currently installed business software information; the first determining module is configured to determine whether the uninstalling installation is to install new business software;
第二判断模块, 设置为再次提示用户确认本次卸载是否是为了安 装新的业务软件; 第一卸载模块, 设置为显示目前已安装的所有业务软件, 以使用 户从所述所有业务软件中选择需要卸载的业务软件, 响应于用户选择 需要卸载的业务软件的操作, 逐个卸载所述选择的业务软件, 如果用 户选择了取消则退出卸载;  The second determining module is configured to prompt the user to confirm whether the uninstalling is to install new business software; the first uninstalling module is configured to display all the currently installed business software, so that the user selects from all the business software. The business software that needs to be uninstalled, in response to the user selecting the operation of the business software that needs to be uninstalled, uninstalling the selected business software one by one, and exiting the uninstallation if the user selects canceling;
第二卸载模块, 设置为与显示该新的业务软件冲突的所有业务软 件, 以使用户从所述与该新的业务软件冲突的所有业务软件中选择需 要卸载的业务软件, 响应于用户选择需要卸载的业务软件的操作, 逐 个卸载所述选择的业务软件, 如果用户选择了取消则退出卸载。  a second uninstalling module, configured to be in contact with all the business software that displays the new business software conflict, so that the user selects the business software that needs to be uninstalled from all the business software that conflicts with the new business software, in response to the user's selection The operation of the uninstalled business software, uninstalling the selected business software one by one, and exiting the uninstallation if the user selects cancel.
24 P41331  24 P41331
PCT/CN2011/071141 2010-11-12 2011-02-21 Method and apparatus for generating and uninstalling software installation package WO2012062063A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010543019.2 2010-11-12
CN201010543019.2A CN101984410B (en) 2010-11-12 2010-11-12 Method and device for generating and unloading software installation package

Publications (1)

Publication Number Publication Date
WO2012062063A1 true WO2012062063A1 (en) 2012-05-18

Family

ID=43641579

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/071141 WO2012062063A1 (en) 2010-11-12 2011-02-21 Method and apparatus for generating and uninstalling software installation package

Country Status (2)

Country Link
CN (1) CN101984410B (en)
WO (1) WO2012062063A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112965714A (en) * 2021-03-08 2021-06-15 平安国际智慧城市科技股份有限公司 Method, device, equipment and storage medium for quickly updating codes
CN113360170A (en) * 2021-06-21 2021-09-07 福建天晴在线互动科技有限公司 Method and system for dynamically updating different versions of tool
CN114816407A (en) * 2022-05-24 2022-07-29 新奥数能科技有限公司 Component packaging method and device, electronic equipment and storage medium

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799444B (en) * 2011-05-27 2016-06-08 华为软件技术有限公司 The method of cross-platform packing program and device
CN102902549A (en) * 2011-07-26 2013-01-30 风网科技(北京)有限公司 Client information packaging system and method for Symbian and Android operating systems
CN103136007A (en) * 2011-11-29 2013-06-05 东莞市网大网络科技有限公司 Generation method of cloud computing system installation package
CN103294563B (en) 2012-02-28 2016-03-09 国际商业机器公司 A kind of method and system installation unit being carried out to version conflict inspection
CN105159710A (en) * 2012-03-31 2015-12-16 北京奇虎科技有限公司 Software uninstalling method and apparatus
CN103677876A (en) * 2012-09-12 2014-03-26 中兴通讯股份有限公司 Manufacturing and installing method, device and system of software installation package
CN103729176B (en) * 2012-10-12 2018-01-26 腾讯科技(深圳)有限公司 Application program integration method and device
CN103019722B (en) * 2012-12-14 2016-03-30 北京中电普华信息技术有限公司 A kind of method and device extracting Java network application AKU
CN103176828B (en) * 2013-03-29 2017-06-09 北京奇虎科技有限公司 Delete the method and device of application program Stub File
CN103605505A (en) * 2013-10-11 2014-02-26 索尔思光电(成都)有限公司 Sharing method of software configuration files
CN103617057B (en) * 2013-11-27 2017-05-24 北京奇虎科技有限公司 Application program installation method and device
CN103984573B (en) * 2014-05-26 2017-09-22 中国工商银行股份有限公司 The installation method and device of application program
US20160117160A1 (en) * 2014-10-27 2016-04-28 Microsoft Corporation Preparing installations and updates for software systems
CN104484206A (en) * 2014-12-17 2015-04-01 宇龙计算机通信科技(深圳)有限公司 Method, terminal and system for setting up application program
CN104657131B (en) * 2015-01-15 2019-03-15 北京奥普维尔科技有限公司 A kind of generation system and method for software installation packet
CN105760176B (en) * 2016-03-15 2019-06-07 青岛海信移动通信技术股份有限公司 A kind of weblication packaging method, starting method and related device
CN105955740B (en) * 2016-04-29 2019-12-06 北京奇虎科技有限公司 software management method and device
CN107908404A (en) * 2017-11-17 2018-04-13 深圳市泉眼网络科技有限公司 program packaging method, system and terminal device
CN109885317B (en) * 2019-02-22 2022-08-26 维沃移动通信有限公司 Information processing method, server and terminal
CN111338832A (en) * 2020-02-17 2020-06-26 中国农业银行股份有限公司 Data processing method and device
CN111813460B (en) * 2020-06-01 2024-08-23 北京百卓网络技术有限公司 Access method, device, equipment and storage medium for application program matched files
CN112685094B (en) * 2020-12-24 2023-12-22 北京浪潮数据技术有限公司 Service unloading method, device, equipment and computer readable storage medium
CN113535194B (en) * 2021-07-23 2024-07-09 平安国际智慧城市科技股份有限公司 Method and device for updating installation package, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002015007A1 (en) * 2000-08-10 2002-02-21 Bbnt Solutions Llc Platform independent project built and management tool
JP2007122128A (en) * 2005-10-25 2007-05-17 Fujifilm Corp Software installation device and software installation program
CN101430647A (en) * 2008-12-02 2009-05-13 北京中星微电子有限公司 Hardware equipment and its drive installation method
CN101561762A (en) * 2008-04-18 2009-10-21 鸿富锦精密工业(深圳)有限公司 Software installation procedure packing system and method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100513093B1 (en) * 2002-12-23 2005-09-07 한국전자통신연구원 Integrated configuration of linux kernel and software packages and generation of installation file list based on cml2 computer language
CN101378393B (en) * 2007-08-31 2012-06-13 深圳富泰宏精密工业有限公司 System and method for customizing human-machine interface function group set
CN101882086B (en) * 2010-06-29 2013-05-22 福建新大陆通信科技股份有限公司 Method for organizing upgrade data of serial port of set top box
CN101866296B (en) * 2010-06-30 2013-09-18 福建升腾资讯有限公司 Windows file system based installation package silencing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002015007A1 (en) * 2000-08-10 2002-02-21 Bbnt Solutions Llc Platform independent project built and management tool
JP2007122128A (en) * 2005-10-25 2007-05-17 Fujifilm Corp Software installation device and software installation program
CN101561762A (en) * 2008-04-18 2009-10-21 鸿富锦精密工业(深圳)有限公司 Software installation procedure packing system and method
CN101430647A (en) * 2008-12-02 2009-05-13 北京中星微电子有限公司 Hardware equipment and its drive installation method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112965714A (en) * 2021-03-08 2021-06-15 平安国际智慧城市科技股份有限公司 Method, device, equipment and storage medium for quickly updating codes
CN112965714B (en) * 2021-03-08 2022-06-10 平安国际智慧城市科技股份有限公司 Method, device and equipment for quickly updating code and storage medium
CN113360170A (en) * 2021-06-21 2021-09-07 福建天晴在线互动科技有限公司 Method and system for dynamically updating different versions of tool
CN113360170B (en) * 2021-06-21 2023-11-17 福建天晴在线互动科技有限公司 Method and system for dynamically updating different versions of tool
CN114816407A (en) * 2022-05-24 2022-07-29 新奥数能科技有限公司 Component packaging method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN101984410B (en) 2015-06-10
CN101984410A (en) 2011-03-09

Similar Documents

Publication Publication Date Title
WO2012062063A1 (en) Method and apparatus for generating and uninstalling software installation package
CN102650947B (en) Continuous increment over-the-air upgrade method of Android handheld equipment
TW561412B (en) System and method for providing hardware driver installation
CN104991793A (en) Method, device and system used for application program subpackage
CN109189451A (en) A kind of firmware upgrade method and device
TWI506555B (en) A method of disseminating updated drivers to mobile computing devices and a dissemination system therefor
CN106775723A (en) The method and Android device of the system firmware customization based on Android platform
CN102915247A (en) APK (Android Package) plug-in management method
CN103189851A (en) Apparatus and method for network driver injection into target image
JP2010049704A (en) Content provision method for mobile communication terminal equipment
CN105988843A (en) Firmware upgrade method and firmware upgrade device for mobile terminal
CN103513998A (en) Method and device for generating upgrade package and method and terminal for upgrading dynamic documents in difference mode
JP2007528534A (en) Using a loader to notify system software update services
CN102622280A (en) Control method and control device used for software version upgrade and based on dual file system
CN101668081A (en) Mobile terminal and automatic upgrading method thereof
CN106886437B (en) Application program updating method and device
CN102004657B (en) A kind of electronic equipment and upgrade method thereof
CN100459500C (en) Method for loading functional extension file of customer end soft ware
CN102346673A (en) Method and device for upgrading mobile phone system
CN102999349B (en) A kind of method for upgrading software
WO2016082450A1 (en) Method for upgrading user terminal, and user terminal
CN110750280B (en) Android platform-based application upgrading method and system and storage medium
CN109885332A (en) Image quality chip software upgrade method, device, display equipment and storage medium
CN109857455A (en) Installation kit packaging method, system, equipment and storage medium
CN104598237B (en) A kind of method and apparatus that user interface is generated under upgrade mode

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

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

Country of ref document: EP

Kind code of ref document: A1