CN115248700A - Method and system for automatically constructing mobile installation package by product code - Google Patents

Method and system for automatically constructing mobile installation package by product code Download PDF

Info

Publication number
CN115248700A
CN115248700A CN202110450318.XA CN202110450318A CN115248700A CN 115248700 A CN115248700 A CN 115248700A CN 202110450318 A CN202110450318 A CN 202110450318A CN 115248700 A CN115248700 A CN 115248700A
Authority
CN
China
Prior art keywords
mobile application
code
application
mobile
construction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110450318.XA
Other languages
Chinese (zh)
Inventor
古伟君
覃振洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanguang Software Co Ltd
Original Assignee
Yuanguang Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuanguang Software Co Ltd filed Critical Yuanguang Software Co Ltd
Priority to CN202110450318.XA priority Critical patent/CN115248700A/en
Publication of CN115248700A publication Critical patent/CN115248700A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method and a system for automatically constructing a mobile installation package by product codes, belongs to the technical field of mobile office, and solves the problems that a product certificate is unsafe and product codes are leaked when mobile applications developed based on UNI-APP construct a mobile installation package in a cloud, the construction steps are complicated when the mobile installation package is constructed in an off-line manner, and the use and learning costs are high. The method comprises the following steps: receiving information parameters of the mobile application, and creating the mobile application; receiving an initialization command, generating a default mobile application template code, and returning to a code base address; receiving a construction command, pulling the updated mobile application code, and generating the mobile application code to be constructed; executing the SHELL script command, constructing and compiling a mobile application code to be constructed, successfully constructing a download address returned to the mobile installation package, and generating a two-dimensional code after analysis. The new intranet construction mode is realized, the construction process is automatic, the research and development efficiency is improved, the server uniformly manages the product certificate and constructs the framework, and the safety and the confidentiality are improved.

Description

Method and system for automatically constructing mobile installation package by product code
Technical Field
The invention relates to the technical field of mobile office, in particular to a method and a system for automatically constructing a mobile installation package by product codes.
Background
With the development of information technology, people use mobile terminals to execute services more and more, a service party pays more attention to how to meet user requirements quickly, mobile application development is completed more conveniently, and mobile terminal application is updated in time.
In the prior art, UNI-APP is a framework for developing all front-end applications using vue. At present, UNI-APP provides two construction modes externally, one mode is cloud construction, and the other mode is off-line construction.
The cloud construction mode needs an external network condition, the HBuilderX tool is used for uploading certificate information of the mobile product, a certificate private key password is exposed, and a product code is packaged and issued to an external network server; the offline construction mode needs to build native frame engineering locally, the version number of the HBuilderX is guaranteed to be consistent with the version number issued by the App offline SDK, an offline packing Key value needs to be applied in a DCloud developer center, configuration is complex, and using cost and learning cost are increased.
Disclosure of Invention
In view of the foregoing analysis, embodiments of the present invention are directed to providing a method and a system for automatically building a mobile installation package by product codes, so as to solve the problems that a product certificate is unsafe, product codes are leaked when a mobile installation package is built by an existing cloud, building steps are complicated when a mobile installation package is built offline, use and learning costs are high, and a third party development tool is needed.
In one aspect, an embodiment of the present invention provides a method for automatically constructing a mobile installation package by product codes, including:
receiving information parameters of the mobile application, and creating the mobile application;
receiving an initialization mobile application command, acquiring information parameters corresponding to a mobile application to be initialized, creating a mobile application directory and a code subdirectory on a construction server, generating a default mobile application template code in the code subdirectory, uploading the template code to a code base, returning a code base address corresponding to the mobile application, and completing initialization of the mobile application;
the code base receives codes updated by the mobile application, and the code base is updated by covering the sample plate codes;
receiving a command for constructing the mobile application, acquiring and analyzing information parameters of the mobile application to be constructed, identifying a code base address of the mobile application, pulling an updated mobile application code from the code base address, uploading the updated mobile application code to a code subdirectory of the mobile application on a construction server, covering a default mobile application template code generated during initialization, and generating the mobile application code to be constructed;
executing the SHELL script command, constructing and compiling a mobile application code to be constructed, successfully constructing and returning a download address of a mobile installation package corresponding to the mobile application command, and unsuccessfully constructing and returning error information;
and receiving and analyzing the download address of the mobile installation package to generate the two-dimensional code.
The beneficial effects of the above technical scheme are as follows: the method provides a new intranet construction mode, environment construction and certificate management are uniformly delivered to a server, developers can automatically construct and compile and return to a download address of a mobile installation package only by a front-end network request. In the whole construction process, developers do not need to use a third-party development tool or touch a product certificate, product codes and the product certificate are good in confidentiality, the research and development efficiency is effectively improved, and the use and learning cost is reduced.
Based on the further improvement of the method, the information parameters of the mobile application comprise an application ID, an application name and an application type of the mobile application; receiving information parameters of the mobile application, and creating the mobile application, wherein the method comprises the following steps: identifying whether the mobile application exists in the application information stored in the database table or not according to the application ID and the application name of the mobile application; and if the mobile application does not exist, the mobile application is created according to the application ID, the application name and the application type of the mobile application, the initialization state, the android construction state and the IOS construction state of the mobile application are set to be incomplete, and an initial version number is generated.
The further improvement scheme judges the information parameters of the mobile application, avoids repeated creation and ensures the uniqueness of the mobile application.
Based on the further improvement of the method, if the initialization state of the mobile application is identified as incomplete, a button for initializing the application is displayed so as to receive a command for initializing the mobile application; and during initialization, generating a template code of the mobile application, uploading the template code to a code base, returning to a code base address corresponding to the mobile application after the initialization is finished, and updating the initialization state of the mobile application to be finished.
The further improved scheme identifies the initialization operation according to the initialization state of the mobile application, automatically generates the template code of the mobile application, and directly develops the service function based on the template code without starting from zero by developers, thereby improving the development efficiency.
Based on further improvement of the method, if the initialization state of the mobile application is identified to be completed, the android construction state and the IOS construction state of the mobile application are identified, and if the android construction state or the IOS construction state is not completed or completed, a button for constructing the android application or the IOS application is displayed so as to receive a mobile application construction command of the android or the IOS, and a corresponding construction type is additionally set in the information parameter of the mobile application to be constructed.
According to the further improved scheme, the android and IOS construction operation is provided for one mobile application at the same time, and the complex construction compiling process can be completed by clicking a button.
Based on further improvement of the method, the construction type is identified as android or IOS, a SHELL script command is executed, a mobile application code to be constructed is constructed and compiled, and a mobile installation package corresponding to the construction type is generated, and the specific steps comprise:
creating a packaging subdirectory in the mobile application directory according to the construction type, and copying a template native frame code in a template directory on the construction server into the packaging subdirectory on the construction server;
creating an APP resource compiling directory in a code sub-directory under the mobile application directory, copying a public compiling item code in the template directory into the APP resource compiling directory, and creating a UNI-CLI item code from the mobile application code to be constructed;
creating an APP resource file directory in a code sub-directory under the mobile application directory, constructing a UNI-CLI project code through a VUE-CLI command, and generating an APP resource file in the APP resource file directory;
copying the APP resource file into a template native frame code under the packaging subdirectory to generate a native frame code of the mobile application;
and constructing and compiling a native framework code of the mobile application, successfully constructing to generate a mobile application installation package, uploading to the release server, and returning error information after the construction is failed.
According to the further improvement scheme, a series of operation commands are automatically executed through the SHELL script, the information parameters of the mobile application are obtained, the relevant configuration files are automatically written, the packaging efficiency is high, and the error rate is low.
Based on a further improvement of the above method, copying template native framework code of android or IOS according to build type, wherein: the ANDROID template native frame code is ANDROID STUDIO engineering and comprises GRADLE configuration information, an ANDROID native configuration file and a product certificate; the prototypical native framework code of IOS is XCODE engineering, including ObjC native configuration files, public library files, and product certificates.
In the further improvement scheme, the native framework code and the product certificate are configured in the construction server, so that configuration by developers is not needed, the learning cost is reduced, and the confidentiality of the product certificate is improved.
Based on the further improvement of the method, when the native framework code of the compiled mobile application is constructed, if the native framework code is android native framework code, the GRADLE command is executed for construction; if the native framework code is IOS, the XCODE command is executed to construct.
The further improved scheme integrates two construction commands, automatically distinguishes construction types according to different button functions, executes construction compiling, and is convenient and fast.
Based on further improvement of the method, when the SHELL script command is executed, if any command fails to be executed, error information is immediately returned, and the android construction state or IOS construction state of the corresponding mobile application is set to be unfinished according to the current construction type; when a mobile application building command of the android or IOS is received again, building and compiling the updated mobile application code again until compiling is successful, and changing the android building state or the IOS building state of the mobile application into a finished state; and recording the compiling log constructed each time, and updating the android construction state or the IOS construction state of the corresponding mobile application.
The further improved scheme can capture and display abnormal information of SHELL command execution failure on a front-end page, so that developers can analyze failure reasons conveniently and locate errors; the log is constructed in a tracking way every time, so that the construction condition is convenient to check, the construction time is counted, and the construction experience is summarized.
In another aspect, an embodiment of the present invention provides a system for automatically constructing a mobile installation package by code, where the system includes: the system comprises a user management module, an application management module, a compiling module and a log management module, wherein:
a user management module: the system is used for verifying user login and identifying user authority;
an application management module: the mobile application template code generation method comprises the steps of receiving information parameters of the mobile application, creating the mobile application, executing initialization mobile application operation, creating a mobile application directory and a code subdirectory on a construction server, generating a default mobile application template code in the code subdirectory, uploading the template code to a code base, and displaying the address of the code base; executing an android application building or IOS application building operation, pulling and uploading updated mobile application codes to a code subdirectory of the mobile application on a building server, executing a SHELL script for building and compiling, successfully returning a download address of a mobile installation package corresponding to the mobile application building operation, analyzing and generating a two-dimensional code, and returning error information after the building is failed;
constructing a compiling module: for managing parameters, configuration files and SHELL scripts;
a log management module: the method is used for recording and constructing the compiling log, and checking the constructing time, the constructing result and the error information.
Based on the further improvement of the system, the application management module displays the corresponding operable buttons and prompt messages based on the different states of the identified mobile application: if the initialization state of the mobile application is not completed, displaying a button of the initialization application, and if the initialization is being performed or the initialization is completed, hiding the button of the initialization application and displaying corresponding prompt information; after initialization is completed, identifying an android build state or an IOS build state of the mobile application; if the construction type is not finished, buttons for displaying the android construction application or the IOS construction application are displayed, if the construction is in progress, the corresponding buttons for constructing the application are hidden according to the construction type, if the construction is finished, buttons for displaying the android two-dimensional code or the IOS two-dimensional code are added according to the finished construction type, and the generated two-dimensional code is viewed after clicking.
The beneficial effect of adopting the above further improved scheme is: the front-end page provides convenient mobile application management and construction functions for developers, the complex construction scripts are solidified and packaged, automation and black-boxing of the construction process are realized, the developers are more focused on understanding and developing business requirements, the development and upgrading efficiency is improved, and the use and learning cost is reduced; the server manages the product certificate and the compiling framework in a unified manner, development and deployment are separated, and a specially-assigned person manages the product certificate and the compiling framework in a special manner, so that the research and development process of the mobile product is more reasonable and safer.
In the invention, the technical schemes can be combined with each other to realize more preferable combination schemes. Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the invention, wherein like reference numerals are used to designate like parts throughout.
Fig. 1 is a flowchart of a method for automatically building a mobile installation package by product codes in embodiment 1 of the present invention.
Detailed Description
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate preferred embodiments of the invention and together with the description, serve to explain the principles of the invention and not to limit the scope of the invention.
In the case of the example 1, the following examples are given,
one embodiment of the present invention discloses a method for automatically constructing a mobile installation package by product codes, as shown in fig. 1, the method includes the following steps:
s101: receiving information parameters of the mobile application, and creating the mobile application;
s102: receiving an initialization mobile application command, acquiring information parameters corresponding to a mobile application to be initialized, creating a mobile application directory and a code subdirectory on a construction server, generating a default mobile application template code in the code subdirectory, uploading the template code to a code base, returning a code base address corresponding to the mobile application, and completing initialization of the mobile application;
s103: the code base receives codes updated by the mobile application, and the code base is updated by covering the sample plate codes;
s104: receiving a command for constructing the mobile application, acquiring and analyzing information parameters of the mobile application to be constructed, identifying a code base address of the mobile application, pulling an updated mobile application code from the code base address, uploading the updated mobile application code to a code subdirectory of the mobile application on a construction server, covering a default mobile application template code generated during initialization, and generating the mobile application code to be constructed;
s105: executing the SHELL script command, constructing and compiling a mobile application code to be constructed, successfully constructing and returning a download address of a mobile installation package corresponding to the mobile application command, and unsuccessfully constructing and returning error information;
s106: and receiving and analyzing the download address of the mobile installation package to generate the two-dimensional code.
During implementation, the mobile application is uniformly created and managed through the front-end page, developers can initialize the mobile application only through a front-end network request, the mobile application is automatically constructed and compiled, the download address of the mobile installation package is returned, and in the whole construction process, the developers do not need to visit an external network, do not need to construct a construction environment and do not need to contact a product certificate.
Compared with the prior art, the embodiment overcomes the defects of two existing construction modes of UNI-APP, provides a new intranet construction mode, achieves environment building and certificate management unified delivery to the server, has good product code and product certificate confidentiality, effectively improves research and development efficiency, and reduces use and learning cost.
It should be noted that, in step S101, on the page where the mobile application is created, the information parameter includes an application ID, an application name, and an application type of the mobile application; receiving information parameters of the mobile application, and creating the mobile application, wherein the method comprises the following steps: according to the application ID and the application name of the mobile application. Whether the mobile application exists in the application information stored in the database table or not is identified, repeated creation is avoided, and uniqueness of the mobile application is guaranteed. If yes, popping up prompt information; and if the mobile application does not exist, the mobile application is created according to the application ID, the application name and the application type of the mobile application, the initialization state, the android construction state and the IOS construction state of the mobile application are set to be incomplete, and an initial version number is generated. For example, the version number may be generated according to a version number management rule of the mobile product, and the initial generation is 0.0.1, and when the mobile application is subsequently built, the version number of the mobile application may be changed first, for example: the small version numbers are gradually increased in the development testing stage, the small version numbers or the large version numbers are increased in the formal release stage according to the change range of the service requirements, and the rationality and the normalization of the version numbers are ensured by checking the size and the format of the version numbers.
After the mobile application is created, the created mobile application is displayed in a list of the mobile application in a page mode. Selecting a mobile application to view the details, and displaying the mobile application information in a details page, comprising: application ID, application name, application type, version number, creation time, and displaying currently operable buttons according to different states of the application. And if the initialization state of the mobile application is identified as incomplete, displaying a button for initializing the application so as to receive a command for initializing the mobile application.
When the initialization application button is clicked, the method proceeds to step S102, receives an initialization mobile application command, obtains information parameters corresponding to the mobile application to be initialized, creates a mobile application directory and a code subdirectory on the construction server according to the application ID and the application name, generates a mobile application template code, uploads the template code to the code base, returns to a code base address corresponding to the mobile application, and completes initialization of the mobile application. A developer develops a service function based on the template code without starting from scratch, and the development efficiency is improved. Illustratively, the mobile application template code comprises a universal service code, is suitable for android and IOS terminals, and can be stored in FTP, server shared directory or other positions for internal public access; the codebase may be an open source or commercially available distributed version control tool such as GIT, CVS, SVN.
Each mobile application only needs to be initialized once, and after the initialization is completed, the buttons of the initialization application are hidden on the detail page of the mobile application, and prompt information is displayed. Meanwhile, identifying an android build state and an IOS build state of the mobile application: if the android building state or the IOS building state is incomplete or completed, displaying a button for building the android application or the IOS application so as to receive a mobile application building command of the android or the IOS to build the mobile application which is not completed or to build the mobile application which is completed, and additionally setting a corresponding building type in the information parameter of the mobile application to be built. Android and IOS construction operations are provided for one mobile application at the same time, and a complex construction and compiling process can be completed by clicking a button.
After the initialization of the mobile application is completed and before the mobile application is constructed, the function development of the mobile application is completed based on the template codes and the function requirements of the mobile application, and the updated mobile application codes obtained by the development are submitted to the code base to cover the template codes, that is, in step S103, the code base receives the updated codes of the mobile application, and the code base is updated by covering the template codes.
It should be noted that a mobile application may be built multiple times, and the version number of the mobile application may be changed before the mobile application is built. After the detail page of the mobile application obtains a button command for clicking to construct an android application or construct an IOS application, the process proceeds to step S104, and information parameters of the mobile application to be constructed are obtained, where the information parameters include an application ID, an application name, an application type, and a construction type. Inquiring a code base address of the mobile application in a mobile application information table according to the transferred application ID, pulling an updated mobile application code based on the code base address, uploading the updated mobile application code to a code subdirectory of the mobile application on a construction server, covering a default mobile application template code generated during initialization, and generating the mobile application template code to be constructed; next, step S105 is executed, according to the fact that the construction type in the obtained information parameters is android or IOS, a corresponding SHELL script command is executed, a mobile application code to be constructed is constructed and compiled, the information parameters of the mobile application are automatically written into a relevant configuration file in the construction process, the packaging efficiency is high, the error rate is low, a mobile installation package corresponding to the construction type is successfully generated, and the specific steps include:
s201: creating a packaging subdirectory in the mobile application directory according to the construction type, and copying a template native frame code in a template directory on the construction server into the packaging subdirectory on the construction server;
it should be noted that, the template native frame code of the ANDROID is the ANDROID child project, and includes the GRADLE configuration information, the ANDROID native configuration file and the product certificate; the prototypical native framework code of an IOS is the XCODE project, including obj c (object-c, the development language of IOS) native configuration files, public library files and product certificates. Development personnel are not required to build and configure a native framework environment, the learning cost is reduced, and the confidentiality of the product certificate is improved. Each mobile application only copies the native frame once, and when copying, whether the native frame exists in the packaging subdirectory of the mobile application is judged, and if so, copying is not performed any more.
S202: creating an APP resource compiling directory in a code sub-directory under the mobile application directory, copying a public compiling item code in the template directory into the APP resource compiling directory, and creating a UNI-CLI item code from the mobile application code to be constructed;
it should be noted that the common compiling item is a general UNI-CLI item, and is integrated with the mobile application code to be constructed, so that the VUE-CLI command can be conveniently used for compiling in the next step.
S203: creating an APP resource file directory in a code sub-directory under the mobile application directory, calling a VUE-CLI command to construct a UNI-CLI project code, and generating an APP resource file in the APP resource file directory; developers do not need to manually execute the operation one by one, and the operation is convenient and quick;
s204: copying the APP resource file into a template native frame code under a packaging subdirectory to generate a native frame code of the mobile application;
it should be noted that the APP resource file is stored in a specific directory under the packaging subdirectory, and when the APP resource file is copied each time, the file existing before is deleted.
S205: and constructing and compiling a native framework code of the mobile application, successfully constructing to generate a mobile application installation package, uploading to the release server, and returning error information after the construction is failed.
It is worth noting that when the SHELL script command is executed, if any command fails to be executed, error information is immediately returned, and the android building state or IOS building state of the corresponding mobile application is set to be unfinished according to the current building type; when a mobile application building command of the android or IOS is received again, building and compiling the updated mobile application code again until compiling is successful, and changing the android building state or the IOS building state of the mobile application into a finished state; and recording the compiling log constructed each time, and updating the android construction state or the IOS construction state of the corresponding mobile application. When the construction fails, capturing abnormal information and displaying the abnormal information in a front-end page, so that developers can analyze failure reasons conveniently and locate errors; each time the log is built, the trace can be circulated, the building condition can be conveniently checked, the building time is counted, and the building experience is summarized.
It should be noted that, during construction, the application ID, the application name, and the version number of the current mobile application are written into a corresponding configuration file, the certificate information is already configured in the native framework, and the certificate information is automatically written into the mobile installation package, if the native framework code is android, a GRADLE command is executed for construction, and a suffix name APK installation package is successfully generated after construction; and if the code is the native framework code of the IOS, executing an XCODE command to construct, and successfully generating an IPA installation package with a suffix name. And automatically uploading the installation package to a directory corresponding to the mobile application of the publishing server through the SHELL script, and returning to the download address of the mobile installation package.
For example, the mobile installation package generated in the packaging subdirectory is constructed each time to cover the original installation package files, and on the publishing server, whether the previous installation package files are to be backed up can be determined according to the version number or the development stage.
And in the mobile application detail page in the step S106, identifying whether the mobile application has an android or IOS mobile installation package address, if so, adding a button for displaying an android two-dimensional code or an IOS two-dimensional code, and after clicking, analyzing a download address of the mobile installation package to generate a two-dimensional code. Scanning the two-dimensional code can automatically download the mobile installation package to install the mobile application.
In the case of the example 2, the following examples are given,
a system for automatically building a mobile installation package by product codes is provided, so that the method for automatically building the mobile installation package in the embodiment 1 is realized. The system comprises: the system comprises a user management module, an application management module, a compiling module and a log management module, wherein:
a user management module: the system is used for verifying user login and identifying user authority;
an application management module: the mobile application template code generation method comprises the steps of receiving information parameters of the mobile application, creating the mobile application, executing initialization mobile application operation, creating a mobile application directory and a code subdirectory on a construction server, generating a default mobile application template code in the code subdirectory, uploading the template code to a code base, and displaying the address of the code base; executing an android application building or IOS application building operation, pulling and uploading updated mobile application codes to a code subdirectory of the mobile application on a building server, executing a SHELL script for building and compiling, successfully returning a download address of a mobile installation package corresponding to the mobile application building operation, analyzing and generating a two-dimensional code, and returning error information after the building is failed; the specific process of the application management module executing any one of the above operations is referred to as a corresponding part in embodiment 1, and is not described herein again.
Constructing a compiling module: for managing parameters, configuration files and SHELL scripts;
the log management module: the method is used for recording and constructing the compiling log, and checking the constructing time, the constructing result and the error information.
When the method is implemented, the mobile application management and construction functions which are convenient for developers are provided through the front-end page, the construction process can be tracked, the construction result is visual, the compiling and configuration are managed in a unified mode, and the adjustment is convenient.
Compared with the prior art, the method has the advantages that the complicated construction scripts are solidified and packaged, automation and black box of the construction process are realized, developers are more focused on understanding and developing business requirements, the development and upgrading efficiency is improved, and the use and learning cost is reduced; the server manages the product certificate and the compiling framework in a unified manner, development and deployment are separated, and a specially-assigned person manages the product certificate and the compiling framework in a special manner, so that the research and development process of the mobile product is more reasonable and safer.
Specifically, in the application management module, based on the identified different states of the mobile application, the corresponding operable buttons and prompt information are displayed: if the initialization state of the mobile application is not finished, displaying a button of the initialization application, and if the initialization is in progress or the initialization is finished, hiding the button of the initialization application and displaying corresponding prompt information; after initialization is completed, identifying an android build state or an IOS build state of the mobile application; if the building type is unfinished, buttons of an android building application or an IOS building application are displayed, if the building type is under construction, the corresponding buttons of the building application are hidden according to the building type, if the building type is finished, buttons for displaying an android two-dimensional code or an IOS two-dimensional code are added according to the finished building type, the generated two-dimensional code is viewed after clicking, the two-dimensional code is scanned, and a mobile installation package is automatically downloaded to install the mobile application.
Those skilled in the art will appreciate that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program, which is stored in a computer readable storage medium, to instruct related hardware. The computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory.
While the invention has been described with reference to specific preferred embodiments, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.

Claims (10)

1. A method for automatically constructing a mobile installation package by product codes is characterized by comprising the following steps:
receiving information parameters of a mobile application, and creating the mobile application;
receiving an initialization mobile application command, acquiring information parameters corresponding to a mobile application to be initialized, creating a mobile application directory and a code subdirectory on a construction server, generating a default mobile application template code in the code subdirectory, uploading the template code to a code base, returning a code base address corresponding to the mobile application, and completing initialization of the mobile application;
the code base receives the updated codes of the mobile application, and the code base is updated by covering the template codes;
receiving a command for constructing the mobile application, acquiring and analyzing information parameters of the mobile application to be constructed, identifying a code base address of the mobile application, pulling the updated mobile application code from the code base address, uploading the updated mobile application code to a code subdirectory of the mobile application on a construction server, covering the default mobile application template code generated during initialization, and generating the mobile application code to be constructed;
executing a SHELL script command, constructing and compiling the mobile application code to be constructed, successfully constructing and returning a download address of a mobile installation package corresponding to the mobile application constructing command, and unsuccessfully constructing and returning error information;
and receiving and analyzing the download address of the mobile installation package to generate the two-dimensional code.
2. The method for automatically building a mobile installation package according to the product code of claim 1, wherein the information parameters of the mobile application comprise an application ID, an application name and an application type of the mobile application;
the receiving information parameters of the mobile application and the creating the mobile application comprise: identifying whether the mobile application exists in application information stored in a database table or not according to the application ID and the application name of the mobile application; and if the mobile application does not exist, creating the mobile application according to the application ID, the application name and the application type of the mobile application, setting the initialization state, the android construction state and the IOS construction state of the mobile application to be incomplete, and generating an initial version number.
3. The method for automatically building a mobile installation package according to product code of claim 2, wherein if it is recognized that the initialization state of the mobile application is not completed, a button for initializing the application is displayed so as to receive the initialize mobile application command; and during initialization, generating a template code of the mobile application, uploading the template code to a code library, returning to a code library address corresponding to the mobile application after initialization is finished, and updating the initialization state of the mobile application to be finished.
4. The method for automatically building a mobile installation package according to the product code of claim 3, wherein if the initialization state of the mobile application is identified as completed, an android build state and an IOS build state of the mobile application are identified; if the android building state or the IOS building state is not finished or is finished, displaying a button for building the android application or the IOS application so as to receive a command for building the mobile application of the android or the IOS, and adding and setting a corresponding building type in the information parameter of the mobile application to be built.
5. The method for automatically constructing the mobile installation package according to the product code of claim 4, wherein the step of identifying the construction type as android or IOS, executing a SHELL script command, constructing and compiling the mobile application code to be constructed, and generating the mobile installation package corresponding to the construction type comprises the following specific steps:
creating a packaging subdirectory in the mobile application directory according to the construction type, and copying a template native frame code in a template directory on a construction server into the packaging subdirectory on the construction server;
creating an APP resource compiling directory in a code sub-directory under the mobile application directory, copying a public compiling item code in the template directory into the APP resource compiling directory, and creating the mobile application code to be constructed into a UNI-CLI item code;
creating an APP resource file directory in a code sub-directory under the mobile application directory, constructing the UNI-CLI project code through a VUE-CLI command, and generating an APP resource file in the APP resource file directory;
copying the APP resource file to a template native frame code under the packaging subdirectory to generate a native frame code of the mobile application;
and constructing and compiling the native framework code of the mobile application, successfully constructing to generate a mobile application installation package, uploading to a release server, and returning error information after the construction is failed.
6. The method for automated product code construction of mobile installation packages according to claim 5, characterized in that the template native framework code of android or IOS is copied according to the construction type, wherein: the ANDROID template native frame code is ANDROID STUDIO engineering and comprises GRADLE configuration information, ANDROID native configuration files and product certificates; the prototypical native framework code of the IOS is XCODE engineering, including ObjC native configuration files, public library files and product certificates.
7. The method for automatically building the mobile installation package according to the product code of claim 6, wherein when the native framework code of the mobile application is built and compiled, if the native framework code of android, a GRADLE command is executed for building; if the native framework code is IOS, the XCODE command is executed to construct.
8. The method for automatically constructing the mobile installation package according to the product code of claim 7, wherein when executing the SHELL script command, if any command fails to be executed, an error message is immediately returned, and the corresponding android construction state or IOS construction state of the mobile application is set to be incomplete according to the current construction type; when a mobile application building command of an android or IOS is received again, building and compiling the updated mobile application code again until compiling is successful, and changing the android building state or the IOS building state of the mobile application into a finished state; and recording the compiling logs constructed each time, and updating the corresponding android construction state or IOS construction state of the mobile application.
9. A system for automated building of a mobile installation package by product code, comprising: the system comprises a user management module, an application management module, a compiling module and a log management module, wherein:
a user management module: the system is used for verifying user login and identifying user authority;
an application management module: the mobile application template code generation method comprises the steps of receiving information parameters of mobile application, creating the mobile application, executing initialization mobile application operation, creating a mobile application directory and a code subdirectory on a construction server, generating a default mobile application template code in the code subdirectory, uploading the template code to a code base, and displaying the address of the code base; executing an android application building or IOS application building operation, pulling and uploading updated mobile application codes to a code subdirectory of the mobile application on a building server, executing a SHELL script for building and compiling, successfully returning a download address of a mobile installation package corresponding to the mobile application building operation, analyzing and generating a two-dimensional code, and returning error information after the building is failed;
constructing a compiling module: for managing parameters, configuration files and SHELL scripts;
a log management module: the method is used for recording and constructing the compiling log, and checking the construction time, the construction result and the error information.
10. The system for automatically building a mobile installation package according to the product code of claim 9, wherein the application management module displays the corresponding operable buttons and prompt messages based on the different states of the identified mobile application: if the initialization state of the mobile application is not completed, displaying a button of the initialization application, and if the initialization is being performed or the initialization is completed, hiding the button of the initialization application and displaying corresponding prompt information; after initialization is completed, identifying an android build state or an IOS build state of the mobile application; if the construction type is not finished, buttons for displaying the android construction application or the IOS construction application are displayed, if the construction is in progress, the corresponding buttons for constructing the application are hidden according to the construction type, if the construction is finished, buttons for displaying the android two-dimensional code or the IOS two-dimensional code are added according to the finished construction type, and the generated two-dimensional code is viewed after clicking.
CN202110450318.XA 2021-04-25 2021-04-25 Method and system for automatically constructing mobile installation package by product code Pending CN115248700A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110450318.XA CN115248700A (en) 2021-04-25 2021-04-25 Method and system for automatically constructing mobile installation package by product code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110450318.XA CN115248700A (en) 2021-04-25 2021-04-25 Method and system for automatically constructing mobile installation package by product code

Publications (1)

Publication Number Publication Date
CN115248700A true CN115248700A (en) 2022-10-28

Family

ID=83697622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110450318.XA Pending CN115248700A (en) 2021-04-25 2021-04-25 Method and system for automatically constructing mobile installation package by product code

Country Status (1)

Country Link
CN (1) CN115248700A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115421781A (en) * 2022-11-04 2022-12-02 易方信息科技股份有限公司 Shell script-based IOS (input/output) end project automatic packaging method
CN115509607A (en) * 2022-11-23 2022-12-23 易方信息科技股份有限公司 Method for transmitting instructions from iOS-end packaging project to packaging script across environments
CN116431122A (en) * 2023-03-07 2023-07-14 中电金信软件有限公司 Compiling method, displaying method and device for development effect and readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115421781A (en) * 2022-11-04 2022-12-02 易方信息科技股份有限公司 Shell script-based IOS (input/output) end project automatic packaging method
CN115509607A (en) * 2022-11-23 2022-12-23 易方信息科技股份有限公司 Method for transmitting instructions from iOS-end packaging project to packaging script across environments
CN115509607B (en) * 2022-11-23 2023-03-21 易方信息科技股份有限公司 Method for transmitting instructions from iOS (internet operating system) end packaging project to packaging script across environments
CN116431122A (en) * 2023-03-07 2023-07-14 中电金信软件有限公司 Compiling method, displaying method and device for development effect and readable storage medium
CN116431122B (en) * 2023-03-07 2024-05-07 中电金信软件有限公司 Compiling method and device for development effect and readable storage medium

Similar Documents

Publication Publication Date Title
CN115248700A (en) Method and system for automatically constructing mobile installation package by product code
US9274784B2 (en) Automatic deployment and update of hybrid applications
CN110569035B (en) Code compiling method, device, equipment and storage medium of software development project
CN106415480B (en) High-speed application for installation on a mobile device for enabling remote configuration of the mobile device
US20160154629A1 (en) Application builder based on metadata
KR102368200B1 (en) Selection of code modules for device design
US20080127093A1 (en) Server testing framework
CN107678748B (en) Source code file compiling method and device
WO2013109860A1 (en) Software builder
US20110113340A1 (en) Information-processing device, communication system, computer readable medium, and information-processing method
WO2020015191A1 (en) Business rule releasing and managing method, electronic device and readable storage medium
CN109800135B (en) Information processing method and terminal
JPH0934723A (en) Commitment of introduction plan object for introduction of application program at network
CN110727440A (en) Software packaging method
US20220103555A1 (en) Service deployment method, device, system, and computer-readable storage medium
CN111596928B (en) Application control method and device and electronic equipment
CN110888655A (en) Application publishing method and device
CN112416345B (en) Universal client software integration system
US10459698B2 (en) Framework for generating adapters in an integrated development environment
CN114297056A (en) Automatic testing method and system
CN113946323A (en) Online development method, device, equipment and storage medium based on micro-service system
CN115658496A (en) Extensible Web automatic test method, system, equipment and storage medium
CN113918198B (en) Model-code synchronization method
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN111427770B (en) Resource testing method and related equipment

Legal Events

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