Method, device, electronic device and medium for packaging applications
By configuring the compilation environment and scripts corresponding to the application type, the inefficient application packaging problem in the existing technology is solved, and efficient multi-scenario packaging and resource conservation are achieved.
Patent Information
- Application Number
- CN202111333015.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-11-11
AI Technical Summary
In the prior art, programmers need to compile and package applications for client devices with different operating systems, resulting in low application development efficiency and consuming a large amount of human resources.
By receiving the source program and required parameters of the application to be packaged, configuring the corresponding compilation environment, calling the compilation script and packaging script corresponding to the application type, compiling and packaging are performed respectively, and generating packaging results for different application types.
It improves the efficiency of application packaging, saves programming human resources, and can simultaneously cover the packaging needs of multiple operating systems.
Smart Images

Figure CN114090063B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the field of application software technology, and specifically to a method, device, electronic device, computer-readable storage medium, and computer program product for packaging an application. Background Art
[0002] Application software is designed to meet user needs in diverse fields and address specific issues. It broadens the application areas of computer systems and enhances hardware functionality. Programmers create application software packages by writing source code, compiling, and packaging it. Users can download and install the application software packages on client devices to meet their needs.
[0003] The approaches described in this section are not necessarily approaches that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any approach described in this section is prior art simply by virtue of its inclusion in this section. Similarly, unless otherwise indicated, the issues raised in this section should not be considered as having been recognized in any prior art. Summary of the Invention
[0004] The present disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for packaging an application.
[0005] According to one aspect of the present disclosure, a method for packaging an application is provided. The method includes: receiving a source program of an application to be packaged and at least one requirement parameter, each of the at least one requirement parameter indicating an application type of the application to be packaged; configuring a compilation environment required for compiling the source program for each application type indicated by the at least one requirement parameter; invoking a compilation script corresponding to the application type in the configured compilation environment to compile the source program to obtain a target program for the application type; and invoking a packaging script corresponding to the application type in the configured compilation environment to package the target program to obtain a packaging result for the application type.
[0006] According to another aspect of the present disclosure, a device for packaging an application is provided. The device includes: a first unit, the first unit being configured to receive a source program of an application to be packaged and at least one requirement parameter, each requirement parameter of the at least one requirement parameter indicating an application type of the application to be packaged; a second unit, the second unit being configured to configure a compilation environment required for compiling the source program for each application type indicated by the at least one requirement parameter; a third unit, the third unit being configured to call a compilation script corresponding to the application type in the configured compilation environment to compile the source program to obtain a target program for the application type; and a fourth unit, the fourth unit being configured to call a packaging script corresponding to the application type in the configured compilation environment to package the target program to obtain a packaging result for the application type.
[0007] According to another aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-described method for packaging applications.
[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is further provided. The computer instructions are used to enable the computer to execute the above-mentioned method for packaging an application.
[0009] According to another aspect of the present disclosure, a computer program product is further provided, including a computer program, wherein the computer program implements the above-mentioned method for packaging an application when executed by a processor.
[0010] According to one or more embodiments of the present disclosure, the efficiency of packaging applications can be improved.
[0011] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.
[0013] Figure 1A schematic diagram illustrating an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;
[0014] Figure 2 A flowchart of a method for packaging an application according to an embodiment of the present disclosure is shown;
[0015] Figure 3 The embodiment according to the present disclosure is shown Figure 2 Flowchart of some example processes in the method;
[0016] Figure 4 A schematic diagram showing a packaging operation using the method for packaging an application according to an embodiment of the present disclosure is shown;
[0017] Figure 5 A structural block diagram of an apparatus for packaging applications according to an embodiment of the present disclosure is shown;
[0018] Figure 6 A structural block diagram of an apparatus for packaging applications according to an embodiment of the present disclosure is shown; and
[0019] Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0020] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0021] In this disclosure, unless otherwise specified, the use of terms such as "first" and "second" to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, while in some cases, based on the context of the description, they may also refer to different instances.
[0022] The terms used in the descriptions of the various examples described in this disclosure are for the purpose of describing specific examples only and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in this disclosure encompasses any one and all possible combinations of the listed items.
[0023] After programmers write source code, they can compile and package it in a local compilation environment to create an application software package. Compilation refers to the process of using a compiler to generate a target program from a source program written in a source language. Typically, the compilation process converts high-level languages into a binary language that computers can understand. Users can then use the application software by downloading and installing the application software package on their client devices.
[0024] In real-world application scenarios, users can install and use application software using different client devices running various operating systems (e.g., iOS-based client devices, Android-based client devices, etc.). Client devices running different operating systems can install different application packages. For example, an application package developed for the Android operating system cannot be installed on a client device running the iOS operating system. Therefore, programmers need to compile and package applications for each client device running different operating systems to meet the packaging requirements of multiple scenarios. This significantly reduces application development efficiency and consumes a significant amount of programming resources.
[0025] Based on this, the present disclosure proposes a method for packaging applications. This method uses requirement parameters to indicate the application type to be packaged, configures a corresponding compilation environment for each application type, and compiles and packages the application in the configured compilation environment to obtain a packaging result for each application type, thereby improving application packaging efficiency and saving programming human resources.
[0026] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0027] Figure 1 FIG2 is a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.
[0028] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the method of packaging an application to be performed.
[0029] In some embodiments, server 120 may also provide other services or software applications that may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0030] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may, in turn, utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0031] The user can use client devices 101, 102, 103, 104, 105 and / or 106 to download and install the application package. The client device can provide an interface that enables the user of the client device to interact with the client device. The client device can also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure can support any number of client devices.
[0032] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing a variety of different applications, such as various internet-related applications, communication applications (such as email applications), and short message service (SMS) applications, and may use various communication protocols.
[0033] The network 110 may be any type of network known to those skilled in the art that can support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0034] Server 120 may include one or more general-purpose computers, specialized server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0035] The computing units in the server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
[0036] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0037] In some embodiments, server 120 may be a distributed system server or a server integrated with blockchain. Server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host equipped with artificial intelligence technology. A cloud server is a host product within the cloud computing service system that addresses the management difficulties and poor scalability of traditional physical hosts and virtual private servers (VPS) services.
[0038] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in a variety of locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0039] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0040] Figure 1 The system 100 may be configured and operated in various ways to enable application of the various methods and apparatuses described in accordance with the present disclosure.
[0041] Figure 2 A flowchart of a method 200 for packaging an application according to an embodiment of the present disclosure is shown.
[0042] like Figure 2 As shown, method 200 includes: step S210, receiving the source program of the application to be packaged and at least one requirement parameter, each of the at least one requirement parameter respectively indicating an application type of the application to be packaged; step S220, configuring the compilation environment required for compiling the source program for each application type respectively indicated by the at least one requirement parameter; step S230, in the configured compilation environment, calling the compilation script corresponding to the application type to compile the source program to obtain a target program for the application type; and step S240, in the configured compilation environment, calling the packaging script corresponding to the application type to package the target program to obtain a packaging result for the application type.
[0043] Therefore, the application type of the application to be packaged is indicated by the requirement parameters, the corresponding compilation environment is configured for each application type, and compilation and packaging are performed in the configured compilation environment to obtain the packaging result for each application type, thereby improving the efficiency of application packaging and saving programming human resources.
[0044] With respect to step S210, according to some embodiments, the application type may include an application type for an iOS client. Accordingly, in step S220, the configured compilation environment for the application type for an iOS client may be a MAC compilation environment. Thus, the required compilation environment can be provided for the compilation and packaging operations for the application type for an iOS client, enabling the server to smoothly perform subsequent compilation and packaging operations.
[0045] For example, after the server 120 receives the source program of the application to be packaged and the requirement parameters P1 and P2 (for example, the requirement parameter P1 indicates that the application type of the application to be packaged is a debug version (debug) application for the iOS client; the requirement parameter P2 indicates that the application type of the application to be packaged is a release version (release) application for the iOS client), it can configure the MAC compilation environment required to compile the source program for each application type indicated by the requirement parameters P1 and P2 respectively.
[0046] With respect to step S210, according to some embodiments, the application type may include an application type for an Android client. Accordingly, in step S220, the compilation environment configured for the application type for the Android client may be a Linux compilation environment or an Ubuntu compilation environment. Thus, the required compilation environment can be provided for the compilation and packaging operations for the application type for the Android client, allowing the server to smoothly perform subsequent compilation and packaging operations.
[0047] For example, after the server 120 receives the source program of the application to be packaged and the requirement parameters P3 and P4 (for example, the requirement parameter P3 indicates that the application type of the application to be packaged is a debug application for an Android client; the requirement parameter P4 indicates that the application type of the application to be packaged is a release application for an Android client), it can configure the Linux compilation environment or Ubuntu compilation environment required to compile the source program for each application type indicated by the requirement parameters P3 and P4 respectively.
[0048] It can be understood that according to some embodiments, the requirement parameters received by the server 120 may be P1, P2, P3 and P4, and the MAC compilation environment required for compiling the source program may be configured for each application type indicated by the requirement parameters P1 and P2; and the Linux compilation environment or Ubuntu compilation environment required for compiling the source program may be configured for each application type indicated by the requirement parameters P3 and P4.
[0049] It is understandable that the configured compilation environment can also be other compilation environments customized by programmers. Moreover, other compilation environments can be customized in the form of image files.
[0050] Figure 3 The embodiment according to the present disclosure is shown Figure 2 Flowchart of a portion of an exemplary process in method 200.
[0051] like Figure 3 As shown, according to some embodiments, Figure 2 In step S230, compiling the source program to obtain a target program for the application type may include: step S331, performing a first-stage compilation on the source program to obtain an intermediate compilation result, wherein the intermediate compilation results corresponding to different application types are the same; and step S332, performing a second-stage compilation on the intermediate result for each application type to obtain a target program for the application type.
[0052] For different application types (such as application types for iOS clients and application types for Android clients), the final compilation result obtained by compiling the source program may include the same code segment. Usually, these same code segments are applicable to different clients, and the compilation script for compiling the same code segment can be the same compilation script. Therefore, the programmer can write the above-mentioned compilation script only once, and the server 120 calls the compilation script to be used for compiling the first phase for different application types. By first compiling the source program in the first phase, an intermediate compilation result is obtained, which corresponds to the above-mentioned same code segment. Then, for each application type, the above-mentioned same code segment is compiled in the second phase, and the target program for each application type can be obtained. Thus, the programmer can reduce the repeated writing of the compilation script for compiling the same code segment. Thus, while covering the packaging requirements of multiple scenes, the programmer's duplication of work can be reduced, thereby further saving programming human resources.
[0053] For example, server 120 may perform a first-stage compilation on the source program to generate a bundle file. The bundle files corresponding to different application types are identical. Based on the application type to be packaged, the generated bundle files are saved to corresponding storage paths. The bundle files are then read from the corresponding storage paths and compiled in a second stage to generate different target programs for different application types.
[0054] As described above, the application type may include an application type for an iOS client. In some embodiments, method 200 may further include receiving an iOS digital certificate and key corresponding to the application type for the iOS client. Furthermore, in step S332, for each application type, performing a second-stage compilation of the intermediate result may include performing a second-stage compilation of the intermediate result based on the iOS digital certificate and key for the application type for the iOS client.
[0055] For iOS client applications, the iOS digital certificate is a digital certificate issued by the iOS operating system vendor to the enterprise or developer to ensure the authenticity and integrity of the application content. The key is used in conjunction with the iOS digital certificate. A second phase of compilation is performed on the intermediate results based on the iOS digital certificate and key, ensuring that the compiled results meet the certification requirements of the iOS operating system vendor.
[0056] In some embodiments, the method 200 may further include: receiving a description file corresponding to an application type for an iOS client, and in step S240 , packaging the target program may include: packaging the target program based on the description file.
[0057] The description file can include the application ID, development certificate or release certificate, and a list of devices on which the application can be installed. The description file can be packaged with the application to describe the application's application ID, release certificate, and the devices on which it can be installed. This allows the packaged result generated based on the description file to meet the requirements of iOS operating system vendors, facilitating subsequent upload or release of the packaged result.
[0058] As described above, the application type may include an application type for an Android client. Furthermore, in step S332, for each application type, performing a second-stage compilation on the intermediate result may include: for the application type for an Android client, performing a second-stage compilation on the intermediate result.
[0059] Unlike application types for iOS clients, for application types for Android clients, the compilation operation can be completed without the corresponding digital certificate during the second stage of compilation, thereby simplifying the compilation process.
[0060] In some embodiments, the method 200 may further include: receiving an Android digital certificate corresponding to the application type for the Android client; electronically signing the packaging result based on the Android digital certificate; and publishing the electronically signed packaging result.
[0061] For application types used for Android clients, after the packaging operation is completed, the package can be electronically signed based on the Android digital certificate, and the server 120 can complete the publishing operation of the electronically signed packaging result. There is no need for programmers to manually upload the packaging result, thereby further improving the efficiency of application development.
[0062] In some embodiments, the at least one requirement parameter may include multiple requirement parameters, and the multiple requirement parameters indicate multiple application types of the application to be packaged. The compiling operation for each application type may be performed in parallel; and the packaging operation for each application type may be performed in parallel.
[0063] Figure 4 FIG. 1 shows a flow chart of a packaging operation using a method for packaging an application according to an embodiment of the present disclosure. Figure 4As shown, the server 120 receives the source program and six requirement parameters P1.1, P1.2, P2.1, P2.2, P3 and P4, wherein the requirement parameter P1.1 indicates that the application type of the application to be packaged is a debug version (debug) application for an enterprise account of an iOS client; the requirement parameter P1.2 indicates that the application type of the application to be packaged is a debug version (debug) application for a company account of an iOS client; the requirement parameter P2.1 indicates that the application type of the application to be packaged is a release version (release) application for an enterprise account of an iOS client; the requirement parameter P2.2 indicates that the application type of the application to be packaged is a release version (release) application for a company account of an iOS client; the requirement parameter P3 indicates that the application type of the application to be packaged is a debug version (debug) application for an Android client; and the requirement parameter P4 indicates that the application type of the application to be packaged is a release version (release) application for an Android client.
[0064] from Figure 4 It can be seen that the compilation operation for each application type can be performed in parallel. That is, for the six application types indicated by the requirement parameters P1.1, P1.2, P2.1, P2.2, P3 and P4 respectively, the first stage of compilation can be performed in parallel to generate bundle files. The six bundle files generated can be the same. In addition, the second stage of compilation can be performed on the six bundle files in parallel to obtain target programs 1 to 4 respectively. Among them, for the four applications indicated by the requirement parameters P1.1, P1.2, P2.1, and P2.2, since they are applications for iOS clients, the corresponding digital certificates and keys need to be combined in the second stage of compilation operation.
[0065] Furthermore, the packaging operation for each application type can be performed in parallel, that is, the packaging operation can be performed in parallel for target programs 1 to 4 to obtain packaging results 1 to 4 respectively.
[0066] Therefore, by performing multiple compilation operations and multiple packaging operations on the same source program in parallel, the packaging efficiency of the application can be further improved while covering the packaging needs of multiple scenarios.
[0067] Figure 4 The situation of performing compilation and packaging operations on six application types in parallel is shown. It should be understood that compilation and packaging operations can also be performed in parallel for more application types indicated by requirement parameters, which will not be described in detail here.
[0068] In some embodiments, the method 200 may further include: generating a QR code corresponding to each packaging result, where the QR code can be scanned by a client device to read or download the corresponding packaging result.
[0069] Programmers can use, for example, any of the client devices 101 to 106 to scan the generated QR code to obtain information related to the application package, or download the packaging result to debug, for example, a debug version of the application package, thereby improving work efficiency.
[0070] Figure 5 A structural block diagram of an apparatus 500 for packaging applications according to an embodiment of the present disclosure is shown.
[0071] like Figure 5 As shown, the device 500 includes: a first unit 510, the first unit 510 is configured to receive a source program of an application to be packaged and at least one requirement parameter, each of the at least one requirement parameter respectively indicating an application type of the application to be packaged; a second unit 520, the second unit 520 is configured to configure a compilation environment required for compiling the source program for each application type respectively indicated by the at least one requirement parameter; a third unit 530, the third unit 530 is configured to call a compilation script corresponding to the application type in the configured compilation environment to compile the source program to obtain a target program for the application type; and a fourth unit 540, the fourth unit 540 is configured to call a packaging script corresponding to the application type in the configured compilation environment to package the target program to obtain a packaging result for the application type.
[0072] According to some embodiments, the third unit 530 can be further configured to: perform a first-stage compilation on the source program to obtain an intermediate compilation result, wherein the intermediate compilation results corresponding to different application types are the same; and for each application type, perform a second-stage compilation on the intermediate result to obtain a target program for the application type.
[0073] According to some embodiments, the application type may include an application type for an iOS client, and the compilation environment configured for the application type for an iOS client is a MAC compilation environment.
[0074] According to some embodiments, the first unit 510 can be further configured to: receive an iOS digital certificate and key corresponding to the application type for the iOS client, and the third unit 530 can be further configured to: perform a second stage of compilation on the intermediate result based on the iOS digital certificate and key for the application type for the iOS client.
[0075] According to some embodiments, the first unit 510 may be further configured to receive a description file corresponding to an application type for an iOS client, and the fourth unit 540 may be further configured to package the target program based on the description file.
[0076] According to some embodiments, the application type may include an application type for an Android client, and the compilation environment configured for the application type for the Android client is a Linux compilation environment or an Ubuntu compilation environment, and wherein the third unit 530 may be further configured to: perform a second stage of compilation on the intermediate result for the application type for the Android client.
[0077] According to some embodiments, at least one requirement parameter may include multiple requirement parameters, and the multiple requirement parameters indicate multiple application types of the application to be packaged, and wherein the third unit 530 may be further configured to perform compilation operations for each application type in parallel; and the fourth unit 540 may be further configured to perform packaging operations for each application type in parallel.
[0078] Figure 6 FIG. 6 is a block diagram of a device 600 for packaging applications according to an embodiment of the present disclosure, wherein the first unit 610 to the fourth unit 640 are the same as the first unit 510 to the fourth unit 540 described above with respect to the device 500 and are not described in detail herein.
[0079] According to some embodiments, the apparatus 600 may further include a fifth unit 650 configured to generate a QR code corresponding to each packaging result, where the QR code can be scanned by a client device to read or download the corresponding packaging result.
[0080] According to an embodiment of the present disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.
[0081] The present disclosure also provides an electronic device. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-described method 200 for packaging applications.
[0082] The present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable the computer to execute the above-mentioned method 200 for packaging an application.
[0083] The present disclosure further provides a computer program product, including a computer program, wherein the computer program implements the above-mentioned method 200 for packaging an application when executed by a processor.
[0084] refer to Figure 7 , a block diagram of an electronic device 700 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0085] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0086] Multiple components within electronic device 700 are connected to I / O interface 705, including an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. Input unit 706 can be any type of device capable of inputting information into electronic device 700. Input unit 706 can receive input numeric or character information and generate key signal input related to user settings and / or function control of the electronic device. It may include, but is not limited to, a mouse, keyboard, touch screen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 707 can be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 708 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 709 allows electronic device 700 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks. It may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver and / or chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0087] The computing unit 701 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as method 200. For example, in some embodiments, method 200 can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the method 200 described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the method 200 in any other appropriate manner (e.g., by means of firmware).
[0088] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0089] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0090] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0092] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0093] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0094] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0095] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only limited by the claims after authorization and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. In addition, the steps may be performed in an order different from that described in this disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after this disclosure.
Claims
1. A method for packaging an application, comprising: Receiving a source program of an application to be packaged and at least one requirement parameter, each of the at least one requirement parameter indicating an application type of the application to be packaged, the application type indicating an application client of the application to be packaged and a version of the application to be packaged, the application client including an iOS client and an Android client, and the version including a debug version and a release version; configuring, for each application type indicated by the at least one requirement parameter, a compilation environment required for compiling the source program; In the configured compilation environment, calling the compilation script corresponding to the application type to compile the source program to obtain a target program for the application type, including: Calling a compilation script corresponding to the same code segment applicable to different clients to perform a first-stage compilation on the source program to obtain an intermediate compilation result, wherein the intermediate compilation results corresponding to different application types are the same; For the application type for the Android client, performing a second-stage compilation on the intermediate compilation result to obtain a target program for the Android client; Receive an iOS digital certificate and key for the application type used for iOS clients; and Based on the iOS digital certificate and the key, performing a second phase of compilation on the intermediate compilation result to obtain a target program for the iOS client; and In the configured compilation environment, calling the packaging script corresponding to the application type to package the target program, and obtaining a packaging result for the application type, including: For Android client applications, receive the Android digital certificate. Based on the Android digital certificate, electronically sign the packaging result for the application type for the Android client to obtain an electronically signed packaging result for the Android client; Receive a description file for the application type for the iOS client; and The target program is packaged based on the description file to obtain a packaging result for an iOS client.
2. The method according to claim 1, wherein The compilation environment configured for the application type for the iOS client is a MAC compilation environment.
3. The method according to claim 1, wherein The compilation environment configured for the application type for the Android client is a Linux compilation environment or an Ubuntu compilation environment.
4. The method according to any one of claims 1 to 3, wherein The at least one requirement parameter includes a plurality of requirement parameters, and the plurality of requirement parameters indicate a plurality of application types of the application to be packaged, and wherein, Performing compilation operations for each application type in parallel; and The packaging operation for each application type is performed in parallel.
5. The method according to any one of claims 1 to 3, further comprising: A QR code corresponding to each packaging result is generated, and the QR code can be scanned by a client device to read or download the corresponding packaging result.
6. A device for packaging an application, comprising: A first unit is configured to receive a source program of an application to be packaged and at least one requirement parameter, each of the at least one requirement parameter indicating an application type of the application to be packaged, the application type indicating an application client of the application to be packaged and a version of the application to be packaged, the application client including an iOS client and an Android client, and the version including a debug version and a release version; a second unit configured to configure a compilation environment required for compiling the source program for each application type respectively indicated by the at least one requirement parameter; The third unit is configured to call a compilation script corresponding to the application type in the configured compilation environment to compile the source program to obtain a target program for the application type. The third unit is further configured to: Calling a compilation script corresponding to the same code segment applicable to different clients to perform a first-stage compilation on the source program to obtain an intermediate compilation result, wherein the intermediate compilation results corresponding to different application types are the same; For the application type for the Android client, performing a second-stage compilation on the intermediate compilation result to obtain a target program for the Android client; Receive an iOS digital certificate and key for the application type used for iOS clients; and Based on the iOS digital certificate and the key, performing a second phase of compilation on the intermediate compilation result to obtain a target program for the iOS client; and The fourth unit is configured to call a packaging script corresponding to the application type in the configured compilation environment to package the target program and obtain a packaging result for the application type. The fourth unit is further configured to: For Android client applications, receive the Android digital certificate. Based on the Android digital certificate, electronically sign the packaging result for the application type for the Android client to obtain an electronically signed packaging result for the Android client; Receive a description file for the application type for the iOS client; and The target program is packaged based on the description file to obtain a packaging result for an iOS client.
7. The device according to claim 6, wherein The compilation environment configured for the application type for the iOS client is a MAC compilation environment.
8. The device according to claim 6, wherein The compilation environment configured for the application type for the Android client is a Linux compilation environment or an Ubuntu compilation environment.
9. The device according to any one of claims 6 to 8, wherein The at least one requirement parameter includes a plurality of requirement parameters, and the plurality of requirement parameters indicate a plurality of application types of the application to be packaged, and wherein, The third unit is further configured to perform a compilation operation for each application type in parallel; and The fourth unit is further configured to perform a packaging operation for each application type in parallel.
10. The apparatus according to any one of claims 6 to 8, further comprising a fifth unit, wherein the fifth unit is configured to generate a QR code corresponding to each packaging result, wherein the QR code can be scanned by a client device to read or download the corresponding packaging result.
11. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5.
13. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method and system for automatically packaging and publishing React Native applications
CN110780917A
Application packaging method, electronic equipment and storage medium
CN112685048A
Generating and publishing applications for multiple platforms
US9645814B1