CN111124423A - Multi-platform-based compiling detection method, device, server and medium - Google Patents

Multi-platform-based compiling detection method, device, server and medium Download PDF

Info

Publication number
CN111124423A
CN111124423A CN201911357525.XA CN201911357525A CN111124423A CN 111124423 A CN111124423 A CN 111124423A CN 201911357525 A CN201911357525 A CN 201911357525A CN 111124423 A CN111124423 A CN 111124423A
Authority
CN
China
Prior art keywords
project
compiling
target
platform
file
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
Application number
CN201911357525.XA
Other languages
Chinese (zh)
Other versions
CN111124423B (en
Inventor
夏炎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Mihoyo Tianming Technology Co Ltd
Original Assignee
Shanghai Mihoyo Tianming Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Mihoyo Tianming Technology Co Ltd filed Critical Shanghai Mihoyo Tianming Technology Co Ltd
Priority to CN201911357525.XA priority Critical patent/CN111124423B/en
Publication of CN111124423A publication Critical patent/CN111124423A/en
Application granted granted Critical
Publication of CN111124423B publication Critical patent/CN111124423B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses a compiling detection method, a compiling detection device, a server and a medium based on multiple platforms, wherein the method comprises the following steps: when the fact that compiling detection operation is triggered is detected, a target compiling platform corresponding to the compiling detection operation is obtained; acquiring a target project file corresponding to a target compiling platform from all pre-established project files, and compiling based on the content in the target project file; and when the compiling result meets the preset condition, normally compiling the code corresponding to the target compiling platform. According to the technical scheme, the technical problems that all resources corresponding to each platform need to be firstly exported when the compiling result of each platform is detected at present, time and labor are wasted when the compiling result of each platform is detected due to the fact that the number of the resources corresponding to each platform is large are solved, and the technical effects that when the compiling result of each platform is detected, the compiling detection efficiency and convenience are improved by processing the project files corresponding to each platform are achieved.

Description

Multi-platform-based compiling detection method, device, server and medium
Technical Field
The embodiment of the invention relates to the technical field of game development, in particular to a compiling detection method, a compiling detection device, a compiling detection server and a compiling detection medium based on multiple platforms.
Background
In the prior art, when the code compiling condition of a unity project on different platforms needs to be checked, and optionally, when the code compiling condition of platforms such as Windows, iOS, android and the like exists, the unity editor needs to be switched to a target platform, and then the code needs to be compiled to check the compiling result.
When the platform is switched in the editor, all resources corresponding to the converted platform need to be acquired, and the compiling condition of the platform can be detected only after all the resources are converted into the format corresponding to the current platform.
Disclosure of Invention
The embodiment of the invention provides a compiling detection method, a compiling detection device, a server and a medium based on multiple platforms, and aims to achieve the technical effects of improving the efficiency and convenience of compiling detection.
In a first aspect, an embodiment of the present invention provides a multi-platform based compilation detection method, where the method includes:
when detecting that compiling detection operation is triggered, acquiring a target compiling platform corresponding to the compiling detection operation;
acquiring a target project file corresponding to the target compiling platform from all pre-established project files, and compiling based on the content in the target project file; wherein the project file comprises compiling configuration corresponding to each platform;
and when the compiling result meets a preset condition, normally compiling the code corresponding to the target compiling platform.
In a second aspect, an embodiment of the present invention further provides a multi-platform-based compilation detection apparatus, where the apparatus includes:
the target compiling platform determining module is used for acquiring a target compiling platform corresponding to compiling detection operation when triggering the compiling detection operation is detected;
the target project file determining module is used for acquiring a target project file corresponding to the target compiling platform from all pre-established project files and compiling based on the content in the target project file; wherein the project file comprises compiling configuration corresponding to each platform;
and the compiling detection result determining module is used for normally compiling the codes corresponding to the target compiling platform when the compiling result meets the preset condition.
In a third aspect, an embodiment of the present invention further provides a server, where the server includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the multi-platform based compilation detection method according to any one of the embodiments of the invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the multi-platform based compilation detection method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, when the triggering compiling detection operation is detected, a target compiling platform corresponding to the compiling detection operation is obtained; acquiring a target project file corresponding to a target compiling platform from all pre-established project files, and compiling based on the content in the target project file; wherein, the project file comprises compiling configuration corresponding to each platform; when the compiling result meets the preset condition, the code corresponding to the target compiling platform is compiled normally, the technical problems that all resources corresponding to the platform need to be exported in an editor in the prior art when the compiling result of each platform is detected are solved, time and labor are wasted in compiling detection due to the fact that the number of the resources corresponding to each platform is large, and the technical effects of improving compiling detection efficiency and convenience are achieved by processing project files corresponding to each platform when the compiling result of each platform is detected.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a multi-platform-based compiling detection method according to an embodiment of the present invention;
fig. 2 is another schematic flow chart illustrating a multi-platform-based compilation detection method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a compiling detection device based on multiple platforms according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a multi-platform-based compiling detection method according to an embodiment of the present invention, where the embodiment is applicable to a situation of detecting compiling results of different platforms, and the method may be executed by a multi-platform-based compiling detection apparatus, and the apparatus may be implemented in the form of software and/or hardware, where the hardware may be an electronic device, and the electronic device may be a mobile terminal or a PC terminal.
As shown in fig. 1, the method of the present embodiment includes:
and S110, when the compiling detection operation is triggered, acquiring a target compiling platform corresponding to the compiling detection operation.
The compiling detection operation may be to trigger a certain control on the display interface, where the control is a control for compiling detection. The target compiling platform can be a currently working platform, and optionally, platforms such as android and ios.
Specifically, when an operation triggering compilation detection is detected, a current working platform corresponding to the compilation detection operation is acquired.
And S120, acquiring a target project file corresponding to the target compiling platform from all the project files established in advance, and compiling based on the content in the target project file.
The project files are pre-established and are project files corresponding to different platforms. The target project file is a project file corresponding to the target compilation platform, optionally, the target compilation platform is an IOS platform, and correspondingly, the target project file is a project file corresponding to the IOS platform.
Specifically, after the target compiling platform is determined, the target project file corresponding to the target compiling platform can be screened from all the project files established in advance, and compiling is performed based on the content in the target project file, so that the platform compiling result corresponding to the current platform is obtained.
Optionally, based on the project configuration files corresponding to all the project files, obtaining target project files corresponding to the target compiling platform from all the project files; and compiling the content in the target project file based on the target tool.
When creating project files corresponding to the respective platforms, project configuration files corresponding to the respective project files need to be created. The project configuration file can include the relevance between each sub project file in the project file and the relevance between each project file.
Specifically, a program for obtaining the project configuration file may be called to obtain the project configuration file, so as to obtain an object project file corresponding to the object compiling platform from all the project files according to the project configuration file, and obtain and compile the content in the object project file based on the object tool.
And S130, when the compiling result meets the preset condition, compiling the code corresponding to the target compiling platform normally.
In this embodiment, after the compilation is completed, prompt information corresponding to the compilation result may be displayed, and based on the prompt information, it may be determined whether the code corresponding to the target compilation platform is compiled normally.
According to the technical scheme of the embodiment of the invention, when the triggering compiling detection operation is detected, a target compiling platform corresponding to the compiling detection operation is obtained; acquiring a target project file corresponding to a target compiling platform from all pre-established project files, and compiling based on the content in the target project file; wherein, the project file comprises compiling configuration corresponding to each platform; when the compiling result meets the preset condition, the code corresponding to the target compiling platform is compiled normally, the technical problems that all resources corresponding to the platform need to be exported in an editor in the prior art when the compiling result of each platform is detected are solved, time and labor are wasted in compiling detection due to the fact that the number of the resources corresponding to each platform is large, and the technical effects of improving compiling detection efficiency and convenience are achieved by processing project files corresponding to each platform when the compiling result of each platform is detected. In this embodiment, before compiling and detecting each platform, project files corresponding to each platform and project configuration files corresponding to each project file need to be established.
Optionally, project files corresponding to the respective platforms are generated based on the target tool, and project configuration files corresponding to all the project files are generated based on the target tool.
It should be noted that, in this embodiment, the number of the project configuration files may be one, and the project configuration file may include an association relationship between a plurality of project files.
Generating project files corresponding to the respective platforms based on the target tools, including: generating to-be-processed project files corresponding to the platforms based on the target tool, and calling the expansion interface to analyze the to-be-processed project files to obtain analysis project files corresponding to the platforms; adding compiling configuration corresponding to each platform based on platform identification information in the analysis project file; calling a reference information acquisition module to acquire all reference information in the analysis project file; and processing the reference information based on the compiling configuration corresponding to each platform, and taking the processed analysis project file as a used project file.
In this embodiment, the VS project file generated by the unity can be processed by using an extended interface of a visual Studio plug-in of the unity. Accordingly, the target tool may be an extension interface of a visual Studio plug-in the unity tool. The project file to be processed is a file without adding compiling configuration corresponding to each platform. And the analysis project file is the project file after the analysis of the project file to be processed. The platform identification information is an identification corresponding to each platform. The compiling configuration is a compiling configuration file to be used when compiling tests are carried out on each platform.
Specifically, a to-be-processed project file corresponding to each platform is generated based on an expansion interface of the VS plugin, and the VS plugin is called to call the expansion interface to analyze the to-be-processed project file, so that an analysis project file corresponding to each platform is obtained. According to the identification information in the analysis project file, a platform corresponding to each analysis project file can be determined, the compiling configuration corresponding to each platform is determined based on the identification information corresponding to each platform, and the compiling configuration is added to the corresponding project file. After determining the compiling configuration corresponding to each platform, all reference relationships in the analysis project file may be obtained based on the reference information obtaining module, and whether all reference relationships are available is determined according to the compiling configuration, and the unavailable reference relationships are deleted. And taking the modified analysis project file as a finally used project file.
It should be noted that, at the same time of generating the project file, a project configuration file corresponding to the project file, that is, a target project file, or a solution file, needs to be generated. Optionally, generating a to-be-processed project configuration file corresponding to the project file based on a target plug-in the target tool; calling a target expansion interface based on the target plug-in to analyze the to-be-processed project configuration file to obtain an analyzed project configuration file; and processing the analyzed project configuration files to obtain target project configuration files corresponding to all the project files.
The project configuration file to be processed corresponds to the project file to be processed.
Specifically, a VS plug-in interface may be called to analyze and process the to-be-processed project configuration file to obtain an analysis project configuration file, extract all the project information included in the analysis project configuration file, add configuration files corresponding to each platform according to the project information, and use the analysis project configuration file to which the configuration file is added as a finally-used project configuration file, that is, a target project configuration file.
In this embodiment, the custom processing of the VS project file generated by unity can be realized based on the extended interface of the VS plugin of unity, various compiling configurations of different platforms are added to the VS project file, the platform compiling codes can be quickly switched in the Visual Studio, the platform does not need to be switched in the unity editor for compiling, and the convenience of compiling detection is improved. That is to say, the technical solution of this embodiment can compile codes of various platforms very fast in the Visual Studio, and avoid a slow process of switching platforms through a unity editor.
Example two
As a preferred embodiment of the foregoing embodiment, fig. 2 is another flow chart of a multi-platform-based compiling detection method according to a second embodiment of the present invention. As shown in fig. 2, the method includes:
s201, opening unit.
It is understood that the unity editor is opened.
And S202, calling the target plug-in to generate a project file to be processed.
After triggering the unity editor, one may wait for the editor to automatically generate or update a pre-established project file. Therefore, in this embodiment, the project file may be established in advance.
Specifically, an expansion interface of the target plug-in is called to generate the project file to be processed. Namely, the unity editor calls the VSTU plug-in to generate a VS pending project file.
And S203, calling the target plug-in to generate a target project configuration file to be processed.
Specifically, the VSTU plug-in generates a VS project file, that is, a target plug-in is called to generate a target project configuration file to be processed corresponding to the project file to be processed.
And S204, analyzing the project file to be processed, and adding compiling configuration corresponding to each platform.
Specifically, the to-be-processed project file is analyzed and processed by calling an expansion interface based on the VSTU plug-in to obtain an analyzed project file, and compiling configuration corresponding to each project file is added according to platform information corresponding to each project file.
S205, extracting all the reference information in the project file, determining whether the reference information needs to be deleted, and saving the modified analysis project file as a finally used project file.
Specifically, all the reference information in the project file is obtained, whether the reference information is correct or not is judged, if not, the reference relationship can be deleted, and if so, the reference information can be retained. Meanwhile, the modified parsed item file is saved as the item file to be finally used.
And S206, analyzing the target project configuration file to be processed based on the target plug-in calling the expansion interface to obtain an analyzed project configuration file.
Specifically, the target plug-in calls the expansion interface to analyze the target project configuration file to be processed, that is, the solution file is analyzed to obtain an analysis project configuration file.
And S207, extracting all project information in the analysis project configuration file, adding platform configurations corresponding to all platforms, and storing the platform configurations as target project configuration files.
Specifically, all project information in the project configuration file is extracted based on the project information, platform configurations corresponding to the platforms are added according to the project information and updated in the analysis project configuration file, and the updated project configuration file is used as a target project configuration file.
And S208, finishing the generation of the VS project file.
And after the target project configuration file and the project file are obtained, determining that the project file is completely generated.
S209, when the trigger target operation is detected, acquiring a compiling platform corresponding to the target operation.
When it is detected that a certain platform needs to be compiled and tested, the compilation of the corresponding platform can be tested based on the project file.
And S210, compiling and testing, and checking a compiling result.
And determining whether the compiling corresponding to the platform is normal or not according to the compiling test output result.
On the basis of the above technical solution, the solution can be understood as follows: opening a unity editor, waiting for the editor to automatically generate or update a visual studio project file, opening the project file in the visual studio, selecting a platform to be compiled, and compiling and viewing the result in the visual studio. The method has the advantages that the compiling conditions of various platforms can be checked without switching the platforms in the unity editor, and the convenience of compiling detection is improved.
According to the technical scheme of the embodiment of the invention, when the triggering compiling detection operation is detected, a target compiling platform corresponding to the compiling detection operation is obtained; acquiring a target project file corresponding to a target compiling platform from all pre-established project files, and compiling based on the content in the target project file; wherein, the project file comprises compiling configuration corresponding to each platform; when the compiling result meets the preset condition, the code corresponding to the target compiling platform is compiled normally, the technical problems that all resources corresponding to the platform need to be exported in an editor in the prior art when the compiling result of each platform is detected are solved, time and labor are wasted in compiling detection due to the fact that the number of the resources corresponding to each platform is large, and the technical effects of improving compiling detection efficiency and convenience are achieved by processing project files corresponding to each platform when the compiling result of each platform is detected.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a compiling detection device based on multiple platforms according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a target compiling platform determining module 310, a target project file determining module 320 and a compiling detection result determining module 330.
The target compiling platform determining module 310 is configured to, when it is detected that a compiling detection operation is triggered, obtain a target compiling platform corresponding to the compiling detection operation; a target project file determining module 320, configured to obtain a target project file corresponding to the target compiling platform from all pre-established project files, and compile based on content in the target project file; wherein the project file comprises compiling configuration corresponding to each platform; and the compiling detection result determining module 330 is configured to determine that the code corresponding to the target compiling platform is compiled normally when the compiling result meets a preset condition.
According to the technical scheme of the embodiment of the invention, when the triggering compiling detection operation is detected, a target compiling platform corresponding to the compiling detection operation is obtained; acquiring a target project file corresponding to a target compiling platform from all pre-established project files, and compiling based on the content in the target project file; wherein, the project file comprises compiling configuration corresponding to each platform; when the compiling result meets the preset condition, the code corresponding to the target compiling platform is compiled normally, the technical problems that all resources corresponding to the platform need to be exported in an editor in the prior art when the compiling result of each platform is detected are solved, time and labor are wasted in compiling detection due to the fact that the number of the resources corresponding to each platform is large, and the technical effects of improving compiling detection efficiency and convenience are achieved by processing project files corresponding to each platform when the compiling result of each platform is detected. On the basis of the above technical solution, the target project file determining module is further configured to: acquiring target project files corresponding to the target compiling platform from all project files based on the project configuration files corresponding to all the project files; compiling the content in the target project file based on a target tool.
On the basis of the above technical solutions, the apparatus further includes: a project profile generation module to: project files corresponding to the respective platforms are generated based on a target tool, and project profiles corresponding to all of the project files are generated based on the target tool.
On the basis of the above technical solutions, the project configuration file generation module is further configured to: generating to-be-processed project files corresponding to the platforms based on the target tool, and calling an expansion interface to analyze the to-be-processed project files to obtain analysis project files corresponding to the platforms; adding compiling configuration corresponding to each platform based on the platform identification information in the analysis project file; calling a reference information acquisition module to acquire all reference information in the analysis project file; and processing the reference information based on the compiling configuration corresponding to each platform, and taking the processed analysis project file as a used project file.
On the basis of the above technical solutions, the project configuration file generation module is further configured to: generating a project configuration file to be processed corresponding to the project file based on a target plug-in a target tool; calling a target expansion interface based on the target plug-in to analyze the project configuration file to be processed to obtain an analyzed project file; and processing the analyzed project files to obtain target project configuration files corresponding to all the project files.
On the basis of the above technical solutions, the project configuration file generation module is further configured to: extracting all project information contained in the analysis project file, adding platform configuration files corresponding to all platforms based on the project information, and storing the platform configuration files in the project file to be analyzed; and taking the analysis project file added with the platform configuration file as a target project configuration file.
On the basis of the technical schemes, the target tool is a VS tool.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary server 40 suitable for use in implementing embodiments of the present invention. The server 40 shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in fig. 4, the server 40 is in the form of a general purpose computing device. The components of server 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The server 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by server 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The server 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The server 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the server 40, and/or with any devices (e.g., network card, modem, etc.) that enable the server 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, server 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 412. As shown, the network adapter 412 communicates with the other modules of the server 40 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with the server 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by executing programs stored in the system memory 402, for example, to implement the multi-platform-based compilation detection method provided by the embodiment of the present invention.
EXAMPLE five
The fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing a multi-platform-based compilation detection method.
The method comprises the following steps:
when detecting that compiling detection operation is triggered, acquiring a target compiling platform corresponding to the compiling detection operation;
acquiring a target project file corresponding to the target compiling platform from all pre-established project files, and compiling based on the content in the target project file; wherein the project file comprises compiling configuration corresponding to each platform;
and when the compiling result meets a preset condition, normally compiling the code corresponding to the target compiling platform.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A multi-platform based compilation detection method is characterized by comprising the following steps:
when detecting that compiling detection operation is triggered, acquiring a target compiling platform corresponding to the compiling detection operation;
acquiring a target project file corresponding to the target compiling platform from all pre-established project files, and compiling based on the content in the target project file; wherein the project file comprises compiling configuration corresponding to each platform;
and when the compiling result meets a preset condition, normally compiling the code corresponding to the target compiling platform.
2. The method according to claim 1, wherein the obtaining of the target project file corresponding to the target compiling platform from all the project files established in advance, and compiling based on the content in the target project file comprises:
acquiring target project files corresponding to the target compiling platform from all project files based on the project configuration files corresponding to all the project files;
compiling the content in the target project file based on a target tool.
3. The method of claim 1, wherein before said obtaining a target compilation platform corresponding to a compilation detection operation when a trigger compilation detection operation is detected, further comprising:
project files corresponding to the respective platforms are generated based on a target tool, and project profiles corresponding to all of the project files are generated based on the target tool.
4. The method of claim 3, wherein the generating project files corresponding to respective platforms based on the target tool comprises:
generating to-be-processed project files corresponding to the platforms based on the target tool, and calling an expansion interface to analyze the to-be-processed project files to obtain analysis project files corresponding to the platforms;
adding compiling configuration corresponding to each platform based on the platform identification information in the analysis project file;
calling a reference information acquisition module to acquire all reference information in the analysis project file;
and processing the reference information based on the compiling configuration corresponding to each platform, and taking the processed analysis project file as a used project file.
5. The method of claim 3, wherein generating a project profile corresponding to all project files based on the target tool comprises:
generating a project configuration file to be processed corresponding to the project file based on a target plug-in a target tool;
calling a target expansion interface based on the target plug-in to analyze the project configuration file to be processed to obtain an analyzed project configuration file;
and processing the analyzed project configuration file to obtain a target project configuration file corresponding to all the project files.
6. The method of claim 5, wherein the processing the parsed project profile to obtain a target project profile corresponding to all project profiles comprises:
extracting all project information contained in the analysis project file, adding platform configuration files corresponding to all platforms based on the project information, and storing the platform configuration files in the analysis project file;
and taking the analysis project file added with the platform configuration file as a target project configuration file.
7. The method of any of claims 1-6, wherein the target tool is a VS tool.
8. A multi-platform based compilation detection apparatus, comprising:
the target compiling platform determining module is used for acquiring a target compiling platform corresponding to compiling detection operation when triggering the compiling detection operation is detected;
the target project file determining module is used for acquiring a target project file corresponding to the target compiling platform from all pre-established project files and compiling based on the content in the target project file; wherein the project file comprises compiling configuration corresponding to each platform;
and the compiling detection result determining module is used for normally compiling the codes corresponding to the target compiling platform when the compiling result meets the preset condition.
9. A server, characterized in that the server comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the multi-platform based compilation detection method of any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the multi-platform based compilation detection method of any of claims 1-7 when executed by a computer processor.
CN201911357525.XA 2019-12-25 2019-12-25 Compiling detection method, device, server and medium based on multiple platforms Active CN111124423B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911357525.XA CN111124423B (en) 2019-12-25 2019-12-25 Compiling detection method, device, server and medium based on multiple platforms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911357525.XA CN111124423B (en) 2019-12-25 2019-12-25 Compiling detection method, device, server and medium based on multiple platforms

Publications (2)

Publication Number Publication Date
CN111124423A true CN111124423A (en) 2020-05-08
CN111124423B CN111124423B (en) 2023-06-13

Family

ID=70502240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911357525.XA Active CN111124423B (en) 2019-12-25 2019-12-25 Compiling detection method, device, server and medium based on multiple platforms

Country Status (1)

Country Link
CN (1) CN111124423B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111610999A (en) * 2020-05-26 2020-09-01 北京字节跳动网络技术有限公司 Checking method, checking device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1271891A (en) * 1999-04-23 2000-11-01 太阳微系统有限公司 Device and method used in instruction selection of multiplatform environment
CN106452879A (en) * 2016-10-20 2017-02-22 国网青海省电力公司电力科学研究院 PB-based SCD cross-platform analysis method
US20170286074A1 (en) * 2016-03-29 2017-10-05 Le Holdings (Beijing) Co., Ltd. Electronic Device and Method for Multiple Compiling Platforms
WO2017166529A1 (en) * 2016-03-29 2017-10-05 乐视控股(北京)有限公司 Compiling system and method for multiple compiling platforms
CN109324544A (en) * 2018-09-14 2019-02-12 国机智骏科技有限公司 The configuration of entire car controller hardware and software platform and integrated Compilation Method and system
CN109582316A (en) * 2018-11-15 2019-04-05 北京深思数盾科技股份有限公司 A kind of cross-platform Compilation Method, device, system, server and storage medium
CN109814853A (en) * 2019-01-18 2019-05-28 宜创(北京)科技有限公司 Based on visual multi-platform data creation method, device, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1271891A (en) * 1999-04-23 2000-11-01 太阳微系统有限公司 Device and method used in instruction selection of multiplatform environment
US20170286074A1 (en) * 2016-03-29 2017-10-05 Le Holdings (Beijing) Co., Ltd. Electronic Device and Method for Multiple Compiling Platforms
WO2017166529A1 (en) * 2016-03-29 2017-10-05 乐视控股(北京)有限公司 Compiling system and method for multiple compiling platforms
CN106452879A (en) * 2016-10-20 2017-02-22 国网青海省电力公司电力科学研究院 PB-based SCD cross-platform analysis method
CN109324544A (en) * 2018-09-14 2019-02-12 国机智骏科技有限公司 The configuration of entire car controller hardware and software platform and integrated Compilation Method and system
CN109582316A (en) * 2018-11-15 2019-04-05 北京深思数盾科技股份有限公司 A kind of cross-platform Compilation Method, device, system, server and storage medium
CN109814853A (en) * 2019-01-18 2019-05-28 宜创(北京)科技有限公司 Based on visual multi-platform data creation method, device, equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴湛;王玲;吴宇;: "针对FPGA的IDL-Verilog编译器的设计与实现", 现代电子技术, no. 14, pages 26 - 30 *
邓磊;吴健;张涛;张森;: "一种多目标平台分布式对象模型编译器设计方法", no. 06, pages 159 - 162 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111610999A (en) * 2020-05-26 2020-09-01 北京字节跳动网络技术有限公司 Checking method, checking device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111124423B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
CN110457277B (en) Service processing performance analysis method, device, equipment and storage medium
CN112100072B (en) Static detection method, device, equipment and medium for application program code
CN110990411B (en) Data structure generation method and device, and calling method and device
CN111061489B (en) Multi-platform compiling detection method, device, equipment and medium
CN111124371A (en) Game-based data processing method, device, equipment and storage medium
CN110990842A (en) Recurrence method and device of small probability event, storage medium and electronic equipment
CN110597704B (en) Pressure test method, device, server and medium for application program
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN113051514A (en) Element positioning method and device, electronic equipment and storage medium
CN111274130A (en) Automatic testing method, device, equipment and storage medium
CN114003269A (en) Component processing method and device, electronic equipment and storage medium
CN111124423B (en) Compiling detection method, device, server and medium based on multiple platforms
CN110297639B (en) Method and apparatus for detecting code
CN112861138A (en) Software security analysis method and analysis device, electronic device, and storage medium
CN110716859A (en) Method for automatically pushing test cases for modified codes and related device
CN113342431B (en) Function call stack backtracking and program exception handling method, device, equipment and medium
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN113590225B (en) Mapping detection method and device, electronic equipment and storage medium
CN113687880B (en) Method, device, equipment and medium for calling component
CN113805861B (en) Code generation method based on machine learning, code editing system and storage medium
CN112748930B (en) Compilation detection method, device, equipment and storage medium
CN112506782B (en) Application program testing method, device, equipment and storage medium
CN113935042A (en) Cross-platform simulation IoT equipment security analysis system and method
CN111309583A (en) Interface overdraw detection method and device
CN113204531A (en) Data backfill method and device, electronic equipment and storage medium

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