A method and system for automatically constructing a mobile installation package using product code
Through automated methods and systems for building mobile installation packages, the security of cloud construction and the complexity of offline construction in the existing technology is solved, and the intranet construction model is realized, which improves R&D efficiency and reduces costs.
Patent Information
- Application Number
- CN202110450318.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-25
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2041-04-25
Smart Images

Figure CN115248700B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile office technology, and in particular to a method and system for automatically constructing a mobile installation package using product codes. Background Art
[0002] With the development of information technology, more and more people are using mobile terminals to perform business. Service providers are paying more attention to how to quickly meet user needs, more conveniently complete mobile application development, and update mobile applications in a timely manner.
[0003] In the existing technology, UNI-APP is a framework that uses Vue.js to develop all front-end applications. Developers write a set of codes and can publish them to multiple platforms such as IOS, Android, Web (responsive), and various small programs (WeChat / Alipay / Baidu / Toutiao / QQ / Dingding / Taobao), quick applications, etc. Currently, UNI-APP provides two building modes, one is cloud building and the other is offline building.
[0004] The cloud construction method requires external network conditions, uses the HBuilderX tool to upload the certificate information of the mobile product, exposes the certificate private key password, and packages the product code and publishes it to the external network server; the offline construction method requires the local construction of a native framework project to ensure that the version number of HBuilderX is consistent with the version number released by the App offline SDK. It is necessary to apply for the offline packaging Key value in the DCloud Developer Center. The configuration is cumbersome, which increases the cost of use and learning. Summary of the invention
[0005] In view of the above analysis, the embodiments of the present invention aim to provide a method and system for automatically building a mobile installation package from product code, so as to solve the problems of insecure product certificates and leakage of product codes when building mobile installation packages in the cloud, cumbersome construction steps and high usage and learning costs when building mobile installation packages offline, and the need to rely on third-party development tools.
[0006] In one aspect, an embodiment of the present invention provides a method for automatically constructing a mobile installation package from a product code, comprising:
[0007] Receive information parameters of the mobile application and create the mobile application;
[0008] Receive a command to initialize a mobile application, obtain information parameters corresponding to the mobile application to be initialized, create a mobile application directory and a code subdirectory on the build server, generate a default mobile application template code in the code subdirectory, upload the template code to the code library, return the code library address corresponding to the mobile application, and complete the initialization of the mobile application;
[0009] The code base receives the updated code of the mobile application and overwrites the boilerplate code to update the code base;
[0010] Receive a command to build a mobile application, obtain and parse information parameters of the mobile application to be built, identify the code library address of the mobile application, pull out the updated mobile application code from it, upload it to the code subdirectory of the mobile application on the build server, overwrite the default mobile application template code generated during initialization, and generate the mobile application code to be built;
[0011] Execute the SHELL script command to build and compile the mobile application code to be built. If the build is successful, the download address of the mobile installation package corresponding to the command to build the mobile application is returned. If the build fails, an error message is returned.
[0012] Receive and parse the download address of the mobile installation package and generate a QR code.
[0013] The beneficial effects of the above technical solution are as follows: it provides a new intranet construction mode, where the environment construction and certificate management are uniformly handed over to the server. Developers only need to request through the front-end network to realize automatic construction and compilation, and return the mobile installation package download address. During the entire construction process, developers do not need to use third-party development tools or contact product certificates. The product code and product certificate are kept confidential, which effectively improves R&D efficiency and reduces usage and learning costs.
[0014] Based on the further improvement of the above method, the information parameters of the mobile application include the application ID, application name and application type of the mobile application; receiving the information parameters of the mobile application and creating the mobile application, including: identifying whether the mobile application already exists in the application information stored in the database table based on the application ID and application name of the mobile application; if not, creating the mobile application based on the application ID, application name and application type of the mobile application, and setting the initialization status, Android build status and IOS build status of the mobile application to incomplete, and generating an initial version number.
[0015] The above further improved solution judges the information parameters of the mobile application to avoid duplicate creation and ensure the uniqueness of the mobile application.
[0016] Based on the further improvement of the above method, if it is identified that the initialization status of the mobile application is incomplete, a button for initializing the application is displayed to receive a command to initialize the mobile application; during initialization, a mobile application template code is generated and the template code is uploaded to the code library. After the initialization is completed, the code library address corresponding to the mobile application is returned, and the initialization status of the mobile application is updated to completed.
[0017] The above further improved solution identifies the initialization operation according to the initialization state of the mobile application and automatically generates the mobile application template code. Developers do not need to start from scratch and can directly develop business functions based on the template code, thereby improving development efficiency.
[0018] Based on the further improvement of the above method, if the initialization status of the mobile application is identified as completed, the Android build status and IOS build status of the mobile application are identified. If the Android build status or the IOS build status is unfinished or completed, a button for building an Android application or building an IOS application is displayed to receive the Android or IOS build mobile application command, and the corresponding build type is added to the information parameters of the mobile application to be built.
[0019] The above further improved solution provides both Android and IOS build operations for a mobile application, and the complex build compilation process can be completed by clicking a button.
[0020] Based on the further improvement of the above method, the build type is identified as Android or IOS, the SHELL script command is executed, the mobile application code to be built is built and compiled, and the mobile installation package corresponding to the build type is generated. The specific steps include:
[0021] Create a package subdirectory in the mobile application directory according to the build type, and copy the sample native framework code in the template directory on the build server to the package subdirectory on the build server;
[0022] Create an APP resource compilation directory in the code subdirectory under the mobile application directory, copy the public compilation project code in the template directory to the APP resource compilation directory, and create the mobile application code to be built into the UNI-CLI project code;
[0023] Create an APP resource file directory in the code subdirectory under the mobile application directory, build the UNI-CLI project code through the VUE-CLI command, and generate APP resource files in the APP resource file directory;
[0024] Copy the APP resource files to the sample native framework code in the package subdirectory to generate the native framework code of the mobile application;
[0025] Build and compile the native framework code of the mobile application. If the build is successful, a mobile application installation package is generated and uploaded to the publishing server. If the build fails, an error message is returned.
[0026] The above further improvement scheme automatically executes a series of operation commands through SHELL scripts, obtains information parameters of mobile applications, and automatically writes relevant configuration files, with high packaging efficiency and low error rate.
[0027] Based on the further improvement of the above method, according to the build type, the sample native framework code of Android or IOS is copied, wherein: the sample native framework code of Android is the ANDROID STUDIO project, including the GRADLE configuration information, the Android native configuration file and the product certificate; the sample native framework code of IOS is the XCODE project, including the ObjC native configuration file, the public library file and the product certificate.
[0028] In the above further improvement scheme, the native framework code and product certificate have been configured in the build server, without the need for developer configuration, which reduces the learning cost and improves the confidentiality of the product certificate.
[0029] Based on the further improvement of the above method, when building and compiling the native framework code of the mobile application, if it is the native framework code of Android, execute the GRADLE command to build it; if it is the native framework code of IOS, execute the XCODE command to build it.
[0030] The above further improved solution integrates two build commands, and automatically distinguishes the build type and executes the build compilation according to different button functions, which is convenient and fast.
[0031] Based on the further improvement of the above method, when executing SHELL script commands, if any command fails to execute, an error message is returned immediately, and the Android build status or IOS build status of the corresponding mobile application is set to incomplete according to the current build type; when the Android or IOS build mobile application command is received again, the updated mobile application code is built and compiled again until the compilation is successful, and the Android build status or IOS build status of the mobile application is changed to completed; each build compilation log is recorded, and the Android build status or IOS build status of the corresponding mobile application is updated.
[0032] The above further improvement scheme can capture and display the abnormal information of SHELL command execution failure on the front-end page, which is convenient for developers to analyze the cause of failure and locate errors; each build log can be traced, which is convenient for viewing the build status, counting the build time, and summarizing the build experience.
[0033] On the other hand, an embodiment of the present invention provides a system for automatically building a mobile installation package with code, including: a user management module, an application management module, a building and compiling module, and a log management module, wherein:
[0034] User management module: used to verify user login and identify user permissions;
[0035] Application management module: used to receive information parameters of mobile applications, create mobile applications, perform initialization operations on mobile applications, create a mobile application directory and a code subdirectory on the build server, generate a default mobile application template code in the code subdirectory, upload the template code to the code library, and display the code library address; execute the operation of building an Android application or building an IOS application, pull the updated mobile application code and upload it to the code subdirectory of the mobile application on the build server, execute the SHELL script to build and compile, return the download address of the mobile installation package corresponding to the mobile application construction operation if the build is successful, parse and generate a QR code, and return an error message if the build fails;
[0036] Build compilation module: used to manage parameters, configuration files and shell scripts;
[0037] Log management module: used to record build compilation logs, view build time, build results, and error information.
[0038] Based on the further improvement of the above system, in the application management module, corresponding operable buttons and prompt information are displayed based on the different states of the identified mobile application: if the initialization state of the mobile application is incomplete, the button for initializing the application is displayed; if it is initializing or has been initialized, the button for initializing the application is hidden, and the corresponding prompt information is displayed; after the initialization is completed, the Android build status or IOS build status of the mobile application is identified; if it is incomplete, the button for building the Android application or the IOS build application is displayed; if it is being built, the corresponding button for building the application is hidden according to the build type; if it is completed, a button for displaying the Android QR code or the IOS QR code is added according to the completed build type, and the generated QR code can be viewed after clicking.
[0039] The beneficial effects of adopting the above-mentioned further improvement plan are: providing developers with convenient mobile application management and construction functions through the front-end page, solidifying and encapsulating complex build scripts, realizing automation and black-boxing of the build process, allowing developers to focus more on understanding and developing business needs, improving development and upgrade efficiency, and reducing usage and learning costs; the server uniformly manages product certificates and compilation frameworks, realizes the separation of development and deployment, and dedicated personnel to manage, making the research and development process of mobile products more reasonable and safer.
[0040] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0042] Figure 1 This is a flow chart of the method for automatically constructing a mobile installation package from product code in Example 1 of the present invention. DETAILED DESCRIPTION
[0043] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0044] Embodiment 1,
[0045] A specific embodiment of the present invention discloses a method for automatically constructing a mobile installation package using product code, such as Figure 1 As shown, the following steps are included:
[0046] S101: receiving information parameters of a mobile application and creating a mobile application;
[0047] S102: receiving a command to initialize a mobile application, obtaining information parameters corresponding to the mobile application to be initialized, creating a mobile application directory and a code subdirectory on the build server, generating a default mobile application template code in the code subdirectory, uploading the template code to a code library, returning a code library address corresponding to the mobile application, and completing the initialization of the mobile application;
[0048] S103: The code base receives the updated code of the mobile application and overwrites the template code to update the code base;
[0049] S104: receiving a command to build a mobile application, obtaining and parsing information parameters of the mobile application to be built, identifying the address of the code library of the mobile application, pulling out the updated mobile application code therefrom, uploading it to the code subdirectory of the mobile application on the build server, overwriting the default mobile application template code generated during initialization, and generating the mobile application code to be built;
[0050] S105: Execute the SHELL script command to build and compile the mobile application code to be built. If the build is successful, the download address of the mobile installation package corresponding to the command to build the mobile application is returned. If the build fails, an error message is returned.
[0051] S106: Receive and parse the download address of the mobile installation package, and generate a QR code.
[0052] During implementation, mobile applications are created and managed uniformly through the front-end page. Developers only need to initialize the mobile application through the front-end network request, automatically build and compile, and return the mobile installation package download address. During the entire build process, developers do not need to access the external network, set up a build environment, or touch product certificates.
[0053] Compared with the prior art, this embodiment solves the shortcomings of the two existing construction modes of UNI-APP and provides a new intranet construction mode. The environment construction and certificate management are uniformly handed over to the server. The product code and product certificate have good confidentiality, which effectively improves R&D efficiency and reduces usage and learning costs.
[0054] It should be noted that in step S101, on the page for creating a mobile application, the information parameters include the application ID, application name and application type of the mobile application; receiving the information parameters of the mobile application, creating the mobile application, including: according to the application ID and application name of the mobile application. Identify whether the mobile application already exists in the application information stored in the database table to avoid duplicate creation and ensure the uniqueness of the mobile application. If it exists, a prompt message pops up; if it does not exist, create the mobile application according to the application ID, application name and application type of the mobile application, and set the initialization state, Android build state and IOS build state of the mobile application to unfinished, and generate the initial version number. Exemplarily, the version number can be generated according to the version number management rules of the mobile product, and the initial generation is 0.0.1. When the mobile application is subsequently constructed, the version number of the mobile application can be changed first, for example: in the development and testing stage, the small version number is gradually increased, and in the formal release stage, the small version number or the large version number is increased according to the scope of change of business requirements. By checking the size and format of the version number, the rationality and standardization of the version number are ensured.
[0055] After the mobile application is created, the created mobile application will be displayed in the mobile application list in pages. Select a mobile application to view the details, and the mobile application information will be displayed on the details page, including: application ID, application name, application type, version number, creation time, and currently operable buttons according to the different states of the application. If the initialization state of the mobile application is identified as incomplete, a button to initialize the application will be displayed to receive the command to initialize the mobile application.
[0056] When the Initialize Application button is clicked, the process proceeds to step S102, where a command to initialize the mobile application is received, information parameters corresponding to the mobile application to be initialized are obtained, a mobile application directory and a code subdirectory are created on the build server according to the application ID and application name, a mobile application template code is generated, and the template code is uploaded to the code library, and the code library address corresponding to the mobile application is returned to complete the initialization of the mobile application. Developers can develop business functions based on the template code without having to start from scratch, thereby improving development efficiency. Exemplarily, the mobile application template code includes general business code, which is suitable for Android and IOS terminals and can be stored in FTP, a server shared directory, or other internal publicly accessible locations; the code library can be an open source or commercial distributed version control tool, such as GIT, CVS, or SVN.
[0057] Each mobile application only needs to be initialized once. After the initialization is completed, the button for initializing the application is hidden on the details page of the mobile application, and a prompt message is displayed. At the same time, the Android build status and IOS build status of the mobile application are identified: if the Android build status or IOS build status is incomplete or completed, a button for building an Android application or building an IOS application is displayed to receive the Android or IOS build mobile application command to build an unfinished mobile application or to build a mobile application that has been built again, and to add the corresponding build type to the information parameters of the mobile application to be built. Both Android and IOS build operations are provided for a mobile application, and the complex build compilation process can be completed by clicking a button.
[0058] After completing the initialization of the mobile application and before building the mobile application, the functional development of the mobile application is completed based on the template code and the functional requirements of the mobile application, and the updated mobile application code obtained after development is submitted to the code library to cover the template code, that is, in step S103, the code library receives the updated code of the mobile application, covers the template code and updates the code library.
[0059] It should be noted that a mobile application can be built multiple times, and the version number of the mobile application can be changed before building. When the command to click the button to build an Android application or build an IOS application is obtained on the details page of the mobile application, step S104 is entered to obtain the information parameters of the mobile application to be built, which include the application ID, application name, application type and build type. According to the application ID passed, the code library address of the mobile application is queried in the mobile application information table, and the updated mobile application code is pulled from the code library address based on the code library address, uploaded to the code subdirectory of the mobile application on the build server, and the default mobile application template code generated during initialization is overwritten to generate the mobile application code to be built; then step S105 is executed, and according to the build type of Android or IOS in the obtained information parameters, the corresponding SHELL script command is executed to build and compile the mobile application code to be built. During the construction process, the information parameters of the mobile application are automatically written into the relevant configuration files, with high packaging efficiency and low error rate. The mobile installation package corresponding to the build type is successfully generated after the construction. The specific steps include:
[0060] S201: creating a package subdirectory in the mobile application directory according to the build type, and copying the sample native framework code in the template directory on the build server to the package subdirectory on the build server;
[0061] It should be noted that the sample native framework code for Android is the ANDROID STUDIO project, including GRADLE configuration information, Android native configuration files and product certificates; the sample native framework code for IOS is the XCODE project, including ObjC (objective-c, the development language of IOS) native configuration files, public library files and product certificates. Developers do not need to build and configure the native framework environment, which reduces the learning cost and improves the confidentiality of the product certificate. Each mobile application only copies the native framework once. When copying, it will determine whether the native framework already exists in the package subdirectory of the mobile application. If it already exists, it will not be copied.
[0062] S202: Create an APP resource compilation directory in the code subdirectory under the mobile application directory, copy the public compilation project code in the template directory to the APP resource compilation directory, and create the mobile application code to be built into the UNI-CLI project code;
[0063] It should be noted that the public compilation project is a general UNI-CLI project, which is integrated with the mobile application code to be built to facilitate the next step of compiling using the VUE-CLI command.
[0064] S203: Create an APP resource file directory in the code subdirectory under the mobile application directory, call the VUE-CLI command to build the UNI-CLI project code, and generate APP resource files in the APP resource file directory; developers do not need to execute one by one manually, which is convenient and fast;
[0065] S204: copy the APP resource file to the sample native framework code in the package subdirectory to generate the native framework code of the mobile application;
[0066] It should be noted that the APP resource files are stored in a specific directory under the package subdirectory. Each time the APP resource files are copied, the previously existing files are deleted first.
[0067] S205: Build and compile the native framework code of the mobile application. If the build is successful, a mobile application installation package is generated and uploaded to the publishing server. If the build fails, an error message is returned.
[0068] It is worth noting that when executing SHELL script commands, if any command fails to execute, an error message will be returned immediately, and the Android build status or IOS build status of the corresponding mobile application will be set to incomplete according to the current build type; when the Android or IOS build mobile application command is received again, the updated mobile application code will be built and compiled again until the compilation is successful, and the Android build status or IOS build status of the mobile application will be changed to completed; each build compilation log will be recorded, and the Android build status or IOS build status of the corresponding mobile application will be updated. When the build fails, the exception information will be captured and displayed on the front-end page, which is convenient for developers to analyze the cause of the failure and locate the error; each build log can be traced, which is convenient for viewing the build status, counting the build time, and summarizing the build experience.
[0069] It should be noted that when building, the application ID, application name, and version number of the current mobile application will be written into the corresponding configuration file. The certificate information has been configured in the native framework, and the certificate information will be automatically written into the mobile installation package. If it is the native framework code of Android, execute the GRADLE command to build, and the successful build will generate an installation package with the suffix APK; if it is the native framework code of IOS, execute the XCODE command to build, and the successful build will generate an installation package with the suffix IPA. The installation package is automatically uploaded to the directory corresponding to the mobile application on the publishing server through the SHELL script, and the download address of the mobile installation package is returned.
[0070] Exemplarily, each mobile installation package generated in the packaging subdirectory overwrites the original installation package file. On the publishing server, it can be decided whether to back up the previous installation package file according to the version number or the development stage.
[0071] In the mobile application details page of step S106, it is identified whether the current mobile application has an Android or IOS mobile installation package address. If so, a button for displaying an Android QR code or an IOS QR code is added. After clicking, the download address of the mobile installation package is parsed and a QR code is generated. Scanning the QR code can automatically download the mobile installation package to install the mobile application.
[0072] Embodiment 2,
[0073] A system for automatically building a mobile installation package from product code is provided, thereby realizing the method for automatically building a mobile installation package in Example 1. The system includes: a user management module, an application management module, a building and compiling module, and a log management module, wherein:
[0074] User management module: used to verify user login and identify user permissions;
[0075] Application management module: used to receive information parameters of mobile applications, create mobile applications, perform initialization operations on mobile applications, create a mobile application directory and a code subdirectory on the build server, generate a default mobile application template code in the code subdirectory, upload the template code to the code library, and display the code library address; execute the operation of building an Android application or building an IOS application, pull the updated mobile application code and upload it to the code subdirectory of the mobile application on the build server, execute the SHELL script to build and compile, and return the download address of the mobile installation package corresponding to the operation of building the mobile application if the build is successful, parse and generate a QR code, and return an error message if the build fails; the specific process of the application management module executing any of the above operations, refer to the corresponding part in Example 1, which will not be repeated here.
[0076] Build compilation module: used to manage parameters, configuration files and shell scripts;
[0077] Log management module: used to record build compilation logs, view build time, build results, and error information.
[0078] During implementation, the front-end page provides developers with convenient mobile application management and building functions. The build process can be tracked, the build results are intuitive, and the compilation configuration is uniformly managed for easy adjustment.
[0079] Compared with the prior art, this embodiment solidifies and encapsulates complex build scripts to automate and black-box the build process, allowing developers to focus more on understanding and developing business needs, improving development and upgrade efficiency, and reducing usage and learning costs; the server uniformly manages product certificates and compilation frameworks, separates development from deployment, and assigns dedicated personnel to manage the development process of mobile products, making it more reasonable and safer.
[0080] Specifically, in the application management module, corresponding operable buttons and prompt information are displayed based on the different states of the identified mobile applications: if the initialization state of the mobile application is incomplete, the button for initializing the application is displayed; if it is initializing or has been initialized, the button for initializing the application is hidden, and the corresponding prompt information is displayed; after the initialization is completed, the Android build status or IOS build status of the mobile application is identified; if it is incomplete, the button for building the Android application or the IOS build application is displayed; if it is being built, the corresponding button for building the application is hidden according to the build type; if it is completed, a button for displaying the Android QR code or the IOS QR code is added according to the completed build type; click to view the generated QR code; scan the QR code to automatically download the mobile installation package to install the mobile application.
[0081] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0082] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for automatically constructing a mobile installation package using product code, characterized in that: The steps include: Receive information parameters of a mobile application and create the mobile application; the information parameters of the mobile application include an application ID, an application name, and an application type of the mobile application; The receiving information parameters of the mobile application and creating the mobile application includes: identifying whether the mobile application already exists in the application information stored in the database table according to the application ID and application name of the mobile application; if not, creating the mobile application according to the application ID, application name and application type of the mobile application, and setting the initialization state, Android build state and IOS build state of the mobile application to incomplete, and generating an initial version number; Receive a command to initialize a mobile application, obtain information parameters corresponding to the mobile application to be initialized, create a mobile application directory and a code subdirectory on a build server, generate a default mobile application template code in the code subdirectory, upload the template code to a code library, return a code library address corresponding to the mobile application, and complete the initialization of the mobile application; The code library receives the updated code of the mobile application and overwrites the template code to update the code library; Receive a command to build a mobile application, obtain and parse information parameters of the mobile application to be built, identify the code library address of the mobile application, pull the updated mobile application code therefrom, upload it to the code subdirectory of the mobile application on the build server, overwrite the default mobile application template code generated during initialization, and generate the mobile application code to be built; Execute the SHELL script command to build and compile the mobile application code to be built, and return the download address of the mobile installation package corresponding to the command to build the mobile application if the build is successful, and return an error message if the build fails. The specific steps include: creating a packaging subdirectory in the mobile application directory according to the build type, and copying the sample native framework code in the template directory on the build server to the packaging subdirectory on the build server; wherein the build type is Android or IOS; creating an APP resource compilation directory in the code subdirectory under the mobile application directory, copying the public compilation project code in the template directory to the APP resource compilation directory, and creating the mobile application code to be built into UNI-CLI project code; creating an APP resource file directory in the code subdirectory under the mobile application directory, building the UNI-CLI project code through the VUE-CLI command, and generating APP resource files in the APP resource file directory; copying the APP resource files to the sample native framework code in the packaging subdirectory to generate the native framework code of the mobile application; building and compiling the native framework code of the mobile application, generating a mobile application installation package after the build is successful, and uploading it to the publishing server, and returning an error message if the build fails; Receive and parse the download address of the mobile installation package and generate a QR code.
2. The method for automatically constructing a mobile installation package using product code according to claim 1, characterized in that: If it is identified that the initialization status of the mobile application is incomplete, a button for initializing the application is displayed to receive the command to initialize the mobile application; during initialization, a mobile application template code is generated and the template code is uploaded to the code library. After the initialization is completed, the code library address corresponding to the mobile application is returned, and the initialization status of the mobile application is updated to completed.
3. The method for automatically constructing a mobile installation package using product code according to claim 2, characterized in that: If it is identified that the initialization status of the mobile application is completed, the Android build status and the IOS build status of the mobile application are identified; if the Android build status or the IOS build status is unfinished or completed, a button for building an Android application or building an IOS application is displayed to receive an Android or IOS command to build a mobile application, and a corresponding build type is added to the information parameters of the mobile application to be built.
4. The method for automatically constructing a mobile installation package using product code according to claim 3, characterized in that: According to the build type, copy the sample native framework code of Android or IOS, wherein: the sample native framework code of Android is an ANDROID STUDIO project, including GRADLE configuration information, Android native configuration file and product certificate; the sample native framework code of IOS is an XCODE project, including ObjC native configuration file, public library file and product certificate.
5. The method for automatically constructing a mobile installation package using product code according to claim 4, characterized in that: When building and compiling the native framework code of the mobile application, if it is the native framework code of Android, execute the GRADLE command to build it; if it is the native framework code of IOS, execute the XCODE command to build it.
6. The method for automatically constructing a mobile installation package using product code according to claim 5, characterized in that: When executing the SHELL script command, if any command fails to execute, an error message is immediately returned, and the Android build status or IOS build status of the corresponding mobile application is set to incomplete according to the current build type; When the Android or IOS build mobile application command is received again, the updated mobile application code is built and compiled again until the compilation is successful, and the Android build status or IOS build status of the mobile application is changed to completed; each build compilation log is recorded, and the corresponding Android build status or IOS build status of the mobile application is updated.
7. A system for automatically constructing a mobile installation package from product code, executing the method for automatically constructing a mobile installation package from product code according to any one of claims 1 to 6, characterized in that: include: User management module, application management module, build compilation module, log management module, including: User management module: used to verify user login and identify user permissions; Application management module: used to receive information parameters of mobile applications, create mobile applications, perform initialization operations on mobile applications, create a mobile application directory and a code subdirectory on the build server, generate a default mobile application template code in the code subdirectory, and upload the template code to the code library; perform operations to build Android applications or build IOS applications, pull updated mobile application codes and upload them to the code subdirectory of the mobile application on the build server, execute SHELL scripts to build and compile, return the download address of the mobile installation package corresponding to the mobile application build operation if the build is successful, parse and generate a QR code, and return an error message if the build fails; Build compilation module: used to manage parameters, configuration files and shell scripts; Log management module: used to record build compilation logs, view build time, build results, and error information.
8. The system for automatically constructing a mobile installation package from product code according to claim 7, characterized in that: In the application management module, based on the different states of the identified mobile application, corresponding operable buttons and prompt information are displayed: if the initialization state of the mobile application is incomplete, a button for initializing the application is displayed; if the initialization is in progress or the initialization is completed, the button for initializing the application is hidden and corresponding prompt information is displayed; After the initialization is completed, identifying the Android build status or the IOS build status of the mobile application; If it is not completed, the button for building the Android application or the IOS application will be displayed. If it is being built, the corresponding button for building the application will be hidden according to the build type. If it is completed, a button for displaying the Android QR code or the IOS QR code will be added according to the completed build type. Click it to view the generated QR code.
Citation Information
Patent Citations
Project initialization code generation method, device, medium and electronic equipment
CN110489106A
Application program construction method, device and system
CN110806935A