CN117348883A - Template-based application program compiling method and device - Google Patents

Template-based application program compiling method and device Download PDF

Info

Publication number
CN117348883A
CN117348883A CN202311278608.6A CN202311278608A CN117348883A CN 117348883 A CN117348883 A CN 117348883A CN 202311278608 A CN202311278608 A CN 202311278608A CN 117348883 A CN117348883 A CN 117348883A
Authority
CN
China
Prior art keywords
compiling
template
task
code
source code
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
CN202311278608.6A
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.)
Zhejiang Geely Holding Group Co Ltd
Zhejiang Zeekr Intelligent Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Zhejiang Zeekr Intelligent 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 Zhejiang Geely Holding Group Co Ltd, Zhejiang Zeekr Intelligent Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202311278608.6A priority Critical patent/CN117348883A/en
Publication of CN117348883A publication Critical patent/CN117348883A/en
Pending legal-status Critical Current

Links

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 application provides a template-based application program compiling method and device, wherein the method comprises the following steps: acquiring a source code of an application program, and determining a code type of the source code; selecting a compiling template corresponding to the code type from preset compiling templates based on the code type; the compiling template comprises at least one flow task related to compiling; and constructing a compiling task based on the flow task in the compiling template. And executing the compiling task, and compiling the source code of the application program into an executable file.

Description

Template-based application program compiling method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a template-based application compiling method and apparatus.
Background
In the software development process, various compiling tools are used to construct compilations according to the situation, such as jenkins tools. When compiling using the jenkins tool, one task unit may be configured for each item, through which compiling is constructed.
Because the task unit of the jenkins tool is flexibly configured, a developer can flexibly configure the task unit according to different development languages, so that compiling task styles constructed by different developers are different. Meanwhile, for the primary user, jenkins is more complex, and due to the more configuration items of the penkins, the problems of misconfiguration, missing configuration and the like may exist.
Disclosure of Invention
The application provides a template-based application program compiling method, which comprises the following steps:
acquiring a source code of an application program, and determining a code type of the source code;
selecting a compiling template corresponding to the code type from preset compiling templates based on the code type; the compiling template comprises at least one flow task related to compiling;
and constructing a compiling task based on the flow task in the compiling template.
And executing the compiling task, and compiling the source code of the application program into an executable file.
Optionally, constructing a compiling task based on the flow task in the compiling template includes:
acquiring compiling parameters based on the process tasks in the compiling template; the compilation parameters include one or more of the following: address of source code, code branch, compiling command, product address;
and writing the compiling parameters into the compiling template to construct a compiling task.
Optionally, the method further comprises:
and acquiring the execution state of each flow task so as to be checked by a user through a visual interface.
Optionally, the method further comprises:
code checking is conducted on source codes of the application programs;
based on the code check result, it is determined whether the compiling task is successfully executed.
Optionally, the method further comprises:
and acquiring the executable file, and uploading the executable file to a file management server for management.
Optionally, the method further comprises:
and acquiring the executable file and remotely deploying the executable file to a service server.
Optionally, the method further comprises:
in response to a user modifying operation for a flow task in the compiling template, adding at least one flow task in the compiling template and/or deleting at least one flow task in the compiling template.
The application provides a template-based application compiling device, which comprises:
the code acquisition unit is used for acquiring source codes of the application programs and determining code types of the source codes;
the template selection unit is used for selecting a compiling template corresponding to the code type from preset compiling templates based on the code type; the compiling template comprises at least one flow task related to compiling;
and the task construction unit is used for constructing the compiling task based on the flow task in the compiling template.
And the task execution unit is used for executing the compiling task and compiling the source code of the application program into an executable file.
Optionally, the task construction unit is further configured to obtain a compiling parameter based on the flow task in the compiling template; the compilation parameters include one or more of the following: address of source code, code branch, compiling command, product address;
and writing the compiling parameters into the compiling template to construct a compiling task.
Optionally, the apparatus further includes:
and the state acquisition unit is used for acquiring the execution state of each flow task so as to be checked by a user through a visual interface.
Optionally, the apparatus further includes:
a code checking unit for checking code against the source code of the application program;
based on the code check result, it is determined whether the compiling task is successfully executed.
Optionally, the apparatus further includes:
and the file storage unit is used for acquiring the executable file and uploading the executable file to a file management server for management.
Optionally, the apparatus further includes:
the file deployment unit is used for acquiring the executable file and remotely deploying the executable file to the service server.
Optionally, the apparatus further includes:
and the template modification unit is used for responding to the flow task changing operation of the user in the compiling template, adding at least one flow task in the compiling template and/or deleting at least one flow task in the compiling template.
The application also provides electronic equipment, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory stores machine readable instructions and the processor performs the method by invoking the machine readable instructions.
The present application also provides a computer readable storage medium storing machine readable instructions that when invoked and executed by a processor implement the above-described methods.
In the solution described in the above embodiment, a developer may create several compiling templates in advance for different development languages, after acquiring source codes of an application program, may select a compiling template corresponding to a code type of the source code, and construct a compiling task based on the compiling template. The compiling task is built in a templatization mode, different building templates can be provided for different development languages, meanwhile, the templates only open necessary building parameters, the configuration difficulty can be reduced, and the compiling task can be built quickly.
Drawings
Fig. 1 is a flowchart of a template-based application compiling method according to an exemplary embodiment.
Fig. 2 is an application diagram of a template-based application compiling method according to an exemplary embodiment.
Fig. 3 is a hardware configuration diagram of an electronic device in which a template-based application compiling apparatus is located according to an exemplary embodiment.
Fig. 4 is a block diagram of a template-based application compilation apparatus provided in an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments. '
Referring to fig. 1, fig. 1 is a flowchart of a template-based application compiling method according to an exemplary embodiment. The method may comprise the steps of:
step 102, acquiring source codes of application programs and determining code types of the source codes.
In this specification, the code type may be a development language used by the source code, or may be a development project to which the source code belongs, based on which project management tool and build automation tool are developed.
For example, the development language of the source code of the application program is java language, and the java language can be used as the code type of the source code. For another example, the development language of the source code is java language, and can be developed based on a Maven tool, and can also be developed based on an Apache Ant tool, and java-Maven and java-Ant can be used as the code type of the source code.
The specific manner of acquiring the source code of the application program is not particularly limited in this specification. If the source code of the application is managed using a version control system (e.g., git, SVN, etc.), the complete source code may be obtained through a clone or check out repository. For example, executing the gitclone < repository address > in the command line can clone the code locally.
Many open source or commercial projects provide a download or browsing means of source code on their project homepage or code hosting platform (e.g., gitHub, gitLab, bitbucket, etc.). The homepage of the project may be accessed, the source code compression package may be looked up and downloaded, or the source code may be browsed and downloaded directly on the code hosting platform.
The developer may also provide archive files of the source code of the application or download such archive files from the developer's website or other means and decompress to obtain the source code.
Step 104, selecting a compiling template corresponding to the code type from preset compiling templates based on the code type; the compilation template includes at least one compilation-related flow task.
In this specification, a developer may construct different compiling templates in advance for different code types. At least one flow task can be included in the compiling template, and the source code is compiled into an executable file based on flow task automation.
The flow tasks can exist in the template in the form of modules, and a user can quickly add or delete the flow tasks in the modes of adding modules, deleting modules and the like, so that different flow tasks can be quickly configured according to different compiling requirements, and different compiling tasks are built to meet actual requirements.
For example, for source code with a code type of java-Maven, a compiling template may be created, where the compiling template may specifically include necessary flow tasks such as preprocessing for the source code, compiling for the source code, assembling for the source code, linking for the source code, and the like.
In addition, the user can optionally add unit tests for the source code, static scans for the source code and other flow tasks for optimization in the compiling template. The executable files can be automatically deployed to the server through optional addition, and the executable files can be automatically saved to the server and other flow tasks.
After the source code of the application program is acquired, a compiling template corresponding to the code type can be selected from a plurality of preset compiling templates based on the code type of the source code. Meanwhile, a user can also determine whether the flow tasks in the compiling template meet the compiling requirement, and different flow tasks of the fir tree can be added or used according to the compiling requirement.
And step 106, constructing a compiling task based on the flow task in the compiling template.
After selecting the compilation template, the compilation task may be constructed based on a number of flow tasks in the compilation template. Among other things, in one compilation task, the necessary flow tasks may include preprocessing, compiling, assembling, and linking.
During the preprocessing stage, the compiler may perform some preprocessing operations on the source code. For example, process macro definitions, header file inclusion, conditional compilation, etc. The preprocessor modifies the source code according to the preprocessing instruction to generate an intermediate code which is subjected to macro expansion and preprocessing operations. In the compilation stage, the preprocessed code is converted by a compiler into a form of assembly language or machine language. The compiler performs syntactic analysis, lexical analysis, and semantic analysis, checks the correctness of the code, and generates intermediate code or assembly code. In the assembly phase, the assembler converts the code of the assembly language into the form of machine language to generate the target file. The object file contains machine instructions, symbol tables and other connection-related information. In the linking stage, the connector merges the target file with the required library file, solves the external references, and generates the final executable file. The linker will combine multiple target files and library files into a single executable file and allocate address space, correct address references, handle global variables, etc.
Source code may be compiled into an executable file by performing the necessary flow tasks in sequence.
In one embodiment, the compiling parameters may be obtained based on the process tasks in the compiling template; the compilation parameters include one or more of the following: address of source code, code branch, compile command, product address.
The address of the source code may refer to a repository address of a code repository to which the source code belongs. Code branching may specifically refer to that in software development of source code, program flows may go to different code blocks according to different paths according to specific conditions or situations. A compile command refers to the convenience that will be used to compile the source code, and is generally different depending on the development language and development environment. The product address specifically refers to an address where the executable file is saved after the compiling task is executed.
Wherein, according to different flow tasks, compiling parameters which may need to be used are also different. For example, when the flow tasks include an auto-deploy task, the executable file need not be saved, and thus the product address need not be obtained.
The compiling template is externally provided with a plurality of interfaces for compiling parameters, and after the compiling parameters are acquired, the compiling parameters can be automatically written into the compiling template to complete configuration for the compiling template, so that an encoding task is constructed.
The user can also write related compiling parameters manually according to actual demands. For example, when the flow tasks include an auto-deploy task, the executable file need not be saved, and thus the product address need not be obtained. The user may also write the product address to the compiled template by manual writing.
And step 108, executing the compiling task and compiling the source code of the application program into an executable file.
In this specification, the flow tasks in the compiling task may be sequentially executed based on the compiling task to compile the application into an executable file.
Among them, the compiler and the compiling instruction used for compiling may be different for different development languages, and are not specifically limited in this specification.
In one embodiment, the execution state of each flow task may also be obtained, so as to be checked by a user through a visual interface.
In this specification, when the compiling task is executed, the execution state of each flow task may be acquired. For example, a compilation log may be automatically built during the compilation phase, with the compilation log being the result of execution of the compilation phase. For another example, in the code inspection stage, a code inspection result may be generated, and the code inspection result may be used as an execution result of the code inspection stage. For another example, in the deployment phase, the deployment result may be taken as the execution result of the deployment phase.
After the execution state of each flow task is obtained, the execution state can be displayed through a visual interface, and a user can check the execution result of each flow task through the visual interface to determine whether each flow task is successfully executed.
In one embodiment, a code check may also be performed with respect to the source code of the application program, and based on the code check result, it is determined whether the compiling task is successfully executed.
Wherein, static inspection for codes, automatic inspection of coding style of codes, possible bug errors of codes and the like can be integrated in the template. The user can preset a quality access control to determine whether the compiling task is successfully executed.
The quality gate inhibition method specifically comprises the step of carrying out grammar check on source codes to ensure that the codes accord with grammar specifications of programming languages. This helps to capture common grammatical errors such as misspellings, lack of semicolons, bracket mismatches, etc.
The type checking of source code is performed, and many static type programming languages perform the type checking at compile time to ensure that the use of variables complies with the type specification. This may help capture type-related errors such as type mismatches, non-declared variables, and the like.
Static code analysis is performed on the source code, which can be scanned before compiling to check for potential problems and errors. For example, unused variables are checked, exceptions are not handled, best practices are violated, etc.
After compiling, unit test is carried out to verify the correctness of the code. Unit testing is an automated test performed on the smallest unit (e.g., function, method) in code.
In one embodiment, the executable file may also be obtained and uploaded to a file management server for management, or the package may be deployed remotely to a service server.
In this specification, the generated executable files may be different due to different development languages, so the manner of obtaining the executable files is also different, and the manner of obtaining the executable files is not specifically limited in this specification.
If the code type of the constructed template is java language, the jar file can be searched from the target file, and the largest jar file is used as an executable file generated by compiling.
If the code type of the build template is javascript language, the executable file is typically saved in a dist.zip compressed file.
After the executable file is obtained, the executable file may be saved in a file management server, or the executable file may be directly and remotely deployed to a service server.
When the remote deployment is performed, if the code type of the constructed template is java language, the old service can be ended through a kill command, and the jar file is deployed through a related command.
If the code type of the constructed template is javascript language, the dist.zip file can be decompressed, and related services such as nginx and the like can be started newly.
In one embodiment, after building the compilation task, the user may need to modify the flow tasks in the compilation task, and the user may modify the flow tasks in the compilation template. Thus, at least one flow task may also be added to the compilation template and/or at least one flow task may be deleted from the compilation template in response to a user modifying operation for the flow task in the compilation template.
Referring to fig. 2, fig. 2 is an application schematic diagram of a template-based application compiling method according to an exemplary embodiment.
As shown in fig. 2, the source code of the application may be obtained and the code type of the source code may be further determined. The specific implementation manner of obtaining the source code of the application program is not specifically limited in this specification.
After determining the code type of the source code, a compiling template corresponding to the code type of the source code may be selected from pre-written compiling templates. The compiling template may include a flow task for completing compiling.
Further, a compiling task may be constructed based on the compiling template. After the compiling task is constructed, the user can add or delete the flow task after modifying the compiling template, and reconstruct a new compiling task.
Based on the compilation task, source code of the application may be compiled into an executable file. Meanwhile, the compiling result of the compiling task can be uploaded to a visual interface.
The compiling template can be integrated with a code checking function module, meanwhile, an access control is set, and whether the compiling task is successfully executed is determined based on a code checking result. Meanwhile, the result of the code inspection can be uploaded to the visual interface.
After the executable file is generated, the executable file can be directly deployed to a service server, and meanwhile, the deployment result can be uploaded to a visual interface. The user can check the compiling result, the code check, the deployment result and the like in real time through the visual interface.
In the solution described in the above embodiment, a developer may create several compiling templates in advance for different development languages, after acquiring source codes of an application program, may select a compiling template corresponding to a code type of the source code, and construct a compiling task based on the compiling template. The compiling task is built in a templatization mode, different building templates can be provided for different development languages, meanwhile, the templates only open necessary building parameters, the configuration difficulty can be reduced, and the compiling task can be built quickly.
The present specification also provides an embodiment of the template-based application compiling apparatus, corresponding to the embodiment of the template-based application compiling method described above.
Referring to fig. 3, fig. 3 is a hardware configuration diagram of an electronic device in which a template-based application compiling apparatus is located in an exemplary embodiment. At the hardware level, the device includes a processor 302, an internal bus 304, a network interface 306, memory 308, and non-volatile storage 310, although other hardware required for the service is possible. One or more embodiments of the present description may be implemented in a software-based manner, such as by the processor 303 reading a corresponding computer program from the non-volatile storage 310 into the memory 308 and then running. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 4, fig. 4 is a block diagram illustrating a template-based application compiling apparatus according to an exemplary embodiment. The template-based application compiling device can be applied to the electronic equipment shown in fig. 3 to realize the technical scheme of the specification. Wherein, the template-based application compiling device may include:
a code obtaining unit 402, configured to obtain a source code of an application program, and determine a code type of the source code;
a template selection unit 404, configured to select a compiling template corresponding to the code type from preset compiling templates based on the code type; the compiling template comprises at least one flow task related to compiling;
and a task construction unit 406, configured to construct a compiling task based on the flow task in the compiling template.
And the task execution unit 408 is configured to execute the compiling task and compile the source code of the application program into an executable file.
In this embodiment, the task building unit is further configured to obtain a compiling parameter based on a flow task in the compiling template; the compilation parameters include one or more of the following: address of source code, code branch, compiling command, product address;
and writing the compiling parameters into the compiling template to construct a compiling task.
In this embodiment, the apparatus further includes:
and the state acquisition unit is used for acquiring the execution state of each flow task so as to be checked by a user through a visual interface.
In this embodiment, the apparatus further includes:
a code checking unit for checking code against the source code of the application program;
based on the code check result, it is determined whether the compiling task is successfully executed.
In this embodiment, the apparatus further includes:
and the file storage unit is used for acquiring the executable file and uploading the executable file to a file management server for management.
In this embodiment, the apparatus further includes:
the file deployment unit is used for acquiring the executable file and remotely deploying the executable file to the service server.
In this embodiment, the apparatus further includes:
and the template modification unit is used for responding to the flow task changing operation of the user in the compiling template, adding at least one flow task in the compiling template and/or deleting at least one flow task in the compiling template.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are illustrative only, in that the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
User information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in this specification are both information and data authorized by the user or sufficiently authorized by the parties, and the collection, use and processing of relevant data requires compliance with relevant laws and regulations and standards of the relevant country and region, and is provided with corresponding operation portals for the user to choose authorization or denial.
The present specification also provides an embodiment of a computer-readable storage medium. The computer readable storage medium stores machine readable instructions that, when invoked and executed by a processor, implement the template-based application compilation method provided by any of the embodiments of the present specification.
The computer readable storage medium provided by the embodiments of the present specification may include, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random Access Memory, random access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Erasable Programmable Read-Only memories), flash memories, magnetic cards, or optical fiber cards. That is, a readable storage medium includes a readable medium that can store or transfer information.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that 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 phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (10)

1. A template-based application compilation method, the method comprising:
acquiring a source code of an application program, and determining a code type of the source code;
selecting a compiling template corresponding to the code type from preset compiling templates based on the code type; the compiling template comprises at least one flow task related to compiling;
constructing a compiling task based on the flow task in the compiling template;
and executing the compiling task, and compiling the source code of the application program into an executable file.
2. The method of claim 1, the constructing a compilation task based on the flow task in the compilation template, comprising:
acquiring compiling parameters based on the process tasks in the compiling template; the compilation parameters include one or more of the following: address of source code, code branch, compiling command, product address;
and writing the compiling parameters into the compiling template to construct a compiling task.
3. The method of claim 1, the method further comprising:
and acquiring the execution state of each flow task so as to be checked by a user through a visual interface.
4. The method of claim 1, the method further comprising:
code checking is conducted on source codes of the application programs;
based on the code check result, it is determined whether the compiling task is successfully executed.
5. The method of claim 1, the method further comprising:
and acquiring the executable file, and uploading the executable file to a file management server for management.
6. The method of claim 1, the method further comprising:
and acquiring the executable file and remotely deploying the executable file to a service server.
7. The method of claim 1, the method further comprising:
in response to a user modifying operation for a flow task in the compiling template, adding at least one flow task in the compiling template and/or deleting at least one flow task in the compiling template.
8. A template-based application compilation apparatus, the apparatus comprising:
the code acquisition unit is used for acquiring source codes of the application programs and determining code types of the source codes;
the template selection unit is used for selecting a compiling template corresponding to the code type from preset compiling templates based on the code type; the compiling template comprises at least one flow task related to compiling;
the task construction unit is used for constructing a compiling task based on the flow task in the compiling template;
and the task execution unit is used for executing the compiling task and compiling the source code of the application program into an executable file.
9. An electronic device comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory stores machine readable instructions, and the processor performs the method of any of claims 1-7 by invoking the machine readable instructions.
10. A computer readable storage medium storing machine readable instructions which, when invoked and executed by a processor, implement the method of any one of claims 1-7.
CN202311278608.6A 2023-09-28 2023-09-28 Template-based application program compiling method and device Pending CN117348883A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311278608.6A CN117348883A (en) 2023-09-28 2023-09-28 Template-based application program compiling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311278608.6A CN117348883A (en) 2023-09-28 2023-09-28 Template-based application program compiling method and device

Publications (1)

Publication Number Publication Date
CN117348883A true CN117348883A (en) 2024-01-05

Family

ID=89366038

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311278608.6A Pending CN117348883A (en) 2023-09-28 2023-09-28 Template-based application program compiling method and device

Country Status (1)

Country Link
CN (1) CN117348883A (en)

Similar Documents

Publication Publication Date Title
JP6859449B2 (en) Methods and equipment for performing tests using test cases
US9098636B2 (en) White-box testing systems and/or methods in web applications
US20070011669A1 (en) Software migration
US20130080993A1 (en) Embedded system performance
US20230004368A1 (en) Multi-chip compatible compiling method and device
CN110795088B (en) Front-end engineering project construction method and tool, and computer-readable storage medium
CN106528258A (en) Method and system for improving compiling speed of Android project
US11113050B2 (en) Application architecture generation
CN107015841B (en) Preprocessing method for program compiling and program compiling device
CN105378658A (en) Automatic source code generation
EP3447635A1 (en) Application architecture generation
CN102346780A (en) Method and device for acquiring webpage address
CN110347588B (en) Software verification method, device, computer equipment and storage medium
Khatchadourian et al. [Engineering Paper] A Tool for Optimizing Java 8 Stream Software via Automated Refactoring
US10656922B2 (en) Systems and methods for providing an application transformation tool
CN117215558A (en) Visual software development method, device, equipment and medium for android
CN116719735A (en) Test case generation method and device
CN117348883A (en) Template-based application program compiling method and device
CN115658140A (en) SDK packaging method, device, terminal and storage medium
CN115964045A (en) Method, device and medium for quickly and automatically constructing cross-architecture operating system
CN110399156B (en) On-orbit upgrading method for aerospace software
CN110532015B (en) On-orbit upgrading system for aerospace software
CN113515452A (en) Automatic test method and system for application, electronic equipment and storage medium
CN112882751A (en) CUDA program migration method, device, electronic equipment and storage medium
CN117093255A (en) Version construction method of application program

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