CN116028099A - Method for generating installation package, related device, equipment and storage medium - Google Patents

Method for generating installation package, related device, equipment and storage medium Download PDF

Info

Publication number
CN116028099A
CN116028099A CN202111242597.7A CN202111242597A CN116028099A CN 116028099 A CN116028099 A CN 116028099A CN 202111242597 A CN202111242597 A CN 202111242597A CN 116028099 A CN116028099 A CN 116028099A
Authority
CN
China
Prior art keywords
target
software management
function
package
installation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111242597.7A
Other languages
Chinese (zh)
Inventor
刘子哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111242597.7A priority Critical patent/CN116028099A/en
Publication of CN116028099A publication Critical patent/CN116028099A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a method for generating an installation package, and a related device, equipment and storage medium, comprising the following steps: determining a first storage directory; acquiring 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 set of software management packages and a second target software management package from the second set of software management packages based on the target 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. By the method, the target software management package capable of executing the target function of the target tool can be determined in the software management package set of different system architectures, the target installation package generated by the method can be adapted to different system frameworks, and a large amount of manual repeatability is not needed for operation, so that the generation efficiency of the installation package is improved.

Description

Method for generating installation package, related device, equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method for generating an installation package, and related devices, apparatuses, and storage media.
Background
With the popularity of mobile intelligent devices, a developer needs to develop an installation package for generating the tool for different system frameworks, and the generation of an installation package of a tool generally needs a great deal of manual repetitive work to perform operations such as compiling, linking, copying and copying a target file, and finally generating an installation package capable of installing the tool, so how to more efficiently generate an installation package adapted to multiple system frameworks is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a method for generating an installation package, a related device, equipment and a storage medium, wherein the method comprises the steps of determining a catalog of a software management package for storing a target tool and determining a target software management package capable of executing a target function of the target tool in a software management package set of different system architectures, so that the target installation package of the target tool is generated through the catalog of the software management package for storing the target tool and the target software management package, and therefore the target installation package can adapt to different system frameworks, does not need a large amount of manual repeatability for operation, and can enable the installed target tool to execute the function only by storing codes corresponding to the function in the storage catalog, thereby improving the generation efficiency of the installation package.
In view of this, a first aspect of the present application provides a method of installation package generation, including:
determining a first storage directory, wherein the first storage directory includes a directory storing a software management package of the target tool;
acquiring a first software management package set of a first system architecture and a second software management package set of a second system architecture, wherein the first software management package set comprises a plurality of first software management packages running under the first system architecture, different first software management packages are used for executing different functions, and the second software management package set comprises a plurality of second software management packages running under the second system architecture, different second software management packages are used for executing different functions;
determining a target function of a target tool, wherein the target function comprises a first function and a second function;
determining a first target software management package from a first set of software management packages and a second target software management package from a second set of software management packages based on the target function, wherein the first target software management package comprises a first software management package for executing the first function and a first software management package for executing the second function, and the second target software management package comprises a second software management package for executing the first function and a second software management package for executing the second function;
And generating a target installation package of the target tool based on the first storage catalog, the first target software management package and the second target software management package, wherein the target installation package comprises the first storage catalog, the first target software management package and the second target software management package.
A second aspect of the present application provides an installation package generating apparatus, including:
a determining module configured to determine a first storage directory, wherein the first storage directory includes a directory storing a software management package of a target tool;
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring a first software management package set of a first system architecture and a second software management package set of a second system architecture, the first software management package set comprises a plurality of first software management packages running under the first system architecture, different first software management packages are used for executing different functions, the second software management package set comprises a plurality of second software management packages running under the second system architecture, and different second software management packages are used for executing different functions;
the determining module is further used for determining a target function of the target tool, wherein the target function comprises a first function and a second function;
a determining module, configured to determine a first target software management package from a first set of software management packages and a second target software management package from a second set of software management packages based on the target function, where 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;
The generating module is used for generating a target installation package of the target tool based on the first storage catalog, the first target software management package and the second target software management package, wherein the target installation package comprises the first storage catalog, the first target software management package and the second target software management package.
In one possible embodiment, the installation package generating device further includes a processing module;
the first storage catalog also comprises a target installation catalog for storing the target tool and a catalog for storing an installation script of the target tool, and the target installation package also comprises the installation script of the target tool;
the processing module is used for decoding the target installation package after the generating module generates the target installation package of the target tool based on the first storage catalog, the first target software management package and the second target software management package, and storing the obtained installation script of the target tool, the first target software management package and the second target software management package in the target installation catalog of the storage target tool;
the system comprises an acquisition module, a target system architecture, a control module and a control module, wherein the acquisition module is also used for acquiring the target system architecture, and the target system architecture is any one of a first system architecture or a second system architecture;
the determining module is further used for determining 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 running under the target system architecture;
The processing module is further used for performing installation processing on the first storage catalog through the installation script of the target tool based on the third target software management package so as to complete installation of the target tool, wherein the installation script of the target tool after the installation is completed is stored in the catalog storing the installation script of the target tool, and the third target software management package is stored in the catalog storing the software management package of the target tool.
In one possible embodiment, the first storage directory further includes a directory storing configuration files of the target tool, and the target installation package further includes configuration files of the target tool;
the processing module is specifically used for decoding the target installation package, and storing the obtained 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 under the target installation directory of the target tool;
the processing module is specifically configured to store the configuration file of the target tool in a directory storing the configuration file of the target tool, and perform installation processing on the first storage directory through an installation script of the target tool based on the third target software management package, so as to complete installation of the target tool.
In one possible embodiment, the first storage directory further includes a directory storing configuration files of the target tool, and the target installation package further includes configuration files of the target tool;
the determining module is further used for detecting a catalog storing the configuration file of the target tool and determining 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;
the processing module is also used for copying the first configuration file in the catalog of the configuration file of the storage target tool to obtain the first configuration file;
the processing module is specifically configured to store the first configuration file in a directory storing the configuration file of the target tool, and perform installation processing on the first storage directory through an installation script of the target tool based on the third target software management package, so as to complete installation of the target tool.
In one possible embodiment, the installation package generating device further includes a creation module;
the system comprises a creation module, a storage module and a storage module, wherein the creation module is used for creating an association relation between a target function and a target function parameter, the target function parameter comprises a first function parameter and a second function parameter, and the association relation comprises an association relation between the first function and the first function parameter and an association relation between the second function and the second function parameter;
The processing module is further used for carrying out distribution processing on the target function to obtain a total inlet, wherein the total inlet indicates a plurality of command inlets, and the command inlets comprise a first command inlet used for executing a first function and a second command inlet used for executing the first function and a second function;
the generation module is specifically configured to generate a target installation package of the target tool based on the first storage directory, the association relationship, the total entry, the first target software management package, and the second target software management package.
In one possible implementation manner, the installation package generating device further comprises a calling module;
the acquisition module is further used for acquiring a first function call instruction through the first command inlet after the processing module finishes the installation of the target tool, wherein the first function call instruction comprises a first function parameter, and the first function parameter uniquely indicates a first function;
the determining module is further used for determining a first function based on the first function parameter;
and the calling module is used for calling the function of the first function through the first command entry so as to execute the first function.
In one possible embodiment, the first portal identification uniquely indicates the first command portal and the second portal identification uniquely indicates the second command portal;
The acquisition module is further used for acquiring a second function call instruction through the main entrance after the processing module finishes the installation of the target tool, wherein the first function call instruction comprises a second entrance identifier and a first function parameter, and the first function parameter only indicates the first function;
the determining module is further used for determining a second command inlet based on the second inlet identification;
the determining module is further used for determining a first function based on the first function parameter;
and the calling module is also used for calling the function of the first function through the second command inlet so as to complete the first function.
A third aspect of the present application provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the above aspects.
An embodiment of the present application provides a computer device, including: memory, transceiver, processor, and bus system; wherein the memory is used for storing programs; the processor is used for executing the program in the memory to realize the method in the aspects; the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method described in the above aspects.
From the above technical solutions, the embodiments of the present application have the following advantages:
in an embodiment of the present application, a method for generating an installation package is provided, first determining a first storage directory, where the first storage directory includes a directory storing software management packages of a target tool, and then obtaining a first software management package set of a first system architecture and a second software management package set of a second system architecture, where the first software management package set includes a plurality of first software management packages running under the first system architecture, different first software management packages are used to execute different functions, and the second software management package set includes a plurality of second software management packages running under the second system architecture, different second software management packages are used to execute different functions. Based on this, the target function of the target tool is re-determined, the target function comprising a first function and a second function, and based on the target function, a first target software management package is determined from the first set of software management packages, the first target software management package comprising 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 comprising a second software management package for performing the first function and a second software management package for performing the second function, and finally a target installation package of the target tool is generated based on the first storage directory, the first target software management package and the second target software management package, the generated target installation package comprising the first storage directory, the first target software management package and the second target software management package. By the method, the obtained target installation package can be adapted to different system frameworks, a large amount of manual repeatability is not needed for operation, and the installed target tool can execute the function only by storing codes corresponding to the function in the storage catalog, so that the generation efficiency of the installation package is improved.
Drawings
FIG. 1 is an environmental schematic diagram of a method of installation package generation in an embodiment of the present application;
FIG. 2 is a schematic diagram of the basic capabilities of an installation package generation system framework provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of an embodiment of a method for generating an installation package according to an embodiment of the present application;
FIG. 4 is a schematic diagram of one embodiment of a first storage directory provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of another embodiment of a first storage directory according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an embodiment of a first target software management package and a second target software management package according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an embodiment of a catalog storing a configuration file of a target tool according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an embodiment of a first storage directory according to an embodiment of the present application;
FIG. 9 is a schematic flow chart of target tool installation according to an embodiment of the present application;
FIG. 10 is a schematic diagram of one embodiment of target tool code writing provided by embodiments of the present application;
FIG. 11 is a schematic diagram of an execution flow of a function call instruction according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an installation package generating device according to an embodiment of the present application;
FIG. 13 is a schematic diagram of an embodiment of a server according to an embodiment of the present application;
fig. 14 is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method for generating an installation package, a related device, equipment and a storage medium, wherein the method comprises the steps of determining a catalog of a software management package for storing a target tool and determining a target software management package capable of executing a target function of the target tool in a software management package set of different system architectures, so that the target installation package of the target tool is generated through the catalog of the software management package for storing the target tool and the target software management package, and therefore the target installation package can adapt to different system frameworks, does not need a large amount of manual repeatability for operation, and can enable the installed target tool to execute the function only by storing codes corresponding to the function in the storage catalog, thereby improving the generation efficiency of the installation package.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of operation in sequences other than those illustrated or described herein, for example. Furthermore, the terms "comprises," "comprising," and "includes" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
With the popularization of mobile intelligent devices, a developer needs to develop an installation package for generating the tool for different system frameworks, and the generation of the installation package of one tool usually needs a great deal of manual repetitive work to compile, link, copy and copy target files and the like, so that the installation package capable of installing the tool is finally generated, for example, the development of the tool is performed under a system without standard specifications, in order to meet the multiple functions of the tool, files with different functions in the installation package need to be encoded by multiple people, and the generation efficiency of the installation package is reduced due to different encoding specifications, log generation modes and the like, namely, the problem of how to more efficiently generate the installation package adapting to multiple system frameworks is needed to be solved. Based on this, the embodiment of the application provides a method for generating an installation package, which determines a target software management package capable of executing a target function of a target tool in a software management package set of different system architectures, so that the target installation package of the target tool is generated by storing a catalog of the software management package of the target tool and the target software management package, and therefore, the target installation package can adapt to different system frameworks, does not need a great deal of manual repeatability to operate, and can enable the installed target tool to execute the function only by storing codes corresponding to the function in the storage catalog, thereby improving the generation efficiency of the installation package.
The application scenario of the embodiment of the present application is described first. It will be appreciated that the method of installation package generation may be performed by the terminal device or by the server. When the method for generating the installation package is deployed on the terminal equipment, the terminal equipment obtains the first software management package set of the first system architecture and the second software management package set of the second system architecture from the local storage in an offline state, determines a first storage catalog based on specifications, and determines the target function of the target tool based on user requirements, so that the target installation package of the target tool is generated by the method for generating the installation package provided by the embodiment of the application, and then the target installation of the target tool is stored locally, so that the target installation of the target tool is directly obtained from the local storage address when the target tool needs to be installed, and the installation package generation and the installation of the target tool are completed, and the installation package generation process is more convenient. When the method for generating the installation package is deployed on the server, the server can determine a first storage catalog based on the specification, determine the target function of the target tool according to the user instruction, and then generate the target installation package of the target tool through the method for generating the installation package provided by the embodiment of the application, so that the efficiency of generating the installation package is improved, and based on the method, the server can store the generated target installation package of the target tool to each server node built based on cloud computing, so that when the terminal equipment needs to install the target tool, the target installation package of the target tool can be obtained from the connected server nodes.
The method for generating the installation package provided in the embodiment of the present application will be described below by taking a server as an execution body as an example. Referring to fig. 1, fig. 1 is an environmental schematic diagram of a method for generating an installation package in an embodiment of the present application, and as shown in fig. 1, the video processing system includes a server and a terminal device, a target installation package of a target tool generated at the server side, and a target installation package of the target tool installed at the terminal device side, so as to satisfy a target function of the target tool running at the terminal device side.
It should be noted that the server in fig. 1 may be a server cluster or a cloud computing center formed by one server or a plurality of servers, and the present invention is not limited thereto. The client is specifically deployed and the terminal device is a tablet computer, a notebook computer, a palm computer, a mobile phone, a vehicle-mounted terminal, a personal computer (personal computer, PC) and a voice interaction device shown in fig. 3. Wherein the terminal device and the server can communicate with each other through a wireless network, a wired network or a removable storage medium. Wherein the wireless network uses standard communication techniques and/or protocols. The wireless network is typically the internet, but may be any network including, but not limited to, bluetooth, a local area network (Local Area Network, LAN), a metropolitan area network (Metropolitan Area Network, MAN), a wide area network (Wide Area Network, WAN), a mobile, private network, or any combination of virtual private networks. In some embodiments, custom or dedicated data communication techniques may be used in place of or in addition to the data communication techniques described above. The removable storage medium may be a universal serial bus (Universal Serial Bus, USB) flash drive, a removable hard disk, or other removable storage medium, etc.
Although only five terminal devices and one server are shown in fig. 1, it should be understood that the example in fig. 1 is only for understanding the present solution, and the number of specific terminal devices and servers should be flexibly determined according to the actual situation.
Secondly, cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The cloud technology is based on the general names of network technology, information technology, integration technology, management platform technology, application technology and the like applied by the cloud computing business mode, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
The Database (Database), which can be considered as an electronic filing cabinet, is a place for storing electronic files, and users can perform operations such as adding, inquiring, updating, deleting and the like on the data in the files. A "database" is a collection of data stored together in a manner that can be shared with multiple users, with as little redundancy as possible, independent of the application.
The database management system (Database Management System, abbreviated as DBMS) is a computer software system designed for managing databases, and generally has basic functions of storage, interception, security, backup and the like. The database management system may classify according to the database model it supports, e.g., relational, XML (Extensible Markup Language ); or by the type of computer supported, e.g., server cluster, mobile phone; the server-generated installation packages of the target tools may be stored in a database based on this, so that when the terminal device needs to install the target tools, the installation packages of the target tools may be downloaded from the database.
Specifically, referring to fig. 2, fig. 2 is a schematic diagram of basic capabilities of an installation package generating system framework according to an embodiment of the present application, where, as shown in fig. 2, the basic capabilities of the installation package generating system framework include a configuration file specification, a dependent installation specification, an installation specification of a tool, and an upgrade specification, a unified log, a command access specification, a help prompt specification, and a code package access specification. Wherein, the configuration file specification and the contract specification which depends on the installation specification as a catalog are required to be complied with when a program developer generates a tool installation package. Because the installation and upgrade specifications of different tools are different, program developers need to know the installation and upgrade specifications of each tool, but are not considered when generating the tool installation package. Secondly, unifying the log, command access specification, help prompt specification and code package access specification into development specification, i.e. the specification for generating the tool installation package, and the program developer also needs to adhere when generating the tool installation package. The foregoing specifications are all preset for implementation based on different tool requirements and functional requirements and should not be construed as limiting the present application.
With reference to the foregoing description, taking an execution body as an example of a terminal device, a method for generating an installation package in the present application will be described with reference to fig. 3, and fig. 3 is a schematic diagram of an embodiment of a method for generating an installation package provided in an embodiment of the present application, where, as shown in fig. 3, the method includes:
301. a first storage directory is determined.
In this embodiment, the terminal device determines a first storage directory including a directory storing a software management package of the target tool. Specifically, in the case of satisfying the dependent installation specification described in fig. 2, it should be understood that, as known from fig. 2, the directory of the software management package for storing the target tool is also included in the configuration file specification, the command access specification, the help prompt specification, the code package access specification, etc., so that the first storage directory may also include the target installation directory for storing the target tool, the directory for storing the installation script of the target tool, the directory for storing the configuration file of the target tool, etc., that is, before the installation package for the target tool is generated, it is necessary to determine the directory in which a plurality of file data in the installation package are specifically stored, and satisfying the determined directory needs to satisfy the respective specifications described in fig. 2, and the specific directory is not limited herein.
302. A first set of software management packages for a first system architecture and a second set of software management packages for a second system architecture are obtained.
In this embodiment, since the program developer of the target tool is required to complete various functions and various requirements under different systems, the terminal device needs to obtain a first set of software management packages of the first system architecture and a second set of software management packages of the second system architecture, where the software management packages are packages of a software package manager (RPM, red-Hat Package Manager).
Specifically, the first set of software management packages includes a plurality of first software management packages running under a first system architecture, and the second set of software management packages includes a plurality of second software management packages running under a second system architecture. For example, the first system architecture is an iOS system, the second system architecture is an android system, and then a first software management package in the first set of software management packages is used to run under the iOS system, and a second software management package in the second set of software management packages is used to run under the android system. Alternatively, the first system architecture is an international technology (Advanced RISC Machines, ARM) system and the second system architecture is an x86 system, then a first software management package in the first set of software management packages is for operation under the ARM system and a second software management package in the second set of software management packages is for operation under the x86 system.
Second, the different first software management package is used to perform different functions, and the different second software management package is also used to perform different functions, for example, the first software management package 1 in the first software management package set is used to perform reading and writing of video data, the first software management package 2 is used to perform reading and writing of voice data, and so on. And the second software management package 1 in the second software management package set is used for executing reading and writing of text data, and the second software management package 2 is used for executing interface switching functions and the like. It should be appreciated that the specific functionality of each first software management package needs to be determined according to the actual situation of the system and the existing software management package provided, and thus the foregoing examples should not be construed as limiting the present application.
303. A target function of the target tool is determined.
In this embodiment, the terminal device determines a target function of the target tool, where the target function includes a first function and a second function. The first function and the second function are different functions, for example, the first function is an addition operation of a numerical value, and the second function is a subtraction operation of a numerical value, and it should be understood that, in practical applications, the target function of the target tool may further include a third function for a product operation of a numerical value, and a fourth function for a division operation of a numerical value. The specific definition of the target function of the target tool is not limited herein.
304. Based on the target function, a first target software management package is determined from the first set of software management packages and a second target software management package is determined from the second set of software management packages.
In this embodiment, the terminal device determines a first target software management package from the first set of software management packages and determines a second target software management package from the second set of software management packages based on the target function. Specifically, since the terminal device determines the target function of the determining target tool through step 303, and obtains the software management package capable of performing different functions under different system architectures in step 302, the terminal device needs to screen the first software management package for performing the first function and the first software management package for performing the second function from the first target software management package, thereby obtaining the first target software management package capable of performing the first function and the second function under the first system architecture. Similarly, the terminal device needs to screen out the second software management package for executing the first function from the second target software management package, and the second software management package for executing the second function, thereby obtaining the second target software management package capable of executing the first function and the second function under the second system architecture. The first target software management package thus comprises 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 comprises a second software management package for performing the first function and a second software management package for performing the second function.
305. 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.
In this embodiment, the terminal device generates 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, where the target installation package includes the first storage directory, the first target software management package, and the second target software management package. For example, referring to fig. 4, fig. 4 is a schematic diagram of one embodiment of a first storage directory provided in an embodiment of the present application, and as shown in fig. 4, A1 indicates a directory of software management packages of storage target tools in the first storage directory, A2 indicates a first target software management package, and A3 indicates a second target software management package.
In the embodiment of the application, the method for generating the installation package is provided, by the mode, the target software management package capable of executing the target function of the target tool is determined in the software management package set of different system architectures, and therefore the target installation package of the target tool is generated by storing the catalog of the software management package of the target tool and the target software management package, the target installation package can adapt to different system frameworks, and does not need a large amount of manual repeatability to operate, and only the codes corresponding to the functions are stored in the storage catalog, so that the installed target tool can execute the functions, and the generation efficiency of the installation package is improved.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the method for generating an installation package provided in the embodiment of the present application, the first storage directory further includes a target installation directory for storing a target tool and a directory for storing an installation script of the target tool, and the target installation package further includes an 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 of installation package generation further comprises:
decoding the target installation package, and storing the obtained installation script of the target tool, the first target software management package and the second target software management package under the target installation directory of the target tool;
acquiring a target system architecture, wherein the target system architecture is any one of a first system architecture or a second system architecture;
determining 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 running under the target system architecture;
and based on a third target software management package, performing installation processing on the first storage catalog through the installation script of the target tool to finish the installation of the target tool, wherein the installation script of the target tool after the installation of the target tool is finished is stored in the catalog storing the installation script of the target tool, and the third target software management package is stored in the catalog storing the software management package of the target tool.
In this embodiment, as can be seen from the foregoing embodiment, the first storage directory further includes a target installation directory storing the target tool and a directory storing an installation script of the target tool, and thus the obtained target installation package further includes the installation script of the target tool. Based on the above, 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 terminal device can execute the installation flow of the target tool, and first decodes the target installation package to obtain the first storage directory included in the target installation package, the installation script of the target tool, the first target software management package and the second target software management package, and because the first storage directory further includes the target installation directory for storing 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 under the target installation directory for storing the target tool. For ease of understanding, fig. 5 is a schematic diagram of another embodiment of the first storage directory provided in the embodiment of the present application, where, as shown in fig. 5, the first storage directory specifically includes a target installation directory for storing target tools, a directory for storing installation scripts of the target tools, and a directory for storing software management packages of the target tools.
Further, the terminal device obtains a target system architecture of the terminal device that needs to install the target tool, where the target system architecture may be a first system architecture or a second system architecture. And then the terminal equipment determines 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 running under the target system architecture. For example, if the target system architecture of the terminal device is an x86 system, and as known from the foregoing examples of embodiments, the second software management package in the second set of software management packages is used to operate under the x86 system, that is, the second software management package in the second target software management package is used to operate under the x86 system, so the second target software management package may be determined as the third target software management package.
For ease of understanding, fig. 6 is a schematic diagram of an embodiment of a first target software management package and a second target software management package provided in an embodiment of the present application, where, as shown in fig. 6, B1 indicates a first target software management package, and B2 indicates a second target software management package. Based on this, the environment is distinguished by the following code and a third target software management package is determined. The specific codes are as follows:
Figure BDA0003319750090000091
And then, the terminal equipment performs installation processing in the first storage catalog through the installation script of the target tool based on the third target software management package so as to complete the installation of the target tool, wherein the installation script of the target tool after the installation is completed is stored in the catalog storing the installation script of the target tool, and the third target software management package is stored in the catalog storing the software management package of the target tool.
Taking the directory structure of the first storage directory shown in fig. 5 as an example, a user who installs a target tool needs to manually execute a corresponding operation to execute a file of the copy. Sh under the TCE directory when installing the target tool. Further, since the first storage directory further includes a directory storing the installation script of the target tool, taking again the directory structure of the first storage directory shown in fig. 5 as an example, when the installation script of the target tool is executed, the core code is as follows:
cur_dir=$(cd$(dirname$0);pwd)
cd${cur_dir}
the purpose of the foregoing code is to prevent dependency on the directory of the executed installation script of the storage target tool when the installation script of the target tool is executed.
Finally, if the target tool is installed for the first time in the terminal device, the terminal device edits "-/. Bash_profile" and invokes (source) "-/. Bash_profile", so that the target tool can be invoked under any directory of the terminal device when being used, thereby completing the installation of the target tool. Specifically, after the terminal device executes the installation script of the target tool, a tool folder of the target tool is obtained, and the terminal device adds the obtained tool folder of the target tool to "-/. Bash_profile" and sources the tool folder of the target tool, so that a user can use the installed target tool under any directory of the terminal device. The core code of the foregoing steps is as follows:
echo"export PATH=\${PATH}:${bin}">>~/.bash_profile
source~/.bash_profile
In the embodiment of the application, the method for installing the target tool is provided, because the obtained target installation package can adapt to different system frameworks, the software management package suitable for the system framework of the terminal equipment is determined through the software management package in the target installation package, which is adaptive to the different system frameworks, in the process of installing the target tool, so that the reliability and the suitability of the installation of the target tool are ensured, and secondly, because the first storage catalog comprises catalogues for storing a plurality of different files and scripts, the corresponding files and scripts can be accurately stored under the corresponding target catalogues when the target tool is installed, and the accuracy and the feasibility of the installation of the target tool are ensured.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the method for generating an installation package provided in the embodiment of the present application, the first storage directory further includes a directory for storing a configuration file of a target tool, and the target installation package further includes a configuration file of the target tool;
decoding the target installation package, and storing the obtained installation script of the target tool, the first target software management package and the second target software management package under the target installation directory of the target tool, wherein the method specifically comprises the following steps:
Decoding the target installation package, and storing the obtained 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 a target installation directory of the target tool;
based on a third target software management package, performing installation processing on the first storage catalog through an installation script of the target tool to complete installation of the target tool, wherein the method comprises the following steps:
and storing the configuration file of the target tool in a catalog storing the configuration file of the target tool, and performing installation processing on the first storage catalog through an installation script of the target tool based on a third target software management package so as to complete the installation of the target tool.
In this embodiment, the first storage directory further includes a directory storing a configuration file of the target tool, and the target installation package further includes a configuration file of the target tool. Illustratively, fig. 7 is a schematic diagram of an embodiment of a directory for storing a configuration file of a target tool according to an embodiment of the present application, and as shown in fig. 7, C1 is indicated as a directory for storing a configuration file of a target tool, where the target C1 is preset in a case of meeting the configuration file specification introduced in fig. 2.
The present embodiment provides a scenario that the terminal device on which the target tool is to be installed does not install the target tool, or the terminal device does not store the configuration file of the target tool in the terminal device, based on which the terminal device decodes the target installation package, and on the basis of obtaining the first storage directory, the installation script of the target tool, the first target software management package, and the second target software management package, the configuration file of the target tool can also be obtained, so that the configuration file of the target tool also needs to be stored in the target installation directory storing the target tool. Based on the configuration file, the terminal equipment specifically stores the configuration file of the target tool in a catalog storing the configuration file of the target tool, and then installs the target tool in the first storage catalog through an installation script of the target tool based on the third target software management package, so as to complete the installation of the target tool.
Illustratively, fig. 8 is a schematic diagram of an embodiment of a first storage directory provided in an embodiment of the present application, where, as shown in fig. 8, D1 indicates a directory for storing a configuration file of a target tool, D2 indicates a software directory including a directory of a software management package of the target tool, and D3 indicates a directory for storing an installation script of the target tool. It should be understood that the examples of fig. 7 and 8 are only for understanding the first storage directory, and the foregoing examples should not be taken as limiting the present solution.
In the embodiment of the application, another method for installing the target tool is provided, by the mode, the configuration file is stored under the catalog storing the configuration file of the target tool when the target tool is installed, and the catalog meets the configuration file specification, so that the target tool can be ensured to accurately call the configuration file when the target tool is used, and the installation and use reliability of the target tool are ensured.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the method for generating an installation package provided in the embodiment of the present application, the first storage directory further includes a directory for storing a configuration file of a target tool, and the target installation package further includes a configuration file of the target tool;
the method for generating the installation package further comprises the following steps:
detecting a catalog storing configuration files of the target tool, and determining 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;
copying the first configuration file in the catalog of the configuration file of the storage target tool to obtain the first configuration file;
based on a third target software management package, performing installation processing on the first storage catalog through an installation script of the target tool to finish the installation of the target tool, wherein the method specifically comprises the following steps:
And storing the first configuration file in a catalog storing the configuration file of the target tool, and performing installation processing on the first storage catalog through an installation script of the target tool based on a third target software management package so as to complete the installation of the target tool.
In this embodiment, the first storage directory further includes a directory storing a configuration file of the target tool, and the target installation package further includes a configuration file of the target tool, which is specifically similar to the schematic diagram of the directory storing the configuration file of the target tool shown in fig. 7, and will not be described herein. Secondly, the present embodiment provides a scenario that the terminal device on which the target tool needs to be installed performs installation of the target tool, or upgrades the target tool this time, or the configuration file of the target tool is stored in the terminal device, because each user may have different configuration requirements on the same tool, in the process of reinstalling the target tool, the original configuration file needs to be copied and stored, so as to ensure that the configuration file of the installed target tool is the original configuration file.
Based on this, the terminal device needs to detect the directory storing the configuration file of the target tool first, and determine that the first configuration file of the target tool exists, where the first configuration file is obtained after the configuration file of the target tool is modified, that is, the first configuration file is adjusted by the user based on the actual requirement, and the level first configuration file may be a configuration file for user definition. Thus, the terminal device copies the first configuration file in the catalog of the configuration file of the storage target tool to obtain the first configuration file, and stores the first configuration file. Further, in the process of executing the installation script of the target tool, the obtained first configuration file is stored in a directory storing the configuration file of the target tool, and the configuration file included in the target tool is deleted, so that the installation process is performed on the first storage directory through the installation script of the target tool based on the third target software management package in a similar manner based on the foregoing embodiment, so as to complete the installation of the target tool, which is not described herein in detail.
In the embodiment of the application, another method for installing the target tool is provided, by the method, whether the user-defined or modified configuration file exists is detected when the target tool is installed, and the configuration file obtained from the tool kit is copied, saved and deleted when the user-defined or modified configuration file exists, so that the configuration file of the target tool which is reinstalled can accurately meet the requirements of the user, and the reliability and the practicability of the installation of the target tool are improved.
In step E1, as shown in fig. 9, since the target installation package of the target tool is generated in the manner based on the foregoing embodiment, when the terminal device needs to install the target tool, the target installation package is first decoded to obtain the first storage directory, the configuration file of the target tool, the installation script of the target tool, the first target software management package and the second target software management package, and the files are stored under the target installation directory of the storage target tool included in the first storage directory. In step E2, since the first storage directory includes a directory of the installation script of the storage target tool, the directory of the installation script of the storage target tool can be determined based on the decoded first storage directory.
Further, in step E3, it is determined whether a first configuration file exists, where the first configuration file is obtained by modifying a configuration file of the target tool, that is, the first configuration file may be obtained by modifying a configuration file in a user-defined manner. Specifically, since the first storage directory includes a directory storing the configuration file of the target tool, the terminal device detects the first configuration file under the directory storing the configuration file of the target tool, determines yes, and performs step E4. Otherwise, if the terminal device does not detect the first configuration file under the directory storing the configuration file of the target tool, determining whether the first configuration file is not detected, and executing the step E5.
In step E4, the first configuration file in the directory storing the configuration file of the target tool is copied to obtain the first configuration file, and then step E5 is performed. The target system architecture is obtained through the 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 through the step E5 through the step E6. At this time, if the determination in step E3 is yes, step E4 is executed, step E7 is executed, and if the determination in step E3 is no, step E4 is not executed, step E8 is executed.
In step E7, the terminal device stores the copied first configuration file in a directory storing the configuration file of the target tool, and performs installation processing in the first storage directory through an installation script of the target tool based on the third target software management package, so as to complete installation of the target tool. In step E8, the terminal device stores the configuration file of the target tool obtained by decoding in a directory storing the configuration file of the target tool, and performs an installation process on the first storage directory through an installation script of the target tool based on the third target software management package, so as to complete the installation of the target tool. It should be understood that the specific implementation of the foregoing steps is described in the foregoing examples, and thus is not described herein in detail. Second, the flow embodiment of fig. 9 is only for understanding how the flow of target tool installation is performed in the present solution, and should not be construed as limiting the present solution.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the method for generating an installation package provided in the embodiment of the present application, the method for generating an installation package further includes:
creating an association relation between a target function and a target function parameter, wherein the target function parameter comprises a first function parameter and a second function parameter, and the association relation comprises an association relation between the first function and the first function parameter and an association relation between the second function and the second function parameter;
Distributing the target function to obtain a total inlet, wherein the total inlet indicates a plurality of command inlets, and the plurality of command inlets comprise a first command inlet for executing a first function and a second command inlet for executing the first function and a second function;
generating a target installation package of the target tool based on the first storage catalog, the first target software management package and the second target software management package, specifically comprising:
a target installation package of the target tool is generated based on the first storage directory, the association, the total portal, the first target software management package, and the second target software management package.
In this embodiment, in the process of generating the target installation package of the target tool, the terminal device may also be configured to create an association relationship between the target function and the target function parameter, where the target function parameter includes a first function parameter and a second function parameter, and the association relationship includes an association relationship between the first function and the first function parameter, and an association relationship between the second function and the second function parameter. Secondly, the terminal device can also perform distribution processing on the target function to obtain a total entry, wherein the total entry indicates a plurality of command entries, and the plurality of command entries comprise a first command entry for executing a first function and a second command entry for executing the first function and the second function. Based on this, the terminal device needs to generate a target installation package of the target tool specifically based on the first storage directory, the association relationship, the total entry, the first target software management package, and the second target software management package.
In the following, description will be made on specific codes for performing association and distribution processing on functions based on fig. 10, fig. 10 is a schematic diagram of an embodiment of target tool code writing provided in the embodiment of the present application, where, as shown in fig. 10, F1 indicates a distribution function, F2 indicates a parameter entering processing code, F3 indicates a usage instruction, and F4 indicates a log processing code. The distribution function F1 is configured to perform distribution processing on a target function to obtain a total entry including a plurality of command entries, so that when different function call requests are obtained, the function call requests can be distributed to corresponding command entries, and then corresponding function logic is filled in the command entries. Because the target tool can have a plurality of functions, different functions are distinguished through different function parameters, the parameter entering processing code F2 can create the association relation between the different functions and the corresponding function parameters, and therefore the function to be called is determined through the function calling request, and the distribution function F1 corresponding to the function is called at the moment. Secondly, when the user does not know the tool command of the target tool, the user can display the use instruction F3 through the shortcut key, and the log processing code F4 can store all the output displayed on the terminal equipment in real time under the catalog of a pre-stored log, and if the target tool has the conditions of running errors and the like, the problem of the running errors can be reviewed and analyzed based on the log.
It should be understood that, in practical application, the target function parameter may further include a third function parameter and more function parameters, and the association relationship includes an association relationship between the third function and the third function parameter and an association relationship between each function parameter and a function. The total entry may include a third command entry for performing a third function and other command entries for performing other functions, among the plurality of command entries included. Second, the example of FIG. 10 is only for understanding target tool code writing in the present solution, and should not be construed as a specific limitation of the present application to target functions and target tools.
In the embodiment of the present application, another method for generating an installation package is provided, by which, because the log, the call entry and the tool deployment are all predetermined specifications in advance, only codes based on different functions need to be provided, thereby improving the efficiency of function codes and improving the efficiency of generating the installation package.
Optionally, in an optional embodiment of the method for generating an installation package according to the embodiment of fig. 3, after the installation of the target tool is completed, the method for generating an installation package further includes:
Acquiring a first function call instruction through a first command inlet, wherein the first function call instruction comprises a first function parameter, and the first function parameter uniquely indicates a first function;
determining a first function based on the first function parameter;
the function of the first function is called through the first command entry to execute the first function.
In this embodiment, after the terminal device completes installation of the target tool, a first function call instruction is obtained through the first command entry, where the first function call instruction includes a first function parameter, and the first function parameter indicates the first function only. Thus, the terminal device is able to determine the first function based on the first function parameter and call the function of the first function through the first command entry to execute the first function. Illustratively, the first function has an association relationship with the first function parameter "1", and the second function has an association relationship with the second function parameter "2", and then when the first function call instruction includes the first function parameter "1", the first function can be determined based on the association relationship.
Specifically, the terminal device invokes the function of the first function through the first command entry, and the specific logic mainly performs preprocessing and transmits the first function parameter to the function code that executes the first function, for example:
Figure BDA0003319750090000141
"bash $ { aktols_dawn }/update.sh $ @ #" in the foregoing code can actually call the first function code to execute the first function.
In the embodiment of the application, the method for executing the function of the target tool required by the user is provided, by the mode, the function calling instruction is directly received through the command inlet, the function to be called is determined based on the function parameter carried by the function calling instruction, so that the command inlet receiving the function calling instruction calls the function corresponding to the function, and the execution of the required function is completed, so that the feasibility of the scheme is improved.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for generating an installation package provided in the embodiment of the present application, 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 for generating the installation package further comprises the following steps:
acquiring a second function call instruction through the main entrance, wherein the first function call instruction comprises a second entrance identifier and a first function parameter, and the first function parameter only indicates a first function;
determining a second command entry based on the second entry identification;
Determining a first function based on the first function parameter;
and calling the function of the first function through the second command entry to complete the first function.
In this embodiment, the first portal identification uniquely indicates the first command portal, the second portal identification uniquely indicates the second command portal, e.g., the first portal identification "a" uniquely indicates the first command portal, and the second portal identification "B" uniquely indicates the second command portal. Based on the above, the terminal device obtains the second function call instruction through the total entrance after completing the installation of the target tool, and at this time, the first function call instruction includes the second entrance identifier and the first function parameter, and the first function parameter indicates the first function only. Thus, the terminal device is able to determine the second command entry based on the second entry identification, and as described in the previous embodiments, if the second function call instruction includes the second entry identification "B", it is determined that the function needs to be called through the second command entry. Similar to the foregoing embodiment, the first function specifically required to be executed is determined based on the first function parameter, so that the function of the first function is called through the second command entry to complete the first function.
For example, a second function call instruction is taken as an example of "aktool dawn update/tmp/remove. Tgz", where the second function call instruction includes "aktool dawn", where "aktool dawn" is a second entry identifier, and "update" is a first function parameter, and specific implementation codes are as follows:
Figure BDA0003319750090000151
as can be seen from the above code, "aktool dawn" designates a command entry, and "update" designates which function corresponding to the function is used for processing in the command entry.
Further, the main function in the code has the specific function of designating the corresponding function according to the function parameter and transmitting the function parameter to the corresponding function, and the specific implementation code is as follows:
Figure BDA0003319750090000152
further, in a similar manner to the previous embodiment, the function of the first function is called through the second command entry, and the specific logic mainly performs preprocessing and transmits the first function parameter to the function code executing the first function.
In the embodiment of the application, another method for executing the function of the target tool required by the user is provided, by the method, the function calling instruction is directly received through the main entrance, the function parameter carried by the calling instruction determines the function to be called at this time, the command entrance capable of executing the function is determined based on the entrance identification, the efficiency of determining the command entrance is improved, and the command entrance is enabled to call the function corresponding to the function, so that the execution of the required function is completed, and the feasibility of the scheme is improved.
Based on the foregoing embodiments, a specific manner of executing the function of the target tool required by the user will be briefly described below, referring to fig. 11, fig. 11 is a schematic flow chart illustrating one execution flow of the function call instruction provided in the embodiment of the present application, as shown in fig. 11, in step G1, after the terminal device completes installation of the target tool, the first function call instruction is obtained through the first command entry, where the first function call instruction includes a first function identifier, and the first function identifier uniquely indicates the first function, so that in step G2, the terminal device determines the first function based on the first function identifier included in the first function call instruction, and in step G3, the terminal device calls the function of the first function through the first command entry to execute the first function.
Next, in step G4, if the terminal device obtains the second function call instruction through the main portal, the first function call instruction includes a second portal identifier and a first function identifier, the first function identifier uniquely indicates the first function, the first portal identifier uniquely indicates the first command portal, and the second portal identifier uniquely indicates the second command portal. The terminal device may determine the second command entry based on the second entry identification in step G5 and determine the first function based on the first function identification in step G6, such that the terminal device invokes the function of the first function through the second command entry in step G7 to complete the first function. It should be understood that, in step G8, no matter which process is used to execute the first function, the corresponding log will be stored in the process of the first function, and the specific manner is similar to that described in the foregoing embodiment, which is not repeated here.
The installation package generation, installation of the installation package and execution of the functions in the embodiment of the present application are described above, and the installation package generation device in the embodiment of the present application will be described below. Fig. 12 is a schematic structural diagram of an installation package generating device according to an embodiment of the present application, and as shown in fig. 12, the installation package generating device 1200 includes:
a determining module 1201, configured to determine a first storage directory, where the first storage directory includes a directory storing a software management package of a target tool;
an obtaining module 1202, configured to obtain a first software management package set of a first system architecture and a second software management package set of a second system architecture, where the first software management package set includes a plurality of first software management packages running under the first system architecture, different first software management packages are used to perform different functions, and the second software management package set includes a plurality of second software management packages running under the second system architecture, different second software management packages are used to perform different functions;
a determining module 1201, configured to determine a target function of the target tool, where the target function includes a first function and a second function;
a determining module 1201, configured to determine, based on the target function, a first target software management package from a first set of software management packages, and determine a second target software management package from a second set of software management packages, where 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;
The generating module 1203 is configured 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, where the target installation package includes the first storage directory, the first target software management package, and the second target software management package.
Optionally, on the basis of the embodiment corresponding to fig. 12, in another embodiment of the installation package generating apparatus 1200 provided in the embodiment of the present application, the installation package generating apparatus 1200 further includes a processing module 1204;
the first storage catalog also comprises a target installation catalog for storing the target tool and a catalog for storing an installation script of the target tool, and the target installation package also comprises the installation script of the target tool;
the processing module 1204 is configured to decode the target installation package after the generating 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 store the obtained 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 storage target tool;
the acquiring module 1202 is further configured to acquire a target system architecture, where the target system architecture is any one of the first system architecture or the second system architecture;
A determining module 1201, configured to determine, based on the target system architecture, a third target software management package from the first target software management package and the second target software management package, where the third target software management package is a software management package running under the target system architecture;
the processing module 1204 is further configured to perform an installation process in the first storage directory through an installation script of the target tool based on a third target software management package, so as to complete the installation of the target tool, where the installation script of the target tool after the installation of the target tool is completed 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.
Optionally, on the basis of the embodiment corresponding to fig. 12, in another embodiment of the installation package generating apparatus 1200 provided in the embodiment of the present application, the first storage directory further includes a directory storing a configuration file of the target tool, and the target installation package further includes a configuration file of the target tool;
the processing module 1204 is specifically configured to decode the target installation package, and store the obtained 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 a target installation directory of the target tool;
The processing module 1204 is specifically configured to store the configuration file of the target tool in a directory storing the configuration file of the target tool, and perform an installation process on the first storage directory through an installation script of the target tool based on the third target software management package, so as to complete the installation of the target tool.
Optionally, on the basis of the embodiment corresponding to fig. 12, in another embodiment of the installation package generating apparatus 1200 provided in the embodiment of the present application, the first storage directory further includes a directory storing a configuration file of the target tool, and the target installation package further includes a configuration file of the target tool;
the determining module 1201 is further configured to detect a directory storing a configuration file of the target tool, and determine that a first configuration file of the target tool exists, where the first configuration file is obtained by modifying the configuration file of the target tool;
the processing module 1204 is further configured to copy a first configuration file in the directory of the configuration file of the storage target tool to obtain the first configuration file;
the processing module 1204 is specifically configured to store the first configuration file in a directory storing the configuration file of the target tool, and perform an installation process on the first storage directory through an installation script of the target tool based on the third target software management package, so as to complete the installation of the target tool.
Optionally, on the basis of the embodiment corresponding to fig. 12, in another embodiment of the installation package generating apparatus 1200 provided in the embodiment of the present application, the installation package generating apparatus 1200 further includes a creating module 1205;
a creating module 1205, configured to create an association between a target function and a target function parameter, where the target function parameter includes a first function parameter and a second function parameter, and the association includes an association between the first function and the first function parameter, and an association between the second function and the second function parameter;
the processing module 1204 is further configured to perform distribution processing on the target function to obtain a total entry, where the total entry indicates a plurality of command entries, and the plurality of command entries includes a first command entry for executing a first function and a second command entry for executing the first function and a second function;
the generating module 1203 is specifically configured to generate a target installation package of the target tool based on the first storage directory, the association relationship, the total entry, the first target software management package, and the second target software management package.
Optionally, on the basis of the embodiment corresponding to fig. 12, in another embodiment of the installation package generating apparatus 1200 provided in the embodiment of the present application, the installation package generating apparatus 1200 further includes a calling module 1206;
The obtaining module 1202 is further configured to obtain, through the first command entry, a first function call instruction after the processing module 1204 completes installation of the target tool, where the first function call instruction includes a first function parameter, and the first function parameter indicates the first function uniquely;
a determining module 1201, configured to determine a first function based on the first function parameter;
the calling module 1206 is configured to call a function of the first function through the first command entry to execute the first function.
Alternatively, on the basis of the embodiment corresponding to fig. 12, in another embodiment of the installation package generating apparatus 1200 provided in the embodiment of the present application, the first entry identifier uniquely indicates the first command entry, and the second entry identifier uniquely indicates the second command entry;
the obtaining module 1202 is further configured to obtain, through the main portal, a second function call instruction after the processing module 1204 completes installation of the target tool, where the first function call instruction includes a second portal identifier and a first function parameter, and the first function parameter indicates the first function uniquely;
a determining module 1201, configured to determine a second command entry based on the second entry identification;
a determining module 1201, configured to determine a first function based on the first function parameter;
The calling module 1206 is further configured to call a function of the first function through the second command entry to complete the first function.
The embodiment of the present application further provides another installation package generating device, where the installation package generating device may be disposed on a server, and may also be disposed on a terminal device, and in this application, an example of the installation package generating device disposed on the server is described with reference to fig. 13, fig. 13 is a schematic diagram of an embodiment of a server in this application, and as shown in the drawing, the server 1000 may generate relatively large differences due to different configurations or performances, and may include one or more central processing units (central processing units, CPU) 1022 (e.g., one or more processors) and a memory 1032, and one or more storage media 1030 (e.g., one or more mass storage devices) storing application programs 1042 or data 1044. Wherein memory 1032 and storage medium 1030 may be transitory or persistent. The program stored on the storage medium 1030 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Further, central processor 1022 may be configured to communicate with storage medium 1030 to perform a series of instruction operations in storage medium 1030 on server 1000.
The 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.
The steps performed by the server in the above embodiments may be based on the server structure shown in fig. 13.
The CPU 1022 included in the server is used to execute the embodiments shown in fig. 3 and the respective embodiments corresponding to fig. 3.
The present application further provides a terminal device, as shown in fig. 13, for convenience of explanation, only a portion related to an embodiment of the present application is shown, and specific technical details are not disclosed, please refer to a method portion of an embodiment of the present application. The terminal device is taken as a mobile phone for example for explanation:
fig. 14 is a block diagram showing a part of the structure of a mobile phone related to a terminal provided in an embodiment of the present application. Referring to fig. 14, the mobile phone includes: radio Frequency (RF) circuitry 1110, memory 1120, input unit 1130, display unit 1140, sensors 1150, audio circuit 1160, wireless fidelity (wireless fidelity, wiFi) module 1170, processor 1180, power supply 1190, and the like. It will be appreciated by those skilled in the art that the handset construction shown in fig. 14 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 14:
the RF circuit 1110 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, the downlink information is processed by the processor 1180; in addition, the data of the design uplink is sent to the base station. Typically, the RF circuitry 1110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, RF circuitry 1110 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global system for mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), email, short message service (Short Messaging Service, SMS), and the like.
The memory 1120 may be used to store software programs and modules, and the processor 1180 executes the software programs and modules stored in the memory 1120 to perform various functional applications and data processing of the cellular phone. The memory 1120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 1120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1130 may be used to receive input numerical or character information and generate key signal inputs related to object settings and function control of the mobile phone. In particular, the input unit 1130 may include a touch panel 1131 and other input devices 1132. The touch panel 1131, also referred to as a touch screen, may collect touch operations on or near an object (e.g., the object's operation on the touch panel 1131 using any suitable object or accessory such as a finger, a stylus, etc., or near the touch panel 1131) and drive the corresponding connection device according to a predetermined program. Alternatively, the touch panel 1131 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of the object, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device and converts it into touch point coordinates, which are then sent to the processor 1180, and can receive commands from the processor 1180 and execute them. In addition, the touch panel 1131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1130 may include other input devices 1132 in addition to the touch panel 1131. In particular, other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 1140 may be used to display information input by an object or information provided to the object and various menus of a mobile phone. The display unit 1140 may include a display panel 1141, and optionally, the display panel 1141 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1131 may overlay the display panel 1141, and when the touch panel 1131 detects a touch operation thereon or thereabout, the touch panel is transferred to the processor 1180 to determine the type of touch event, and then the processor 1180 provides a corresponding visual output on the display panel 1141 according to the type of touch event. Although in fig. 14, the touch panel 1131 and the display panel 1141 are two separate components for implementing the input and output functions of the mobile phone, in some embodiments, the touch panel 1131 may be integrated with the display panel 1141 to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 1150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1141 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1141 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may be further configured in the mobile phone, details are not described here.
Audio circuitry 1160, speaker 1161, and microphone 1162 may provide an audio interface between the object and the handset. The audio circuit 1160 may transmit the received electrical signal converted from audio data to the speaker 1161, and may be converted into a sound signal by the speaker 1161 to be output; on the other hand, the microphone 1162 converts the collected sound signals into electrical signals, which are received by the audio circuit 1160 and converted into audio data, which are processed by the audio data output processor 1180 for transmission to, for example, another cell phone via the RF circuit 1110, or which are output to the memory 1120 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help an object to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 1170, so that wireless broadband Internet access is provided for the object. Although fig. 14 shows a WiFi module 1170, it is understood that it does not belong to the necessary constitution of the handset.
The processor 1180 is a control center of the mobile phone, and connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions and processes of the mobile phone by running or executing software programs and/or modules stored in the memory 1120 and calling data stored in the memory 1120, thereby performing overall monitoring of the mobile phone. In the alternative, 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 primarily processes an operating system, an object interface, an application program, etc., and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1180.
The handset further includes a power supply 1190 (e.g., a battery) for powering the various components, which may be logically connected to the processor 1180 via a power management system so as to provide for the management of charging, discharging, and power consumption by the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which will not be described herein.
In the embodiment of the present application, the processor 1180 included in the terminal is configured to perform the embodiment shown in fig. 3 and the respective embodiments corresponding to fig. 3.
There is also provided in an embodiment of the present application a computer readable storage medium having stored therein a computer program which, when run on a computer, causes the computer to perform the steps performed by the terminal device in the method described in the embodiment shown in fig. 3.
There is also provided in an embodiment of the present application a computer program product comprising a program which, when run on a computer, causes the computer to perform the steps performed by a terminal device in a method as described in the embodiment shown in fig. 3.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., at least two elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on at least two network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A method of installation package generation, comprising:
determining a first storage directory, wherein the first storage directory comprises a directory storing a software management package of a target tool;
acquiring a first software management package set of a first system architecture and a second software management package set of a second system architecture, wherein the first software management package set comprises a plurality of first software management packages running under the first system architecture, different first software management packages are used for executing different functions, and the second software management package set comprises a plurality of second software management packages running under the second system architecture, and different second software management packages are used for executing different functions;
determining a target function of the target tool, wherein the target function comprises a first function and a second function;
determining a first target software management package from the first set of software management packages and a second target software management package from the second set of software management packages based on the target function, wherein the first target software management package comprises a first software management package for executing the first function and a first software management package for executing the second function, and the second target software management package comprises a second software management package for executing the first function and a second software management package for executing the second function;
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, wherein the target installation package comprises the first storage directory, the first target software management package and the second target software management package.
2. The method of claim 1, wherein the first storage directory further comprises a target installation directory of the storage target tool and a directory of installation scripts of the storage target tool, the target installation package further comprising installation scripts of the target tool;
after the 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 comprises:
decoding the target installation package, and storing the obtained installation script of the target tool, the first target software management package and the second target software management package under a target installation directory of the storage target tool;
acquiring a target system architecture, wherein the target system architecture is any one of the first system architecture or the second system architecture;
Determining 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 running under the target system architecture;
and based on the third target software management package, performing installation processing on the first storage catalog through the installation script of the target tool to finish the installation of the target tool, wherein the installation script of the target tool after the installation of the target tool is finished is stored in the catalog storing the installation script of the target tool, and the third target software management package is stored in the catalog storing the software management package of the target tool.
3. The method of claim 2, wherein the first storage directory further comprises a directory storing a configuration file of a target tool, the target installation package further comprising the configuration file of the target tool;
the decoding processing is performed on the target installation package, and the obtained installation script of the target tool, the first target software management package and the second target software management package are stored under the target installation catalog of the storage target tool, including:
Decoding the target installation package, and storing the obtained 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 under the target installation directory of the storage target tool;
the installing process is performed in the first storage directory through the installation script of the target tool based on the third target software management package, so as to complete the installation of the target tool, including:
and storing the configuration file of the target tool in a catalog of the configuration file of the storage target tool, and performing installation processing on the first storage catalog through the installation script of the target tool based on the third target software management package so as to complete the installation of the target tool.
4. The method of claim 2, wherein the first storage directory further comprises a directory storing a configuration file of a target tool, the target installation package further comprising the configuration file of the target tool;
the method further comprises the steps of:
detecting the catalog of the configuration file of the storage target tool, and determining 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;
Copying the first configuration file in the catalog of the configuration file of the storage target tool to obtain the first configuration file;
the installing process is performed in the first storage directory through the installation script of the target tool based on the third target software management package, so as to complete the installation of the target tool, including:
and storing the first configuration file in a catalog of the configuration file of the storage target tool, and performing installation processing on the first storage catalog through an installation script of the target tool based on the third target software management package so as to complete the installation of the target tool.
5. The method according to claim 1, wherein the method further comprises:
creating an association relation between the target function and a target function parameter, wherein the target function parameter comprises a first function parameter and a second function parameter, and the association relation comprises an association relation between the first function and the first function parameter and an association relation between the second function and the second function parameter;
distributing the target function to obtain a total inlet, wherein the total inlet indicates a plurality of command inlets, and the plurality of command inlets comprise a first command inlet for executing the first function and a second command inlet for executing the first function and the second function;
The 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 includes:
the target installation package of the target tool is generated based on the first storage directory, the association, the total entry, the first target software management package, and the second target software management package.
6. The method of claim 5, wherein after the completion of the installation of the target tool, the method further comprises:
acquiring a first function call instruction through the first command inlet, wherein the first function call instruction comprises a first function parameter, and the first function parameter uniquely indicates the first function;
determining the first function based on the first function parameter;
and calling a function of the first function through the first command inlet to execute the first function.
7. The method of claim 5, wherein a first portal identification uniquely indicates the first command portal and a second portal identification uniquely indicates the second command portal;
after the completion of the installation of the target tool, the method further comprises:
Acquiring a second function call instruction through the main entrance, wherein the first function call instruction comprises a second entrance identifier and a first function parameter, and the first function parameter uniquely indicates the first function;
determining the second command entry based on the second entry identification;
determining the first function based on the first function parameter;
and calling a function of the first function through the second command entry to complete the first function.
8. An installation package generating apparatus, characterized in that the installation package generating apparatus includes:
a determining module configured to determine a first storage directory, where the first storage directory includes a directory storing a software management package of a target tool;
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a first software management package set of a first system architecture and a second software management package set of a second system architecture, the first software management package set comprises a plurality of first software management packages running under the first system architecture, different first software management packages are used for executing different functions, and the second software management package set comprises a plurality of second software management packages running under the second system architecture, and different second software management packages are used for executing different functions;
The determining module is further configured to determine a target function of the target tool, where 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 set of software management packages and a second target software management package from the second set of software management packages based on the target function, where 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;
and the generating module is used for generating a target installation package of the target tool based on the first storage catalog, the first target software management package and the second target software management package, wherein the target installation package comprises the first storage catalog, the first target software management package and the second target software management package.
9. A computer device, comprising: memory, transceiver, processor, and bus system;
Wherein the memory is used for storing programs;
the processor being adapted to execute a program in the memory to implement the method of any one of claims 1 to 7;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
10. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN202111242597.7A 2021-10-25 2021-10-25 Method for generating installation package, related device, equipment and storage medium Pending CN116028099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111242597.7A CN116028099A (en) 2021-10-25 2021-10-25 Method for generating installation package, related device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111242597.7A CN116028099A (en) 2021-10-25 2021-10-25 Method for generating installation package, related device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116028099A true CN116028099A (en) 2023-04-28

Family

ID=86079998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111242597.7A Pending CN116028099A (en) 2021-10-25 2021-10-25 Method for generating installation package, related device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116028099A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311698A (en) * 2023-08-14 2023-12-29 广州致远电子股份有限公司 Software package release method, software package download method, terminal device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311698A (en) * 2023-08-14 2023-12-29 广州致远电子股份有限公司 Software package release method, software package download method, terminal device and storage medium
CN117311698B (en) * 2023-08-14 2024-05-17 广州致远电子股份有限公司 Software package release method, software package download method, terminal device and storage medium

Similar Documents

Publication Publication Date Title
CN106970790B (en) Application program creating method, related equipment and system
CN108880867B (en) Network equipment data acquisition method and system
CN106502703B (en) Function calling method and device
EP3402160B1 (en) Service processing method and apparatus
CN109857403B (en) Page updating method and device, page processing method and device
CN110196795B (en) Method and related device for detecting running state of mobile terminal application
KR102193404B1 (en) Incrementally compiling software artifacts from an interactive development environment
CN107908407B (en) Compiling method and device and terminal equipment
CN103544033A (en) Method, device and associated equipment for rolling back application program
EP3637251B1 (en) Method, device and terminal for executing hotpatch
CN106713608B (en) Application function state modification method and device and terminal
CN103455348A (en) Subarea adjustment method, device, terminal, server and system
CN111666222A (en) Test method and related device
CN108090345B (en) Linux system external command execution method and device
CN109800030B (en) Application program running method and device and terminal
EP2869604B1 (en) Method, apparatus and device for processing a mobile terminal resource
CN114115895A (en) Code query method and device, electronic equipment and storage medium
EP3129883B1 (en) Method and apparatus for repairing dynamic link library file
CN116028099A (en) Method for generating installation package, related device, equipment and storage medium
CN108132844B (en) Plug-in downloading method and device
CN103729283A (en) System log output method and device and terminal device
CN109145598B (en) Virus detection method and device for script file, terminal and storage medium
CN107741895B (en) Server management method, device and equipment
CN106933626B (en) Application association method and device
CN113742716B (en) Code running method, device, electronic equipment, storage medium and program product

Legal Events

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