A method for generating an installation package and related devices, apparatuses and storage media

By identifying the target software management package for the desired function from a set of software management packages for different system architectures, and generating the target installation package for the target tool, the problem of low efficiency in generating installation packages adapted to multiple system frameworks is solved, achieving efficient installation package generation and compatibility with the target tool.

CN116028099BActive Publication Date: 2026-05-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-10-25
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies require a large amount of repetitive manual operations when generating installation packages that are compatible with multiple system frameworks, resulting in low efficiency.

Method used

By identifying the target software management package from a set of software management packages for different system architectures, a target installation package for the target tool is generated. The storage directory and the target software management package are then used to adapt to different system frameworks, reducing manual operations.

Benefits of technology

It improves the efficiency of installation package generation, ensures that target tools run normally under different system frameworks, and reduces repetitive manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116028099B_ABST
    Figure CN116028099B_ABST
Patent Text Reader

Abstract

The application discloses a method for generating an installation package and related devices, equipment and storage media, comprising: determining a first storage directory; obtaining a first software management package set of a first system architecture and a second software management package set of a second system architecture; determining a target function of a target tool; determining a first target software management package from the first software management package set and a second target software management package from the second software management package set based on the target function; and generating a target installation package of the target tool based on the first storage directory, the first target software management package and the second target software management package. Through the above method, the target software management package capable of executing the target function of the target tool can be determined in the software management package sets of different system architectures, the target installation package generated thereby can be adapted to different system frameworks, and a large amount of manual repetitive operation is not required, thereby improving the generation efficiency of the installation package.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method for generating an installation package and related apparatus, devices and storage media. Background Technology

[0002] With the widespread adoption of mobile smart devices, developers need to create installation packages for tools that perform the same functions, tailored to different system frameworks. Generating an installation package for a tool typically requires a lot of repetitive manual work, such as compiling, linking, and copying target files, before finally generating an installation package that can install the tool. Therefore, how to generate installation packages that are compatible with multiple system frameworks more efficiently has become an urgent problem to be solved. Summary of the Invention

[0003] This application provides a method for generating an installation package, as well as related apparatus, devices, and storage media. By determining the directory of the software management package storing the target tool, and identifying the target software management package capable of executing the target function of the target tool from a set of software management packages for different system architectures, a target installation package of the target tool is generated using the directory of the software management package storing the target tool and the target software management package. Therefore, the target installation package can adapt to different system frameworks and does not require a large amount of repetitive manual operation. It is only necessary to store the code corresponding to the function in the storage directory, so that the installed target tool can execute the function, thereby improving the efficiency of installation package generation.

[0004] In view of this, the first aspect of this application provides a method for generating an installation package, comprising:

[0005] Determine a first storage directory, wherein the first storage directory includes a directory storing the software management package of the target tool;

[0006] Obtain a first software management package set for a first system architecture and a second software management package set for a second system architecture. The first software management package set includes multiple first software management packages running under the first system architecture, with different first software management packages used to perform different functions. The second software management package set includes multiple second software packages running under the second system architecture, with different second software packages used to perform different functions.

[0007] Determine the target functions of the target tool, whereby the target functions include a first function and a second function;

[0008] Based on the target function, a first target software management package is determined from a first software management package set, and a second target software management package is determined from a second software management package set. The first target software management package includes a first software management package for performing a first function and a first software management package for performing a second function. The second target software management package includes a second software management package for performing a first function and a second software management package for performing a second function.

[0009] A target installation package for the target tool is generated based on the first storage directory, the first target software management package, and the second target software management package, wherein the target installation package includes the first storage directory, the first target software management package, and the second target software management package.

[0010] A second aspect of this application provides an installation package generation apparatus, comprising:

[0011] A determining module is used to determine a first storage directory, wherein the first storage directory includes a directory storing the software management package of the target tool;

[0012] The acquisition module is used to acquire a first software management package set for a first system architecture and a second software management package set for a second system architecture. The first software management package set includes multiple first software management packages running under the first system architecture, and different first software management packages are used to perform different functions. The second software package set includes multiple second software packages running under the second system architecture, and different second software packages are used to perform different functions.

[0013] The determination module is also used to determine the target function of the target tool, wherein the target function includes a first function and a second function;

[0014] The determining module is further configured to determine a first target software management package from a first software management package set and a second target software management package from a second software management package set based on the target function, wherein the first target software management package includes a first software management package for performing a first function and a first software management package for performing a second function, and the second target software management package includes a second software management package for performing the first function and a second software management package for performing the second function;

[0015] The generation module is used to generate a target installation package for the target tool based on a first storage directory, a first target software management package, and a second target software management package, wherein the target installation package includes the first storage directory, the first target software management package, and the second target software management package.

[0016] In one possible implementation, the installation package generation apparatus further includes a processing module;

[0017] The first storage directory also includes the target installation directory for the target tool and the directory for the installation script of the target tool. The target installation package also includes the installation script of the target tool.

[0018] The processing module is used to decode the target installation package after the generation module generates the target installation package of the target tool based on the first storage directory, the first target software management package, and the second target software management package, and then store the installation script of the target tool, the first target software management package, and the second target software management package in the target installation directory of the target tool.

[0019] The acquisition module is also used to acquire the target system architecture, wherein the target system architecture is either the first system architecture or the second system architecture;

[0020] The determination module is also used to determine a third target software management package from the first target software management package and the second target software management package based on the target system architecture, wherein the third target software management package is a software management package that runs under the target system architecture;

[0021] The processing module is also used to perform installation processing on the target tool in the first storage directory based on the third target software management package and the installation script of the target tool, so as to complete the installation of the target tool. After the target tool is installed, the installation script of the target tool is stored in the directory storing the installation script of the target tool, and the third target software management package is stored in the directory storing the software management package of the target tool.

[0022] In one possible implementation, the first storage directory further includes a directory storing the configuration files of the target tool, and the target installation package further includes the configuration files of the target tool;

[0023] The processing module is specifically used to decode the target installation package and store the installation script of the target tool, the configuration file of the target tool, the first target software management package, and the second target software management package in the target installation directory of the target tool.

[0024] The processing module is specifically used to store the target tool's configuration file in the directory where the target tool's configuration file is stored, and based on the third target software management package, to perform the installation process in the first storage directory using the target tool's installation script, thereby completing the installation of the target tool.

[0025] In one possible implementation, the first storage directory further includes a directory storing the configuration files of the target tool, and the target installation package further includes the configuration files of the target tool;

[0026] The determination module is also used to detect the directory where the configuration files of the target tool are stored, and to determine the existence of the first configuration file of the target tool, wherein the first configuration file is obtained by modifying the configuration file of the target tool;

[0027] The processing module is also used to copy the first configuration file in the directory where the configuration files of the target tool are stored, to obtain the first configuration file;

[0028] The processing module is specifically used to store the first configuration file in the directory storing the configuration files of the target tool, and based on the third target software management package, to perform the installation process in the first storage directory through the installation script of the target tool to complete the installation of the target tool.

[0029] In one possible implementation, the installation package generation apparatus further includes a creation module;

[0030] A creation module is used to create the association between target functions and target function parameters. The target function parameters include a first function parameter and a second function parameter. The association includes the association between the first function and the first function parameter, and the association between the second function and the second function parameter.

[0031] The processing module is also used to distribute the target function to obtain a main entry point, wherein the main entry point indicates multiple command entry points, including a first command entry point for executing the first function, and a second command entry point for executing both the first function and the second function.

[0032] The generation module is specifically used to generate the target installation package of the target tool based on the first storage directory, the association relationship, the main entry point, the first target software management package, and the second target software management package.

[0033] In one possible implementation, the installation package generation apparatus further includes a calling module;

[0034] The acquisition module is also used to acquire a first function call instruction through a first command entry after the processing module has completed the installation of the target tool. The first function call instruction includes a first function parameter, and the first function parameter uniquely indicates the first function.

[0035] The determining module is also used to determine the first function based on the first function parameters;

[0036] The calling module is used to call the function of the first function through the first command entry point to execute the first function.

[0037] In one possible implementation, the first entry identifier uniquely indicates the first command entry, and the second entry identifier uniquely indicates the second command entry;

[0038] The acquisition module is also used to acquire a second function call instruction through the main entry point after the processing module has completed the installation of the target tool. The first function call instruction includes a second entry point identifier and a first function parameter, and the first function parameter uniquely indicates the first function.

[0039] The determination module is also used to determine the second command entry based on the second entry identifier;

[0040] The determining module is also used to determine the first function based on the first function parameters;

[0041] The calling module is also used to call the function of the first function through the second command entry point to complete the first function.

[0042] A third aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described in the above aspects.

[0043] This application provides a computer device, characterized in that it includes: a memory, a transceiver, a processor, and a bus system; wherein the memory is used to store a program; the processor is used to execute the program in the memory to implement the methods described in the above aspects; and the bus system is used to connect the memory and the processor to enable communication between the memory and the processor.

[0044] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods described in the above aspects.

[0045] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0046] In this embodiment of the application, a method for generating an installation package is provided. First, a first storage directory is determined, which includes a directory storing the software management package of the target tool. Then, a first software management package set for a first system architecture and a second software management package set for a second system architecture are obtained. The first software management package set includes multiple first software management packages running under the first system architecture, with different first software management packages used to perform different functions. The second software package set includes multiple second software packages running under the second system architecture, with different second software packages used to perform different functions. Based on this, the target functions of the target tool are determined. These target functions include a first function and a second function. Based on these target functions, a first target software management package is determined from a first software management package set, and a second target software management package is determined from a second software management package set. The first target software management package includes a first software management package for executing the first function and a first software management package for executing the second function. The second target software management package includes a second software management package for executing the first function and a second software management package for executing the second function. Finally, a target installation package for the target tool is generated based on a first storage directory, the first target software management package, and the second target software management package. The generated target installation package includes the first storage directory, the first target software management package, and the second target software management package. Through this method, the obtained target installation package can adapt to different system frameworks and does not require a large amount of repetitive manual operation. Simply storing the code corresponding to the function in the storage directory is sufficient for the installed target tool to execute its functions, thereby improving the efficiency of installation package generation. Attached Figure Description

[0047] Figure 1 This is an environmental diagram illustrating the method for generating an installation package in an embodiment of this application;

[0048] Figure 2 A schematic diagram illustrating the basic capabilities of the installation package generation system framework provided in this application embodiment;

[0049] Figure 3 A schematic diagram illustrating an embodiment of a method for generating an installation package provided in this application;

[0050] Figure 4 A schematic diagram of an embodiment of the first storage directory provided in this application;

[0051] Figure 5 Another schematic diagram illustrating an embodiment of the first storage directory provided in this application;

[0052] Figure 6 Schematic diagrams illustrating embodiments of the first target software management package and the second target software management package provided in this application;

[0053] Figure 7 A schematic diagram of an embodiment of the directory of configuration files for the target storage tool provided in this application;

[0054] Figure 8 A schematic diagram of an embodiment of the first storage directory provided in this application;

[0055] Figure 9 A schematic diagram of the installation process for the target tool provided in the embodiments of this application;

[0056] Figure 10 A schematic diagram of an embodiment of the target tool code provided in this application;

[0057] Figure 11 A schematic diagram of the execution flow of a function call instruction provided in an embodiment of this application;

[0058] Figure 12 This is a schematic diagram of the structure of an installation package generation device provided in an embodiment of this application;

[0059] Figure 13 This is a schematic diagram of one embodiment of the server in this application;

[0060] Figure 14 This is a schematic diagram of one embodiment of the terminal device in this application. Detailed Implementation

[0061] This application provides a method for generating an installation package, as well as related apparatus, devices, and storage media. By determining the directory of the software management package storing the target tool, and identifying the target software management package capable of executing the target function of the target tool from a set of software management packages for different system architectures, a target installation package of the target tool is generated using the directory of the software management package storing the target tool and the target software management package. Therefore, the target installation package can adapt to different system frameworks and does not require a large amount of repetitive manual operation. It is only necessary to store the code corresponding to the function in the storage directory, so that the installed target tool can execute the function, thereby improving the efficiency of installation package generation.

[0062] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0063] With the widespread adoption of mobile smart devices, developers of tools performing the same functions need to create installation packages for different system frameworks. Generating an installation package for a single tool typically requires a significant amount of repetitive manual work, including compiling, linking, and copying target files, to finally produce an installable package. For example, in systems without standardized specifications, to meet the multiple functionalities of a tool, different files within the installation package need to be coded by multiple people. Different coding standards or log generation methods can reduce the efficiency of installation package generation, thus lowering the overall tool development efficiency. Therefore, how to more efficiently generate installation packages adapted to multiple system frameworks has become a pressing issue. Based on this, this application provides a method for generating installation packages. It determines a target software management package (MMS) capable of executing the target function of a target tool from a set of MMS sets for different system architectures. Then, by storing the directory of the target tool's MMS and the target MMS, it generates the target installation package for the target tool. Therefore, this target installation package can adapt to different system frameworks and does not require a large amount of repetitive manual work. Only the code corresponding to the function needs to be stored in the storage directory for the installed target tool to execute its functions, thereby improving the efficiency of installation package generation.

[0064] The application scenarios of this application embodiment will be introduced below. It is understood that the method for generating the installation package can be executed by a terminal device or a server. In practice, when the method for generating the installation package is deployed on a terminal device, the terminal device, in an offline state, obtains a first software management package set of a first system architecture and a second software management package set of a second system architecture from local storage. Based on specifications, it determines a first storage directory, and based on user needs, it determines the target function of the target tool. Thus, it generates a target installation package for the target tool using the method provided in this application embodiment. Then, it stores the target installation of the target tool locally, so that when the target tool needs to be installed, it can be directly retrieved from the local storage address to complete the installation package generation and installation of the target tool, making the installation package generation process more convenient. When the method for generating the installation package is deployed on a server, the server can determine the first storage directory based on the specifications and determine the target function of the target tool according to the user instructions. Then, the target installation package of the target tool is generated by the method for generating the installation package provided in this application embodiment, thereby improving the efficiency of installation package generation. Based on this, the server can also store the generated target installation package of the target tool to various server nodes built on cloud computing, so that when the terminal device needs to install the target tool, it can obtain the target installation package of the target tool from the connected server node.

[0065] The following describes the method for generating the installation package provided in this application embodiment, using a server as the execution entity as an example. Please refer to... Figure 1 , Figure 1 This is an environmental diagram illustrating the method for generating the installation package in an embodiment of this application, such as... Figure 1 As shown, the video processing system includes a server and a terminal device. The target installation package of the target tool is generated on the server side, and the target installation package of the target tool is installed on the terminal device side to enable the target tool to run the target function on the terminal device side.

[0066] It should be noted that, Figure 1 The server in this context can be a single server, a server cluster consisting of multiple servers, or a cloud computing center, etc. The specific deployment of the client is on the terminal device, which can be... Figure 3The examples shown include tablet computers, laptops, PDAs, mobile phones, in-vehicle terminals, personal computers (PCs), and voice interaction devices. Communication between the terminal devices and the server can be achieved via wireless networks, wired networks, or removable storage media. The wireless networks described above use standard communication technologies and / or protocols. The wireless network is typically the Internet, but can also be any network, including but not limited to Bluetooth, Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, private networks, or any combination of virtual private networks. In some embodiments, custom or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies. The removable storage media can be a Universal Serial Bus (USB) flash drive, external hard drive, or other removable storage media.

[0067] Although Figure 1 Only five terminal devices and one server are shown, but it should be understood that... Figure 1 The examples provided are for understanding this solution only; the actual number of terminal devices and servers should be determined flexibly based on the specific circumstances.

[0068] Secondly, cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technology, information technology, integration technology, management platform technology, and application technology applied to the cloud computing business model. It can form resource pools, available on demand, and is flexible and convenient. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.

[0069] A database, simply put, can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, capable of being shared by multiple users, with minimal redundancy, and independent of application programs.

[0070] A Database Management System (DBMS) is a computer software system designed to manage databases, generally possessing basic functions such as storage, retrieval, security, and backup. DBMSs can be classified according to the database model they support, such as relational or XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters or mobile phones; or according to the query language used, such as SQL (Structured Query Language) or XQuery; or according to performance priorities, such as maximum scale or maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMSs can cross categories, for example, supporting multiple query languages ​​simultaneously. Based on this, in the embodiments of this application, the installation package of the target tool generated by the server can be stored in the database, so that when the terminal device needs to install the target tool, it can download the installation package of the target tool from the database.

[0071] Specifically, the basic capabilities integrated into the system framework in this application embodiment are described below. Please refer to [link / reference]. Figure 2 , Figure 2 A schematic diagram illustrating the basic capabilities of the installation package generation system framework provided in this application embodiment, such as... Figure 2 As shown, the basic capabilities of the installation package generation system framework include configuration file specifications, dependency installation specifications, tool installation and upgrade specifications, unified logging, command access specifications, help prompt specifications, and code package access specifications. Among these, the configuration file specifications and dependency installation specifications are conventions for the directory structure, which program developers must adhere to when generating tool installation packages. Since different tools have different installation and upgrade specifications, program developers need to understand the installation and upgrade specifications for each tool, but these are not considered when generating tool installation packages. Secondly, the unified logging, command access specifications, help prompt specifications, and code package access specifications are development specifications, i.e., specifications for generating tool installation packages, which program developers must also adhere to when generating tool installation packages. The aforementioned specifications are all preset based on different tool requirements and functional requirements, and should not be construed as limitations of this application.

[0072] Based on the above introduction, the method for generating the installation package in this application will be described below, taking the terminal device as the execution subject as an example. Please refer to [link / reference]. Figure 3 , Figure 3 An embodiment of a method for generating an installation package provided in this application is illustrated in the following diagram: Figure 3 As shown, the method includes:

[0073] 301. Determine the first storage directory.

[0074] In this embodiment, the terminal device determines a first storage directory, which includes a directory storing the software management package of the target tool. Specifically, when the following conditions are met... Figure 2 Under the dependency installation specifications described, the directory for storing the software management package of the target tool should be understood to be... Figure 2 As can be seen, this also includes configuration file specifications, command access specifications, help prompt specifications, and code package access specifications. Therefore, the first storage directory can also include the target installation directory for the target tool, the directory for storing the installation script for the target tool, and the directory for storing the configuration files for the target tool. In other words, before generating the installation package of the target tool, it is necessary to determine the specific directories where multiple files in the installation package will be stored, and all determined directories must meet certain requirements. Figure 2 The specific list of standards introduced is not limited here.

[0075] 302. Obtain the first software management package set of the first system architecture and the second software management package set of the second system architecture.

[0076] In this embodiment, since the program developers of the target tool need to complete various functions and various requirements under different systems, the terminal device needs to obtain the first software management package set of the first system architecture and the second software management package set of the second system architecture. The software management package is a package manager (RPM, Red-Hat PackageManager) package.

[0077] Specifically, the first software management package set includes multiple first software management packages that run under the first system architecture, and the second software management package set includes multiple second software management packages that run under the second system architecture. For example, if the first system architecture is an iOS system and the second system architecture is an Android system, then the first software management packages in the first software management package set are used to run under the iOS system, while the second software management packages in the second software management package set are used to run under the Android system. Alternatively, if the first system architecture is an ARM (Advanced RISC Machines, ARM) system and the second system architecture is an x86 system, then the first software management packages in the first software management package set are used to run under the ARM system, while the second software management packages in the second software management package set are used to run under the x86 system.

[0078] Secondly, different first software management packages are used to perform different functions, and different second software management packages are also used to perform different functions. For example, in the set of first software management packages, first software management package 1 is used to perform video data reading and writing, and first software management package 2 is used to perform voice data reading and writing, etc. Similarly, in the set of second software management packages, second software package 1 is used to perform text data reading and writing, and second software package 2 is used to perform interface switching functions, etc. It should be understood that the specific function of each first software management package needs to be determined based on the actual situation of the system and the existing software management packages provided; therefore, the foregoing examples should not be construed as limitations of this application.

[0079] 303. Determine the target function of the target tool.

[0080] In this embodiment, the terminal device determines the target function of the target tool, which includes a first function and a second function. The first and second functions are different functions; for example, the first function may be numerical addition, and the second function may be numerical subtraction. It should be understood that in practical applications, the target function of the target tool may also include a third function for numerical multiplication and a fourth function for numerical division. The specific target function of the target tool is not limited here.

[0081] 304. Based on the target function, determine a first target software management package from the first software management package set, and determine a second target software management package from the second software management package set.

[0082] In this embodiment, the terminal device determines a first target software management package from a first software management package set and a second target software management package from a second software management package set based on the target function. Specifically, since the terminal device determines the target function of the target tool through step 303, and obtains software management packages capable of performing different functions under different system architectures in step 302, the terminal device needs to filter out a first software management package for performing a first function and a first software management package for performing a second function from the first target software management packages, thereby obtaining a first target software management package capable of performing both the first and second functions under the first system architecture. Similarly, the terminal device needs to filter out a second software management package for performing the first function and a second software management package for performing the second function from the second target software management packages, thereby obtaining a second target software management package capable of performing both the first and second functions under the second system architecture. Therefore, the first target software management package includes a first software management package for performing the first function and a first software management package for performing the second function, and the second target software management package includes a second software management package for performing the first function and a second software management package for performing the second function.

[0083] 305. Generate a target installation package for the target tool based on the first storage directory, the first target software management package, and the second target software management package.

[0084] In this embodiment, the terminal device generates a target installation package for the target tool based on a first storage directory, a first target software management package, and a second target software management package. This target installation package includes the first storage directory, the first target software management package, and the second target software management package. For example, please refer to... Figure 4 , Figure 4 A schematic diagram of an embodiment of the first storage directory provided in this application is shown below. Figure 4 As shown, A1 indicates the directory of the software management package for the target tool in the first storage directory, A2 indicates the first target software management package, and A3 indicates the second target software management package.

[0085] In this embodiment of the application, a method for generating an installation package is provided. Through the above method, a target software management package capable of executing the target function of the target tool is determined from the software management package set of different system architectures. Then, the target installation package of the target tool is generated by storing the directory of the software management package of the target tool and the target software management package. Therefore, the target installation package can be adapted to different system frameworks and does not require a lot of repetitive manual operations. It is only necessary to store the code corresponding to the function in the storage directory so that the installed target tool can execute the function, thereby improving the efficiency of installation package generation.

[0086] Optionally, in the above Figure 3 Based on the corresponding embodiments, in an optional embodiment of the method for generating an installation package provided in this application, the first storage directory further includes a target installation directory for storing the target tool and a directory for storing the installation script of the target tool, and the target installation package further includes the installation script of the target tool;

[0087] After generating the target installation package for the target tool based on the first storage directory, the first target software management package, and the second target software management package, the method for generating the installation package further includes:

[0088] The target installation package is decoded, and the installation script of the target tool, the first target software management package, and the second target software management package are stored in the target installation directory of the target tool.

[0089] Obtain the target system architecture, wherein the target system architecture is either the first system architecture or the second system architecture;

[0090] Based on the target system architecture, a third target software management package is determined from the first target software management package and the second target software management package, wherein the third target software management package is the software management package that runs under the target system architecture;

[0091] Based on the third target software management package, the installation process of the target tool is performed in the first storage directory to complete the installation of the target tool. After the target tool is installed, the installation script of the target tool is stored in the directory storing the installation script of the target tool, and the third target software management package is stored in the directory storing the software management package of the target tool.

[0092] In this embodiment, as described in the previous embodiments, the first storage directory also includes a target installation directory for the target tool and a directory for storing the installation script of the target tool. Therefore, the obtained target installation package also includes the installation script of the target tool. Based on this, after the terminal device generates the target installation package of the target tool based on the first storage directory, the first target software management package, and the second target software management package, it can execute the installation process of the target tool. First, the target installation package is decoded to obtain the first storage directory, the installation script of the target tool, the first target software management package, and the second target software management package included in the target installation package. Since the first storage directory also includes the target installation directory for the target tool, the obtained installation script of the target tool, the first target software management package, and the second target software management package need to be stored in the target installation directory for the target tool. For ease of understanding, Figure 5 Another schematic diagram of the first storage directory provided in the embodiments of this application is shown below. Figure 5 As shown, the first storage directory specifically includes the target installation directory of the target tool, the directory of the installation script of the target tool, and the directory of the software management package of the target tool.

[0093] Furthermore, the terminal device obtains the target system architecture of the terminal device that needs to install the target tool. At this point, the target system architecture can be a first system architecture or a second system architecture. Then, based on the target system architecture, the terminal device determines a third target software management package from the first and second target software management packages. This third target software management package is the software management package that runs under the target system architecture. For example, if the target system architecture of the terminal device is an x86 system, and based on the examples in the foregoing embodiments, the second software management package in the second software management package set is used to run under the x86 system, that is, the second software management package in the second target software management package is used to run under the x86 system. Therefore, the second target software management package can be determined as the third target software management package.

[0094] For ease of understanding, Figure 6 The schematic diagrams of the first target software management package and the second target software management package provided in the embodiments of this application are as follows: Figure 6As shown, B1 indicates the first target software management package, and B2 indicates the second target software management package. Based on this, the following code distinguishes the environment and determines the third target software management package. The specific code is as follows:

[0095]

[0096] Then, the terminal device, based on the third target software management package, performs the installation process in the first storage directory using the target tool's installation script to complete the installation of the target tool. After the target tool is installed, the target tool's installation script is stored in the directory storing the target tool's installation script, and the third target software management package is stored in the directory storing the target tool's software management package.

[0097] For example, with Figure 5 Taking the directory structure of the first storage directory as an example, the deploy.sh file in the TCE directory during target tool installation requires manual execution by the user installing the target tool. Furthermore, since the first storage directory also includes a directory storing the target tool's installation scripts, this will be repeated... Figure 5 Taking the directory structure of the first storage directory shown as an example, the core code for executing the installation script of this target tool is as follows:

[0098] cur_dir=$(cd$(dirname$0);pwd)

[0099] cd${cur_dir}

[0100] The purpose of the aforementioned code is to prevent the execution of the target tool's installation script from becoming dependent on the directory where the target tool's installation script is stored.

[0101] Finally, if the target tool is installed on the terminal device for the first time, the terminal device will edit "~ / .bash_profile" and source "~ / .bash_profile" to ensure that the target tool can be accessed from any directory on the terminal device, thus completing the installation. Specifically, after the terminal device executes the target tool's installation script, it obtains the target tool's tool folder. The terminal device adds this tool folder to "~ / .bash_profile" and sources the tool folder, allowing the user to use the installed target tool from any directory on the terminal device. The core code for the aforementioned steps is as follows:

[0102] echo "export PATH=\${PATH}:${bin}">>~ / .bash_profile

[0103] source ~ / .bash_profile

[0104] In this embodiment of the application, a method for installing a target tool is provided. Through the above method, since the obtained target installation package can be adapted to different system frameworks, the software management package suitable for the terminal device system framework is determined by the software management package in the target installation package that is adapted to different system frameworks during the installation of the target tool, thereby ensuring the reliability and compatibility of the target tool installation. Secondly, since the first storage directory includes directories that store multiple different files and scripts, the corresponding files and scripts can be accurately stored in the corresponding target directory during the installation of the target tool, ensuring the accuracy and feasibility of the target tool installation.

[0105] Optionally, in the above Figure 3 Based on the corresponding embodiments, in an optional embodiment of the method for generating an installation package provided in this application, the first storage directory further includes a directory for storing the configuration file of the target tool, and the target installation package further includes the configuration file of the target tool;

[0106] The target installation package is decoded, and the resulting installation script for the target tool, the first target software management package, and the second target software management package are stored in the target installation directory of the target tool. Specifically, this includes:

[0107] The target installation package is decoded, and the installation script of the target tool, the configuration file of the target tool, the first target software management package, and the second target software management package are stored in the target installation directory of the target tool.

[0108] Based on the third-party target software management package, the target tool is installed in the first storage directory using the target tool's installation script, including:

[0109] The target tool's configuration file is stored in the directory containing the target tool's configuration file. Based on the third-party target software management package, the target tool's installation script is used to perform the installation process in the first storage directory to complete the installation of the target tool.

[0110] In this embodiment, the first storage directory further includes a directory storing the configuration files of the target tool, and the target installation package also includes the configuration files of the target tool. For example, Figure 7 An embodiment diagram of the directory of configuration files for the storage target tool provided in this application is shown below. Figure 7 As shown, C1 points to the directory where the configuration files for the target tool are stored. This target C1 is defined as meeting the following conditions: Figure 2 This is the default setting based on the configuration file specifications described.

[0111] This embodiment addresses a scenario where the terminal device requiring the target tool has not previously installed the target tool, or the terminal device does not store the target tool's configuration file. Based on this, the terminal device decodes the target installation package, obtaining the first storage directory, the target tool's installation script, the first target software management package, and the second target software management package, as well as the target tool's configuration file. Therefore, the target tool's configuration file must also be stored in the target installation directory where the target tool is stored. Specifically, the terminal device stores the target tool's configuration file in the directory containing the target tool's configuration file, and then, based on the third target software management package, performs the installation process using the target tool's installation script in the first storage directory to complete the installation of the target tool.

[0112] For example, Figure 8 A schematic diagram of an embodiment of the first storage directory provided in this application is shown below. Figure 8 As shown, D1 indicates the directory where the configuration files for the target tool are stored, D2 indicates the software directory containing the software management package for the target tool, and D3 indicates the directory where the installation scripts for the target tool are stored. It should be understood that... Figure 7 as well as Figure 8 The examples provided are only for understanding the first storage directory and should not be taken as limitations of this scheme.

[0113] In this embodiment of the application, another method for installing a target tool is provided. In this way, when installing the target tool, the configuration file is stored in the directory where the target tool's configuration file is stored. Since the directory meets the configuration file specification, it can ensure that the target tool accurately calls the configuration file when it is used, so as to ensure the reliability of the target tool's installation and use.

[0114] Optionally, in the above Figure 3 Based on the corresponding embodiments, in an optional embodiment of the method for generating an installation package provided in this application, the first storage directory further includes a directory for storing the configuration file of the target tool, and the target installation package further includes the configuration file of the target tool;

[0115] Other methods for generating installation packages include:

[0116] The directory storing the target tool's configuration files is checked to determine the existence of the target tool's first configuration file, which is obtained by modifying the target tool's configuration file.

[0117] Copy the first configuration file in the directory containing the configuration files of the target tool to obtain the first configuration file;

[0118] Based on the third-party target software management package, the target tool is installed using an installation script in the first storage directory. This installation process includes:

[0119] The first configuration file is stored in the directory containing the configuration files of the target tool. Based on the third target software management package, the installation script of the target tool is used to perform the installation process in the first storage directory to complete the installation of the target tool.

[0120] In this embodiment, the first storage directory also includes a directory storing the configuration files of the target tool, and the target installation package also includes the configuration files of the target tool, specifically... Figure 7 The diagram showing the directory for storing the target tool's configuration file is similar and will not be repeated here. Secondly, this embodiment addresses scenarios where the target tool has already been installed on the terminal device, or where this is an upgrade to the target tool, or where the terminal device already contains the target tool's configuration file. Since each user may have different configuration requirements for the same tool, the original configuration file needs to be copied and stored during the reinstallation process to ensure that the installed target tool's configuration file is the same as the original.

[0121] Based on this, the terminal device first needs to detect the directory storing the target tool's configuration files to determine the existence of the target tool's first configuration file. This first configuration file is obtained by modifying the target tool's configuration file; that is, the first configuration file is adjusted by the user based on actual needs. This first configuration file can be a custom configuration file. Therefore, the terminal device copies the first configuration file from the directory storing the target tool's configuration files and stores it. Further, during the execution of the target tool's installation script, the obtained first configuration file is stored in the directory storing the target tool's configuration files, and the configuration files included in the target tool are deleted. Thus, based on a similar method to the aforementioned embodiment, using a third target software management package, the target tool's installation script performs the installation process in the first storage directory to complete the installation of the target tool. Specific details are not elaborated here.

[0122] In this embodiment of the application, another method for installing a target tool is provided. In this way, when installing the target tool, it is first detected whether there is a user-defined or modified configuration file. If there is, the configuration file is copied and saved and the configuration file obtained from the tool package is deleted. This ensures that the configuration file of the reinstalled target tool accurately meets the user's needs, thereby improving the reliability and practicality of the target tool installation.

[0123] As can be seen from the foregoing embodiments, whether or not the terminal device stores a user-modified / customized configuration file will result in different installation processes for the target tool. For further understanding of the target tool installation process, please refer to [link to relevant documentation]. Figure 9 , Figure 9 A schematic diagram of the installation process for the target tool provided in the embodiments of this application is shown below. Figure 9 As shown, in step E1, since the target installation package of the target tool is generated based on the aforementioned embodiment, when the terminal device needs to install the target tool, the target installation package is first decoded to obtain a first storage directory, the target tool's configuration file, the target tool's installation script, a first target software management package, and a second target software management package. These files are then stored in the target installation directory of the target tool, which is included in the first storage directory. In step E2, since the first storage directory includes a directory storing the target tool's installation script, the directory storing the target tool's installation script can be determined based on the decoded first storage directory.

[0124] Further, in step E3, it is determined whether a first configuration file exists. The first configuration file is obtained by modifying the configuration file of the target tool; that is, the first configuration file can be obtained by the user customizing the configuration file. Specifically, since the first storage directory includes the directory storing the configuration files of the target tool, if the terminal device detects the first configuration file in the directory storing the configuration files of the target tool, it is determined to exist, and step E4 is executed. Conversely, if the terminal device does not detect the first configuration file in the directory storing the configuration files of the target tool, it is determined not to exist, and step E5 is executed.

[0125] In step E4, the first configuration file in the directory storing the target tool's configuration files is copied to obtain the first configuration file, and then step E5 is executed. That is, the target system architecture is obtained through step E5, and then the third target software management is determined from the first target software management package and the second target software management package based on the target system architecture obtained in step E5 in step E6. At this time, if the determination in step E3 is yes and step E4 is executed, step E7 will be executed; if the determination in step E3 is no and step E4 is not executed, step E8 will be executed.

[0126] In step E7, the terminal device stores the copied first configuration file in the directory storing the target tool's configuration file, and performs installation processing in the first storage directory based on the third target software management package and the target tool's installation script to complete the installation of the target tool. In step E8, the terminal device stores the decoded target tool's configuration file in the directory storing the target tool's configuration file, and performs installation processing in the first storage directory based on the third target software management package and the target tool's installation script to complete the installation of the target tool. It should be understood that the specific implementation methods of the aforementioned steps have been described in the previous embodiments, and therefore will not be repeated here. Secondly, Figure 9 The process examples provided are only for understanding how the target tool is installed in this solution, and should not be construed as limiting this solution.

[0127] Optionally, in the above Figure 3 Based on the corresponding embodiments, in an optional embodiment of the method for generating an installation package provided in this application, the method for generating an installation package further includes:

[0128] Create the association between target functions and target function parameters, where the target function parameters include a first function parameter and a second function parameter, and the association includes the association between the first function and the first function parameter, and the association between the second function and the second function parameter.

[0129] The target function is distributed to obtain a main entry point, which indicates multiple command entry points, including a first command entry point for executing the first function, and a second command entry point for executing both the first and second functions.

[0130] The target installation package for the target tool is generated based on the first storage directory, the first target software management package, and the second target software management package, specifically including:

[0131] The target installation package of the target tool is generated based on the first storage directory, the association relationship, the main entry point, the first target software management package, and the second target software management package.

[0132] In this embodiment, during the process of generating the target installation package of the target tool, the terminal device can also create an association between target functions and target function parameters. These target function parameters include first function parameters and second function parameters, and the associations include the association between the first function and the first function parameter, and the association between the second function and the second function parameter. Secondly, the terminal device can also distribute the target functions to obtain a main entry point. This main entry point indicates multiple command entry points, including a first command entry point for executing the first function, and a second command entry point for executing both the first and second functions. Based on this, the terminal device needs to specifically generate the target installation package of the target tool based on the first storage directory, the associations, the main entry point, the first target software management package, and the second target software management package.

[0133] The following will be based on Figure 10 This section introduces the relationships between functions and the specific code for distributing them. Figure 10 A schematic diagram of an embodiment of the target tool code provided in this application is shown, as follows. Figure 10 As shown, F1 indicates the dispatch function, F2 indicates the input parameter processing code, F3 indicates the usage instructions, and F4 indicates the log processing code. The dispatch function F1 is used to dispatch the target function, obtaining a general entry point that includes multiple command entries. This allows for the dispatching of different function call requests to the corresponding command entry point, where the corresponding functional logic can be filled in. Since the target tool can have many functions, distinguished by different function parameters, the input parameter processing code F2 creates associations between different functions and their corresponding function parameters. This determines the function to be called based on the function call request, at which point the dispatch function F1 corresponding to that function is invoked. Furthermore, when the user is unfamiliar with the target tool's commands, the usage instructions can be displayed via the shortcut key F3. The log processing code F4 can save all output displayed on the terminal device in real time to a pre-stored log directory. If the target tool encounters runtime errors, the logs can be used to review and analyze the problems.

[0134] It should be understood that in practical applications, the target function parameters can also include third function parameters and more function parameters, and the relationships include the relationship between the third function and the third function parameter, as well as the relationship between each function parameter and the function. Therefore, the multiple command entries included in the main entry point can also include a third command entry for executing the third function and other command entries for executing other functions. Secondly, Figure 10 The examples provided are for understanding the target tool code writing in this scheme only, and should not be construed as specific limitations of this application on the target functions and target tools.

[0135] In this embodiment of the application, another method for generating an installation package is provided. In this way, since the logs, call entry points and tool deployments are all pre-defined specifications, only code based on different functions needs to be provided, thereby improving the efficiency of the functional code and thus improving the efficiency of generating the installation package.

[0136] Optionally, in the above Figure 3 Based on the corresponding embodiments, in an optional embodiment of the installation package generation method provided in this application, after the installation of the target tool is completed, the installation package generation method further includes:

[0137] The first function call instruction is obtained through the first command entry point, wherein the first function call instruction includes the first function parameter, and the first function parameter uniquely indicates the first function;

[0138] The first function is determined based on the first function parameters;

[0139] The first function is executed by calling the function of the first function through the first command entry point.

[0140] In this embodiment, after the terminal device completes the installation of the target tool, it obtains a first function call instruction through a first command entry point. The first function call instruction includes a first function parameter, which uniquely indicates the first function. Therefore, the terminal device can determine the first function based on the first function parameter and call the function of the first function through the first command entry point to execute the first function. For example, if the first function is associated with the first function parameter "1", and the second function is associated with the second function parameter "2", then when the first function call instruction includes the first function parameter "1", the first function can be determined based on the aforementioned association.

[0141] Specifically, the terminal device calls the function of the first function through the first command entry point. The specific logic mainly involves preprocessing and transmitting the parameters of the first function to the function code that executes the first function. For example:

[0142]

[0143] The "bash${AKTOOLS_DAWN} / update.sh$@#" in the aforementioned code can actually call the first function code to execute the first function.

[0144] In this embodiment of the application, a method is provided to execute the function of a target tool required by the user. In this way, the function call instruction is received directly through the command entry, and the function to be called is determined based on the function parameters carried by the function call instruction. Thus, the command entry that receives the function call instruction calls the function corresponding to the function, thereby completing the execution of the required function and improving the feasibility of this solution.

[0145] Optionally, in the above Figure 3 Based on the corresponding embodiments, in an optional embodiment of the method for generating an installation package provided in this application, the first entry identifier uniquely indicates the first command entry, and the second entry identifier uniquely indicates the second command entry;

[0146] After the target tool is installed, the methods for generating the installation package also include:

[0147] The second function call instruction is obtained through the main entry point. The first function call instruction includes the second entry point identifier and the first function parameter, and the first function parameter uniquely indicates the first function.

[0148] The second command entry is determined based on the second entry identifier;

[0149] The first function is determined based on the first function parameters;

[0150] The first function is called through the second command entry point to complete the first function.

[0151] In this embodiment, the first entry identifier uniquely indicates the first command entry, and the second entry identifier uniquely indicates the second command entry. For example, the first entry identifier "A" uniquely indicates the first command entry, and the second entry identifier "B" uniquely indicates the second command entry. Based on this, after the terminal device completes the installation of the target tool, it obtains the second function call instruction through the main entry. At this time, the first function call instruction includes the second entry identifier and the first function parameter, and the first function parameter uniquely indicates the first function. Therefore, the terminal device can determine the second command entry based on the second entry identifier. Taking the aforementioned embodiment as an example, if the second function call instruction includes the second entry identifier "B", it is determined that a function needs to be called through the second command entry. Similar to the aforementioned embodiment, the specific first function to be executed is determined based on the first function parameter, and the function of the first function is called through the second command entry to complete the first function.

[0152] For example, the second function call command is "aktool dawn update / tmp / demo.tgz". This second function call command includes "aktool dawn", which is the second entry identifier, and "update" is the first function parameter. The specific implementation code is as follows:

[0153]

[0154] As can be seen from the code above, "aktool dawn" specifies the command entry point, and "update" specifies which function to use for processing within the command entry point.

[0155] Furthermore, the specific function of the main function in the above code is to specify the corresponding function based on the function parameters and pass the function parameters to the corresponding function. The specific implementation code is as follows:

[0156]

[0157] Furthermore, in a similar manner to the aforementioned embodiments, the function of the first function is called through the second command entry point. The specific logic mainly involves preprocessing and transmitting the parameters of the first function to the function code that executes the first function.

[0158] In this application embodiment, another method for executing the function of the target tool required by the user is provided. In the above manner, the function call instruction is received directly through the main entry point. The function parameters carried by the call instruction determine the function to be called this time, and the command entry point that can execute the function is determined based on the entry point identifier, which improves the efficiency of command entry point determination. Furthermore, the command entry point calls the function corresponding to the function, thereby completing the execution of the required function and improving the feasibility of this solution.

[0159] Based on the foregoing embodiments, the specific methods for executing the functions of the target tool required by the user are described in detail below. Two methods will be briefly described below; please refer to [link / reference needed]. Figure 11 , Figure 11 A schematic diagram of the execution flow of a function call instruction provided in an embodiment of this application is shown below. Figure 11 As shown, in step G1, after the terminal device completes the installation of the target tool, it obtains a first function call instruction through the first command entry. The first function call instruction includes a first function identifier, which uniquely indicates the first function. Thus, in step G2, the terminal device determines the first function based on the first function identifier included in the first function call instruction. In step G3, the terminal device calls the function of the first function through the first command entry to execute the first function.

[0160] Secondly, in step G4, if the terminal device obtains a second function call instruction through the main entry point, and the first function call instruction includes a second entry identifier and a first function identifier, where the first function identifier uniquely indicates the first function, the first entry identifier uniquely indicates the first command entry point, and the second entry identifier uniquely indicates the second command entry point, then in step G5, the terminal device can determine the second command entry point based on the second entry identifier, and in step G6, it can determine the first function based on the first function identifier. This allows the terminal device to call the function of the first function through the second command entry point in step G7 to complete the first function. It should be understood that in step G8, regardless of which of the above processes is used to execute the first function, a corresponding log will be stored during the execution of the first function. The specific method is similar to that described in the previous embodiments and will not be repeated here.

[0161] The above describes the generation, installation, and execution of the installation package in the embodiments of this application. The installation package generation device in the embodiments of this application will be described below. Figure 12 This is a schematic diagram of an installation package generation device provided in an embodiment of this application, as shown below. Figure 12 As shown, the installation package generation device 1200 includes:

[0162] The determining module 1201 is used to determine a first storage directory, wherein the first storage directory includes a directory storing the software management package of the target tool;

[0163] The acquisition module 1202 is used to acquire a first software management package set for a first system architecture and a second software management package set for a second system architecture. The first software management package set includes multiple first software management packages running under the first system architecture, and different first software management packages are used to perform different functions. The second software package set includes multiple second software packages running under the second system architecture, and different second software packages are used to perform different functions.

[0164] The determination module 1201 is also used to determine the target function of the target tool, wherein the target function includes a first function and a second function;

[0165] The determining module 1201 is further configured to determine a first target software management package from a first software management package set and a second target software management package from a second software management package set based on the target function, wherein the first target software management package includes a first software management package for performing a first function and a first software management package for performing a second function, and the second target software management package includes a second software management package for performing a first function and a second software management package for performing a second function;

[0166] The generation module 1203 is used to generate a target installation package of the target tool based on the first storage directory, the first target software management package, and the second target software management package, wherein the target installation package includes the first storage directory, the first target software management package, and the second target software management package.

[0167] Optionally, in the above Figure 12 Based on the corresponding embodiments, in another embodiment of the installation package generation device 1200 provided in this application, the installation package generation device 1200 further includes a processing module 1204;

[0168] The first storage directory also includes the target installation directory for the target tool and the directory for the installation script of the target tool. The target installation package also includes the installation script of the target tool.

[0169] The processing module 1204 is used to decode the target installation package after the generation module 1203 generates the target installation package of the target tool based on the first storage directory, the first target software management package, and the second target software management package, and to store the installation script of the target tool, the first target software management package, and the second target software management package in the target installation directory of the target tool.

[0170] The acquisition module 1202 is also used to acquire the target system architecture, wherein the target system architecture is either the first system architecture or the second system architecture;

[0171] The determination module 1201 is also used to determine a third target software management package from the first target software management package and the second target software management package based on the target system architecture, wherein the third target software management package is a software management package that runs under the target system architecture;

[0172] The processing module 1204 is also used to perform installation processing on the target tool in the first storage directory based on the third target software management package and the installation script of the target tool, so as to complete the installation of the target tool. After the target tool is installed, the installation script of the target tool is stored in the directory storing the installation script of the target tool, and the third target software management package is stored in the directory storing the software management package of the target tool.

[0173] Optionally, in the above Figure 12 Based on the corresponding embodiments, in another embodiment of the installation package generation device 1200 provided in this application, the first storage directory further includes a directory storing the configuration file of the target tool, and the target installation package further includes the configuration file of the target tool;

[0174] The processing module 1204 is specifically used to decode the target installation package and store the obtained target tool installation script, target tool configuration file, first target software management package and second target software management package in the target installation directory of the target tool.

[0175] The processing module 1204 is specifically used to store the configuration file of the target tool in the directory where the configuration file of the target tool is stored, and to perform the installation process in the first storage directory based on the third target software management package and the installation script of the target tool, so as to complete the installation of the target tool.

[0176] Optionally, in the above Figure 12 Based on the corresponding embodiments, in another embodiment of the installation package generation device 1200 provided in this application, the first storage directory further includes a directory storing the configuration file of the target tool, and the target installation package further includes the configuration file of the target tool;

[0177] The determination module 1201 is also used to detect the directory where the configuration file of the target tool is stored, and to determine that a first configuration file of the target tool exists, wherein the first configuration file is obtained by modifying the configuration file of the target tool;

[0178] The processing module 1204 is also used to copy the first configuration file in the directory where the configuration files of the target tool are stored, to obtain the first configuration file;

[0179] The processing module 1204 is specifically used to store the first configuration file in the directory storing the configuration file of the target tool, and based on the third target software management package, to perform installation processing in the first storage directory through the installation script of the target tool to complete the installation of the target tool.

[0180] Optionally, in the above Figure 12 Based on the corresponding embodiments, in another embodiment of the installation package generation device 1200 provided in this application, the installation package generation device 1200 further includes a creation module 1205;

[0181] Create module 1205 to create the association between target function and target function parameters. The target function parameters include a first function parameter and a second function parameter. The association includes the association between the first function and the first function parameter, and the association between the second function and the second function parameter.

[0182] The processing module 1204 is also used to distribute the target function to obtain a main entry point, wherein the main entry point indicates multiple command entry points, including a first command entry point for executing the first function, and a second command entry point for executing both the first function and the second function.

[0183] The generation module 1203 is specifically used to generate a target installation package for the target tool based on the first storage directory, the association relationship, the main entry point, the first target software management package, and the second target software management package.

[0184] Optionally, in the above Figure 12 Based on the corresponding embodiments, in another embodiment of the installation package generation device 1200 provided in this application, the installation package generation device 1200 further includes a calling module 1206;

[0185] The acquisition module 1202 is also used to acquire a first function call instruction through a first command entry after the processing module 1204 has completed the installation of the target tool. The first function call instruction includes a first function parameter, and the first function parameter uniquely indicates the first function.

[0186] The determining module 1201 is also used to determine the first function based on the first function parameters;

[0187] Module 1206 is used to call the function of the first function through the first command entry point to execute the first function.

[0188] Optionally, in the above Figure 12 Based on the corresponding embodiments, in another embodiment of the installation package generation device 1200 provided in this application, the first entry identifier uniquely indicates the first command entry, and the second entry identifier uniquely indicates the second command entry;

[0189] The acquisition module 1202 is also used to acquire a second function call instruction through the main entry point after the processing module 1204 completes the installation of the target tool. The first function call instruction includes a second entry point identifier and a first function parameter, and the first function parameter uniquely indicates the first function.

[0190] The determining module 1201 is also used to determine the second command entry based on the second entry identifier;

[0191] The determining module 1201 is also used to determine the first function based on the first function parameters;

[0192] Module 1206 is also used to call the function of the first function through the second command entry point to complete the first function.

[0193] This application also provides another installation package generation device. These devices can be deployed on servers or terminal devices. This application uses a server-based installation package generation device as an example for explanation. Please refer to [link to relevant documentation]. Figure 13 , Figure 13This is a schematic diagram of one embodiment of the server in this application. As shown in the figure, the server 1000 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1022 (e.g., one or more processors) and memory 1032, and one or more storage media 1030 (e.g., one or more mass storage devices) for storing application programs 1042 or data 1044. The memory 1032 and storage media 1030 can be temporary or persistent storage. The program stored in the storage media 1030 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the CPU 1022 may be configured to communicate with the storage media 1030 and execute the series of instruction operations in the storage media 1030 on the server 1000.

[0194] Server 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input / output interfaces 1058, and / or one or more operating systems 1041, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.

[0195] The steps performed by the server in the above embodiments can be based on this Figure 13 The server structure shown.

[0196] The server includes 1022 CPUs used for performing tasks such as... Figure 3 The illustrated embodiments and Figure 3 The corresponding embodiments.

[0197] This application also provides a terminal device, such as Figure 13 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The following explanation uses a mobile phone as an example of a terminal device:

[0198] Figure 14 This is a block diagram illustrating a portion of the structure of a mobile phone related to the terminal provided in the embodiments of this application. (Reference) Figure 14The mobile phone includes components such as a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, a processor 1180, and a power supply 1190. Those skilled in the art will understand that... Figure 14 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0199] The following is combined Figure 14 A detailed introduction to each component of a mobile phone:

[0200] RF circuit 1110 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 1180; additionally, it transmits uplink data to the base station. Typically, RF circuit 1110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 1110 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0201] The memory 1120 can be used to store software programs and modules. The processor 1180 executes various functions and data processing of the mobile phone by running the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0202] The input unit 1130 can be used to receive input numerical or character information, and to generate key signal inputs related to the object settings and function control of the mobile phone. Specifically, the input unit 1130 may include a touch panel 1131 and other input devices 1132. The touch panel 1131, also known as a touch screen, can collect touch operations on or near the object (such as operations performed by the object using a finger, stylus, or any suitable object or accessory on or near the touch panel 1131), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1131 may include two parts: a touch detection device and a touch controller. The touch detection device detects the touch position of the object and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1180, and can also receive and execute commands sent by the processor 1180. In addition, the touch panel 1131 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1131, the input unit 1130 may also include other input devices 1132. Specifically, other input devices 1132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0203] Display unit 1140 can be used to display information input by an object or information provided to an object, as well as various menus of the mobile phone. Display unit 1140 may include display panel 1141, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 1141. Further, touch panel 1131 may cover display panel 1141. When touch panel 1131 detects a touch operation on or near it, it transmits the information to processor 1180 to determine the type of touch event. Subsequently, processor 1180 provides corresponding visual output on display panel 1141 based on the type of touch event. Although in Figure 14 In this embodiment, the touch panel 1131 and the display panel 1141 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1131 and the display panel 1141 can be integrated to realize the input and output functions of the mobile phone.

[0204] The mobile phone may also include at least one sensor 1150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1141 according to the ambient light level, and the proximity sensor can turn off the display panel 1141 and / or the backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, are not described in detail here.

[0205] Audio circuit 1160, speaker 1161, and microphone 1162 provide an audio interface between the device and the mobile phone. Audio circuit 1160 converts received audio data into electrical signals and transmits them to speaker 1161, where speaker 1161 converts them into sound signals for output. On the other hand, microphone 1162 converts collected sound signals into electrical signals, which are received by audio circuit 1160, converted into audio data, and then processed by processor 1180 before being transmitted via RF circuit 1110 to, for example, another mobile phone, or the audio data can be output to memory 1120 for further processing.

[0206] WiFi is a short-range wireless transmission technology. A mobile phone using the WiFi module 1170 can help users send and receive emails, browse web pages, and access streaming media, providing them with wireless broadband internet access. Although Figure 14 WiFi module 1170 is shown, but it is understood that it is not an essential component of a mobile phone.

[0207] The processor 1180 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 1120, and calls data stored in the memory 1120 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1180.

[0208] The mobile phone also includes a power supply 1190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1180 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0209] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be elaborated here.

[0210] In this embodiment of the application, the processor 1180 included in the terminal is used to perform, for example... Figure 3 The illustrated embodiments and Figure 3 The corresponding embodiments.

[0211] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the aforementioned actions. Figure 3 The steps performed by the terminal device in the method described in the illustrated embodiment.

[0212] This application also provides a computer program product including a program, which, when run on a computer, causes the computer to perform the aforementioned actions. Figure 3 The steps performed by the terminal device in the method described in the illustrated embodiment.

[0213] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0214] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, at least two units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0215] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across at least two network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0216] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0217] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0218] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for generating an installation package, characterized in that, include: A first storage directory is determined, wherein the first storage directory includes a directory that stores the software management package of the target tool; Obtain a first software management package set for a first system architecture and a second software management package set for a second system architecture. The first software management package set includes multiple first software management packages running under the first system architecture, with different first software management packages used to perform different functions. The second software management package set includes multiple second software packages running under the second system architecture, with different second software packages used to perform different functions. Determine the target function of the target tool, wherein the target function includes a first function and a second function; Based on the target function, a first target software management package is determined from the first software management package set, and a second target software management package is determined from the second software management package set, wherein the first target software management package includes a first software management package for performing the first function and a first software management package for performing the second function, and the second target software management package includes a second software management package for performing the first function and a second software management package for performing the second function; A target installation package for the target tool is generated based on the first storage directory, the first target software management package, and the second target software management package, wherein the target installation package includes the first storage directory, the first target software management package, and the second target software management package.

2. The method according to claim 1, characterized in that, The first storage directory also includes the target installation directory of the storage target tool and the directory of the installation script of the storage target tool, and the target installation package also includes the installation script of the target tool; After generating the target installation package of the target tool based on the first storage directory, the first target software management package, and the second target software management package, the method further includes: The target installation package is decoded, and the installation script of the target tool, the first target software management package, and the second target software management package are stored in the target installation directory of the target tool. Obtain the target system architecture, wherein the target system architecture is either the first system architecture or the second system architecture; Based on the target system architecture, a third target software management package is determined from the first target software management package and the second target software management package, wherein the third target software management package is a software management package that runs under the target system architecture; Based on the third target software management package, the target tool is installed in the first storage directory using the installation script of the target tool to complete the installation of the target tool. After the target tool is installed, the installation script of the target tool is stored in the directory storing the installation script of the target tool, and the third target software management package is stored in the directory storing the software management package of the target tool.

3. The method according to claim 2, characterized in that, The first storage directory also includes a directory for storing the configuration files of the target tool, and the target installation package also includes the configuration files of the target tool; The step of decoding the target installation package and storing the resulting installation script for the target tool, the first target software management package, and the second target software management package in the target installation directory of the storage target tool includes: The target installation package is decoded, and the resulting installation script of the target tool, the configuration file of the target tool, the first target software management package, and the second target software management package are stored in the target installation directory of the target tool. The installation of the target tool, based on the third target software management package and using the target tool's installation script in the first storage directory, includes the following steps: The configuration file of the target tool is stored in the directory containing the configuration file of the target tool, and the installation process of the target tool is performed in the first storage directory based on the third target software management package and the installation script of the target tool to complete the installation of the target tool.

4. The method according to claim 2, characterized in that, The first storage directory also includes a directory for storing the configuration files of the target tool, and the target installation package also includes the configuration files of the target tool; The method further includes: The directory containing the configuration files of the target tool is checked to determine the existence of a first configuration file for the target tool, wherein the first configuration file is obtained by modifying the configuration file of the target tool. The first configuration file in the directory of the storage target tool's configuration files is copied to obtain the first configuration file; The installation of the target tool, based on the third target software management package and using the target tool's installation script in the first storage directory, includes the following steps: The first configuration file is stored in the directory of the configuration file of the target tool, and the installation process of the target tool is performed in the first storage directory based on the third target software management package and the installation script of the target tool to complete the installation of the target tool.

5. The method according to claim 2, characterized in that, The method further includes: Create an association between the target function and the target function parameters, wherein the target function parameters include a first function parameter and a second function parameter, and the association includes the association between the first function and the first function parameter, and the association between the second function and the second function parameter; The target function is distributed to obtain a main entry point, wherein the main entry point indicates multiple command entry points, including a first command entry point for executing the first function, and a second command entry point for executing both the first function and the second function; The process of generating the target installation package for the target tool based on the first storage directory, the first target software management package, and the second target software management package includes: The target installation package of the target tool is generated based on the first storage directory, the association relationship, the main entry point, the first target software management package, and the second target software management package.

6. The method according to claim 5, characterized in that, After the installation of the target tool is completed, the method further includes: A first function call instruction is obtained through the first command entry, wherein the first function call instruction includes a first function parameter, and the first function parameter uniquely indicates the first function. The first function is determined based on the first function parameters; The first function is executed by calling its function through the first command entry point.

7. The method according to claim 5, characterized in that, The first entry identifier uniquely indicates the first command entry, and the second entry identifier uniquely indicates the second command entry; After the installation of the target tool is completed, the method further includes: The second function call instruction is obtained through the main entry point, wherein the first function call instruction includes the second entry point identifier and the first function parameter, and the first function parameter uniquely indicates the first function; The second command entry is determined based on the second entry identifier; The first function is determined based on the first function parameters; The first function is invoked through the second command entry point to complete the first function.

8. An installation package generation apparatus, characterized in that, The installation package generation device includes: A determining module is used to determine a first storage directory, wherein the first storage directory includes a directory storing the software management package of the target tool; The acquisition module is used to acquire a first software management package set for a first system architecture and a second software management package set for a second system architecture. The first software management package set includes multiple first software management packages running under the first system architecture, and different first software management packages are used to perform different functions. The second software package set includes multiple second software packages running under the second system architecture, and different second software packages are used to perform different functions. The determining module is further configured to determine the target function of the target tool, wherein the target function includes a first function and a second function; The determining module is further configured to determine a first target software management package from the first software management package set and a second target software management package from the second software management package set based on the target function, wherein the first target software management package includes a first software management package for performing the first function and a first software management package for performing the second function, and the second target software management package includes a second software management package for performing the first function and a second software management package for performing the second function; A generation module is used to generate a target installation package for the target tool based on the first storage directory, the first target software management package, and the second target software management package, wherein the target installation package includes the first storage directory, the first target software management package, and the second target software management package.

9. A computer device, characterized in that, include: Memory, transceiver, processor, and bus system; The memory is used to store programs; The processor is used to execute the program in the memory to implement the method of any one of claims 1 to 7; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.

10. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method as claimed in any one of claims 1 to 7.