Software processing method and device, terminal and readable storage medium
By obtaining and packaging the component compilation files and library files of the target software, combining cross-system packaging tools, software installation packages compatible with different systems are generated, solving the compatibility problem of the software in different system environments.
Patent Information
- Application Number
- CN202310969721.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2025-02-18
AI Technical Summary
When delivering software to enterprise customers, customized adaptation is required for specific system environments, but the delivered software is difficult to compatible with different systems.
By obtaining the component compilation files of the target software and the dependent library files, determine the target running environment, and generate the initial software installation package. The executable deployment files are encapsulated using the cross-system encapsulation tool, and the cross-system executable files are obtained, and packaged into the target software installation package to make them compatible with different systems.
The target software is processed as a portable installation package. The cross-system executable files can be used as command line entrances for different systems, avoiding dependence on the system environment and library files, and solving the software compatibility problem.
Smart Images

Figure CN119473319A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a software processing method, device, terminal and readable storage medium. Background Art
[0002] With the rapid development of computer technology, enterprise-level servers have emerged with various architectures such as Intel x86 and ARM (Advanced RISC Machine). At the same time, in addition to the Windows operating system, there are also CentOS (Community Enterprise Operating System), Kylin (Kirin Operating System) and UOS (Unity Operating System) operating systems. When delivering the required software to enterprise customers, it is usually necessary to customize and adapt it to the specific system environment, but the delivered software is still difficult to be compatible with different systems. Summary of the invention
[0003] The embodiments of the present application provide a software processing method, device, terminal and readable storage medium, which can solve the technical problem that when delivering the required software to enterprise customers, it is usually necessary to customize and adapt it to a specific system environment, but the delivered software is still difficult to be compatible with different systems.
[0004] In a first aspect, an embodiment of the present application provides a software processing method, the method comprising:
[0005] Obtaining a component compilation file corresponding to a software component in the target software, and determining a library file on which the component compilation file depends;
[0006] Determine the target operating environment of the target software, and generate an initial software installation package based on the component compilation file, the library file and the target operating environment;
[0007] A cross-system packaging tool is used to package the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, and a target software installation package for the target software is generated based on the initial software installation package and the cross-system executable file.
[0008] Optionally, after determining the library file on which the component compiled file depends, the method further includes:
[0009] Obtain the library file, and package the library file to obtain a library file package;
[0010] A library file path of the library file in the library file package is determined, and path update processing is performed on the component compiled file based on the library file path.
[0011] Optionally, the performing path update processing on the component compiled file based on the library file path includes:
[0012] Determine the system library path corresponding to the component compiled file, and update the system library path to the library file path.
[0013] Optionally, generating an initial software installation package based on the component compilation file, the library file, and the target operating environment includes:
[0014] Containerizing and packaging the target operating environment to obtain an operating environment package;
[0015] Packaging the component compiled files to obtain a compiled file package, and packing the library files to obtain a library file package;
[0016] The operating environment package, the compiled file package and the library file package are packaged in a container to obtain an initial software installation package.
[0017] Optionally, the containerizing and packaging the operating environment package, the compilation file package, and the library file package to obtain an initial software installation package includes:
[0018] Containerizing and packaging the operating environment package, the compiled file package, and the library file package to obtain a quasi-software installation package, and exporting a target activation calling component for activating a target operating environment in the operating environment package;
[0019] An initial software installation package is obtained based on the target activation calling component and the quasi-software installation package.
[0020] Optionally, after generating a target software installation package for the target software based on the initial software installation package and the cross-system executable file, the method further includes:
[0021] Decompressing the target software installation package on the client to obtain the cross-system executable file and the initial software installation package;
[0022] Executing the cross-system executable file to call the target activation calling component in the initial software installation package to activate the target operating environment in the quasi-software installation package;
[0023] In the target operating environment, the component compiled files corresponding to the compiled file package in the quasi-software installation package are installed based on the cross-system executable file and the library file package.
[0024] Optionally, obtaining a component compilation file corresponding to a software component in the target software and determining a library file on which the component compilation file depends includes:
[0025] Obtaining a software component of the target software, compiling the software component, and obtaining a component compilation file corresponding to the software component;
[0026] Query the library files that the component compilation file depends on.
[0027] Optionally, the acquiring of the software component of the target software, compiling the software component to obtain a component compilation file corresponding to the software component, includes:
[0028] Obtaining software components of the target software, compiling the software components, and obtaining component compilation files corresponding to the binary package;
[0029] The querying of the library files on which the component compiled file depends includes:
[0030] The library file on which the component compiled file depends is queried based on the library file query command.
[0031] In a second aspect, an embodiment of the present application provides a software processing device, the device comprising:
[0032] An acquisition module, adapted to acquire a component compilation file corresponding to a software component in the target software, and determine a library file on which the component compilation file depends;
[0033] A configuration module, adapted to determine a target operating environment of the target software, and generate an initial software installation package based on the component compilation file, the library file and the target operating environment;
[0034] The compiling module is adapted to use a cross-system packaging tool to encapsulate the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, and to generate a target software installation package for the target software based on the initial software installation package and the cross-system executable file.
[0035] In a third aspect, an embodiment of the present application provides a terminal, the terminal comprising:
[0036] Processor; and
[0037] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of the above.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, implement any of the methods described above.
[0039] The beneficial effects brought about by the technical solutions provided in some embodiments of the embodiments of the present application include at least: processing the target software into a portable target software installation package, encapsulating the executable deployment file to obtain a cross-system executable file, and based on the compatibility of the cross-system executable file with different systems, the cross-system executable file can be used as a command line entry for different systems. In addition, the embodiments of the present application also package the target operating environment and dependent library files corresponding to the execution of the component compilation file into the target software installation package, so that the component compilation file can avoid dependence on the system environment and the corresponding library files of the system when it is installed or executed, thereby effectively solving the technical problem that when delivering the required software to enterprise customers, it is usually necessary to customize and adapt it to a specific system environment, but the delivered software is still difficult to be compatible with different systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 An exemplary system architecture diagram of a software processing method provided in an embodiment of the present application;
[0042] Figure 2 A flowchart of a software processing method provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of a process for determining a library file on which a component compilation file depends provided in an embodiment of the present application;
[0044] Figure 4 A schematic diagram of a process for updating the path of a component compiled file based on a library file path provided in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of a process for generating an initial software installation package provided in an embodiment of the present application;
[0046] Figure 6 A schematic diagram of another process for generating an initial software installation package provided in an embodiment of the present application;
[0047] Figure 7 A schematic diagram of a process for installing a component compilation file provided in an embodiment of the present application;
[0048] Figure 8 A schematic diagram of the structure of a software processing device provided in an embodiment of the present application;
[0049] Fig. 9 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the embodiments of the present application.
[0051] With the rapid development of computer technology, enterprise-level servers have gradually emerged with a variety of architectures and operating systems. When delivering the required software to corporate customers, it is usually necessary to customize and adapt it to the specific system environment, but the delivered software is still difficult to be compatible with different systems.
[0052] In the prior art, when delivering private cloud software to customers, it is generally necessary to rely on platform virtualization technologies such as Docker and Kubernetes. Among them, Docker is an open source application container engine that allows developers to package their applications and dependent packages into a portable image, and then publish it to any popular Linux or Windows operating system machine, and can also achieve virtualization. The container is completely sandboxed, and there is no interface between them. Kubernetes is an open source, used to manage containerized applications on multiple hosts in the cloud platform. The goal of Kubernetes is to make the deployment of containerized applications simple and efficient. Kubernetes provides a mechanism for application deployment, planning, updating and maintenance. However, when installing Docker and Kubernetes, it is still necessary to consider the differences in the system environment provided by the customer. However, when facing the differences in the environments provided by different customers, it is usually only possible to make special adaptations for specific system environments, but the deployment tools corresponding to the special adaptations cannot shield the differences between different systems and be compatible with multiple platforms.
[0053] In order to solve the above technical problems, the embodiment of the present application proposes a software processing method, which first obtains the component compilation file corresponding to the software component in the target software, determines the library file on which it depends based on the component compilation file, and then determines the target operating environment of the target software, and generates an initial software installation package based on the component compilation file, the library file and the target operating environment. The component compilation file and the library file on which it depends are both located in the initial software installation package, so that when the component compilation file is running, it can effectively avoid dependence on the corresponding library file of the system, and the target operating environment is also located in the initial software installation package, so that when installing or executing the component compilation file, it can be effectively compatible with different systems. Finally, a cross-system packaging tool is used to encapsulate the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, so that the cross-system executable file can be executed in different systems, thereby completing the installation of the component compilation file, and then, a target software installation package for the target software is generated based on the initial software installation package and the cross-system executable file.
[0054] The embodiment of the present application provides a software processing method, processes the target software into a portable target software installation package, encapsulates the executable deployment file to obtain a cross-system executable file, and based on the compatibility of the cross-system executable file with different systems, the cross-system executable file can be used as a command line entry for different systems. In addition, the embodiment of the present application also packages the target operating environment and dependent library files corresponding to the execution of the component compilation file into the target software installation package, so that the component compilation file can avoid dependence on the system environment and the corresponding library files of the system when it is installed or executed, thereby effectively solving the technical problem that when delivering the required software to enterprise customers, it is usually necessary to customize and adapt it to a specific system environment, but the delivered software is still difficult to be compatible with different systems.
[0055] See also Figure 1 , Figure 1 An exemplary system architecture diagram of a software processing method provided in an embodiment of the present application.
[0056] like Figure 1 As shown, the system architecture may include a terminal 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the terminal 101 and the server 103. The network 102 may include various types of wired communication links or wireless communication links, for example, the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.
[0057] The terminal 101 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the terminal 101 can interact with the server 103 through the network 102 to receive messages or data sent by other users to the server 103. The terminal 101 can be hardware or software. When the terminal 101 is hardware, it can be various terminals, including but not limited to smart watches, smart phones, tablet computers, laptop portable computers and desktop computers. When the terminal 101 is software, it can be installed in the terminals listed above, which can be implemented as multiple software or software modules (for example: used to provide distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.
[0058] In an embodiment of the present application, terminal 101 can obtain the component compilation file corresponding to the software component in the target software, and determine the library file on which the component compilation file depends; then, determine the target operating environment of the target software, and generate an initial software installation package based on the component compilation file, the library file and the target operating environment; finally, use a cross-system packaging tool to encapsulate the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, and generate a target software installation package for the target software based on the initial software installation package and the cross-system executable file.
[0059] The server 103 may be a business server that provides various services. It should be noted that the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or it may be implemented as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or it may be implemented as a single software or software module, which is not specifically limited here.
[0060] Alternatively, the system architecture may not include the server 103. In other words, the server 103 may be an optional device in the embodiments of this specification. That is, the method provided in the embodiments of this specification may be applied to a system structure that only includes the terminal 101, and the embodiments of this application do not limit this.
[0061] It should be understood that Figure 1 The number of terminals, networks and servers in the figure is only for illustration and any number of terminals, networks and servers may be used according to implementation requirements.
[0062] See also Figure 2 , Figure 2A flowchart of a software processing method provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be a terminal that executes the software processing method, or a processor in the terminal that executes the software processing method, or a software processing service in the terminal that executes the software processing method. For the convenience of description, the specific execution process of the software processing method is introduced below by taking the execution subject as the processor in the terminal as an example.
[0063] like Figure 2 As shown, the software processing method may at least include:
[0064] S202: Obtain a component compilation file corresponding to a software component in the target software, and determine a library file on which the component compilation file depends.
[0065] The target software can be software selected for compatibility with multiple systems. For example, the target software can include software applications for enterprise customers such as Kubernetes and Docker, or it can be software commonly used by users in their daily lives for clothing, food, housing, and transportation, such as shopping software, food delivery software, taxi-hailing software, and hotel service software.
[0066] The target software is assembled based on software components. Software components can be understood as self-contained, programmable, reusable, language-independent software units, which can be easily used in assembled applications. The corresponding component compilation file is determined based on the software component. The component compilation file can be understood as a binary file recognizable by the computer. The software component corresponding to the component compilation file has dependent library files during the installation or execution process. Generally, the library files that the software component corresponding to the component compilation file depends on need to be called from the system. Therefore, in order to avoid dependence on the system, the library files that the software component corresponding to the component compilation file depends on can be copied so that calling from the system can be avoided when calling.
[0067] Among them, library files are a type of files on the computer that are used to provide users with some out-of-the-box variables, functions or classes. Library files are divided into static libraries and dynamic libraries. The difference between static libraries and dynamic libraries is reflected in the linking stage of the program. Static libraries are copied to the program during the linking stage of the program; dynamic libraries are not copied to the program during the linking stage, but are dynamically loaded into the memory by the system when the program is running for the program to call.
[0068] See also Figure 3 , Figure 3 A schematic diagram of a process for determining a library file on which a component compilation file depends provided in an embodiment of the present application.
[0069] like Figure 3As shown, optionally, obtaining a component compilation file corresponding to a software component in the target software in S202 and determining a library file on which the component compilation file depends includes:
[0070] S302: Acquire software components of the target software, compile the software components, and obtain component compilation files corresponding to the software components.
[0071] Determine the corresponding software components based on the target software, and the number of software components can be one or more. Compile the software components to obtain the component compilation files corresponding to each software component. Specifically, the software components of the target software can be obtained, and the software components can be compiled to obtain the component compilation files corresponding to the binary packages. For example, various software components used in the deployment of Kubernetes platform software can be compiled into corresponding binary packages to obtain the component compilation files corresponding to the software components in the Kubernetes platform software.
[0072] S304: Query the library files that the component compilation file depends on.
[0073] Based on the library file query command, the library files that the component compiled files depend on are queried. The library file query command may include the ldd (list dynamic dependencies) command, and the library files may include the lib (library) package. Among them, the ldd command is used to print the list of shared libraries that the program or library file depends on. Specifically, the ldd command of the Linux system can be used to query the lib package that the corresponding binary file of each component compiled file depends on. The lib package may contain some commonly used functions, etc.
[0074] S204: Determine the target operating environment of the target software, and generate an initial software installation package based on the component compilation file, the library file, and the target operating environment.
[0075] The target software needs a compatible system environment during operation. Therefore, the target operating environment of the target software can be a system environment that supports the operation of the target software. First, the target operating environment of the target software can be determined. For example, Dockerfile can be used to build a container image of python ansible. Among them, Dockerfile contains multiple instructions, each instruction builds a layer of image layer, so the content of each instruction is to describe how the layer should be built; python ansible is a python-based operating environment.
[0076] The initial software installation package is determined based on the component compilation file, the library file and the target operating environment. In the initial software installation package, the component compilation file and the library file it depends on are both located in the initial software installation package, so that when the component compilation file is running, the dependency on the corresponding library file of the system can be effectively avoided, and the target operating environment is also located in the initial software installation package, so that different systems can be effectively compatible when installing or executing the component compilation file.
[0077] See also Figure 4 , Figure 4 A schematic diagram of a process for updating the path of a component compilation file based on a library file path provided in an embodiment of the present application.
[0078] like Figure 4 As shown, optionally, after determining the library file on which the component compiled file depends in S202, the method further includes:
[0079] S402: Obtain library files, package the library files, and obtain a library file package.
[0080] After determining the library files that the component compiled file depends on, the library files that the component compiled file depends on can be copied to obtain the copied library files, and the copied library files can be packaged to obtain a library file package. Packaging the library files into the library file package can effectively avoid the component compiled file from being dependent on the library files in the system for installation or operation, so that the component compiled file can be installed or run based on the library file package.
[0081] S404: Determine the library file path of the library file in the library file package, and perform path update processing on the component compiled file based on the library file path.
[0082] The storage path of the library file in the library file package is determined. Therefore, the library file path of the library file in the library file package can be obtained based on the storage path of the library file in the library file package. In the component compilation file or software component, the storage path corresponding to the library file it depends on is recorded. Generally, the initial component compilation file or the library file corresponding to the software component is stored in the system. In order to avoid dependence on the system, the path of the component compilation file can be updated based on the library file path of the library file in the library file package.
[0083] In a feasible implementation, the patchelf tool can be used to modify the rpath in the component compilation file to point to the custom lib path. The patchelf tool is a command line tool that can be used to modify the runtime link path, dependent library path and other information of the executable file. The component compilation file is an executable file. Here, rpath is a parameter. Based on the rpath parameter, when the component compilation file is running, the directory specified by rpath can be preferentially searched for the dependent library file.
[0084] Optionally, in S404, the path update process of the component compiled file is performed based on the library file path, including:
[0085] Determine the system library path corresponding to the component compilation file, and update the system library path to the library file path.
[0086] Determine the library files in the system that the component compilation file depends on, and determine the system library path in the component compilation file that points to the library files in the system, modify the system library path in the component compilation file, and update the system library path to the library file path, so that the system library path in the component compilation file that points to the library files in the system is modified to point to the library file path in the library file package, effectively avoiding dependence on the system library files, and isolating the system and component compilation files at the same time.
[0087] See also Figure 5 , Figure 5 A schematic diagram of a process for generating an initial software installation package provided in an embodiment of the present application.
[0088] like Figure 5 As shown, optionally, in S204, an initial software installation package is generated based on the component compilation file, the library file and the target operating environment, including:
[0089] S502: Containerize and package the target operating environment to obtain an operating environment package.
[0090] The target operating environment is packaged in a container to achieve portability of the target operating environment so that it can run on different systems. Here, container packaging is to package the software code and all required components together and isolate them in their own "container" to achieve the purpose of isolating the system.
[0091] Containerized packaging may include but is not limited to Docker containerized packaging technology. Docker containerized packaging technology allows applications, dependencies, function libraries, and configurations to be packaged together during development to form a portable image. Based on Docker containerized packaging technology, applications run in containers and use a sandbox mechanism to isolate each other, which is used to solve compatibility issues of different component dependencies, such as the dependency of applications on components in the system. Here, the target operating environment is first packaged in containers so that the operating environment corresponding to the component compilation file can be quickly migrated.
[0092] It should be noted that Docker is a technology for quickly delivering and running applications. After packaging, you can run the component compiled files by executing Docker. At this time, Docker is a system process, which is different from a virtual machine, which is an operating system in an operating system. Therefore, compared with a virtual machine, Docker is smaller in size, faster in startup, and has better performance.
[0093] In Docker container packaging technology, an image can be understood as an application and its required dependencies, function libraries, and operating environment. A container can be understood as a process formed after the application in the image runs. This process is invisible to the outside world and is isolated from other processes.
[0094] S504: Packaging the component compiled files to obtain a compiled file package, and packing the library files to obtain a library file package.
[0095] The number of component compiled files can be one or more, and each component compiled file is packaged to obtain a compiled file package; the number of library files can be one or more, and each library file is packaged to obtain a library file package. The number of library files is related to the component compiled files, and the number of library files can be determined based on the library files that each component compiled file depends on.
[0096] S506: Containerize and package the operating environment package, the compilation file package, and the library file package to obtain an initial software installation package.
[0097] By containerizing and packaging the target operating environment, compiled file package and library file package, the initial software installation package in a container isolated from the system can install and run the target software based on its own operating environment package, compiled file package and library file package. The component compiled file and the library files it depends on are all located in the initial software installation package, so that when the component compiled file is running, it can effectively avoid dependence on the corresponding library files of the system. In addition, the target operating environment is also located in the initial software installation package, so that different systems can be effectively compatible when installing or executing the component compiled file.
[0098] See also Figure 6 , Figure 6 A schematic diagram of another process for generating an initial software installation package provided in an embodiment of the present application.
[0099] like Figure 6 As shown, optionally, in S506, the operating environment package, the compilation file package and the library file package are packaged in a container to obtain an initial software installation package, including:
[0100] S602: Containerize and package the operating environment package, the compilation file package, and the library file package to obtain a quasi-software installation package, and export a target activation calling component for activating the target operating environment in the operating environment package.
[0101] The target activation calling component is used to activate the target operating environment in the operating environment package. The target activation calling component can be the runc component corresponding to the target operating environment. The runc component is a command line tool that can be used directly to create and run containers. In a feasible implementation, when the target operating environment is packaged and processed into a container to obtain the operating environment package, the rootfs (root file) system structure corresponding to the target operating environment can be exported based on the target operating environment, and then the containerized packaging is performed to obtain the operating environment package. At this time, the runc component can be used alone to directly call the rootfs system structure to run the target operating environment.
[0102] S604: Activate the calling component and the quasi-software installation package based on the target to obtain an initial software installation package.
[0103] The target activation calling component and the quasi-software installation package are packaged in containers to form a separate initial software installation package.
[0104] S206: Using a cross-system packaging tool to package the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, and generating a target software installation package for the target software based on the initial software installation package and the cross-system executable file.
[0105] The cross-system packaging tool may include but is not limited to the Go compiler. Based on the cross-system packaging tool, the executable deployment file corresponding to the initial software installation package is packaged to obtain a cross-system executable file that is compatible with different systems. Here, encapsulation is to compile the executable deployment file across systems based on the cross-system packaging tool, and encapsulate the abstracted fields and the operations on the fields together, so that the data is protected internally, and other packages of the program can only operate on the fields through authorized operations or methods. Finally, a target software installation package for the target software is generated based on the initial software installation package and the cross-system executable file. It should be noted that the cross-system executable file encapsulated by the cross-system packaging tool is compatible with different systems, so that the target software installation package can be installed in different systems.
[0106] See also Figure 7 , Figure 7 A schematic diagram of a process for installing a component compilation file provided in an embodiment of the present application.
[0107] like Figure 7 As shown, optionally, after generating a target software installation package for the target software based on the initial software installation package and the cross-system executable file, the method further includes:
[0108] S702: Decompress the target software installation package on the client to obtain a cross-system executable file and the initial software installation package.
[0109] After the target software installation package is generated, the target software installation package can be copied to the client's server, and the target software installation package can be decompressed in the client's server to obtain a cross-system executable file and an initial software installation package.
[0110] S704: Execute the cross-system executable file to call the target activation calling component in the initial software installation package to activate the target operating environment in the quasi-software installation package.
[0111] Execute the cross-system executable file, which can also be called the CK8 file, to call the target activation calling component in the initial software installation package, and activate the target operating environment in the quasi-software installation package based on the target activation calling component, thereby providing an operating environment for the installation of the component compilation file corresponding to the target software, thereby realizing one-click installation of the component compilation file corresponding to the target software based on the cross-system executable file.
[0112] S706: In the target operating environment, the component compiled files corresponding to the compiled file package in the aligned software installation package are installed based on the cross-system executable file and the library file package.
[0113] In the target operating environment, the cross-system executable file is executed to enable the component compilation file to call the library file in the library file package to install the component compilation file corresponding to the target software, thereby installing the target software.
[0114] In an embodiment provided in the present application, first, after copying the target software installation package to the client's server, the implementer can create a folder on the server to store the target software installation package, and copy the target software installation package to the folder used to store the target software installation package.
[0115] Decompress the target software installation package to obtain the cross-system executable file and the initial software installation package. Put the decompressed cross-system executable file in the system executable file path, generate configuration template files for different numbers of deployment nodes, and modify the configuration. The number of nodes can be determined based on the number of servers in the local area network. Use the cross-system executable file to execute the Kuberrnetes installation process. The screen will print the entire operation log. Execute the cross-system executable file to call the target activation call component in the initial software installation package, and activate the target operating environment in the quasi-software installation package based on the target activation call component.
[0116] Use cross-system executable files to perform the installation process of basic application components (i.e., component compilation files corresponding to software components), such as the installation process of MySQL (My Structured Query Language), Redis (Remote Dictionary Server), ingress, etc. Wait for the basic application component installation process. The entire kubernetes underlying platform and basic application components are installed and deployed, and finally the data is cleaned and reset. It should be noted that when the Kuberrnetes installation process fails, it can be repaired based on the problem or the target operating environment can be reset. After Kuberrnetes is successfully installed, the corresponding basic application components can be installed. When the basic application component installation fails, it can be repaired based on the problem or the target operating environment can be reset until the basic application component is finally installed.
[0117] An embodiment of the present application further provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.
[0118] See also Figure 8 , Figure 8 A schematic diagram of the structure of a software processing device provided in an embodiment of the present application. Figure 8 As shown, the software processing device 800 includes:
[0119] The acquisition module 810 is adapted to acquire the component compilation file corresponding to the software component in the target software and determine the library file on which the component compilation file depends;
[0120] Configuration module 820, adapted to determine a target operating environment for the target software, and generate an initial software installation package based on component compilation files, library files, and the target operating environment;
[0121] The compiling module 830 is adapted to use a cross-system packaging tool to encapsulate the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, and to generate a target software installation package for the target software based on the initial software installation package and the cross-system executable file.
[0122] Optionally, the acquisition module 810 includes:
[0123] The acquisition submodule is adapted to acquire software components of the target software, compile the software components, and obtain component compilation files corresponding to the software components;
[0124] The query module is suitable for querying the library files that the component compilation files depend on.
[0125] Optionally, the acquisition submodule is further adapted to acquire software components of the target software, compile the software components, and obtain component compilation files corresponding to the binary package;
[0126] The query module is also adapted to query the library files that the component compilation file depends on based on the library file query command.
[0127] Optionally, the software processing device 800 further includes:
[0128] A library file package determination module is adapted to obtain library files, package the library files, and obtain a library file package;
[0129] The path update module is adapted to determine the library file path of the library file in the library file package, and perform path update processing on the component compilation file based on the library file path.
[0130] Optionally, the path updating module is further adapted to determine a system library path corresponding to the component compilation file, and update the system library path to a library file path.
[0131] Optionally, the compiling module 830 includes:
[0132] The operating environment package determination module is suitable for containerizing and packaging the target operating environment to obtain an operating environment package;
[0133] The packaging module is suitable for packaging component compiled files to obtain compiled file packages, and packaging library files to obtain library file packages;
[0134] The containerized packaging processing module is suitable for performing containerized packaging processing on the operating environment package, the compiled file package and the library file package to obtain an initial software installation package.
[0135] Optionally, the containerized packaging processing module includes:
[0136] The export module is suitable for containerizing the operating environment package, the compilation file package and the library file package to obtain a quasi-software installation package, and exporting a target activation calling component for activating the target operating environment in the operating environment package;
[0137] The initial software installation package determination module is adapted to obtain the initial software installation package based on the target activation calling component and the quasi-software installation package.
[0138] Optionally, the software processing device 800 further includes:
[0139] A decompression module, adapted to decompress the target software installation package on the client to obtain a cross-system executable file and an initial software installation package;
[0140] A calling module, adapted to execute a cross-system executable file to call a target activation calling component in an initial software installation package to activate a target operating environment in a quasi-software installation package;
[0141] The installation module is suitable for installing the component compiled files corresponding to the compiled file package in the software installation package based on the cross-system executable files and library file packages in the target operating environment.
[0142] See also Fig. 9 , Fig. 9 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. Fig. 9 As shown, the terminal 900 may include: at least one processor 901 , at least one network interface 904 , a user interface 903 , a memory 905 , and at least one communication bus 902 .
[0143] The communication bus 902 is used to realize the connection and communication between these components.
[0144] The user interface 903 may include a display screen (Display) and a camera (Camera), and the optional user interface 903 may also include a standard wired interface and a wireless interface.
[0145] The network interface 904 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0146] Among them, the processor 901 may include one or more processing cores. The processor 901 uses various interfaces and lines to connect the various parts of the entire experimental operation terminal 900, and executes various functions and processes data of the terminal 900 by running or executing instructions, programs, code sets or instruction sets stored in the memory 905, and calling data stored in the memory 905. Optionally, the processor 901 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 901 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 901, and it can be implemented by a single chip.
[0147] Among them, the memory 905 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 905 includes a non-transitory computer-readable storage medium. The memory 905 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 905 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 905 may also be optionally at least one storage device located away from the aforementioned processor 901. As Fig. 9 As shown, the memory 905 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a software processing program.
[0148] exist Fig. 9In the digital terminal 900 shown, the user interface 903 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 901 can be used to call the software processing program stored in the memory 905 and specifically perform the following operations:
[0149] Obtain the component compilation file corresponding to the software component in the target software, and determine the library file on which the component compilation file depends;
[0150] Determine the target operating environment of the target software, and generate an initial software installation package based on the component compilation files, library files and the target operating environment;
[0151] A cross-system packaging tool is used to package the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, and a target software installation package for the target software is generated based on the initial software installation package and the cross-system executable file.
[0152] Optionally, when the processor 901 obtains the component compilation file corresponding to the software component in the target software and determines the library file on which the component compilation file depends, the following steps are specifically performed:
[0153] Obtaining software components of the target software, compiling the software components, and obtaining component compilation files corresponding to the software components;
[0154] Query the library files that the component compilation file depends on.
[0155] Optionally, when the processor 901 obtains the software component of the target software, compiles the software component, and obtains the component compilation file corresponding to the software component, the following steps are specifically performed:
[0156] Obtain software components of the target software, compile the software components, and obtain component compilation files corresponding to the binary package;
[0157] Query the library files that the component compilation files depend on, including:
[0158] The library files that the component compilation files depend on are queried based on the library file query command.
[0159] Optionally, after determining the library file on which the component compiled file depends, the processor 901 further performs the following steps:
[0160] Obtain library files, package the library files, and obtain library file packages;
[0161] Determine the library file path of the library file in the library file package, and perform path update processing on the component compilation file based on the library file path.
[0162] Optionally, when the processor 901 performs path update processing on the component compiled file based on the library file path, the following steps are specifically performed:
[0163] Determine the system library path corresponding to the component compilation file, and update the system library path to the library file path.
[0164] Optionally, when the processor 901 generates an initial software installation package based on the component compilation file, the library file, and the target operating environment, the following steps are specifically performed:
[0165] Containerize and package the target operating environment to obtain an operating environment package;
[0166] The component compilation files are packaged to obtain a compilation file package, and the library files are packaged to obtain a library file package;
[0167] The operating environment package, the compilation file package and the library file package are packaged in a container to obtain an initial software installation package.
[0168] Optionally, the processor 901 performs containerized packaging processing on the operating environment package, the compilation file package, and the library file package to obtain an initial software installation package, and specifically performs the following steps:
[0169] Containerizing and packaging the operating environment package, the compilation file package, and the library file package to obtain a quasi-software installation package, and exporting a target activation calling component for activating the target operating environment in the operating environment package;
[0170] Based on the target activation, the calling component and the quasi-software installation package are obtained to obtain the initial software installation package.
[0171] Optionally, after the processor 901 generates a target software installation package for the target software based on the initial software installation package and the cross-system executable file, it further performs the following steps:
[0172] Decompress the target software installation package on the client to obtain a cross-system executable file and an initial software installation package;
[0173] Executing the cross-system executable file to call the target activation calling component in the initial software installation package to activate the target operating environment in the quasi-software installation package;
[0174] In the target operating environment, the component compiled files corresponding to the compiled file packages in the aligned software installation package are installed based on the cross-system executable files and the library file packages.
[0175] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0176] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0177] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0178] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0179] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present application.
[0180] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0181] The above is a description of a software processing method, device, terminal and readable storage medium provided in an embodiment of the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.
Claims
1. A software processing method, wherein: The method comprises: Obtaining a component compilation file corresponding to a software component in the target software, and determining a library file on which the component compilation file depends; Determine the target operating environment of the target software, and generate an initial software installation package based on the component compilation file, the library file and the target operating environment; A cross-system packaging tool is used to package the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, and a target software installation package for the target software is generated based on the initial software installation package and the cross-system executable file.
2. The method according to claim 1, wherein: After determining the library file on which the component compiled file depends, the method further includes: Obtain the library file, and package the library file to obtain a library file package; A library file path of the library file in the library file package is determined, and path update processing is performed on the component compiled file based on the library file path.
3. The method according to claim 2, wherein: The performing path updating processing on the component compiled file based on the library file path includes: Determine the system library path corresponding to the component compiled file, and update the system library path to the library file path.
4. The method according to claim 1, wherein: The generating an initial software installation package based on the component compilation file, the library file and the target operating environment includes: Containerizing and packaging the target operating environment to obtain an operating environment package; Packaging the component compiled files to obtain a compiled file package, and packing the library files to obtain a library file package; The operating environment package, the compiled file package and the library file package are packaged in a container to obtain an initial software installation package.
5. The method according to claim 4, wherein: The containerizing and packaging the operating environment package, the compilation file package, and the library file package to obtain an initial software installation package includes: Containerizing and packaging the operating environment package, the compiled file package, and the library file package to obtain a quasi-software installation package, and exporting a target activation calling component for activating a target operating environment in the operating environment package; An initial software installation package is obtained based on the target activation calling component and the quasi-software installation package.
6. The method according to claim 5, wherein: After generating a target software installation package for the target software based on the initial software installation package and the cross-system executable file, the method further includes: Decompressing the target software installation package on the client to obtain the cross-system executable file and the initial software installation package; Executing the cross-system executable file to call the target activation calling component in the initial software installation package to activate the target operating environment in the quasi-software installation package; In the target operating environment, the component compiled files corresponding to the compiled file package in the quasi-software installation package are installed based on the cross-system executable file and the library file package.
7. The method according to claim 1, wherein: The step of obtaining a component compilation file corresponding to a software component in the target software and determining a library file on which the component compilation file depends includes: Obtaining a software component of the target software, compiling the software component, and obtaining a component compilation file corresponding to the software component; Query the library files that the component compilation file depends on.
8. A software processing device, wherein: The device comprises: An acquisition module, adapted to acquire a component compilation file corresponding to a software component in the target software, and determine a library file on which the component compilation file depends; A configuration module, adapted to determine a target operating environment of the target software, and generate an initial software installation package based on the component compilation file, the library file and the target operating environment; The compiling module is adapted to use a cross-system packaging tool to encapsulate the executable deployment file corresponding to the initial software installation package to obtain a cross-system executable file, and to generate a target software installation package for the target software based on the initial software installation package and the cross-system executable file.
9. A terminal, wherein: The terminal includes: Processor; and A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, which, when executed by a processor, implement the method of any one of claims 1 to 7.
Citation Information
Cited By
Executable program packaging method and device, storage medium and electronic equipment
CN121143817A