CN118259922A - Compiling method, compiling device, compiling product, compiling device, compiling equipment and compiling medium for application program - Google Patents
Compiling method, compiling device, compiling product, compiling device, compiling equipment and compiling medium for application program Download PDFInfo
- Publication number
- CN118259922A CN118259922A CN202410688088.4A CN202410688088A CN118259922A CN 118259922 A CN118259922 A CN 118259922A CN 202410688088 A CN202410688088 A CN 202410688088A CN 118259922 A CN118259922 A CN 118259922A
- Authority
- CN
- China
- Prior art keywords
- compiling
- program
- source code
- package
- application program
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 102
- 238000011161 development Methods 0.000 claims abstract description 340
- 238000012545 processing Methods 0.000 claims abstract description 74
- 238000006243 chemical reaction Methods 0.000 claims description 56
- 230000006870 function Effects 0.000 claims description 42
- 230000015654 memory Effects 0.000 claims description 41
- 238000004590 computer program Methods 0.000 claims description 21
- 238000004088 simulation Methods 0.000 claims description 19
- 238000004458 analytical method Methods 0.000 claims description 18
- 230000004044 response Effects 0.000 claims description 10
- 230000001960 triggered effect Effects 0.000 claims description 10
- 108091029480 NONCODE Proteins 0.000 claims description 7
- 238000012216 screening Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 description 37
- 238000010586 diagram Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 8
- 238000005457 optimization Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 6
- 201000001432 Coffin-Siris syndrome Diseases 0.000 description 5
- 239000000047 product Substances 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000004806 packaging method and process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- -1 device Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000013067 intermediate product Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000013138 pruning Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a compiling method, a compiling device, a compiling product, compiling equipment and compiling media of an application program, wherein the compiling method comprises the following steps: the compiling client is configured with compiling plug-ins respectively corresponding to a plurality of development languages for compiling the application program, and can respond to configuration operation aiming at the development languages to acquire a target development language configured for compiling the application program; the target development language is at least one of a plurality of development languages; acquiring a program source code package of an application program written based on a target development language; invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application program, and is used for running the written application program. By adopting the method and the device, the flexibility of writing the applet can be improved, and the difficulty of writing the applet can be reduced.
Description
Technical Field
The present application relates to the technical field of program compilation, and in particular, to a compiling method, device, product, device, and medium for an application program.
Background
The applet may have a published developer tool in which the applet may be written, while the applet typically has its canonical development language, so the applet needs to be written in the developer tool in the applet canonical development language.
If a developer wants to write an applet in a development language other than the standard development language, the developer needs to build a third party framework for writing the applet in the development language, and in this case, the difficulty of writing the applet in the development language is high. Therefore, how to improve the flexibility of writing the applet and reduce the difficulty of writing the applet is a problem to be solved.
Disclosure of Invention
The application provides a compiling method, a compiling device, a compiling product, compiling equipment and compiling media for application programs, which can improve the flexibility of compiling the applet and reduce the difficulty of compiling the applet.
The application provides a compiling method of an application program, which is applied to a compiling client, wherein compiling plug-ins respectively corresponding to a plurality of development languages for compiling the application program are configured in the compiling client, and the method comprises the following steps:
Responding to configuration operation aiming at the development language, and acquiring a target development language configured for compiling an application program; the target development language is at least one of a plurality of development languages;
acquiring a program source code package of an application program written based on a target development language;
Invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application program, and is used for running the written application program.
An aspect of the present application provides a compiling apparatus for an application, where the compiling apparatus for an application is applied to a compiling client, and a compiling plug-in corresponding to each of a plurality of development languages for compiling the application is configured in the compiling client, and the compiling apparatus for an application includes:
the response module is used for responding to the configuration operation aiming at the development language and acquiring the target development language configured for compiling the application program; the target development language is at least one of a plurality of development languages;
the acquisition module is used for acquiring a program source code packet of an application program written based on a target development language;
the compiling module is used for calling a compiling plugin corresponding to the target development language, and carrying out standardized compiling treatment on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application program, and is used for running the written application program.
Optionally, the compiling plugin corresponding to any of the plurality of development languages is defined with at least one of the following data:
A hook function adapted to source code of any development language of standardized compilation; conversion correspondence between each file type in any development language and the file type in the specification language; thread configuration information of a compiling plug-in corresponding to any development language;
The hook function is used for calling a compiler related to the corresponding compiling plug-in when the source code of any development language is compiled in a standardized mode; the thread configuration information of the compiling plugin corresponding to any development language is used for indicating whether the plugin task of the compiling plugin corresponding to any development language needs to start a compiling sub-thread to execute.
Optionally, the program source code package includes source code files of multiple file types in the target development language;
the compiling module calls a compiling plug-in corresponding to the target development language, performs standardized compiling processing on the program source code package, and generates a program specification package mode, which comprises the following steps:
Invoking a compiling plugin corresponding to the target development language, and respectively converting each source code file in the program source code package into a standard file corresponding to the file type under the standard language according to the conversion corresponding relation between each file type under the target development language and the file type under the standard language;
And generating a program specification packet based on the specification files corresponding to each source code file in the program source code packet.
Optionally, the plug-in task of the compiling plug-in corresponding to the target development language comprises a file conversion task, wherein the file conversion task is used for converting each source code file in the program source code package into a standard file of a corresponding file type under the standard language;
The compiling module calls a compiling plugin corresponding to the target development language, and according to the conversion corresponding relation between each file type in the target development language and the file type in the standard language, each source code file in the program source code package is respectively converted into a standard file corresponding to the file type in the standard language, and the compiling module comprises the following steps:
If the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task needs to start the compiling sub-thread to execute, creating the compiling sub-thread for the compiling main thread of the compiling plug-in corresponding to the target development language, and calling the created compiling sub-thread to execute the file conversion task;
And if the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task does not need to start the compiling sub-thread to execute, calling the compiling main thread to execute the file conversion task.
Optionally, the compiling module invokes a compiling plug-in corresponding to the target development language to perform normalized compiling processing on the program source code package, and the method for generating the program specification package includes:
invoking a compiling plug-in corresponding to the target development language, and screening key source code files for constructing the application program from the program source code package;
carrying out standardized compiling treatment on the key source code file to generate a key specification file corresponding to the key source code file;
acquiring an additional file to be called of a key source code file, and integrating the additional file with a key specification file to generate a program specification package; the attached file belongs to a non-code file.
Optionally, the compiling module invokes a compiling plug-in corresponding to the target development language to perform normalized compiling processing on the program source code package, and the method for generating the program specification package includes:
Invoking a compiling plug-in corresponding to the target development language, performing syntax analysis processing on the program source code package, and generating a syntax tree of the program source code package;
and carrying out grammar analysis processing on the grammar tree, and generating a program specification packet based on the grammar analysis result.
Optionally, the compiling device of the application program further includes a landing module, where the landing module is configured to:
the obtained program source code package is dropped into a client disk of the compiling client;
the program source code package from the disk of the client comprises a source code main package of the written application program and N source code sub-packages, wherein N is a positive integer, the source code main package is used for running the main program of the written application program, and the N source code sub-packages are used for running the subprogram of the written application program.
Optionally, a simulator is configured in the compiling client, and the simulator is used for simulating running of the application program; the compiling device of the application program further comprises a simulation running module, wherein the simulation running module is used for:
Responding to simulation operation aiming at the written application program, and calling a simulator to read a source code main package from a client disk;
calling a simulator to submit the read source code main package to a compiling plug-in corresponding to the target development language;
invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the source code main package to generate a standard main package corresponding to the source code main package;
Calling a simulator to simulate and run a main program of the written application program based on the standard main package;
the compiled specification main package is used for being cached in the memory of the compiling client.
Optionally, in the process of simulating and running the main program, the simulation running module is further configured to:
When the trigger operation for the main program of the simulation operation is obtained, the simulator is called to read the source code sub-packet corresponding to the subprogram triggered to operate by the trigger operation from the client disk;
Calling a simulator to packetize the read source codes and submitting the source codes to a compiling plug-in corresponding to the target development language;
Invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the read source code subcontracting to generate a standardized subcontracting corresponding to the read source code subcontracting;
Invoking a simulator to simulate and run a subprogram corresponding to the written application program based on the standard subcontracting;
The compiled normative subcontracting is used for being cached in the memory of the compiling client.
Optionally, the responding module responds to the configuration operation for the development language to acquire the mode of compiling the configured target development language for the application program, including:
Responding to configuration operation, and acquiring configuration information aiming at development language;
and carrying out information analysis processing on the configuration information to determine a target development language configured for compiling the application program.
Optionally, the compiling device of the application program further includes an uploading module, where the uploading module is configured to:
Uploading the program specification package to a background server to which the compiling client belongs, so that the background server drops the program specification package to a server disk of the background server;
after the program specification package is dropped into the server disk, the object terminal is used for sending a program operation request to the background server, and the background server is used for reading the program specification package from the server disk according to the program operation request and returning the read program specification package to the object terminal;
The object terminal is used for running the written application program in the running environment of the application program based on the program specification package returned by the background server.
In one aspect the application provides a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the method of one aspect of the application.
An aspect of the application provides a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the method of the above aspect.
According to one aspect of the present application, there is provided a computer program product comprising a computer program stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program to cause the computer device to execute the method provided in various optional manners of the above aspect and the like.
The compiling client can be configured with compiling plug-ins respectively corresponding to a plurality of development languages for compiling application programs, and can respond to configuration operations aiming at the development languages to acquire target development languages configured for compiling the application programs; the target development language is at least one of a plurality of development languages; the program source code package of the application program written based on the target development language can be obtained; therefore, a compiling plug-in corresponding to the target development language can be called, and the program source code package is subjected to standardized compiling processing to generate a program specification package; the program specification package adopts the specification language of the application program, and the program specification package is used for running the written application program. According to the method provided by the application, as the compiling plug-ins respectively corresponding to the multiple development languages for compiling the application program are configured in the compiling client, a support developer can flexibly select a target development language to be adopted from the multiple development languages, so that the developer can compile the application program by using the selected target development language, and subsequently, the compiling client can also adopt the compiling plug-ins corresponding to the target development language to automatically realize the standardized compiling of the program source code package compiled by the developer by adopting the target development language, so that the program specification package adopting the specification language of the application program is obtained, and the compiled applet can be operated by the program specification package; therefore, the development language for writing the application program can be flexibly selected according to the actual demands of the developer, and a third party framework for writing the application program is not required to be additionally built for the selected development language, so that the flexibility of writing the applet is improved, and the difficulty of writing the applet is reduced.
Drawings
In order to more clearly illustrate the application or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from them without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a network architecture for compiling and running applications according to an embodiment of the present application;
FIG. 2 is a schematic view of a compiling application according to an embodiment of the present application;
FIG. 3 is a flowchart of a compiling method for an application according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a compiling application according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating the effect of a compiling interface of a compiling client according to an embodiment of the present application;
FIG. 6 is a flow chart of a method for simulating running an application according to an embodiment of the present application;
FIG. 7 is a schematic view of a scenario for simulating running of a written application program according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a framework for compiling an application program according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a compiling apparatus for an application according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the application are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Here, a description will be given of a related art concept to which the present application relates:
Small procedure: is an application program which can be used without downloading and installing, and can be independently operated in other application programs (such as a flow platform).
Small games: the novel game product form which depends on the flow platform and takes the applet as a carrier not only does not need to be downloaded, but also meets the requirements of light experience, namely point-and-play of players. Wherein the applet belongs to a specific type of applet.
Development language: is a specialized language used in computer programming.
Applet specification code file: code files in the specification language of an applet, which may include four classes: a JS type code file (belonging to script files), WXSS type code file (belonging to style files), JSON type code file (belonging to configuration files), and WXML type code file (belonging to page structure files).
Js: javaScript, a high-level, interpreted programming language, is also the core technology for applet development.
WXSS: a style definition language similar to CSS (a computer language) is used to describe the style of the applet page with the suffix name wxss of the file.
JSON: is a lightweight data exchange format.
WXML: a markup language similar to HTML (a markup language) is used for the code describing the page structure of the applet, whose file has a suffix name wxml.
AST: abstract syntax code, an abstract syntax tree, is a tree representation of the abstract syntax structure of the source code.
Ts: TYPESCRIPT, an open source programming language, is a superset of JavaScript that extends the syntax of JavaScript.
And (3) Less: it can be seen as a high-level language based on CSS, the purpose of which is to make CSS development more flexible and powerful, a dynamic style language.
Sass: similar to Less, it can also be regarded as a high-level language based on CSS, which is also aimed at making CSS development more flexible and powerful, and also a dynamic style language.
Firstly, it should be noted that all data collected by the present application (such as program source code package written for application program, program specification package compiled from the program source code package, etc.) are collected under the condition that the object (such as user, organization or enterprise) to which the data belongs agrees and authorizes, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related region.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a network architecture for compiling and running an application according to an embodiment of the present application. As shown in fig. 1, the network architecture may include a compiling terminal, a background server, and an object device cluster, which may include one or more terminal devices, the number of which will not be limited here. The compiling terminal and each object terminal can be connected with the background server through a network, so that the compiling terminal and each object terminal can perform data interaction with the background server through the network connection.
The background server shown in fig. 1 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like. The terminal device may be: smart terminals such as smart phones, tablet computers, notebook computers, desktop computers, smart televisions, vehicle-mounted terminals, smart home and the like.
The compiling terminal may have a compiling client, where the compiling client may be a client for compiling and compiling an application program (such as an applet), the compiling terminal may be a terminal of a writer (such as a developer) of the application program, and the background server is a server of the compiling client. The object terminals in the object terminal cluster may then be user terminals capable of running the application compiled by the compiling client.
Therefore, it can be understood that a writer of an application program can write the application program in a compiling client of the compiling terminal, the compiling client can perform corresponding compiling processing on the application program written by the writer, and can upload a compiled application program (such as a code packet obtained by compiling the written application program) to a background server, and then, each object terminal can pull the compiled code packet from the background server, so that the application program written by the writer of the application program is operated through the code packet.
Referring to fig. 2, fig. 2 is a schematic view of a compiling application according to an embodiment of the application. As shown in fig. 2, the compiling client may be configured with compiling plugins corresponding to multiple developing languages (including developing language y1 to developing language ym m in total) for writing an application program, where the compiling plugins include compiling plugins b1 corresponding to developing language y1 to compiling plugins bm corresponding to developing language ym m in total, where m is a positive integer, and a specific value of m may be determined according to an actual application scenario, which is not limited by the present application.
A writer of an application may select a development language in a compilation client that the writer wants to use to write the application, and the development language selected by the writer may be referred to as a target development language. Thus, the writer of the application program can write the application program by adopting the selected target development language so as to obtain a program source code package of the written application program. Furthermore, the compiling client can automatically call a compiling plug-in corresponding to the target development language, and perform standardized compiling processing on the program source code package adopting the target development language so as to compile the program source code package into a program specification package adopting a specification language of the application program. The program specification package is a code package for running the written application program, and the compiling client can upload the program specification package to the background server, so that the subsequent object terminal can acquire the program specification package from the background server, and run the written application program through the acquired program specification package. This particular procedure can also be seen in the relevant description of the embodiments described below.
By adopting the method provided by the application, a writer supporting an application program can flexibly select the development language which the writer wants to use when writing the application program, the writer of the application program only needs to pay attention to the development language selected by the writer, and the compiling client can realize the automatic standardized compiling processing of the application program written by the writer of the application program by adopting the development language selected by the writer of the application program without sense, thereby improving the flexibility and experience sense of the application program written by the writer of the application program.
Referring to fig. 3, fig. 3 is a flowchart illustrating a compiling method of an application program according to an embodiment of the application. As shown in fig. 3, the method may include:
Step S101, responding to configuration operation aiming at development language, obtaining target development language configured for compiling application program; the target development language is at least one of a plurality of development languages.
Specifically, the execution subject in the embodiment of the present application may be a compiling client, which may be used to develop and compile an application program. Alternatively, the application may be any program that needs to be compiled, e.g., the application may be an applet. The compiling client may exist in a terminal device of a user (such as a writer of an applet), and if the application program to be compiled is an applet, the compiling client may also be an applet developer tool.
The compiling client of the application can be configured with compiling plugins (also called compilers) respectively corresponding to a plurality of development languages for compiling application programs, one development language can correspond to one compiling plugin, and the compiling plugin corresponding to one development language is the plugin which is specifically configured for the development language and can compile code files compiled by the development language into code files of a standard language of the application programs. As the name implies, the canonical language of an application (e.g., the canonical language of an applet) is the specific canonical development language that the application needs to use to run.
The plurality of development languages may include a plurality of other high-level languages other than the canonical language of the application program, such as the high-level languages above Ts, less, sass. Of course, the compiling client may also be configured with a writing plug-in corresponding to the standard language of the application program, and the writing plug-in is a plug-in for directly writing the applet in the standard language of the application program.
The method can support the writer of the application program to select one or more development languages which the writer of the application program wants to use from the various development languages with more abundance and diversity according to the actual demands of the writer of the application program, so that the writer of the application program can write the application program by adopting the development language selected by the writer of the application program. By the method, the development language used by the writer of the application program when the application program is written is not limited, and flexibility and convenience of the writer for writing the application program are improved.
Specifically, the compiling client may respond to the configuration operation for the development language, and obtain a target development language configured for compiling the application program, where the target development language may be at least one of the multiple development languages, and the target development language is a development language configured (i.e. selected) by a writer of the application program in the compiling client for writing the application program.
For example, the compiling client may obtain, in response to the configuration operation, configuration information for the development language, where the configuration information may be information configured by a writer of the application program for selecting the development language in the compiling client, and the configuration information includes the development language configured by the writer for writing the application program.
Therefore, the compiling client can perform information analysis processing on the configuration information to analyze and obtain at least one development language configured by a writer of the application program and used for compiling the application program, wherein the analyzed at least one development language is a target development language configured by compiling the application program.
Optionally, when the application program is written, one or more code files to be written can exist, and different code files can be written in different or the same development languages, so that one or more target development languages can be selected.
Further, such a process of compiling a code file written in a non-standard language (other development languages than the standard language among the above-described plurality of development languages) into a code file in a standard language of an application program may be referred to as a standardized compiling process for a code file written in the non-standard language.
It should be noted that, there may be multiple types of code files in one development language, that is, multiple file types (i.e., multiple file formats) in one development language. Based on this, the compiling plugin corresponding to any of the above multiple development languages (hereinafter, simply referred to as any development language) may be defined (may also be understood as being configured) with at least one of the following data:
A hook function adapted to the source code of the normalized compiling any development language; conversion correspondence between each file type in any development language and the file type in the standard language; the any development language corresponds to the thread configuration information of the compiling plug-in.
The hook function is used for calling a compiling program (belonging to an internal program of a compiling client) related to a compiling plug-in corresponding to any development language when the source code of the development language (namely, a code file written by the development language) is compiled in a standardized manner. The associated compiler is a program for compiling the source code of the any development language at the corresponding compilation stage in which the hook function resides. It will be appreciated that there may be multiple compilation stages in the compilation plug-in for the source code of any development language, at which respective hook functions may be configured to invoke the required compiler at the respective compilation stages to perform the respective compilation process on the source code of any development language.
The number of the hook functions defined by the compiling plugin corresponding to any development language can be multiple, the mode and logic for standardized compiling of the source code of any development language in the compiling plugin are embodied, namely, the hook functions defined by the compiling plugin corresponding to any development language are used for realizing standardized compiling of the source code of any development language in the compiling plugin. Thus, the hook functions defined for the compilation plug-ins corresponding to different development languages may be different.
The code segment defines a series of hook functions (i.e., pluginHooks) for the compilation plug-in, as shown in the code segment:
export interface pluginHooks{
load:loadHook;
transform:TransformHook;
generate:GenerateHook;
optimize:OptimizeHook;
compress:CompressHook;
sealed:SealedHook;
}
Wherein load, transform, generate, optimize and sealed both belong to the hook function defined for the compilation plug-in. Hook function load may be used to convert a source code file into A Syntax Tree (AST); the hook function transform can be used for processing information of the converted grammar tree; hook function generation may be used to generate a canonical code file (i.e., a code file of a canonical language) of an application from the information-processed syntax tree; the hook function optimize may be used to perform code optimization; hook function compacts may be used to perform code compression; the hook function sealed may be used to perform code packaging.
It should be noted that, in the present application, the writer of the application program only needs to pay attention to the writing process of the application program by adopting the target development language selected by the writer, and does not need to pay attention to the compiling process of performing normalized compiling processing on the source code of the target development language, that is, the compiling process may be insensitive to the user, so that the compiling plug-in, the compiling program, and the hook function defined by the compiling plug-in may be both insensitive and unintelligible to the user.
The conversion correspondence between each file type in any development language and the file type in the standard language is defined, namely, the code file of each file type in any development language needs to be converted into the code file of which file type in the standard language. For example, if there is a conversion correspondence between the file type W1 in any development language (may be any of a plurality of file types in any development language) and the file type W2 in the standard language, it indicates that when the code file of the file type W1 in any development language is subjected to the standardized compiling process, the code file of the file type W1 needs to be compiled and converted into the code file of the file type W2.
Alternatively, the conversion correspondence may be defined by a suffix of the code file, for example, the conversion correspondence between the file type W1 and the file type W2 may be defined by a file suffix of the code file of the file type W1 and a file suffix of the code file of the file type W2, and if the conversion correspondence may be defined as follows: the file suffix is required to be converted into the file suffix of the code file of the file type W1 into the file suffix of the code file of the file type W2.
Illustratively, the conversion correspondence may be defined by ResolveExt fields (fields for performing suffix conversion between file types), as shown in the following code:
ResolveExt{
js:‘ts’,
}
The code segment defines the code file (the file suffix is Js) of the Js type, which needs to be converted into the code file (the file suffix is Ts) of the Ts type.
The thread configuration information of the corresponding compiling plugin of any development language is used for indicating whether the plugin task of the corresponding compiling plugin of any development language needs to start the compiling sub-thread (i.e. a single thread additionally started outside the compiling main thread) to execute.
Illustratively, the thread configuration information may be defined by a WorkerMethods field (a field for defining the manner of operation) and a supportWorker field (a field for defining the support of single-thread operation).
Step S102, a program source code package of an application program written based on a target development language is acquired.
Specifically, after selecting (i.e., configuring) a target development language to be used, a writer of the application program may write the application program using the selected target development language in the compiling client.
Therefore, the compiling client can acquire the program source code package of the application program written in the target development language, and the program source code package is the code package of the application program written in the target development language by the writer of the application program in the compiling client.
Step S103, calling a compiling plug-in corresponding to the target development language, and carrying out standardized compiling treatment on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application program, and is used for running the written application program.
Specifically, after acquiring a program source code package of an application program written in a target development language, the compiling client can automatically call a compiling plug-in unit corresponding to the target development language, and perform standardized compiling processing on the program source code package, namely compiling the program source code package into a code package of a standard language of the application program so as to generate a program standard package.
The program specification package is a code package adopting the specification language of the application program, and is used for running the application program written by a writer of the application program.
The process of the compiling client invoking the compiling plug-in corresponding to the target development language to perform normalized compiling processing on the program source code package to generate the program specification package may include:
The compiling client can call a compiling plug-in corresponding to the target development language, and key source code files for constructing the application program are screened from the program source code package. It will be appreciated that the program source code package will typically include some code files that are not used to construct the application program (e.g., some intermediate code files generated by an intermediate process), so that the compiling client may identify and filter the code files used to construct the application program from the program source code package, and the code files that are filtered to construct the application program may be referred to as key source code files.
Therefore, the compiling client can perform standardized compiling processing on the key source code file to generate a key specification file corresponding to the key source code file, wherein the key specification file is a code file obtained after compiling the key source code file into a specification language of an application program.
In addition, the key source code files may also be used to invoke some non-code files (which may be referred to as additional files), such as non-code files that may be invoked by pictures, icons, merchandise listings, etc., that may be provided (uploaded) by the application's writer in the compilation client.
Therefore, the compiling client can acquire the additional file called by the key source code file, and can integrate the additional file with the compiled key specification file to generate a program specification package, and the program specification package can include the compiled key specification file and the additional file, so that the corresponding additional file can be called by the compiled key specification file when the compiled application program is run by the program specification package.
More, the process of the compiling client invoking the compiling plug-in corresponding to the target development language and performing normalized compiling processing on the program source code package to generate the program specification package may further include:
The program source code package can comprise source code files of various file types under the target development language, so that the compiling client can call a compiling plug-in corresponding to the target development language, and each source code file in the program source code package (namely, a code file of each file type under the target development language in the program source code package) is respectively converted into a standard file of a corresponding file type under the standard language of the application program according to the conversion corresponding relation between each file type under the target development language and the file type under the standard language, wherein the standard file is a code file adopting the standard language.
It can be understood that in the process of converting a source code file in a target development language in a program source code package into a standard file of a file type having a conversion correspondence in a standard language, it is necessary to compile and convert a file suffix of the source code file in the target development language into a file suffix of the file type having a conversion correspondence in the standard language.
The source code files in the program source code package need to be converted into source code files corresponding to the standard files, which may include the key source code files (the key source code files may include source code files of multiple file types in the target development language), that is, the compiling plug-in corresponding to the target development language is called at the compiling client, and each source code file in the program source code package may include only the key source code file used for constructing the application program in the program source code package when the corresponding standard file is converted according to the conversion correspondence between each file type in the target development language and the file type in the standard language.
Further, the compiling client may generate a program specification package of the written application program through the converted specification file (such as a specification file obtained by converting the key source code file).
Optionally, the plug-in task of the compiling plug-in corresponding to the target development language may include a file conversion task, where the file conversion task is a task of converting a source code file of the target development language in the program source code package into a specification file corresponding to a file type in the specification language.
Therefore, the process of calling the compiling plug-in corresponding to the target development language by the compiling client, and converting each source code file in the program source code package into a corresponding standard file according to the conversion corresponding relation between each file type in the target development language and the file type in the standard language may further include:
If the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the compiling sub-thread needs to be started for executing the file conversion task, the compiling client can create a new compiling sub-thread for the compiling main thread of the compiling plug-in corresponding to the target development language, so that the compiling client can call the created compiling sub-thread to execute the file conversion task, and each source code file in the program source code package is respectively converted into a corresponding specification file in the specification language according to the conversion corresponding relation between each file type in the target development language and the file type in the specification language.
If the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task does not need to start a compiling sub-thread to execute, the compiling client can directly call the compiling main thread of the compiling plug-in to execute the file conversion task, so that each source code file in the program source code package is respectively converted into a corresponding specification file in the specification language according to the conversion corresponding relation between each file type in the target development language and the file type in the specification language.
In addition, the process of calling the compiling plug-in corresponding to the target development language by the compiling client to perform normalized compiling processing on the program source code package to generate the program specification package may further include:
the compiling client may call a compiling plug-in corresponding to the target development language, and parse the program source code package to generate A Syntax Tree (AST) of the program source code package. The syntax analysis processing may be performed on the program source code packet, and the syntax tree of the generated program source code packet may be the syntax tree of the key source code file.
Further, the compiling client may parse the syntax tree, and may generate (i.e., construct) the program source code package based on a result of the syntax parsing (e.g., the parsed syntax). The process of generating the program source code package based on the result of the grammar parsing may be the process of converting the source code file (such as a key source code file) to which the grammar tree belongs into the corresponding specification file in the specification language according to the conversion correspondence between each file type in the target development language and the file type in the specification language based on the result of the grammar parsing.
Referring to fig. 4, fig. 4 is a schematic diagram of a compiling application according to an embodiment of the application. As shown in fig. 4, the data represented by the ellipses in the figure may be related hook functions used in the compilation process. The process of performing normalized compiling processing on the program source code package may include operations buildStart (hook function for starting compiling), appStruct (structure of the application is obtained, that is, code file for building the application is obtained), collectEntryFiles (entry file of the application is collected), resolution & loadFile & transform (path of parsing local file & loading writer-written code in compiling plugin & format converting code file, that is, converting file types as described above) and buildEnd (hook function for ending compiling) in the figure. codeFiles may be an initial code package obtained after normalized compilation, and the code package may be a code package subjected to privacy processing (such as confusion processing) of codes.
In the application, a series of optimization processing can be carried out on the initial code package obtained by standardization compiling so as to obtain a final program standardization package. Here, the series of optimization processes may include operations of BundleAsset (for resource packaging, such as packaging of codes of compiled specification language and non-code files to be called), optimize (for performing specific optimization operations, in particular, what optimization operations may be set according to actual requirements, such as optimization operations of code compression, optimization operations of code pruning, or/and optimization operations of code confusion, etc.), beforeUpload (for a hook function before uploading a file, for a hook function for performing inspection of relevant basic information of a written application before uploading a program specification package), and afterUpload (for a hook function for performing callback after file uploading).
In addition, watcher in the figure is a monitor, which is used to monitor the compiling process of the program source code package, for example, to monitor whether the program source code package compiled in the compiling process is changed (onFileChanges), whether the changed program source code package needs to be recompiled (ADDWATCHFILES), and fileUtils is a program unit for starting the monitor.
The compiling and optimizing processing of the program source code package are realized through the process, and the final program specification package can be obtained.
Referring to fig. 5 again, fig. 5 is a schematic diagram illustrating an effect of a compiling interface of a compiling client according to an embodiment of the application. As shown in fig. 5, the compiling interface may belong to an interface related to compiling an application program by a writer of the application program in a compiling client, and may include a plurality of development languages selectable by the writer of the application program. The compiling interface may include configuration information entered by a writer of the application program, where the configuration information may be information for selecting a target development language required for compiling the application program, and the target development language configured herein may include TYPESCRIPT and Less.
Taking an application program as an applet, the compiling interface can also comprise an applet interface for simulating operation, namely, a program interface for simulating operation of the written application program. How the compiling client runs the written application program specifically can also be referred to as the related description in the corresponding embodiment of fig. 6 below.
The compiling client may further upload the program specification package obtained by compiling to a background server to which the compiling client belongs, so that the background server may drop the received program specification package into a server disk of the background server, that is, the background server may store the program specification package into a server disk thereof.
After the program specification package is dropped into the server disk, the object terminal (user terminal) may initiate (send together) a program running request to the background server, where the program running request is used to request the application program written by the writer running the application program. After receiving the program running request, the background server can read the dropped program specification packet from the server disk and return the read program specification packet to the object terminal.
After receiving the program specification package returned by the background server, the object terminal can run the written application program in the running environment (such as the applet running environment) of the application program through the program specification package, so that the running of the application program written by a user on the writer of the application program is realized.
The application program written by the writer of the application program can be oriented (i.e. opened) to a large number of users, so that the users can run the application program written by the writer. In an exemplary application scenario, the application written by the writer of the application is an application of an online store of a merchant, so that the application can be directed to a wide number of buyers, and the object terminal can be a user terminal of the buyer.
The application reforms the whole compiling flow of the developer tool (namely the compiling client), expands the compiling capability of the developer tool by a plug-in mode, realizes the effect that a user does not need to rely on a third party tool and a framework (tools and frameworks for compiling application programs by adopting other high-level languages except the standard language), has no perception on the standard language, and directly uses the selected high-level language (such as a target developing language) to develop the application program. The user does not need to pay attention to the intermediate product content of converting the high-level language file (namely, the source code file written by the target development language) into the standard format file (such as the code file of the standard language), and only needs to pay attention to the code content of the high-level language used by the user, so that the development efficiency of the application program by the user is improved, the development cost of the application program by the user is reduced, and the understanding cost of the user to the whole development process of the application program is greatly reduced. Meanwhile, the application also provides a series of hook functions in the compiling process, which realizes that more customized compiling process processing can be carried out on the application program in a developer tool, thereby ensuring the compiling effect of the application program.
In one embodiment, the modified compiling client in the application can also be applied to the scene of compiling and compiling the mini-games, and the compiled mini-programs can be the mini-games compiled by developers. In the application, a developer supporting the mini-game can flexibly select a familiar development language (such as TYPESCRIPT) from the compiling client modified by the application to quickly write the mini-game, and after the program source code package of the mini-game is written by the developer, the compiling client can automatically realize standardized compiling processing (which can be insensitive to the developer) of the mini-game written by the developer so as to quickly generate the program specification package of the mini-game. Thus, point-and-play of a composed mini-game may be achieved by the program specification package generated for the mini-game.
Therefore, the method provided by the application has excellent application effect when applied to the development scene of the small game, the compiling client side modified by the method can realize quick and flexible compiling of the small game and automatic standardized compiling, greatly reduces the development difficulty of a developer on the small game, ensures that the developer can conveniently develop various types of small games for the masses to play at the moment without downloading according to the actual requirements of the developer, and can gradually promote the universality and the playability of the small game in the application market.
The compiling client can be configured with compiling plug-ins respectively corresponding to a plurality of development languages for compiling application programs, and can respond to configuration operations aiming at the development languages to acquire target development languages configured for compiling the application programs; the target development language is at least one of a plurality of development languages; the program source code package of the application program written based on the target development language can be obtained; therefore, a compiling plug-in corresponding to the target development language can be called, and the program source code package is subjected to standardized compiling processing to generate a program specification package; the program specification package adopts the specification language of the application program, and the program specification package is used for running the written application program. According to the method provided by the application, as the compiling plug-ins respectively corresponding to the multiple development languages for compiling the application program are configured in the compiling client, a support developer can flexibly select a target development language to be adopted from the multiple development languages, so that the developer can compile the application program by using the selected target development language, and subsequently, the compiling client can also adopt the compiling plug-ins corresponding to the target development language to automatically realize the standardized compiling of the program source code package compiled by the developer by adopting the target development language, so that the program specification package adopting the specification language of the application program is obtained, and the compiled applet can be operated by the program specification package; therefore, the development language for writing the application program can be flexibly selected according to the actual demands of the developer, and a third party framework for writing the application program is not required to be additionally built for the selected development language, so that the flexibility of writing the applet is improved, and the difficulty of writing the applet is reduced.
In another embodiment, after the compiling client obtains the written program source code package, the compiling client may drop the program source code package into a client disk of the compiling client, without dropping a program specification package obtained by compiling the program source code package into the client disk. When the compiled application program needs to be simulated in the compiling client, the program source code package of the falling disk in the disk of the client can be read in real time, and the read program source code package can be normalized and compiled in real time, so that the compiled application program can be simulated in the compiling client through the compiled specification file.
The program source code package from the disk of the client can comprise a source code main package and N source code sub packages of the written application program, wherein N is a positive integer. The source code main package may be used to run a main program (i.e., a main program, such as may be an entry program of a written application) of the written application, and the N source code sub packages may be used to run a sub program of the written application. Different source packetization may be used to run different subroutines of the written application. Alternatively, different subroutines of a written application may correspond to different application functions of the written application, which may also be referred to as application tasks of the written application.
Therefore, the program specification package submitted (i.e., sent) to the background server may be generated after the compiler of the application program determines that the program source code package of the compiled application program is error-free, triggers an upload operation on the program source code package in the compiling client, and invokes a compiling plug-in corresponding to the target development language to perform overall standardized compiling processing on the program specification package by the compiling client.
If the program specification package submitted to the background server can be a compiling plug-in corresponding to the target development language called by the compiling client, the code package obtained after the standardized compiling processing is carried out on the source code main package and the N source code sub packages of the compiled application program, and the code package can correspondingly contain a specification main package in a specification language obtained by compiling the source code main package and N specification sub packages in a specification language obtained by compiling the N source code sub packages.
Before the uploading operation of the program source code package is triggered in the compiling client, the compiling client does not need to carry out integral standardized compiling processing on the source code package of the compiled application program, namely, does not need to carry out standardized compiling processing on the source code main package and N source code sub packages of the application program, but only needs to compile the source code main package of the compiled application program when the compiled application program needs to be simulated and operated so as to firstly run the main program of the compiled application program, and can read the source code sub package corresponding to the sub program from a magnetic disk when a writer of the application program needs to simulate and operate which sub program of the compiled application program (such as the simulated operation of a certain sub program of the compiled application program is triggered on the basis of the running main program) so as to simulate and operate the sub program. Reference is specifically made to the following description of the corresponding embodiment of fig. 7, and the corresponding embodiment of fig. 7 describes the process of simulating running a written application program on a compiling client.
Referring to fig. 6, fig. 6 is a flowchart of a method for simulating an application program according to an embodiment of the application. A simulator may be configured in the compilation client that may be used to simulate running a written application. As shown in fig. 6, the method may include:
Step S201, in response to simulation running operation for the written application program, a simulator is called to read a source code main package from a client disk.
In particular, simulated running operations for a written application may be triggered by the writer of the application in the compiling client. The compiling client may call the simulator to read the above-mentioned source code main package for landing the written application program from the client disk in response to the simulation run operation for the written application program.
In other words, when the compiling client receives the simulated running operation triggered by the written application program, the compiling client can read the source code main package of the written application program from the client disk.
Step S202, calling a simulator to submit the read source code main package to a compiling plug-in corresponding to the target development language.
Specifically, the compiling client may call the simulator to submit (i.e. transmit) the read source code main package to the compiling plug-in corresponding to the target development language, so as to request the compiling plug-in corresponding to the target development language to perform normalized compiling processing on the source code main package, as described in the following content.
And step S203, calling a compiling plug-in corresponding to the target development language, and carrying out standardized compiling processing on the source code main package to generate a standard main package corresponding to the source code main package.
Specifically, the compiling client may call a compiling plug-in corresponding to the target development language, and perform real-time normalized compiling processing on the source code main package submitted by the simulator, so as to generate a normalized main package corresponding to the source code main package, where the normalized main package adopts a normalized language of the application program, and the normalized main package is a code package obtained after compiling the source code main package of the target development language into the normalized language. In the application, the standard main package obtained by real-time compiling can be cached in the memory of the compiling client, and the standard main package does not need to be dropped into a client disk of the compiling client.
For a specific principle of compiling the source code main package into the specification main package, reference may be made to the related compiling process described in the corresponding embodiment of fig. 3.
Step S204, calling a simulator to simulate running a main program of the written application program based on the standard main package.
Specifically, the compiling client may call the simulator to simulate the main program of the written application program through the specification main package obtained by compiling. While in simulating the running of the main program of the written application program, the writer of the application program may also trigger the simulated running of the sub-program of the written application program, as described below.
When the compiling client side obtains the triggering operation of the main program for the simulation operation, the simulator can be called to identify and analyze the subprogram which is required to trigger the operation of the compiled application program by the triggering operation, and the source code subcontracting corresponding to the subprogram can be read from the client side disk. The triggering operation is triggered in the compiling client by the writer of the application program, and may be, for example, a click operation of the writer of the application program on a program interface of the main program that simulates running, or the like.
The compiling client can call the simulator to submit (i.e. transmit) the read source code sub-package to the compiling plug-in corresponding to the target development language, so that the compiling plug-in corresponding to the target development language can be called, and real-time standardized compiling processing is carried out on the read source code sub-package to generate a standard sub-package corresponding to the read source code sub-package, namely, a code package obtained after the read source code sub-package is compiled and converted into the standard language. Similarly, the canonical subcontracting obtained by real-time compiling can be cached in the memory of the compiling client without being dropped to the client disk of the compiling client.
Therefore, the compiling client can call the simulator to simulate running the subprogram corresponding to the compiled application program (namely, the subprogram to which the read source code packet belongs) through the standard packet obtained by compiling, and the subprogram is the subprogram which the writer of the application program wants to simulate running through the triggering operation.
Referring to fig. 7, fig. 7 is a schematic view of a scenario for simulating running of a written application program according to an embodiment of the present application. As shown in fig. 7, a program source code package written by a writer of an application program using a target development language may be recorded on a client disk of a compiling client, where the program source code package may include a source code main package and N source code sub-packages (may include source code sub-packages 1 to N herein) of the written application program.
When the simulation operation of the compiled application program is triggered in the compiling client, the compiling client can call the simulator to read the source code main package of the compiled application program from the client disk, and can call the compiling plug-in corresponding to the target development language to perform standardized compiling processing on the read source code main package so as to obtain a standard main package corresponding to the source code main package, the compiling client can cache the standard main package in a client memory of the compiling client, and can operate the main program of the compiled application program through the cached standard main package, and a corresponding program interface of the operated main program can be displayed in a compiling interface of the compiling client.
Furthermore, the writer of the application program may trigger the execution of the sub-program of the written application program (which may be in the corresponding program interface of the main program being executed or in the associated program interface of the sub-program that has been executed at present), as may be the execution of the sub-program 2 of the written application program. Then, the compiling client may call the simulator to read the source code sub-packet 2 corresponding to the subroutine 2 from the client disk, and may call the compiling plug-in corresponding to the target development language to perform normalized compiling processing on the read source code sub-packet 2, so as to obtain the normalized sub-packet 2 corresponding to the source code sub-packet 2, where the normalized sub-packet 2 may also be cached in the client memory of the compiling client. The compiling client can call the simulator to re-run the subprogram 2 of the written application program on the basis of the main program of the running written application program through the cached canonical subcontracting 2.
The process of compiling the compiled application program in real time in the compiling client is realized, and the current subprogram required to be run can be compiled as required in the running process without compiling all subprograms of the compiled application program at the same time, so that the compiling calculation amount when the compiled application program is simulated is reduced, and the cost when the compiled application program is simulated.
Referring to fig. 8, fig. 8 is a schematic diagram of a framework for compiling an application program according to an embodiment of the application. As shown in fig. 8, the framework may include a plurality of execution modules (may be abbreviated as modules, and specifically include modules M1 to M6 herein).
The module M1 refers to that a user (i.e., a writer of the application program) may write the application program by using a selected target development language to obtain high-level language source code, where the high-level language source code may be a program source code package obtained by writing. The module M2 may be that the compiling client may perform built-in compiling processing on the high-level language source code written by the user, that is, perform normalized compiling processing internally, where the compiling process may be insensitive to the user, and the user only needs to pay attention to the process of writing the application program through the target development language selected by the user.
The module M3 is that during the process of writing the application program by the user, the compiling client can detect whether the user modifies the code written by the application program (i.e. the source code) using the target development language, that is, whether the code written by the application program is changed, if no change occurs, the compiling client does not need to recompile the high-level language source code written by the user, and if a change occurs, the compiling client needs to recompile the high-level language source code written by the user. The module M4 is a code file (i.e. the compiled code herein may be the above-mentioned standard main package, standard subcontracting, program standard package, etc.) compiled from the high-level language source code written by the user, and stored in a client memory (which may be simply referred to as a memory) of the compiling client.
More, the module M5 refers to a simulator that can be called to preview and run the compiled code, such as a main program of an application program written by the compiled specification main package preview and run, or a sub program of an application program written by the compiled specification sub package preview and run. The module M6 refers to that a code (such as a program specification package) compiled by a high-level language source code compiled by a user may be cached in a client memory of a compiling client, and after the high-level language source code is confirmed to be compiled without errors (such as after an application program writer triggers confirmation and uploading operations on the high-level language source code), the compiling client may upload the program specification package in the client memory to a background server for a subsequent object terminal to call.
Through the modules, the application can realize accurate writing, compiling, preview running, uploading processing and the like of the application program.
Through the implementation of the scheme, a user can directly use the wanted high-level language to develop the application program without learning and using a third-party compiling tool and a development framework for the application program, the user does not need to process environment installation and other trivial events required by the high-level language, the whole compiling process is uniformly managed and controlled by a developer tool, the compiling performance is minimum, and through various hook functions and configurable options (such as configuration options for the target development language required to be selected) provided, the compiling scene which can be customized for the application program code can be realized, and the compiling processing which is flexible in the interior of the application program written by the high-level language and is not felt by the user is realized.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a compiling apparatus for an application according to an embodiment of the application. The compiling device of the application program can be applied to a compiling client, and compiling plug-ins respectively corresponding to a plurality of development languages for compiling the application program are configured in the compiling client. As shown in fig. 9, the compiling apparatus 90 of the application program may include: a response module 901, an acquisition module 902, and a compilation module 903.
A response module 901, configured to obtain a target development language configured for compiling an application program in response to a configuration operation for the development language; the target development language is at least one of a plurality of development languages;
an acquiring module 902, configured to acquire a program source code packet of an application program written based on a target development language;
The compiling module 903 is configured to invoke a compiling plug-in corresponding to the target development language, perform normalized compiling processing on the program source code package, and generate a program specification package; the program specification package adopts the specification language of the application program, and is used for running the written application program.
Optionally, the compiling plugin corresponding to any of the plurality of development languages is defined with at least one of the following data:
A hook function adapted to source code of any development language of standardized compilation; conversion correspondence between each file type in any development language and the file type in the specification language; thread configuration information of a compiling plug-in corresponding to any development language;
The hook function is used for calling a compiler related to the corresponding compiling plug-in when the source code of any development language is compiled in a standardized mode; the thread configuration information of the compiling plugin corresponding to any development language is used for indicating whether the plugin task of the compiling plugin corresponding to any development language needs to start a compiling sub-thread to execute.
Optionally, the program source code package includes source code files of multiple file types in the target development language;
the compiling module 903 calls a compiling plug-in corresponding to the target development language, performs normalized compiling processing on the program source code package, and generates a program specification package in a manner that includes:
Invoking a compiling plugin corresponding to the target development language, and respectively converting each source code file in the program source code package into a standard file corresponding to the file type under the standard language according to the conversion corresponding relation between each file type under the target development language and the file type under the standard language;
And generating a program specification packet based on the specification files corresponding to each source code file in the program source code packet.
Optionally, the plug-in task of the compiling plug-in corresponding to the target development language comprises a file conversion task, wherein the file conversion task is used for converting each source code file in the program source code package into a standard file of a corresponding file type under the standard language;
the compiling module 903 calls a compiling plugin corresponding to the target development language, and respectively converts each source code file in the program source code package into a standard file corresponding to the file type in the standard language according to a conversion corresponding relation between each file type in the target development language and the file type in the standard language, where the method includes:
If the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task needs to start the compiling sub-thread to execute, creating the compiling sub-thread for the compiling main thread of the compiling plug-in corresponding to the target development language, and calling the created compiling sub-thread to execute the file conversion task;
And if the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task does not need to start the compiling sub-thread to execute, calling the compiling main thread to execute the file conversion task.
Optionally, the compiling module 903 calls a compiling plug-in corresponding to the target development language, performs normalized compiling processing on the program source code package, and generates a program specification package by a method including:
invoking a compiling plug-in corresponding to the target development language, and screening key source code files for constructing the application program from the program source code package;
carrying out standardized compiling treatment on the key source code file to generate a key specification file corresponding to the key source code file;
acquiring an additional file to be called of a key source code file, and integrating the additional file with a key specification file to generate a program specification package; the attached file belongs to a non-code file.
Optionally, the compiling module 903 calls a compiling plug-in corresponding to the target development language, performs normalized compiling processing on the program source code package, and generates a program specification package by a method including:
Invoking a compiling plug-in corresponding to the target development language, performing syntax analysis processing on the program source code package, and generating a syntax tree of the program source code package;
and carrying out grammar analysis processing on the grammar tree, and generating a program specification packet based on the grammar analysis result.
Optionally, the compiling apparatus 90 for an application program further includes a landing module 904, where the landing module 904 is configured to:
the obtained program source code package is dropped into a client disk of the compiling client;
the program source code package from the disk of the client comprises a source code main package of the written application program and N source code sub-packages, wherein N is a positive integer, the source code main package is used for running the main program of the written application program, and the N source code sub-packages are used for running the subprogram of the written application program.
Optionally, a simulator is configured in the compiling client, and the simulator is used for simulating running of the application program; the compiling apparatus 90 for an application program further includes a simulation run module 905, and the simulation run module 905 is configured to:
Responding to simulation operation aiming at the written application program, and calling a simulator to read a source code main package from a client disk;
calling a simulator to submit the read source code main package to a compiling plug-in corresponding to the target development language;
invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the source code main package to generate a standard main package corresponding to the source code main package;
Calling a simulator to simulate and run a main program of the written application program based on the standard main package;
the compiled specification main package is used for being cached in the memory of the compiling client.
Optionally, during the process of simulating and running the main program, the simulation running module 905 is further configured to:
When the trigger operation for the main program of the simulation operation is obtained, the simulator is called to read the source code sub-packet corresponding to the subprogram triggered to operate by the trigger operation from the client disk;
Calling a simulator to packetize the read source codes and submitting the source codes to a compiling plug-in corresponding to the target development language;
Invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the read source code subcontracting to generate a standardized subcontracting corresponding to the read source code subcontracting;
Invoking a simulator to simulate and run a subprogram corresponding to the written application program based on the standard subcontracting;
The compiled normative subcontracting is used for being cached in the memory of the compiling client.
Optionally, the responding module 901 responds to the configuration operation for the development language, and obtains the mode of compiling the configured target development language for the application program, including:
Responding to configuration operation, and acquiring configuration information aiming at development language;
and carrying out information analysis processing on the configuration information to determine a target development language configured for compiling the application program.
Optionally, the compiling apparatus 90 for an application program further includes an uploading module 906, where the uploading module 906 is configured to:
Uploading the program specification package to a background server to which the compiling client belongs, so that the background server drops the program specification package to a server disk of the background server;
after the program specification package is dropped into the server disk, the object terminal is used for sending a program operation request to the background server, and the background server is used for reading the program specification package from the server disk according to the program operation request and returning the read program specification package to the object terminal;
The object terminal is used for running the written application program in the running environment of the application program based on the program specification package returned by the background server.
According to an embodiment of the present application, the steps involved in the compiling method for an application program shown in fig. 3 may be performed by respective modules in the compiling apparatus 90 for an application program shown in fig. 9. For example, step S101 shown in fig. 3 may be performed by the response module 901 in fig. 9, and step S102 shown in fig. 3 may be performed by the acquisition module 902 in fig. 9; step S103 shown in fig. 3 may be performed by the compiling module 903 in fig. 9.
The compiling client can be configured with compiling plug-ins respectively corresponding to a plurality of development languages for compiling application programs, and can respond to configuration operations aiming at the development languages to acquire target development languages configured for compiling the application programs; the target development language is at least one of a plurality of development languages; the program source code package of the application program written based on the target development language can be obtained; therefore, a compiling plug-in corresponding to the target development language can be called, and the program source code package is subjected to standardized compiling processing to generate a program specification package; the program specification package adopts the specification language of the application program, and the program specification package is used for running the written application program. According to the device provided by the application, as the compiling plug-ins respectively corresponding to the multiple development languages for compiling the application program are configured in the compiling client, a support developer can flexibly select a target development language to be adopted from the multiple development languages, so that the developer can compile the application program by using the selected target development language, and subsequently, the compiling client can also adopt the compiling plug-ins corresponding to the target development language to automatically realize the standardized compiling of the program source code package compiled by the developer by adopting the target development language, so that the program specification package adopting the specification language of the application program is obtained, and the compiled applet can be operated by the program specification package; therefore, the development language for writing the application program can be flexibly selected according to the actual demands of the developer, and a third party framework for writing the application program is not required to be additionally built for the selected development language, so that the flexibility of writing the applet is improved, and the difficulty of writing the applet is reduced.
According to an embodiment of the present application, each module in the compiling apparatus 90 of the application program shown in fig. 9 may be separately or completely combined into one or several units to form a structure, or some unit(s) thereof may be further split into a plurality of sub-units with smaller functions, so that the same operation may be implemented without affecting the implementation of the technical effects of the embodiment of the present application. The above modules are divided based on logic functions, and in practical applications, the functions of one module may be implemented by a plurality of units, or the functions of a plurality of modules may be implemented by one unit. In other embodiments of the present application, the compiling apparatus 90 of the application program may also include other units, and in practical applications, these functions may also be realized with assistance of other units, and may be realized by cooperation of a plurality of units.
In the present embodiment, the term "module" or "unit" refers to a computer program or a part of a computer program having a predetermined function and working together with other relevant parts to achieve a predetermined object, and may be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Also, a processor (or multiple processors or memories) may be used to implement one or more modules or units. Furthermore, each module or unit may be part of an overall module or unit that incorporates the functionality of the module or unit.
According to one embodiment of the present application, a computer program capable of executing the steps involved in the respective methods shown in the embodiments of the present application may be run on a general-purpose computer device, which may contain a processing element and a storage element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), etc., to construct a compiling apparatus 90 of an application program as shown in fig. 9. The above-described computer program may be recorded on, for example, a computer-readable recording medium, and may be loaded into and executed in the above-described computer apparatus through the computer-readable recording medium.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the application. As shown in fig. 10, the computer device 1000 may include: processor 1001, network interface 1004, and memory 1005, and, in some embodiments, computer device 1000 may further comprise: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 10, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 1005, which is one type of computer storage medium.
In the computer device 1000 shown in FIG. 10, the network interface 1004 may provide network communication functions; while user interface 1003 is primarily used as an interface for providing input to a user; the computer device 1000 may be applied to a compiling client having a compiling plug-in configured therein corresponding to each of a plurality of development languages for compiling an application program, and the processor 1001 may be configured to call a device control application program stored in the memory 1005 to implement:
Responding to configuration operation aiming at the development language, and acquiring a target development language configured for compiling an application program; the target development language is at least one of a plurality of development languages;
acquiring a program source code package of an application program written based on a target development language;
Invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application program, and is used for running the written application program.
In one possible implementation, the compilation plugin corresponding to any one of a plurality of development languages is defined with at least one of the following data:
A hook function adapted to source code of any development language of standardized compilation; conversion correspondence between each file type in any development language and the file type in the specification language; thread configuration information of a compiling plug-in corresponding to any development language;
The hook function is used for calling a compiler related to the corresponding compiling plug-in when the source code of any development language is compiled in a standardized mode; the thread configuration information of the compiling plugin corresponding to any development language is used for indicating whether the plugin task of the compiling plugin corresponding to any development language needs to start a compiling sub-thread to execute.
In one possible implementation, the program source code package includes source code files of multiple file types in the target development language;
the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
Invoking a compiling plugin corresponding to the target development language, and respectively converting each source code file in the program source code package into a standard file corresponding to the file type under the standard language according to the conversion corresponding relation between each file type under the target development language and the file type under the standard language;
And generating a program specification packet based on the specification files corresponding to each source code file in the program source code packet.
In one possible implementation, the plug-in tasks of the compiling plug-ins corresponding to the target development language include a file conversion task, where the file conversion task is used to convert each source code file in the program source code package into a standard file corresponding to a file type in the standard language;
the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
If the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task needs to start the compiling sub-thread to execute, creating the compiling sub-thread for the compiling main thread of the compiling plug-in corresponding to the target development language, and calling the created compiling sub-thread to execute the file conversion task;
And if the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task does not need to start the compiling sub-thread to execute, calling the compiling main thread to execute the file conversion task.
In one possible implementation, the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
invoking a compiling plug-in corresponding to the target development language, and screening key source code files for constructing the application program from the program source code package;
carrying out standardized compiling treatment on the key source code file to generate a key specification file corresponding to the key source code file;
acquiring an additional file to be called of a key source code file, and integrating the additional file with a key specification file to generate a program specification package; the attached file belongs to a non-code file.
In one possible implementation, the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
Invoking a compiling plug-in corresponding to the target development language, performing syntax analysis processing on the program source code package, and generating a syntax tree of the program source code package;
and carrying out grammar analysis processing on the grammar tree, and generating a program specification packet based on the grammar analysis result.
In one possible implementation, the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
the obtained program source code package is dropped into a client disk of the compiling client;
the program source code package from the disk of the client comprises a source code main package of the written application program and N source code sub-packages, wherein N is a positive integer, the source code main package is used for running the main program of the written application program, and the N source code sub-packages are used for running the subprogram of the written application program.
In one possible implementation, a simulator is configured in the compiling client, and the simulator is used for simulating running the application program; the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
Responding to simulation operation aiming at the written application program, and calling a simulator to read a source code main package from a client disk;
calling a simulator to submit the read source code main package to a compiling plug-in corresponding to the target development language;
invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the source code main package to generate a standard main package corresponding to the source code main package;
Calling a simulator to simulate and run a main program of the written application program based on the standard main package;
the compiled specification main package is used for being cached in the memory of the compiling client.
In one possible implementation, during the simulation of running the main program, the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
When the trigger operation for the main program of the simulation operation is obtained, the simulator is called to read the source code sub-packet corresponding to the subprogram triggered to operate by the trigger operation from the client disk;
Calling a simulator to packetize the read source codes and submitting the source codes to a compiling plug-in corresponding to the target development language;
Invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the read source code subcontracting to generate a standardized subcontracting corresponding to the read source code subcontracting;
Invoking a simulator to simulate and run a subprogram corresponding to the written application program based on the standard subcontracting;
The compiled normative subcontracting is used for being cached in the memory of the compiling client.
In one possible implementation, the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
Responding to configuration operation, and acquiring configuration information aiming at development language;
and carrying out information analysis processing on the configuration information to determine a target development language configured for compiling the application program.
In one possible implementation, the processor 1001 may also be used to invoke a device control application stored in the memory 1005 to implement:
Uploading the program specification package to a background server to which the compiling client belongs, so that the background server drops the program specification package to a server disk of the background server;
after the program specification package is dropped into the server disk, the object terminal is used for sending a program operation request to the background server, and the background server is used for reading the program specification package from the server disk according to the program operation request and returning the read program specification package to the object terminal;
The object terminal is used for running the written application program in the running environment of the application program based on the program specification package returned by the background server.
It should be understood that the computer device 1000 described in the embodiments of the present application may perform the description of the compiling method of the application program in the embodiments of the present application, and may also perform the description of the compiling apparatus 90 of the application program in the embodiment corresponding to fig. 9, which is not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the present application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, which when executed by a processor, can perform the description of the compiling method of the application program in each embodiment of the present application, and therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer storage medium according to the present application, please refer to the description of the method embodiments of the present application.
As an example, the above-described computer program may be deployed to be executed on one computer device or on multiple computer devices that are located at one site, or on multiple computer devices that are distributed across multiple sites and interconnected by a communication network, where the multiple computer devices that are distributed across multiple sites and interconnected by a communication network may constitute a blockchain network.
The computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), etc. that are provided on the computer device. Further, the computer-readable storage medium may also include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
The present application provides a computer program product comprising a computer program stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the description of the compiling method of the application program in the embodiments of the present application, and thus, a detailed description thereof will not be provided herein. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
The terms first, second and the like in the description and in the claims and drawings of embodiments of the application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or device that comprises a list of steps or elements is not limited to the list of steps or modules but may, in the alternative, include other steps or modules not listed or inherent to such process, method, apparatus, article, or device.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.
Claims (15)
1. The compiling method of the application program is characterized in that the method is applied to a compiling client, and compiling plug-ins respectively corresponding to a plurality of development languages for compiling the application program are configured in the compiling client; the method comprises the following steps:
Responding to configuration operation aiming at the development language, and acquiring a target development language configured for compiling an application program; the target development language is at least one of the plurality of development languages;
acquiring a program source code package of an application program written based on the target development language;
Invoking a compiling plug-in corresponding to the target development language, and carrying out standardized compiling treatment on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application program, and is used for running the written application program.
2. The method of claim 1, wherein the compilation plugin corresponding to any of the plurality of development languages is defined with at least one of the following data:
a hook function adapted to the source code of the any development language is compiled in a standardized manner; the conversion corresponding relation between each file type in any development language and the file type in the standard language; the thread configuration information of the compiling plugin corresponding to any development language;
The hook function is used for calling a compiler related to a corresponding compiling plug-in when the source code of any development language is compiled in a standardized mode; the thread configuration information of the compiling plugin corresponding to any development language is used for indicating whether the plugin task of the compiling plugin corresponding to any development language needs to start a compiling sub-thread to execute.
3. The method of claim 2, wherein the program source code package includes source code files of a plurality of file types in the target development language;
The compiling plug-in corresponding to the target development language is called, the program source code package is subjected to standardized compiling processing, and a program specification package is generated, and the method comprises the following steps:
Invoking a compiling plug-in corresponding to the target development language, and respectively converting each source code file in the program source code package into a standard file corresponding to the file type in the standard language according to the conversion corresponding relation between each file type in the target development language and the file type in the standard language;
and generating the program specification package based on the specification files corresponding to each source code file in the program source code package.
4. The method of claim 3, wherein the plug-in tasks of the target development language corresponding compilation plug-ins include a file conversion task for converting each source code file in the program source code package into a canonical file of a corresponding file type in the canonical language;
The compiling plugin corresponding to the target development language is called, each source code file in the program source code package is respectively converted into a standard file corresponding to the file type in the standard language according to the conversion corresponding relation between each file type in the target development language and the file type in the standard language, and the compiling plugin comprises:
If the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task needs to start a compiling sub-thread to execute, creating a compiling sub-thread for a compiling main thread of the compiling plug-in corresponding to the target development language, and calling the created compiling sub-thread to execute the file conversion task;
And if the thread configuration information of the compiling plug-in corresponding to the target development language is used for indicating that the file conversion task does not need to start a compiling sub-thread to execute, calling the compiling main thread to execute the file conversion task.
5. The method of claim 1, wherein the calling the compiling plugin corresponding to the target development language performs normalized compiling processing on the program source code package to generate a program specification package, and includes:
Invoking a compiling plug-in corresponding to the target development language, and screening key source code files for constructing an application program from the program source code package;
carrying out standardized compiling treatment on the key source code file to generate a key specification file corresponding to the key source code file;
Acquiring an additional file to be called of the key source code file, and integrating the additional file with the key specification file to generate the program specification package; the additional file belongs to a non-code file.
6. The method of claim 1, wherein the calling the compiling plugin corresponding to the target development language performs normalized compiling processing on the program source code package to generate a program specification package, and includes:
Invoking a compiling plug-in corresponding to the target development language, and carrying out grammar analysis processing on the program source code package to generate a grammar tree of the program source code package;
and carrying out grammar analysis processing on the grammar tree, and generating the program specification packet based on a grammar analysis result.
7. The method of claim 1, wherein the method further comprises:
the obtained program source code package is dropped into a client disk of the compiling client;
The program source code package in the client disk comprises a source code main package of the written application program and N source code sub-packages, wherein N is a positive integer, the source code main package is used for running the main program of the written application program, and the N source code sub-packages are used for running the subprogram of the written application program.
8. The method of claim 7, wherein the compiling client has a simulator configured therein for simulating running an application program; the method further comprises the steps of:
Responding to simulation operation aiming at a written application program, and calling the simulator to read the source code main package from the client disk;
invoking the simulator to submit the read source code main package to a compiling plug-in corresponding to the target development language;
Invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the source code main package to generate a standardized main package corresponding to the source code main package;
invoking the simulator to simulate running the main program of the written application program based on the standard main package;
the compiled specification main package is used for being cached in the memory of the compiling client.
9. The method of claim 8, wherein in simulating running the main program, the method further comprises:
When the trigger operation of the main program aiming at the simulation operation is obtained, calling the simulator to read a source code sub-packet corresponding to a subprogram triggered to operate by the trigger operation from the client disk;
Invoking the simulator to subpackage the read source codes and submitting the subpackage to a compiling plug-in corresponding to the target development language;
Invoking a compiling plug-in corresponding to the target development language, and performing standardized compiling processing on the read source code subcontracting to generate a standardized subcontracting corresponding to the read source code subcontracting;
Invoking the simulator to simulate and run a subprogram corresponding to the written application program based on the standard subcontracting;
The compiled specification packet is used for being cached in the memory of the compiling client.
10. The method of claim 1, wherein the obtaining the target development language configured for application compilation in response to the configuration operation for the development language comprises:
responding to the configuration operation, and acquiring configuration information aiming at a development language;
and carrying out information analysis processing on the configuration information to determine the target development language configured for compiling the application program.
11. The method of claim 1, wherein the method further comprises:
uploading the program specification package to a background server to which the compiling client belongs, so that the background server drops the program specification package to a server disk of the background server;
After the program specification package is dropped into the server disk, the object terminal is used for sending a program running request to the background server, and the background server is used for reading the program specification package from the server disk according to the program running request and returning the read program specification package to the object terminal;
and the object terminal is used for running the written application program in the running environment of the application program based on the program specification package returned by the background server.
12. The compiling device of the application program is characterized in that the device is applied to a compiling client, and compiling plug-ins respectively corresponding to a plurality of development languages for compiling the application program are configured in the compiling client; the device comprises:
The response module is used for responding to the configuration operation aiming at the development language and acquiring the target development language configured for compiling the application program; the target development language is at least one of the plurality of development languages;
The acquisition module is used for acquiring a program source code packet of an application program written based on the target development language;
the compiling module is used for calling a compiling plug-in corresponding to the target development language, and carrying out standardized compiling processing on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application program, and is used for running the written application program.
13. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-11.
14. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1-11.
15. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program adapted to be loaded by a processor and to perform the steps of the method according to any of claims 1-11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410688088.4A CN118259922B (en) | 2024-05-30 | 2024-05-30 | Compiling method, compiling device, compiling product, compiling device, compiling equipment and compiling medium for application program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410688088.4A CN118259922B (en) | 2024-05-30 | 2024-05-30 | Compiling method, compiling device, compiling product, compiling device, compiling equipment and compiling medium for application program |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118259922A true CN118259922A (en) | 2024-06-28 |
CN118259922B CN118259922B (en) | 2024-09-06 |
Family
ID=91607255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410688088.4A Active CN118259922B (en) | 2024-05-30 | 2024-05-30 | Compiling method, compiling device, compiling product, compiling device, compiling equipment and compiling medium for application program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118259922B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119065679A (en) * | 2024-11-05 | 2024-12-03 | 成都鱼泡科技有限公司 | Multi-terminal multiplexed applet code conversion method, device and computer program product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5339424A (en) * | 1991-04-19 | 1994-08-16 | Mitsubishi Denki Kabushiki Kaisha | System and method for compiling and executing a computer program written in more than one programming language |
US20140189664A1 (en) * | 2009-10-20 | 2014-07-03 | Russell WAYNE Guenthner | METHOD FOR ENABLING COMPILATION OF A COBOL SOURCE PROGRAM UTILIZING A TWO-STAGE COMPILATION PROCESS, THE COBOL SOURCE PROGRAM INCLUDING A MIX OF COBOL, C++ or JAVA STATEMENTS, AND OPTIONAL OPENMP DIRECTIVES |
CN110955431A (en) * | 2018-09-27 | 2020-04-03 | 北京国双科技有限公司 | Processing method and device of compiling environment |
CN114327431A (en) * | 2021-12-31 | 2022-04-12 | 网易(杭州)网络有限公司 | Compiling method, device, equipment and storage medium |
CN117707499A (en) * | 2023-11-28 | 2024-03-15 | 道莅智远技术(苏州)有限公司 | Multi-source model algorithm analyzer plug-in and compiling algorithm based on virtualization technology |
-
2024
- 2024-05-30 CN CN202410688088.4A patent/CN118259922B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5339424A (en) * | 1991-04-19 | 1994-08-16 | Mitsubishi Denki Kabushiki Kaisha | System and method for compiling and executing a computer program written in more than one programming language |
US20140189664A1 (en) * | 2009-10-20 | 2014-07-03 | Russell WAYNE Guenthner | METHOD FOR ENABLING COMPILATION OF A COBOL SOURCE PROGRAM UTILIZING A TWO-STAGE COMPILATION PROCESS, THE COBOL SOURCE PROGRAM INCLUDING A MIX OF COBOL, C++ or JAVA STATEMENTS, AND OPTIONAL OPENMP DIRECTIVES |
CN110955431A (en) * | 2018-09-27 | 2020-04-03 | 北京国双科技有限公司 | Processing method and device of compiling environment |
CN114327431A (en) * | 2021-12-31 | 2022-04-12 | 网易(杭州)网络有限公司 | Compiling method, device, equipment and storage medium |
CN117707499A (en) * | 2023-11-28 | 2024-03-15 | 道莅智远技术(苏州)有限公司 | Multi-source model algorithm analyzer plug-in and compiling algorithm based on virtualization technology |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119065679A (en) * | 2024-11-05 | 2024-12-03 | 成都鱼泡科技有限公司 | Multi-terminal multiplexed applet code conversion method, device and computer program product |
Also Published As
Publication number | Publication date |
---|---|
CN118259922B (en) | 2024-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9715370B2 (en) | Method and system for providing content | |
US10552520B2 (en) | System and method for provisioning a mobile software application to a mobile device | |
CN111240684B (en) | Cutting method and device of JS codes, medium and electronic equipment | |
US9015654B2 (en) | System for providing test environments for executing and analysing test routines | |
US7155381B2 (en) | Module for developing wireless device applications using an integrated emulator | |
CN111831538B (en) | Debugging method, device and storage medium | |
KR20180122019A (en) | Tools and methods for real-time data flow programming languages | |
CN110069259B (en) | ID L file-based parsing method and device, electronic equipment and storage medium | |
CN111913741B (en) | Object interception method, device, medium and electronic equipment | |
CN111506314B (en) | Project development method, device, server and medium | |
CN115113850B (en) | Cross-platform application construction and operation method, server, terminal and system | |
CN118259922B (en) | Compiling method, compiling device, compiling product, compiling device, compiling equipment and compiling medium for application program | |
CN117093286B (en) | Plug-in generation method, device, equipment and computer readable storage medium | |
CN111596905A (en) | Method, device, storage medium and terminal for generating java object | |
CN108287720A (en) | software compilation method, device, equipment and storage medium | |
CN110659022B (en) | Method for automatically calling Python script based on Java | |
CN106843875B (en) | The method and apparatus of cross-platform transplanting Python program | |
AU2019222873B2 (en) | Method and system for providing content | |
CN117389587A (en) | Application merging method and device, storage medium and computer equipment | |
CN113641594B (en) | Cross-terminal automatic testing method and related device | |
CN111966355B (en) | Project operation method, device, equipment and computer storage medium | |
CN114721929A (en) | Test method, test device, storage medium and equipment | |
CN116431139A (en) | Component assembly model, interface generation method, device, medium and equipment | |
CN118259646A (en) | Diagnostic program generation method, device and vehicle | |
CN119473248A (en) | Communication method, device, equipment and medium across three-terminal systems based on Rust |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |