CN115509538A - Compilation control method and device, computer equipment and storage medium - Google Patents

Compilation control method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115509538A
CN115509538A CN202211185074.8A CN202211185074A CN115509538A CN 115509538 A CN115509538 A CN 115509538A CN 202211185074 A CN202211185074 A CN 202211185074A CN 115509538 A CN115509538 A CN 115509538A
Authority
CN
China
Prior art keywords
compiling
file
information
log
user
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
CN202211185074.8A
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.)
Wuxi Wentai Information Technology Co ltd
Original Assignee
Wuxi Wentai Information Technology 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 Wuxi Wentai Information Technology Co ltd filed Critical Wuxi Wentai Information Technology Co ltd
Priority to CN202211185074.8A priority Critical patent/CN115509538A/en
Publication of CN115509538A publication Critical patent/CN115509538A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

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

Abstract

The invention discloses a compiling control method and device, computer equipment and a storage medium; the method comprises the following steps: when compiling the target file is completed, acquiring a log file generated by compiling the target file; acquiring a compiling result of the target file according to the log file; if the compiling result is compiling success, generating and sending first information to a user, wherein the first information comprises information for informing the user to obtain a compiled file generated by compiling the target file; and if the compiling result is compiling failure, generating and sending second information to the user, wherein the second information comprises information for informing the user of the reason of the compiling failure in the log file. The compiling control method can inform the user of verifying the downloaded and compiled file or modifying the file for recompilation in time after the target file is compiled, so that the user does not need to search the file generated by compiling and wait for the compiling result, and the working efficiency of the user is improved.

Description

Compilation control method and device, computer equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of program compilation, and relates to but is not limited to a compilation control method and device, computer equipment and a storage medium.
Background
In ODM type companies of original design manufacturers, most research and development personnel adopt internal and external networks for working, modify codes in the internal network, locally compile versions and export the versions to the external network for flashing verification. There are problems in this process: 1. in the compiling process, a user needs to execute a plurality of commands and then finds apk or jar export from the corresponding Out directory, and for a new person, much time is needed for finding the apk of the corresponding Out directory. 2. The compiling process is long, a user does not know when compiling is finished and whether compiling is successful or not, and the user needs to frequently watch the output result of the console to avoid failure caused by modification and delay of working efficiency.
Disclosure of Invention
In view of this, the compilation control method and apparatus, the computer device, and the storage medium provided in the embodiments of the present application can notify the user to download the compiled file for verification or modify the file for recompilation in case of an error after the target file is compiled, and thus the user is no longer required to search the file generated by compilation and wait for the compilation result, thereby improving the working efficiency of the user. The compiling control method and device, the computer device and the storage medium provided by the embodiment of the application are realized as follows:
the compiling control method provided by the embodiment of the application is applied to computer equipment and comprises the following steps:
when compiling the target file is completed, acquiring a log file generated by compiling the target file;
acquiring a compiling result of the target file according to the log file;
if the compiling result is compiling success, generating and sending first information to a user, wherein the first information comprises information for informing the user to obtain a compiled file generated by compiling the target file;
and if the compiling result is compiling failure, generating and sending second information to the user, wherein the second information comprises information for informing the user of the reason of the compiling failure in the log file.
In some embodiments, the obtaining a log file generated by compiling the object file includes:
determining a compiling platform and a compiling mode for compiling the target file;
determining a storage directory of the log file according to the compiling platform and the compiling mode;
and acquiring the log file from the storage directory.
In some embodiments, the obtaining a compilation result of the target file according to the log file includes:
reading the log content in the log file;
and matching the log content with preset result keywords to determine the compiling result.
In some embodiments, the computer device presets an address of the server, an outgoing mailbox parameter, and an incoming mailbox address, and the generating and sending the first information to the user includes:
storing the compiled file to the server according to the address of the server, and receiving a download address of the compiled file fed back by the server;
and sending the download address of the compiled file to a mailbox corresponding to the addressee mailbox address according to the sender mailbox parameter.
In some embodiments, the computer device presets an outgoing mailbox parameter and an incoming mailbox address, and the generating and sending a second message to the user includes:
acquiring information of the compiling failure reason in the log file;
and sending the information of the compiling failure reason to a mailbox corresponding to the addressee mailbox address according to the sending mailbox parameter.
In some embodiments, the obtaining information of the reason for the compilation failure in the log file includes:
reading the log content in the log file;
matching the log content with a preset error reporting keyword to determine an error reporting position;
and acquiring the information of the compiling failure reason corresponding to the error reporting position according to a preset interception mode. .
The compiling control device provided by the embodiment of the application comprises:
the log obtaining module is used for obtaining a log file generated by compiling the target file when the target file is compiled;
the result acquisition module is used for acquiring the compiling result of the target file according to the log file;
the successful processing module is used for generating and sending first information to a user if the compiling result is compiling success, wherein the first information comprises information for informing the user to obtain a compiled file generated by compiling the target file;
and the failure processing module is used for generating and sending second information to the user if the compiling result is compiling failure, wherein the second information comprises information for informing the user of the reason of the compiling failure in the log file.
In some embodiments, the log acquisition module comprises:
a platform determination unit for determining a compiling platform and a compiling mode for compiling the object file;
the position determining unit is used for determining a storage directory of the log file according to the compiling platform and the compiling mode;
and the log acquiring unit is used for acquiring the log file from the storage directory.
The computer device provided by the embodiment of the application comprises a memory and a processor, wherein the memory stores a computer program which can run on the processor, and the processor executes the program to realize the method of the embodiment of the application.
The computer-readable storage medium provided by the embodiment of the present application stores thereon a computer program, and the computer program, when executed by a processor, implements the method provided by the embodiment of the present application.
The compiling control method, the compiling control device, the computer equipment and the computer readable storage medium provided by the embodiment of the application can inform a user of downloading and compiling a file for verification or modifying the file for error recompilation in time after the target file is compiled, and the user does not need to search a file generated by compiling and wait for a compiling result, so that the working efficiency of the user is improved, and the technical problem provided by the background technology is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart of a compilation control method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for obtaining a log file generated by compiling a target file according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for obtaining a compilation result of a target file according to a log file according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for generating and sending first information to a user according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a method for generating and sending second information to a user according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a compiling control device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, specific technical solutions of the present application will be described in further detail below with reference to the accompanying drawings in the embodiments of the present application. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
It should be noted that the terms "first \ second \ third" are used herein to distinguish similar or different objects and do not denote a particular order or importance to the objects, and it should be understood that "first \ second \ third" may be interchanged with a particular order or sequence where permissible to enable embodiments of the present application described herein to be practiced in other than the order shown or described herein.
In ODM type companies of original design manufacturers, most research and development personnel adopt internal and external networks for working, modify codes in the internal network, locally compile versions and export the versions to the external network for flashing verification. The current code compilation process has the following problems: 1. after the compiling process is finished, finding Out the apk or jar export from the corresponding Out directory, and for a new person, it takes much time to find Out the apk of the corresponding Out directory. 2. The compiling process is long, a user does not know when the compiling is finished and whether the compiling is successful or not, and the user needs to frequently see the output result of the console, so that the failure caused by code modification is avoided, and the work efficiency is delayed.
In view of this, the embodiments of the present application provide a compilation control method, which is applied to a computer device, and the computer device may be various types of devices with information processing capability in the implementation process. For example, the computer device may include a personal computer, a notebook computer, a palm top computer, a server, or the like. The functions implemented by the method may be implemented by calling program code by a processor in a computer device, which may, of course, be stored in a computer storage medium, which may comprise at least a processor and a storage medium.
Fig. 1 is a schematic diagram of an implementation flow of a compilation control method according to an embodiment of the present application, where the compilation control method can notify a user to download a compiled file for verification or modify a file for recompilation in time after a target file is compiled, and does not require the user to search a file generated by compilation and wait for a compilation result, thereby improving the working efficiency of the user. As shown in fig. 1, the compiling control method may include:
step 101, when the compiling of the target file is completed, a log file generated by compiling the target file is obtained.
It should be noted that the object file refers to a code file for compiling, and when the compiling of the object file is completed, the following steps of the control program may be automatically started to be executed, so as to achieve the purpose of notifying the compiling result to the user for the user to perform subsequent operations. The method for obtaining the log file generated by compiling the target file is not limited in this embodiment.
In some embodiments, log files generated by compiling with different compiling platforms and compiling modes are stored in different file directories, so that the compiling platforms and the compiling modes used in compiling need to be distinguished.
Fig. 2 is a schematic flowchart of a method for acquiring a log file generated by compiling a target file according to an embodiment of the present application, where as shown in fig. 2, the method for acquiring a log file generated by compiling a target file in step 101 may include:
step 1011: and determining a compiling platform and a compiling mode for compiling the object file.
Step 1012: and determining a storage directory of the log file according to the compiling platform and the compiling mode.
Step 1013: and acquiring the log file from the storage directory.
It should be noted that the compiling platform for determining the compiling target file can be distinguished by reading the symbolic file under the compiling item directory, the symbolic file refers to a file which is generated under the current compiling platform and is obviously different from other compiling platforms, and the corresponding compiling platform can be determined according to the files. Determining a compiling mode of the compiling target file, which can be distinguished by reading parameters introduced by a compiling command, wherein the parameters which must be introduced when the compiling command calls the script comprise: compile type, the incoming parameters may be selected including: and (4) module name. The compiling mode is divided into module compiling and full compiling, if the compiling mode is full compiling, the incoming parameters are only compiling types, and if the compiling mode is module compiling, the incoming parameters comprise the compiling types and the module names, so that the compiling module can determine whether the compiling mode is module compiling or full compiling according to the fact that the module compiling can carry one more parameter.
It can be understood that the compiling is performed under different compiling platforms and compiling modes, the storage directories of the Log files are different, after the compiling platform and the compiling mode are determined, the storage directory of the Log file corresponding to the currently determined compiling platform and compiling mode can be determined according to the preset corresponding relationship between the compiling platform, the compiling mode and the Log file storage directory, and the Log file is read under the storage directory.
In some embodiments, in order to automatically run the following control program when the compiling of the target file is completed, the control program can be realized by modifying the compiling script or monitoring through an external program.
For example, in this embodiment, the control program may be automatically run when the compiling of the target file is completed by modifying the original compiling script, the modifying of the compiling script may be implemented by adding a command parameter in the compiling script and judging the command parameter, and if the compiling command is executed while carrying the command parameter, the control program is executed by calling the preset script after the compiling is completed.
The control program is triggered after project compiling is finished, the control program reads a preset configuration file after the triggering, the configuration file is used for storing some parameters and information needed by the execution of the control program, if key contents in the configuration file are read to be empty, an error report prompt is given and the running is stopped, if the configuration file is read, a symbolic file in a compiling project is read, the current compiling program is determined to run under a certain compiling platform project according to the existence of the symbolic file, such as MTK, high-pass and the like, then a parameter distinguishing compiling mode transmitted by a compiling command is read, and then a Log file generated by compiling under a corresponding project is read according to the compiling platform and the compiling mode.
It is understood that currently, known compiling scripts exist for each item, and the control program can be triggered after the compiling scripts are modified.
Step 102: and acquiring a compiling result of the target file according to the log file.
The information of the compilation result is described in the log file, and the compilation result can be specified by reading the contents of the log file and performing a judgment.
Fig. 3 is a flowchart illustrating a method for obtaining a compiling result of a target file according to a log file according to an embodiment of the present application, and as shown in fig. 3, the method for obtaining the compiling result of the target file according to the log file in step 102 may include:
step 1021: reading the log content in the log file;
step 1022: and matching the log content with a preset result keyword to determine the compiling result.
It should be noted that the compiling result may be determined by reading the log content in the log file and adopting a keyword matching method. The method for reading the log content in the log file is not particularly limited in the present application.
For example, in order to increase the processing speed, the log content in the log file may be read upward from the last line, the read log content is converted into a character string when each line is read, and the character string of each line is matched with a preset keyword, so as to determine whether the compiling is successful. For example, if the compiling is successful, a character string "PASS" may occur, and if the compiling is failed, a character string "FAIL" may occur, and if the log content matches the preset "PASS" keyword, the compiling result is determined to be successful, and if the log content matches the preset "FAIL" keyword, the compiling result is determined to be failed.
It can be understood that, by obtaining the Log content and performing keyword search, it can be determined from the Log file whether the compiling result of the last compiling is successful.
Step 103: and if the compiling result is that the compiling is successful, generating and sending first information to a user, wherein the first information comprises information for informing the user to obtain a compiled file generated by compiling the target file.
It should be noted that, after the compiling result is determined to be successful, the user obtains the compiled file generated by compiling and then verifies the compiled file, so that after the control program determines that the compiling is successful, the user should be notified of the compiling result and send the generated compiled file to the user.
In some embodiments, in order to facilitate notifying the user and sending the compilation file when the compilation is successful, the notifying operation may be accomplished by way of mail sending.
Fig. 4 is a schematic flowchart of a method for generating and sending a first message to a user according to an embodiment of the present application, where as shown in fig. 4, the address of the server, the sending mailbox parameter, and the receiving mailbox address are preset in the computer device, and the method for generating and sending a first message to a user in step 103 may include:
step 1031: storing the compiled file to the server according to the address of the server, and receiving a download address of the compiled file fed back by the server;
step 1032: and sending the download address of the compiled file to a mailbox corresponding to the address of the receiving mailbox according to the sending mailbox parameters.
In order to notify the user of the compilation result and send the compilation file by sending a mail, it is necessary to previously configure information necessary for sending a mail. For example, before the project is compiled, a configuration file may be added for the project, the JSON format may be fixed, and the key-value field may be filled in, where the key field may include: sending mailbox parameters of a sending result after compiling is finished, an receiving mailbox list of the sending result after compiling is finished, a server IP address of a compiled file which is a flashing packet generated by uploading and compiling and the like, and the sending mailbox parameters can also contain filling fields which can include: remark information and the like, namely the optional filling field can be read when the mail is sent, and the value is added to the mail text.
The mail sending mailbox parameters can comprise configuration parameters such as the SDK, the secret key and the like acquired after the mail box official network opens the function of sending the mails by the SDK, the configuration of the mail sending mailbox is completed before the compiling is started, and the mails can be sent by calling the mail sending mailbox parameters after the compiling is completed.
In this embodiment, if the program is successfully compiled, the package-to-package file generated by compiling is first obtained, and it needs to determine whether module compiling or full compiling is performed according to the parameters transmitted when the compiler is triggered, as described above, the method for determining is that the flow of processing in the full compiling mode and the module compiling mode is the same, but the file directories and names of the obtained compiled files generated by compiling are different according to the different compiling modes, and different compiled files are found in different directories and names according to the determined compiling mode, the preset compiling mode, and the directory and name of the file generated by storing the compiling. And then reading the configuration file, uploading the generated compiling file to a configured server in a byte stream mode by using a tool class or socket mode on the network, and generating a corresponding download link. And then the mail text is combined, namely additional logic is executed according to the optional information in the configuration file, or the optional information in the configuration file is directly generated into a mail text character string, a download link is added into the text character string, and the SDK given by a preset mail box official network is called to send the mail to an addressee mail box list in the configuration file.
Step 104: and if the compiling result is compiling failure, generating and sending second information to the user, wherein the second information comprises information for informing the user of the reason of the compiling failure in the log file.
It should be noted that, after determining that the compilation result is a compilation failure, the user normally performs subsequent operations to obtain the reason of the compilation failure, then modifies the current file, and then compiles the file again, so that the user should be notified of the reason of the compilation failure after determining that the compilation failure has occurred.
In some embodiments, in order to conveniently notify the user of the failure reason when the compiling fails, the notification operation may be completed by sending a mail.
Fig. 5 is a schematic flowchart of a method for generating and sending a second message to a user according to an embodiment of the present application, where as shown in fig. 5, the computer device presets an outgoing mailbox parameter and an incoming mailbox address, and the step 104 generates and sends the second message to the user may include:
step 1041: acquiring information of a compiling failure reason in the log file;
step 1042: and sending the information of the compiling failure reason to a mailbox corresponding to the receiving mailbox address according to the sending mailbox parameter.
It should be noted that, in order to notify the user of the reason for the compiling failure, information necessary for sending the mail needs to be configured in advance. For example, before the project is compiled, a configuration file may be added for the project, the JSON format may be fixed, and the key-value field may be filled in, where the key field may include: the parameters of the sending mailbox for sending the result after the compiling is finished, the list of the receiving mailbox for sending the result after the compiling is finished, and the like, and may further include a filling field, and the filling field may include: remark information and the like, namely the optional filling field can be read when the mail is sent, and the remark information is added to the mail text if the remark information has a value.
The mail sending mailbox parameters can comprise configuration parameters such as the SDK, the secret key and the like acquired after the mail box official network opens the function of sending the mails by the SDK, the configuration of the mail sending mailbox is completed before the compiling is started, and the mails can be sent by calling the mail sending mailbox parameters after the compiling is completed.
In this embodiment, if the program determines that the compilation is failed, first, information of a reason of the compilation failure needs to be acquired from the log file, then the configuration file is read, the acquired information of the reason of the compilation failure is combined into a mail text, that is, additional logic is executed according to optional information in the configuration file, or optional information in the configuration file is directly used to generate a mail text character string, the information of the reason of the compilation failure is added to the text character string, and an SDK given by a preset delivery mailbox official network is called to send a mail to an addressee mailbox list in the configuration file.
Further, the step 1041 of acquiring the information of the reason for the compiling failure in the log file may include: reading the log content in the log file; matching the log content with a preset error reporting keyword to determine an error reporting position; and acquiring the information of the compiling failure reason corresponding to the error reporting position according to a preset interception mode.
For example, in order to increase the processing speed, the method of reading the log content in the log file may start to read upwards from the last line, convert the read log content into a character string when reading one line each time, match the character string of each line with a preset key word, thereby determining whether the read log content is an ERROR reporting position, or continue to read upwards from the position where the compiling result is determined before and match the key word until the line with the ERROR reporting is found.
For the MTK platform module compilation, firstly, a control script is newly added to the compilation script, and the logic is as follows: the command contains 2 parameters, a number corresponding to the warehouse path and the project version. Judging that the input parameters are 2, sequentially executing commands source, lunch and mmm compiled by the module, recognizing that the compiling result is successful after compiling is completed, calling a configuration file to upload apk, and sending an email to a user to complete a compiling control flow.
According to the compiling control method provided by the embodiment of the application, the control program is automatically called to obtain the compiling result when the compiling is finished, corresponding operation is carried out according to the compiling result, notification information is generated and sent to the appointed mailbox through the mail. Illustratively, if the compiling is successful, the generated apk or version is automatically exported to a designated server, and meanwhile, an additional download link is added to the mail, wherein the designated server refers to a forwarding server corresponding to the version or apk and other files after the internal network export, and filters and screens the uploaded content. After receiving the mail, the user can directly download the file for verification or revise the code and compile again. If the compiling is wrong, the log file generated by compiling is retrieved, the key information with the error is retrieved from the last line upwards, the key information can be the uplink and the downlink of keywords error and fail, the content is intercepted to the mail text, and the user is reminded to modify the content.
After the embodiment is adopted, for the mode of module compiling and command or script packaging, a user only needs to take the currently modified warehouse path and the project name as parameters, the single command can start module compiling, module name searching in a file is not needed in research and development, the script automatically reads the corresponding file in the input warehouse to obtain, the method is extremely friendly to new people, and the compiling result can be directly sent to a research and development prompt by a mail.
According to the compiling control method provided by the embodiment of the application, under the condition that server resources are not used, research and development efficiency can be provided through simple configuration of scripts and the like, research and development are helped to timely download version verification, or errors in submission are modified and recompiled, the compiling control method is suitable for scenes that compiling result information is not timely transmitted, and flow office can be achieved.
It should be understood that although the various steps in the flow charts of fig. 1-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Based on the foregoing embodiments, the present application provides a compiling control device, where each module included in the device and each unit included in each module may be implemented by a processor; of course, the implementation can also be realized through a specific logic circuit; in implementation, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 6 is a schematic structural diagram of a compilation control apparatus according to an embodiment of the present application, and as shown in fig. 6, the apparatus 200 includes a log obtaining module 201, a result obtaining module 202, a success processing module 203, and a failure processing module 204, where:
a log obtaining module 201, configured to obtain a log file generated by compiling the target file when the compiling of the target file is completed;
a result obtaining module 202, configured to obtain a compiling result of the target file according to the log file;
a successful processing module 203, configured to generate and send first information to a user if the compiling result is that the compiling is successful, where the first information includes information for notifying the user to obtain a compiled file generated by compiling the target file;
and a failure processing module 204, configured to generate and send second information to the user if the compiling result is that the compiling is failed, where the second information includes information for notifying the user of a reason for the compiling failure in the log file.
In some embodiments, the log obtaining module 201 includes: a platform determination unit for determining a compiling platform and a compiling mode for compiling the target file; the position determining unit is used for determining a storage directory of the log file according to the compiling platform and the compiling mode; and the log acquiring unit is used for acquiring the log file from the storage directory.
In some embodiments, the result obtaining module 202 comprises: the first reading unit is used for reading the log content in the log file; and the first matching unit is used for matching the log content with a preset result keyword to determine the compiling result.
In some embodiments, the computer device presets an address of a server, an address of an outgoing mailbox, and an address of an incoming mailbox, and the success processing module 203 includes: the download acquisition unit is used for storing the compiled file into the server according to the address of the server and receiving the download address of the compiled file fed back by the server; and the first sending unit is used for sending the download address of the compiled file to a mailbox corresponding to the receiving mailbox address according to the sending mailbox parameters.
In some embodiments, the computer device presets an outgoing mailbox parameter and an incoming mailbox address, and the failure processing module 204 includes: a reason acquiring unit, configured to acquire information of a reason for compilation failure in the log file; and the second sending unit is used for sending the information of the compiling failure reason to the mailbox corresponding to the addressee mailbox address according to the sending mailbox parameter.
In the embodiment of the application, the compiling control method can inform the user of verifying the downloaded compiled file or modifying the file to be compiled again in time after the target file is compiled, so that the user does not need to search the file generated by compiling and wait for the compiling result, and the working efficiency of the user is improved.
The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that, in the embodiment of the present application, the division of the modules by the compilation control device shown in fig. 6 is schematic, and only one logic function division is used, and another division manner may be used in actual implementation. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, may exist alone physically, or may be integrated into one unit by two or more units. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit. Or may be implemented in a combination of software and hardware.
It should be noted that, in the embodiment of the present application, if the method described above is implemented in the form of a software functional module and sold or used as a standalone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. As such, embodiments of the present application are not limited to any specific combination of hardware and software.
Fig. 7 is a schematic diagram of a structure of a computer device provided in an embodiment of the present application, and as shown in fig. 7, the computer device may be a server, and a structure diagram of the computer device may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a compilation control method.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the methods provided in the above embodiments.
Embodiments of the present application provide a computer program product containing instructions that, when executed on a computer, cause the computer to perform the steps of the method provided by the above-described method embodiments.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the storage medium, the storage medium and the device of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" or "some embodiments" means that a particular feature, structure or characteristic described in connection with the embodiments is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "in some embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of the processes should be determined by their functions and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments. The foregoing description of the various embodiments is intended to highlight different aspects of the embodiments, and for the sake of brevity, identical or similar parts may be referred to one another and will not be repeated herein.
The term "and/or" herein is merely an association relationship describing an associated object, and means that three relationships may exist, for example, object a and/or object B, may mean: the object A exists alone, the object A and the object B exist simultaneously, and the object B exists alone.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments are merely illustrative, for example, the division of the modules is only one logical functional division, and other division manners may be implemented in practice, for example: multiple modules or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be electrical, mechanical or other.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules; can be located in one place or distributed on a plurality of network units; some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be separately used as one unit, or two or more modules may be integrated into one unit; the integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or the like, on which various program codes may be stored.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A compilation control method applied to a computer device includes:
when compiling the target file is completed, acquiring a log file generated by compiling the target file;
acquiring a compiling result of the target file according to the log file;
if the compiling result is compiling success, generating and sending first information to a user, wherein the first information comprises information for informing the user to obtain a compiled file generated by compiling the target file;
and if the compiling result is compiling failure, generating and sending second information to the user, wherein the second information comprises information for informing the user of the reason of the compiling failure in the log file.
2. The method of claim 1, wherein obtaining a log file generated by compiling the object file comprises:
determining a compiling platform and a compiling mode for compiling the target file;
determining a storage directory of the log file according to the compiling platform and the compiling mode;
and acquiring the log file from the storage directory.
3. The method according to claim 1, wherein the obtaining the compilation result of the object file according to the log file comprises:
reading the log content in the log file;
and matching the log content with a preset result keyword to determine the compiling result.
4. The method according to claim 1, wherein the computer device presets an address of a server, an address of an outgoing mailbox parameter, and an address of an incoming mailbox, and the generating and sending a first message to a user comprises:
storing the compiled file to the server according to the address of the server, and receiving a download address of the compiled file fed back by the server;
and sending the download address of the compiled file to a mailbox corresponding to the address of the receiving mailbox according to the sending mailbox parameters.
5. The method according to claim 1, wherein the computer device presets an outgoing mailbox parameter and an incoming mailbox address, and the generating and sending the second information to the user includes:
acquiring information of the compiling failure reason in the log file;
and sending the information of the compiling failure reason to a mailbox corresponding to the receiving mailbox address according to the sending mailbox parameter.
6. The method according to claim 5, wherein the obtaining information of a reason for compilation failure in the log file comprises:
reading the log content in the log file;
matching the log content with a preset error reporting keyword to determine an error reporting position;
and acquiring the information of the compiling failure reason corresponding to the error reporting position according to a preset interception mode.
7. A compiling control device applied to a computer device includes:
the log acquisition module is used for acquiring a log file generated by compiling the target file when the compiling of the target file is finished;
the result acquisition module is used for acquiring the compiling result of the target file according to the log file;
the successful processing module is used for generating and sending first information to a user if the compiling result is compiling success, wherein the first information comprises information for informing the user to obtain a compiled file generated by compiling the target file;
and the failure processing module is used for generating and sending second information to the user if the compiling result is compiling failure, wherein the second information comprises information for informing the user of the reason of the compiling failure in the log file.
8. The apparatus of claim 7, wherein the log obtaining module comprises:
a platform determination unit for determining a compiling platform and a compiling mode for compiling the object file;
the position determining unit is used for determining a storage directory of the log file according to the compiling platform and the compiling mode;
and the log acquisition unit is used for acquiring the log file from the storage catalog.
9. A computer device comprising a memory and a processor, the memory storing a computer program operable on the processor, wherein the processor when executing the program performs the steps of the method of any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
CN202211185074.8A 2022-09-27 2022-09-27 Compilation control method and device, computer equipment and storage medium Pending CN115509538A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211185074.8A CN115509538A (en) 2022-09-27 2022-09-27 Compilation control method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211185074.8A CN115509538A (en) 2022-09-27 2022-09-27 Compilation control method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115509538A true CN115509538A (en) 2022-12-23

Family

ID=84506742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211185074.8A Pending CN115509538A (en) 2022-09-27 2022-09-27 Compilation control method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115509538A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107589A (en) * 2023-03-06 2023-05-12 上海聚水潭网络科技有限公司 Automatic compiling method, device and equipment of software codes and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107589A (en) * 2023-03-06 2023-05-12 上海聚水潭网络科技有限公司 Automatic compiling method, device and equipment of software codes and storage medium
CN116107589B (en) * 2023-03-06 2024-03-19 上海聚水潭网络科技有限公司 Automatic compiling method, device and equipment of software codes and storage medium

Similar Documents

Publication Publication Date Title
US10528454B1 (en) Intelligent automation of computer software testing log aggregation, analysis, and error remediation
US10929117B2 (en) Container image building using shared resources
KR102304698B1 (en) Method and apparatus for automatic device program generation
CN111831563A (en) Automatic interface test method and device and storage medium
US8806475B2 (en) Techniques for conditional deployment of application artifacts
CN111930382B (en) Application page access method, device and equipment
CN111666129B (en) Container mirror image processing method, electronic device, storage medium and system
CN111198863A (en) Rule engine and implementation method thereof
CN109254765B (en) Timing task management method, device, computer equipment and storage medium
CN115509538A (en) Compilation control method and device, computer equipment and storage medium
CN108874464A (en) Middleware automatically scanning assembly method, device and storage medium
CN103595770A (en) Method and device for achieving file downloading through SDK
CN111104158A (en) Software packaging method and device, computer equipment and storage medium
CN107977260B (en) Task submitting method and device
CN111026455A (en) Plug-in generation method, electronic device and storage medium
CN107368339B (en) Container entrance program operation method, system, device and storage medium
CN103595769A (en) Method and device for achieving file uploading through SDK
CN110597783A (en) Database management method, device, equipment and storage medium
WO2017219778A1 (en) Method for configuring service for router, router, and storage medium
CN103957234A (en) Method for sending download files in browser and browser device
CN113608800A (en) Project starting method and device, electronic equipment and storage medium
CN110659022B (en) Method for automatically calling Python script based on Java
CN110059485A (en) Privately owned API detection method, terminal and the storage medium of IOS application
CN115269117A (en) Resource creating method and device, computer equipment and storage medium
CN114895916A (en) Code deployment method, device, storage medium and electronic 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