Installation package generation method, device, medium and electronic device

By compiling scripts to read and process index configuration files and application configuration files, the problems of repetitive work and waste of resources in Android application development are solved, and efficient installation package generation and development efficiency are achieved.

CN110895471BActive Publication Date: 2025-05-16BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201811063850.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-09-12
Publication Date
2025-05-16
Estimated Expiration
2038-09-12

AI Technical Summary

Technical Problem

When developing Android mobile client applications, there are problems of repetitive work and waste of resources, resulting in inefficient development.

Method used

Read the index configuration file of the target application through a compilation script, obtain the corresponding application configuration file, and compile and package the target application according to the application configuration file to generate the installation package.

Benefits of technology

It realizes rapid packaging and generation of installation packages for different applications, improves resource utilization and development efficiency, and reduces the human investment and error rate during packaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110895471B_ABST
    Figure CN110895471B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an installation package generation method, device, medium and electronic device. The installation package generation method comprises: reading an index configuration file of a target application according to a compilation script; obtaining an application configuration file corresponding to the index configuration file according to the index configuration file; compiling and packaging the target application according to the application configuration file to generate an installation package of the target application. The technical solution of the embodiment of the present invention can improve the efficiency of installation package generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer software technology, and in particular to an installation package generation method, device, medium and electronic equipment. Background Art

[0002] With the rapid development of mobile Internet, application software for mobile devices has also seen explosive growth. In particular, as the Android system has occupied a considerable portion of the mobile device market, a large number of mobile clients for the Android system have continued to emerge in the market.

[0003] To meet the needs of different scenarios, Android application developers have developed different applications, and provide the application installation package (AndroidPackage, whose file format is APK) to users, so that users can install and use the applications developed by developers. For different applications, there are also many small functional modules that are common, for example, they all use account names and passwords to log in; for the same application, developers often need to provide different versions, such as paid versions, free versions, etc.; this leads to a lot of repetitive work, and causes waste of resources and low work efficiency of developers.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a method, device, medium and electronic device for generating an installation package, thereby overcoming the problem of low efficiency in application development at least to a certain extent.

[0006] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.

[0007] According to a first aspect of an embodiment of the present invention, there is provided a method for generating an installation package, comprising:

[0008] Read the target application's index configuration file according to the compilation script;

[0009] Acquire, according to the index configuration file, an application configuration file corresponding to the index configuration file;

[0010] The target application is compiled and packaged according to the application configuration file to generate an installation package of the target application.

[0011] In an exemplary embodiment of the present invention, before acquiring the application configuration file corresponding to the index configuration file according to the index configuration file, the method further includes:

[0012] Get multiple functional modules of the application;

[0013] Configure the application configuration file corresponding to the functional module.

[0014] In an exemplary embodiment of the present invention, after configuring the application configuration file corresponding to the functional module, the method further includes:

[0015] According to the functional modules required by the target application, an application configuration file corresponding to the target application is determined.

[0016] In an exemplary embodiment of the present invention, compiling and packaging the target application according to the application configuration file to generate an installation package of the target application includes:

[0017] Copy the application configuration file to the project of the target application;

[0018] The project is packaged to generate an installation package of the target application.

[0019] In an exemplary embodiment of the present invention, after generating the installation package of the target application, the method further includes:

[0020] When installing the target application, the functional modules of the target application are parsed based on the project.

[0021] In an exemplary embodiment of the present invention, before reading the index configuration file of the target application according to the compilation script, the method further includes:

[0022] An index configuration file of the target application is generated according to the application configuration file corresponding to the target application.

[0023] In an exemplary embodiment of the present invention, obtaining, according to the index configuration file, an application configuration file corresponding to the index configuration file includes:

[0024] According to the name of the application configuration file included in the index configuration file, the application configuration file corresponding to the index configuration file is obtained.

[0025] According to a second aspect of an embodiment of the present invention, there is provided an installation package generating device, comprising:

[0026] An index reading unit, used for reading an index configuration file of a target application according to a compilation script;

[0027] An application configuration acquisition unit, configured to acquire an application configuration file corresponding to the index configuration file according to the index configuration file;

[0028] The installation package generating unit is used to compile and package the target application according to the application configuration file to generate an installation package of the target application.

[0029] According to a third aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the installation package generation method described in the first aspect of the above embodiment is implemented.

[0030] According to a fourth aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the installation package generation method as described in the first aspect of the above embodiment.

[0031] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0032] In the technical solution provided by some embodiments of the present invention, an index configuration file of a target application is read through a compilation script, and then an application configuration file corresponding to the index configuration file is obtained, and the target application is compiled and packaged according to the application configuration file to generate an installation package of the target application, so that different applications can be quickly packaged to generate installation packages; on the one hand, different applications can use the same compilation script, which improves resource utilization; on the other hand, different installation packages can be packaged and generated according to different application configuration files, which greatly improves the development efficiency of the application; on another hand, the application can be automatically packaged by executing the compilation script, which saves a lot of manpower, reduces the error rate of the packaging process, and improves the success rate of packaging.

[0033] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The drawings herein are incorporated into and constitute a part of the specification, showing embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0035] Figure 1A schematic diagram of a system architecture for implementing a method for generating an installation package according to an embodiment of the present invention is shown;

[0036] Figure 2 A flowchart of a method for generating an installation package according to an embodiment of the present invention is schematically shown;

[0037] Figure 3 A flowchart of a method for generating an installation package according to another embodiment of the present invention is schematically shown;

[0038] Figure 4 A flowchart of a method for generating an installation package according to another embodiment of the present invention is schematically shown;

[0039] Figure 5 A schematic diagram of the structure of an installation package generating device according to an embodiment of the present invention is shown;

[0040] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0041] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present invention will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0042] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.

[0043] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0044] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0045] Currently, when there are the same parts of code in multiple applications, developers create independent projects for each application, copy the common code to the project, and then package it to generate installation packages for different applications. This method requires a lot of repetitive work and is inefficient. In addition, the compilation tool Gradle provided by Android also provides a productFlavors tool for building different installation packages for the same set of code, but this method relies on the usage specifications of the compilation script of the tool and has limitations.

[0046] Based on this, this example implementation first provides a system architecture for implementing an installation package generation method, which can be applied to various scenarios, such as building an installation package, creating an application, etc. Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0047] The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send request instructions, etc. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as image processing applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0048] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0049] The server 105 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 101, 102, and 103. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0050] It should be noted that the installation package generation method provided in the embodiment of the present invention is generally executed by the server 105 , and accordingly, the installation package generation device is generally provided in the terminal device 101 .

[0051] Based on the above system architecture 100, an exemplary embodiment of the present invention provides a method for generating an installation package. Figure 2 As shown, the method may include steps S210, S220, and S230. Among them:

[0052] Step S210. Read the index configuration file of the target application according to the compiled script;

[0053] Step S220. Obtaining an application configuration file corresponding to the index configuration file according to the index configuration file;

[0054] Step S230: Compile and package the target application according to the application configuration file to generate an installation package of the target application.

[0055] In the installation package generation method of this example embodiment, the index configuration file of the target application is read through a compilation script, and then the application configuration file corresponding to the index configuration file is obtained, and the target application is compiled and packaged according to the application configuration file to generate an installation package for the target application. Different applications can be quickly packaged to generate installation packages; on the one hand, different applications can use the same compilation script, which improves resource utilization; on the other hand, different installation packages can be packaged and generated according to different application configuration files, which greatly improves the development efficiency of the application; on another hand, the application can be automatically packaged by executing the compilation script, which saves a lot of manpower, reduces the error rate of the packaging process, and improves the success rate of packaging.

[0056] Next, we will combine Figures 2 to 4 Each step of the installation package generation method in this example embodiment is described in more detail.

[0057] Step S210: Read the index configuration file of the target application according to the compilation script.

[0058] The above-mentioned compile script may include a script written in the grammatical rules of a scripting language, which is used to compile the code and compile the code into an executable file; multiple commands can be written in one script, so that the compile tool can automatically complete the corresponding operations according to the commands in the script, thereby improving the compilation efficiency; therefore, the compile script can also be used in various compile tools, such as Gradle, Ant, Buck, etc. In addition, the compile script may include parameters or information required to compile the target application, such as the resource package that the target application depends on, the version of the application, the compilation version, the server address, etc.

[0059] The target application may include the application for which the installation package is to be generated; it may also include software products with specific functions; for example, various clients installed on mobile phones, etc. In addition, the development of applications can be assisted by various development platforms or development tools; for example, Eclipse, JBuilder, MyEclipse, etc. When developing applications in these development tools, you can create a project and then create a file directory for storing code in the project; a project can include all the code required for an application; of course, according to actual needs, you can also create multiple projects to implement an application.

[0060] The configuration file may include a file that defines the properties and property values ​​of the application; the configuration file may include the parameters required for the application to run, and may also include the parameters for initializing the application. The configuration file can be used to implement different scenarios and functions of the application, such as a Chinese version of the application, an English version of the application, and so on. In addition, the configuration file can be generated in any format, such as ini, properties, xml, config, and so on. The above-mentioned index configuration file may include a file generated by indexing the configuration file; the configuration file corresponding to the target application can be found through the index configuration file of the target application; therefore, the index configuration file may also include information about the configuration file, such as the name of the configuration file, the storage path, and so on.

[0061] As can be seen from the above, in this exemplary embodiment, the index configuration file of the target application can be read according to the compilation script by writing the name or path of the index configuration file in the command of the compilation script. When the compilation script is executed, the corresponding index configuration file will be automatically read according to the name or path, and then other information will be obtained according to the information configured in the index configuration file. Of course, other commands can also be written in the compilation script to obtain the index configuration file. For example, other compilation scripts or configuration files can be called in the compilation script, and the information of the index configuration file can be written in other compilation scripts or configuration files, so as to read the index configuration file.

[0062] Step S220: Obtain an application configuration file corresponding to the index configuration file according to the index configuration file.

[0063] The above application configuration file may include parameters required by the target application, or parameters of a certain functional module of the target application; it may also include parameters required by the project of the target application; therefore, by configuring different parameter values ​​in different application configuration files, the application can be configured in multiple ways, so that a set of code can generate multiple applications; for example, applications with different themes or scenarios, applications with different home page functions, etc. In other words, different application configuration files can configure different applications, and different applications can be realized through different combinations of multiple application configuration files.

[0064] Furthermore, multiple functional modules of the application can be obtained, and then the application configuration files corresponding to the functional modules can be configured. Among them, corresponding to the effects that the application can achieve, multiple functional modules of the application can be obtained. For example, the target application can implement password login, then the functional module includes a password login module, and the target application can also implement public use by all users, then the functional module includes a public login module. Each application configuration file can be configured according to each functional module; an application configuration file can include the configuration information required for a functional module, or the parameters required for the functional module; for example, the input parameters of the functional module, the information of the code corresponding to the functional module, the dependent resource package, etc. Therefore, using different application configuration files or a combination of multiple application configuration files can realize the rapid generation of different applications with the same code, reducing the work of developers and improving development efficiency.

[0065] Furthermore, after configuring the application configuration file, the application configuration file corresponding to the target application can also be determined according to the functional modules required by the target application. In other words, the corresponding application configuration file can be determined according to the application scenario and function of the target application, for example, the target application is a certain mobile phone brand, the target application is a red theme, etc. By determining the application configuration file corresponding to the target application, the target application can be quickly and personalized configured without the need to write code, which greatly saves manpower and improves efficiency.

[0066] As can be seen from the above, after determining the application configuration file corresponding to the target application, the index configuration file of the target application can be generated according to the application configuration file corresponding to the target application. For example, the index configuration file can be generated according to the name of the application configuration file, or the saved path. Of course, the index configuration file can also be generated according to other information of the application configuration file, for example, the index configuration file can be generated according to the name of the function module corresponding to the application configuration file, etc.

[0067] In this exemplary embodiment, after the index configuration file of the target application is obtained, the corresponding application configuration file can be obtained according to the information in the index configuration file; the application configuration file corresponding to the name can be obtained according to the name of the application configuration file included in the index configuration file; the application configuration file under the corresponding path can also be obtained according to the storage path of the application configuration file included in the index configuration file; of course, the application configuration file can also be obtained in other ways, for example, according to the name and storage path of the application configuration file in the index configuration file, the application configuration file is obtained. Preferably, the application configuration file corresponding to the index configuration file can be obtained according to the name of the application configuration file included in the index configuration file.

[0068] Step S230: Compile and package the target application according to the application configuration file to generate an installation package of the target application.

[0069] The installation package may include a collection of files required for application installation, or may include a compressed file; and the file format of the installation package may also be a compressed file format zip; of course, its file format may also be other formats, such as apk, exe, etc. The files required for application installation may be compressed and packaged to generate an installation package; or the files may be decompressed by executing the installation package, thereby installing the application on the device.

[0070] In this exemplary embodiment, the target application can be compiled and packaged according to the application configuration file, so that the files related to the target application can be compressed to generate an installation package. Among them, when the target application is created, a project can be established, and the various file directories in the project can be used to save related files, such as the target application's code files, configuration files, resource files, etc.; therefore, the project can also be packaged to generate an installation package for the target application. In addition, the target application can be personalized differently according to the application configuration file to generate multiple installation packages; for example, the application's name, logo information, theme, application resource package dependencies, server environment, page function modules, and other information can be differently configured through the configuration file. Therefore, the process of generating an installation package for the target application can also include steps S301 and S302. Figure 3 As shown, where:

[0071] Step S301. Copy the application configuration file to the project of the target application;

[0072] Step S302: Package the project to generate an installation package for the target application.

[0073] The above project may include a code file or a collection of code files that can implement the configuration in the application configuration file; or may include code files of the functional modules of the application, so that when the application is running, the corresponding functional modules can be loaded; for example, if the page theme configured in the application configuration file is blue, then the code file can set the page theme to blue. When the application is running, the corresponding code can be selected and executed according to the corresponding application configuration file to implement the corresponding configuration.

[0074] In this example implementation, in step S301, the application configuration file corresponding to the target application is copied to the project of the target application; a new directory can be created in the project to store the application configuration file; or the application configuration file can be stored in an existing directory in the project, or in a directory automatically created when the project is created, such as assets. In step S302, after the application configuration file is copied to the project, the project is packaged to generate an installation package of the target application. Therefore, installation packages of applications with different themes or functions can be obtained according to different application configuration files.

[0075] Furthermore, after generating the installation package of the target application, the application configuration file can be parsed based on the code in the project when installing the target application, so as to execute the code corresponding to the application configuration file and implement the configuration of the target application by the application configuration file.

[0076] like Figure 4 As shown, taking the Android platform compilation tool Gradle as an example, this exemplary implementation may also include steps S401 to S409. Among them:

[0077] Step S401. Read configuration; the compilation tool can read the relevant configuration of the target application through the compilation script; that is, the basic information of the target application can be written in the compilation script in a format supported by the compilation tool; when the script is executed, the configuration of the target application will be automatically read; the configuration may include the index configuration file in step S402. Therefore, after reading the configuration in step S401, the index configuration file Index.config in step S402 can be obtained, and the Index.config file may be the index configuration file of the target application in this example. Then, according to the file name or path in Index.config, the application configuration file app1.config in step S403 can be obtained, and the app1.config file may include the information required by the target application, such as the name of the target application, the theme, the dependency of the application resource package, the server environment, the functional module, etc. The target application may include multiple application configuration files, that is, multiple application configuration files may be obtained according to the index configuration file of the target application; therefore, by executing the above steps S402 and S403 multiple times, all application configuration files corresponding to the above index configuration file Index.config may be obtained, that is, step S404. Obtain all application configuration files. After obtaining all the application configuration files of the target application, execute step S405 to copy the application configuration files to the project directory; wherein the project may include the code files of the target application. Then in step S406, apk files of different themes may be generated; that is, an installation package corresponding to the above project may be generated. After the installation package is generated, when the installation package is run, step S407 may be executed to parse the application configuration file, configure the target application through the information contained in the application configuration file, call the code that can implement the corresponding configuration, and load the personalized function module of the target application; then the application is displayed through step S408; that is, the application can be used by the user.

[0078] As can be seen from the above, different application configuration files can be generated according to the functions and style themes that the target application needs to implement, wherein each application configuration file can configure a style theme or function module. When executing the script, the corresponding application configuration file can be obtained by reading the index configuration file, thereby generating the installation package of the target application corresponding to the style theme or function module.

[0079] The following describes an embodiment of the device of the present invention, which can be used to execute the above-mentioned installation package generation method of the present invention. Figure 5 As shown, the installation package generating device 500 may include:

[0080] An index reading unit 510 is used to read an index configuration file of a target application according to a compilation script;

[0081] The application configuration acquisition unit 520 is used to acquire the application configuration file corresponding to the index configuration file according to the index configuration file;

[0082] The installation package generating unit 530 is used to compile and package the target application according to the application configuration file to generate an installation package of the target application.

[0083] Since the various functional modules of the installation package generation device of the example implementation of the present invention correspond to the steps of the example implementation of the above-mentioned installation package generation method, for details not disclosed in the implementation of the device of the present invention, please refer to the implementation of the above-mentioned installation package generation method of the present invention.

[0084] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of an electronic device suitable for implementing an embodiment of the present invention. Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0085] like Figure 6 As shown, computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. Various programs and data required for system operation are also stored in RAM 603. CPU 601, ROM 602 and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.

[0086] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0087] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 609, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0088] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0089] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0090] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.

[0091] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the installation package generation method described in the above embodiment.

[0092] For example, the electronic device can implement Figure 2 As shown in: Step S210. Read the index configuration file of the target application according to the compilation script; Step S220. Obtain the application configuration file corresponding to the index configuration file according to the index configuration file; Step S230. Compile and package the target application according to the application configuration file to generate an installation package of the target application.

[0093] For example, the electronic device can achieve Figure 3 The steps shown.

[0094] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0095] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.

[0096] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0097] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for generating an installation package, characterized in that: include: Reading an index configuration file of the target application according to the compilation script, wherein the index configuration file is a file generated by determining a corresponding application configuration file based on an application scenario and function of the target application to establish an index; Acquire, according to the index configuration file, an application configuration file corresponding to the index configuration file; Compiling and packaging the target application according to the application configuration file to generate an installation package of the target application; The application configuration file includes: parameters required by the target application, or parameters of any functional module of the target application, or parameters required by the project of the target application; the target application is obtained by configuring the parameters of the application configuration file or a combination of multiple application configuration files; Before obtaining the application configuration file corresponding to the index configuration file according to the index configuration file, the method further includes: obtaining multiple functional modules of the application program; configuring the application configuration files corresponding to the functional modules; After configuring the application configuration file corresponding to the functional module, the method further includes: determining the application configuration file corresponding to the target application according to the functional module required by the target application; Wherein, the index configuration file also includes: the function module name corresponding to the application configuration file.

2. The installation package generation method according to claim 1, characterized in that: Compiling and packaging the target application according to the application configuration file to generate an installation package of the target application includes: Copy the application configuration file to the project of the target application; The project is packaged to generate an installation package of the target application.

3. The installation package generation method according to claim 2, characterized in that: After the installation package of the target application is generated, the following is also included: When installing the target application, the functional modules of the target application are parsed based on the project.

4. The installation package generation method according to claim 1, characterized in that: Before reading the target application's index configuration file according to the compilation script, it also includes: An index configuration file of the target application is generated according to the application configuration file corresponding to the target application.

5. The installation package generation method according to claim 1, characterized in that: Acquiring an application configuration file corresponding to the index configuration file according to the index configuration file includes: According to the name of the application configuration file included in the index configuration file, the application configuration file corresponding to the index configuration file is obtained.

6. An installation package generating device, characterized in that: include: An index reading unit, configured to read an index configuration file of a target application according to a compilation script, wherein the index configuration file is a file generated by determining a corresponding application configuration file according to an application scenario and function of the target application and establishing an index; An application configuration acquisition unit, configured to acquire an application configuration file corresponding to the index configuration file according to the index configuration file; An installation package generating unit, used for compiling and packaging the target application according to the application configuration file to generate an installation package of the target application; The application configuration file includes: parameters required by the target application, or parameters of any functional module of the target application, or parameters required by the project of the target application; the target application is obtained by configuring the parameters of the application configuration file or a combination of multiple application configuration files; The application configuration acquisition unit also includes: acquiring multiple functional modules of the application; configuring an application configuration file corresponding to the functional modules; determining the application configuration file corresponding to the target application based on the functional modules required by the target application; wherein the index configuration file also includes: the name of the functional module corresponding to the application configuration file.

7. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the installation package generation method according to any one of claims 1 to 5 is implemented.

8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the installation package generation method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Application construction method and system, computer equipment and storage medium

    CN108287694A

  • Android application packaging and uploading method and device, computer device and storage medium

    CN108418717A