CN108304189B - Multi-mirror image equipment software compiling method, device and equipment - Google Patents
Multi-mirror image equipment software compiling method, device and equipment Download PDFInfo
- Publication number
- CN108304189B CN108304189B CN201610751723.4A CN201610751723A CN108304189B CN 108304189 B CN108304189 B CN 108304189B CN 201610751723 A CN201610751723 A CN 201610751723A CN 108304189 B CN108304189 B CN 108304189B
- Authority
- CN
- China
- Prior art keywords
- compiling
- sub
- compilation
- configuration file
- source code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
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)
- Devices For Executing Special Programs (AREA)
Abstract
The embodiment of the invention provides a software compiling method, device and equipment for multi-mirror image equipment. The compiling method and the compiling device define a management directory for multi-mirror compiling as a global working area and a management directory for single-mirror compiling under the global working area as a sub-working area based on a software architecture of multi-mirror device software to be compiled; creating an engineering management configuration file, a compiling operation configuration file and a compiling dependency relationship configuration file; controlling the compiling of the sub-working areas based on a source code sharing structure between the working areas obtained by analyzing the configuration file, a compiling priority list of the sub-working areas, and pre-compiling operation, in-compiling operation and post-compiling operation corresponding to the global compiling and the sub-working area compiling to obtain a single mirror image file; and executing pre-compiling operation, in-compiling operation and post-compiling operation of global compiling, and combining the single mirror image files into the multi-mirror image files. The software compiling operation is automatically executed during compiling, and the compiling efficiency is good.
Description
Technical Field
The invention relates to the technical field of program control, in particular to a multi-mirror device software compiling method, device and equipment.
Background
The existing multi-mirror image equipment software compiling method divides a compiling main project of multi-mirror image equipment software into a plurality of compiling sub projects corresponding to function modules based on a function module framework of a multi-mirror image equipment software product, carries out compiling on each compiling sub project to obtain a plurality of single mirror image files, and then combines the plurality of single mirror image files into a large mirror image file containing a plurality of single mirror images to complete multi-mirror image equipment software compiling.
The existing software compiling method for multi-mirror image equipment has the technical problems of low use efficiency of a compiling machine and long software compiling time, and the software development efficiency is seriously restricted.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a device for compiling software of a multi-mirror device with good compiling efficiency, so as to improve the efficiency of software product development.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for compiling software of a multi-mirror device, where the method includes:
based on a software architecture of multi-mirror image equipment software to be compiled, a management directory for multi-mirror image compilation is defined as a global working area, and a management directory for single-mirror image compilation under the global working area is defined as a sub-working area; compiling the multiple images into global compilation, and compiling the single image into a sub-working area compilation;
creating a project management configuration file of which the configuration item comprises a sub-working area name, a source code active sharing, a sharing authorization sub-working area name and a source code appointed path;
defining pre-compiling operation, in-compiling operation and post-compiling operation of global compiling and sub-work area compiling; creating a compiling operation configuration file of a configuration item, wherein the compiling operation configuration file comprises pre-compiling operation, in-compiling operation and post-compiling operation;
creating a compiling dependency relationship configuration file of which the configuration items comprise names of the sub-working areas and names of other depended sub-working areas;
creating a source code sharing structure between the sub-workspaces based on the analytical engineering management configuration file; generating a compiling priority list of the sub-working areas based on the analysis compiling dependency configuration file; obtaining pre-compilation operation, in-compilation operation and post-compilation operation corresponding to global compilation and sub-workspace compilation based on analyzing the compilation operation configuration file;
the method comprises the steps that sub-working areas outside a sharing authorization sub-working area download source codes through a source code designated path, and the sharing authorization sub-working area obtains the source codes from the sub-working areas actively shared by the source codes based on a source code sharing structure between the sub-working areas;
compiling the sub-working area based on the compiling priority list of the sub-working area and the pre-compiling operation, the in-compiling operation and the post-compiling operation corresponding to the compiling of the sub-working area to obtain a single mirror image file;
and executing pre-compiling operation, in-compiling operation and post-compiling operation of global compiling, and combining the single mirror image files into the multi-mirror image files.
In a second aspect, an embodiment of the present invention further provides a multi-mirror device software compiling apparatus, where the compiling apparatus includes:
the compiling work area setting unit is used for defining a management directory for multi-mirror compiling as a global work area and defining a management directory for single-mirror compiling under the global work area as a sub-work area based on a software architecture of multi-mirror equipment software to be compiled; compiling the multiple images into global compilation, and compiling the single image into a sub-working area compilation;
the engineering management configuration file creating unit is used for creating an engineering management configuration file with configuration items including the names of the sub-working areas, the names of the source codes actively shared and sharing authorized sub-working areas and the designated paths of the source codes;
the compiling operation configuration file creating unit is used for defining the pre-compiling operation, the in-compiling operation and the post-compiling operation of the global compiling and the sub-working area compiling; creating a compiling operation configuration file of a configuration item, wherein the compiling operation configuration file comprises pre-compiling operation, in-compiling operation and post-compiling operation;
the compiling dependency configuration file creating unit is used for creating a compiling dependency configuration file with configuration items including names of the sub-working areas and names of other depended sub-working areas;
the configuration file analysis unit comprises a source code sharing structure establishing unit, a source code sharing structure establishing unit and a compiling operation acquisition unit; wherein,
the source code sharing structure creating unit is used for creating a source code sharing structure between the sub-working areas based on the analysis engineering management configuration file;
the compiling priority list generating unit is used for generating a compiling priority list of the sub-working area based on the analysis compiling dependency configuration file;
the compiling operation obtaining unit is used for obtaining a pre-compiling operation, an in-compiling operation and a post-compiling operation which correspond to the global compiling and the sub-working area compiling based on analyzing the compiling operation configuration file;
the source code downloading and sharing execution unit is used for downloading the source code by the sub-working areas except the sharing authorization sub-working area through the designated path of the source code, and the sharing authorization sub-working area acquires the source code from the sub-working area actively shared by the source code based on the source code sharing structure between the sub-working areas;
the single mirror image compiling and executing unit is used for compiling the sub-working areas based on the compiling priority list of the sub-working areas and the pre-compiling operation, the in-compiling operation and the post-compiling operation corresponding to the compiling of the sub-working areas to obtain a single mirror image file;
and the multi-mirror image compiling and executing unit is used for executing pre-compiling operation, in-compiling operation and post-compiling operation of global compiling and combining the single mirror image files into the multi-mirror image files.
In a third aspect, an embodiment of the present invention further provides a compiling apparatus, which includes the multi-mirror image apparatus software compiling device.
The method, the device and the equipment for compiling the multi-mirror image equipment software manage the global compilation of the multi-mirror image equipment software on the basis of a global working area, manage the single-mirror image compilation of the multi-mirror image equipment software on the basis of a sub-working area, realize the automation of source code management and the high efficiency of source code downloading by using a source code sharing structure between the sub-working areas on the basis, perform the automatic overall scheduling of the compilation of each sub-working area on the basis of a compilation priority list of the sub-working area, and automatically control the process of the compilation of the sub-working area on the basis of the pre-compilation operation, the in-compilation operation and the post-compilation operation corresponding to the compilation of the sub-working area, thereby realizing the automatic overall execution of the compilation of the sub-working area.
Compared with the existing multi-mirror image equipment software compiling method adopting a large amount of manual intervention, the multi-mirror image equipment software compiling method provided by the first embodiment of the invention realizes source code management automation, automatic control of the compiling process and automatic overall scheduling of compiling of each sub-working area. The more sub-working areas are compiled, the more sub-working areas can be shared by the source codes, the higher the downloading efficiency of the source codes is, and the higher the compiling efficiency of the sub-working areas is.
Thus, the multi-mirror device software compiling method provided by the first embodiment of the invention has higher compiling machine utilization rate and good compiling efficiency, and the overall compiling time of the multi-mirror software is greatly shortened. Meanwhile, the compiling process management based on the configuration file is more intuitive in operation and easy to learn and master.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
Fig. 1 is a flowchart of a software compiling method for a multi-mirror device according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating the relationship between a global workspace and a sub-workspace.
Fig. 3 is a schematic structural diagram of a software compiling apparatus of a multi-mirroring device according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a compiling operation configuration file creating unit of a software compiling apparatus for a multi-mirroring device according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a configuration file parsing unit of a software compiling device for a multi-mirroring device according to an embodiment of the present invention.
Detailed Description
The existing multi-mirror image equipment software compiling method divides a compiling main project of multi-mirror image equipment software into a plurality of compiling sub projects corresponding to function modules based on a function module framework of a multi-mirror image equipment software product, carries out compiling on each compiling sub project to obtain a plurality of single mirror image files, and then combines the plurality of single mirror image files into a large mirror image file containing a plurality of single mirror images. The method has the technical problems of low use efficiency of a compiling machine and long software compiling time.
The term "mirror image" refers to an archive package file obtained by downloading a source code, compiling the source code, and packaging and archiving a compilation result of a software source code. In the software compiling process, a filing package file obtained by compiling the compiling sub-project is a single mirror image file, and a filing package file which corresponds to the compiling main project and comprises a plurality of single mirror image files is a multi-mirror image file.
The term "multi-mirror device" refers to a device that requires multiple single mirror files to achieve full startup operation of the drive hardware. Correspondingly, a single-mirror device refers to a device that can realize the complete start and operation of the drive hardware only by a single mirror file
The inventor finds that, in the research, the existing multi-mirror image device software compiling method has the technical problems of low use efficiency of a compiling machine and long software compiling time when the multi-mirror image device software is compiled, and the existing multi-mirror image device software compiling method is not only due to the fact that the structure of the multi-mirror image device software compiling project is complex and the compiling project amount is large, but also has the real reason that the manual intervention degree is too high in the multi-mirror image device software compiling process, and the software compiling efficiency is seriously influenced. Specifically, in compiling source code management, a source code set of a software product needs to be manually divided into a plurality of source code subsets corresponding to compiling sub-projects, the plurality of source code subsets are independent of each other, and if a source code of one source code subset is modified, the source codes of the plurality of source code subsets need to be synchronized in a manual synchronization mode; in the management of the compiling process, the compiling of each compiling sub-project needs to be started in a manual mode, and the compiling ending state is manually checked; in the aspect of creating a multi-mirror image file, a plurality of single mirror image files need to be manually merged into a large mirror image file containing a plurality of single mirror images.
The inventor finds that in the process of software compiling, the existing multi-mirror image equipment software compiling method needs a large amount of manual intervention, and the compiling quality can not be guaranteed only by adopting a large amount of manual intervention, and the real reason is that the source code management of each compiling sub-project is independent from each other and can not share the source code, the compiling operation of each compiling sub-project is independent from each other and has no relevance, and only the compiling task can be arranged manually.
Theoretically, software source codes can be automatically managed as long as source code subsets corresponding to compiling sub-projects are shared, compiling operation definitions are carried out on the compiling parent projects and the compiling sub-projects, associations are generated between the compiling parent projects and the compiling sub-projects and between the compiling sub-projects, automatic priority sequencing on time sequence can be carried out on the compiling sub-projects, and execution of the compiling sub-projects and execution of the compiling parent projects can be automatically arranged as long as dependency definitions are carried out on the compiling operations.
Based on the above knowledge, the inventor provides a software compiling method, device and equipment for multi-mirror image equipment. The compiling method and the compiling device define a management directory for multi-mirror compiling as a global working area and a management directory for single-mirror compiling under the global working area as a sub-working area based on a software architecture of multi-mirror device software to be compiled; compiling the multiple images into global compilation, and compiling the single image into a sub-working area compilation; creating an engineering management configuration file, a compiling operation configuration file and a compiling dependency relationship configuration file; and automatically controlling the compiling of the sub-working areas based on the source code sharing structure between the working areas, the compiling priority list of the sub-working areas, the pre-compiling operation, the in-compiling operation and the post-compiling operation corresponding to the global compiling and the compiling of the sub-working areas, so as to obtain a single-image file, and automatically executing the pre-compiling operation, the in-compiling operation and the post-compiling operation of the global compiling, so as to combine the single-image file into a multi-image file.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings of the embodiments of the present invention in conjunction with practical applications, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all of them.
First embodiment
The first embodiment explains the compiling method of the software of the multi-mirror device of the present invention, taking the compiling of the software of the multi-mirror device as an example.
Fig. 1 is a flowchart of a method for compiling software of a multi-mirror device according to an embodiment of the present invention. According to the compiling method, according to the functional architecture of multi-mirror image equipment software and the requirement of software compiling, a management directory for multi-mirror image compiling is defined as a global working area, and a management directory for single-mirror image compiling under the global working area is defined as a sub-working area; and corresponding configuration files are created and are respectively used for automatic management of software source codes and scheduling of compiling priorities of all the sub-working areas, and the automatic control of the global compiling and the sub-working area compiling processes is realized.
It should be noted that the multi-mirroring device software compiling method provided in the first embodiment of the present invention is not limited to compiling multi-mirroring device software, but is also applicable to compiling single-mirroring device software.
Referring now to fig. 1, the method comprises:
s110, based on a software architecture of multi-mirror image equipment software to be compiled, defining a management directory for multi-mirror image compilation as a global working area, and defining a management directory for single-mirror image compilation under the global working area as a sub-working area; compiling the multiple images into global compilation, and compiling the single image into a sub-working area compilation;
in the first embodiment of the present invention, the global working area is a management directory for multi-mirror compilation, and accordingly, the multi-mirror compilation is a compilation of the global working area, which is referred to as global compilation for short, to obtain a multi-mirror file; the sub-working area under the global working area is a management directory for single-image compilation, and correspondingly, the single-image compilation is the compilation of the sub-working area, which is called sub-working area compilation for short, so that a single-image file is obtained; when the source code is compiled, each sub-working area is compiled to have a corresponding preset compiling instruction set, and due to the fact that the preset compiling instruction sets are different between the two sub-working areas, even if the source code is adopted, the obtained two single mirror image files are different.
FIG. 2 is a diagram illustrating the relationship between a global workspace and a sub-workspace.
Referring to fig. 2, a management directory for multi-mirror compilation is used as a global working area 900, the management directory enters the global working area 900, sub-working areas 910 are determined according to the number of single-mirror files required by multi-mirror device software to be compiled, and each sub-working area 910 corresponds to one single-mirror compilation.
Continuing to refer to S120 shown in fig. 1, the creation configuration item includes a sub-work area name, a source code active sharing, a sharing authorization sub-work area name, and an engineering management configuration file of a source code designated path;
in the first embodiment of the invention, the name of the sub-workspace in the project management configuration file is the name assigned to the sub-workspace; the source code active sharing is used for indicating whether the sub-working area provides source code sharing service for other sub-working areas, and if the sharing authorization sub-working area name under the item name of a certain sub-working area is null, the sub-working area does not provide source code sharing for other sub-working areas; the shared authorized sub-working area name refers to a sub-working area name of a source code shared by the sub-working area actively shared with the source code; the source code designated path refers to a path for obtaining the source code by a sub-working area except the sharing authorization sub-working area.
In a first embodiment of the present invention, the file name of the engineering management profile may be taken as hierarchy.
And configuring the source code relationship of each sub-working area by adopting the engineering management configuration file, so that the sub-working areas actively shared by the source codes can download the source codes through the designated path of the source codes, and provide the source codes for compiling for the sharing authorized sub-working areas. On one hand, the downloading efficiency of the source code in the compiling process can be improved; on the other hand, if the source code is modified, the modified source code is downloaded to the corresponding sub-work area from the source code designated path corresponding to the modified source code, so that the source code can be effectively updated.
Step S110 and step S120 are combined, so that the global compilation of the multi-mirror image device software can be managed on the basis of the global working area, and the sub-working area compilation of the multi-mirror image device software can be managed on the basis of the sub-working area; meanwhile, automatic updating of the source code can be realized.
S130, defining pre-compiling operation, in-compiling operation and post-compiling operation of global compiling and sub-work area compiling; creating a compiling operation configuration file of a configuration item, wherein the compiling operation configuration file comprises pre-compiling operation, in-compiling operation and post-compiling operation;
in the first embodiment of the present invention, the pre-compilation operation is used to specify an operation to be executed before compilation; the operation in compiling is used for appointing the operation needing to be executed in the compiling process; and the post-compiling operation is used for specifying the operation needing to be executed after compiling. The pre-compiling operation, the in-compiling operation and the post-compiling operation configuration items in the compiling operation configuration file are added under the global compiling item and/or the sub-workspace compiling item.
In the first embodiment of the present invention, the file name of the compilation operation profile may be taken as action.
And configuring the compiling execution process of the global compiling and the sub-workspace compiling by using the compiling operation configuration file so as to perform process management on the compiling execution process.
S140, creating a compiling dependency relationship configuration file of which the configuration items comprise names of the sub-working areas and names of other depended sub-working areas;
in the first embodiment of the invention, the name of the sub-working area in the dependency configuration file is compiled and is a name assigned to the sub-working area; and the names of the other dependent sub-working areas are used for indicating whether the compiling of the sub-working areas depends on the compiling of the other sub-working areas, and if not, the names of the other dependent sub-working areas under the name of the sub-working area are null.
In the first embodiment of the present invention, the file name of the compilation dependency configuration file may be taken as build.
And configuring the compiling priority of compiling the sub-working areas by adopting the compiling dependency relationship configuration file so as to control the compiling cooperativity of each sub-working area.
S150, establishing a source code sharing structure between the sub-working areas based on the analysis project management configuration file; generating a compiling priority list of the sub-working areas based on the analysis compiling dependency configuration file; obtaining pre-compilation operation, in-compilation operation and post-compilation operation corresponding to global compilation and sub-workspace compilation based on analyzing the compilation operation configuration file;
in a first embodiment of the present invention, the step of creating a source code sharing structure between sub-workspaces based on parsing the project management configuration file comprises:
analyzing the project management configuration file, obtaining the sub-working areas actively shared by the source codes, and establishing a source code sharing structure between the sub-working areas based on the sharing relation between the sub-working areas actively shared by the source codes and the sharing authorization sub-working areas and the source code designated path; the sub-work area actively shared by the source code is the sub-work area needing to download the source code.
The step of generating a compilation priority list of the sub-workspace based on parsing the compilation dependency configuration file comprises:
analyzing a compiling dependency relationship configuration file, compiling in advance according to the dependent sub-working areas, compiling in the later dependent sub-working areas, determining the compiling priority of each sub-working area, and generating a compiling priority list of the sub-working areas based on the compiling priority of each sub-working area; and each sub-working area in the same compiling priority in the compiling priority list of the sub-working areas is arranged to be compiled in parallel.
The steps of obtaining pre-compilation operation, in-compilation operation and post-compilation operation corresponding to global compilation and sub-workspace compilation based on analyzing the compilation operation configuration file include:
analyzing the compiling operation configuration file, and obtaining pre-compiling operation, in-compiling operation and post-compiling operation of global compiling from the global compiling item of the compiling operation configuration file; and obtaining pre-compilation operation, in-compilation operation and post-compilation operation of the compiling of the sub-working area from the sub-working area compiling item of the compiling operation configuration file.
In the first embodiment of the present invention, a source code sharing structure between the sub-work areas is created, so that it is possible to implement source code sharing between the sub-work areas before compiling and executing; generating a compiling priority list of the sub-working areas, so that the automatic overall scheduling of compiling of each sub-working area in the compiling process of the sub-working areas becomes possible; and obtaining pre-compilation operation, in-compilation operation and post-compilation operation of the sub-work area compilation, so that process control on each compilation stage in the whole compilation process becomes possible.
S160, the sub-working areas except the sharing authorization sub-working area download the source codes through the source code designated path, and the sharing authorization sub-working area obtains the source codes from the sub-working areas actively shared by the source codes based on the source code sharing structure between the sub-working areas;
in the first embodiment of the invention, the sub-working areas except the sharing authorization sub-working area download the source code into the concurrent download source code through the source code designated path, and the method can improve the download efficiency of the source code. The sharing authorization sub-working area obtains the source code from the sub-working area actively shared by the source code, so that the downloading efficiency of the source code can be improved on one hand, and the automatic management of the source code can be improved on the other hand.
In the software compiling method for multi-mirroring devices provided by the first embodiment of the present invention, the more sub-work areas are compiled, the more sub-work areas that can be shared by the source code are compiled, and the higher the downloading efficiency of the source code is.
S170, compiling the sub-working area based on the compiling priority list of the sub-working area and the pre-compiling operation, the in-compiling operation and the post-compiling operation corresponding to the compiling of the sub-working area to obtain a single mirror image file;
in the first embodiment of the present invention, the step of performing the compiling of the sub-workspace based on the compiling priority list of the sub-workspace and the pre-compiling operation, the in-compiling operation, and the post-compiling operation corresponding to the compiling of the sub-workspace includes:
compiling the sub-working areas according to the priority order of the compiling priority list of the sub-working areas, and compiling all the sub-working areas with the same priority in parallel; when each sub-working area is compiled, the operations before compiling, the operations during compiling and the operations after compiling are executed in sequence.
In the software compiling method for the multi-mirroring device according to the first embodiment of the present invention, the compiling priority list of the sub-work areas is used to perform the automatic overall scheduling of the compiling of each sub-work area, and the process of the compiling of the sub-work areas is automatically controlled based on the pre-compiling operation, the in-compiling operation, and the post-compiling operation corresponding to the compiling of the sub-work areas, so as to implement the automatic overall execution of the compiling of the sub-work areas. When software is compiled, the more sub-work areas are compiled, and the higher the compiling efficiency of the sub-work areas is.
And S180, executing the pre-compiling operation, the in-compiling operation and the post-compiling operation of the global compiling, and combining the single image files into the multi-image files.
In the first embodiment of the present invention, after all the sub-workspaces are compiled, the pre-compilation operation, the in-compilation operation, and the post-compilation operation of the global compilation are executed, and a plurality of single-mirror files compiled from the sub-workspaces are merged into one large-mirror file including a plurality of single mirrors.
It should be noted that, when one sub-work area is provided, the multi-mirroring device software compiling method provided in the first embodiment of the present invention is used for compiling single-mirroring device software; when the number of the sub-working areas is at least two, the software compiling is used for the multi-mirror device.
Second embodiment
The second embodiment provides a software compiling device for a multi-mirror device and a compiling device applied to the software compiling device. The compiling device may be the application environment of the foregoing method embodiment, or may be only a part of the application environment of the foregoing method embodiment.
The technical concept, implementation principle, technical effect, and technical problem that can be solved of the multi-mirror device software compiling apparatus provided by the second embodiment of the present invention are the same as those of the foregoing method embodiments, and those skilled in the art can understand the multi-mirror device software compiling apparatus provided by the second embodiment of the present invention with reference to the detailed description of the corresponding method steps in the foregoing method embodiments of the present invention.
The compiling device comprises any implementation method of the software compiling device of the multi-mirror device provided by the second embodiment of the invention. The compiling device can be a compiling computer, such as a compiling server, a compiling computer system, such as a distributed compiling computer system comprising a master compiling computer and a slave compiling computer, and a compiling cloud computing platform.
Fig. 3 is a schematic structural diagram of a software compiling apparatus of a multi-mirroring device according to an embodiment of the present invention. The device controls and manages the compiling process of the software of the multi-mirror image equipment or the software of the single mirror image equipment.
Referring now to fig. 3, the apparatus includes a compilation workspace setting unit 810, an engineering management profile creating unit 820, a compilation operation profile creating unit 830, a compilation dependency profile creating unit 840, a profile parsing unit 850, a source code download sharing execution unit 860, a single mirroring compilation execution unit 870, and a multi-mirroring compilation execution unit 880; wherein,
a compiling work area setting unit 810, configured to define a management directory for multi-image compiling as a global work area and a management directory for single-image compiling in the global work area as a sub-work area based on a software architecture of multi-image device software to be compiled; compiling the multiple images into global compilation, and compiling the single image into a sub-working area compilation;
an engineering management configuration file creating unit 820, configured to create an engineering management configuration file with configuration items including names of sub-work areas, names of source codes actively shared and sharing authorized sub-work areas, and source codes specifying paths;
a compiling operation configuration file creating unit 830, configured to define pre-compiling operation, in-compiling operation, and post-compiling operation of global compiling and sub-workspace compiling; creating a compiling operation configuration file of a configuration item, wherein the compiling operation configuration file comprises pre-compiling operation, in-compiling operation and post-compiling operation;
a compiling dependency configuration file creating unit 840, configured to create a compiling dependency configuration file whose configuration items include names of the sub-work areas and names of other dependent sub-work areas;
a configuration file analyzing unit 850 for analyzing the project management configuration file, the compiling dependency relationship configuration file, and the compiling operation configuration file;
a source code downloading and sharing execution unit 860, configured to download the source code through a source code designated path in a sub-work area other than the sharing authorized sub-work area, and based on a source code sharing structure between the sub-work areas, the sharing authorized sub-work area obtains the source code from the sub-work area actively shared by the source code;
the single-mirror image compiling and executing unit 870 is used for compiling the sub-working areas based on the compiling priority list of the sub-working areas and the pre-compiling operation, the in-compiling operation and the post-compiling operation corresponding to the compiling of the sub-working areas to obtain a single-mirror image file;
and a multi-mirror compilation execution unit 880 for performing pre-compilation, mid-compilation, and post-compilation operations of the global compilation, and merging the single mirror files into a multi-mirror file.
In the second embodiment of the present invention, the single-mirror compilation executing unit 870 is specifically configured to perform sub-work area compilation according to a priority order of a compilation priority list of sub-work areas, and perform parallel compilation on sub-work areas with the same priority; when each sub-working area is compiled, the operations before compiling, the operations during compiling and the operations after compiling are executed in sequence.
Fig. 4 is a schematic structural diagram of a compiling operation configuration file creating unit of a software compiling apparatus for a multi-mirroring device according to an embodiment of the present invention. Referring now to fig. 4, compiling operation profile creating unit 830 includes pre-compiling operation specifying unit 831, in-compiling operation specifying unit 832, post-compiling operation specifying unit 833;
wherein,
a pre-compilation operation specifying unit 831 for specifying operations to be executed before compilation;
an operation-in-compilation specifying unit 832 for specifying operations to be executed in the compilation process;
a post-compilation operation specifying unit 833 for specifying operations to be executed after compilation.
Fig. 5 is a schematic structural diagram of a configuration file parsing unit of a software compiling device for a multi-mirroring device according to an embodiment of the present invention. Referring now to fig. 5, the configuration file parsing unit 850 includes a source code shared structure creating unit 851, a source code shared structure creating unit 852, and a compiling operation obtaining unit 853; wherein,
a source code sharing structure creating unit 851 for creating a source code sharing structure between the sub-workspaces based on the parsing project management configuration file;
a compiling priority list generating unit 852, configured to generate a compiling priority list of the sub-work area based on the analysis compiling dependency configuration file;
a compiling operation obtaining unit 853, configured to obtain pre-compiling operation, in-compiling operation, and post-compiling operation corresponding to the global compiling and the sub-work area compiling based on analyzing the compiling operation configuration file;
in the second embodiment of the present invention, the source code sharing structure creating unit 851 is specifically configured to parse the engineering management configuration file, obtain the sub-work areas actively shared by the source code, and create the source code sharing structure between the sub-work areas based on the sharing relationship between the sub-work areas actively shared by the source code and the sharing authorized sub-work areas and the source code designated path; the sub-work area actively shared by the source code is the sub-work area needing to download the source code.
In the second embodiment of the present invention, the compiling priority list generating unit 852 of the sub-work area is specifically configured to analyze the compiling dependency configuration file, determine the compiling priority of each sub-work area according to that the depended sub-work area is compiled first and the depended sub-work area is compiled later, and generate the compiling priority list of the sub-work area based on the compiling priority of each sub-work area; and each sub-working area in the same compiling priority in the compiling priority list of the sub-working areas is arranged to be compiled in parallel.
In the second embodiment of the present invention, the compiling operation obtaining unit 853 is specifically configured to parse the compiling operation configuration file, and obtain a pre-compiling operation, an in-compiling operation, and a post-compiling operation of global compiling from a global compiling item of the compiling operation configuration file; and obtaining pre-compilation operation, in-compilation operation and post-compilation operation of the compiling of the sub-working area from the sub-working area compiling item of the compiling operation configuration file.
In the second embodiment of the present invention, the multi-mirroring device software compiling apparatus 800 may be a virtual apparatus, and in this case, it is an apparatus defined by the process disclosed in any one of the foregoing embodiments of the present invention, each unit module involved in the multi-mirroring device software compiling apparatus 800 is implemented by a software code, the multi-mirroring device software compiling apparatus 800 is installed in a memory and includes one or more software function modules executed by a processor, the memory is used for storing a program, and the processor calls the program stored in the memory through a bus connected to the memory to execute the method executed by the process disclosed in any one of the embodiments of the present invention. The method performed by the multi-mirrored device software compilation apparatus 800 may be implemented in or by a processor.
In the second embodiment of the present invention, the multi-mirroring device software compiling apparatus 800 may be a hardware entity apparatus, and in this case, it is a logic integrated circuit. Which may be a separate electronic device or part of a processor circuit. In the implementation process, the steps of the software compiling method for the multi-mirror device disclosed in any embodiment of the invention can be implemented by hardware integrated logic circuits in a processor or instructions in the form of software.
The above-described embodiments of the compiling device and multi-mirroring device software compiling apparatus are merely illustrative, for example, the division of the units is only a logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
It should be noted that, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The software compiling method of the multi-mirror image device provided by the embodiment of the invention is realized in the form of a software functional unit and can be stored in a computer readable storage medium when being used or sold as an independent product. At this time, the computer program product of the multi-mirror device software compiling method provided in the embodiment of the present invention includes a computer readable storage medium storing a program code, and instructions included in the program code may be used to execute the method described in the foregoing method embodiment.
In summary, the method, the apparatus, and the device for compiling software of a multi-mirror device provided in the embodiments of the present invention may be used for compiling software of a single-mirror device, and may also be used for compiling software of a multi-mirror device. When the software of the single mirroring device is compiled, the software compiling automation is realized. When the multi-mirror image equipment software is compiled, the automation of source code management and the high efficiency of source code downloading are realized based on a source code sharing structure between the sub-working areas, and the compiling automation overall scheduling and the process automatic control of the sub-working areas are realized based on the compiling priority list of the sub-working areas and the compiling-before operation, the compiling-in operation and the compiling-after operation which correspond to the compiling of the sub-working areas.
Compared with the existing multi-mirror image equipment software compiling method adopting a large amount of manual intervention, the multi-mirror image equipment software compiling method, the device and the equipment provided by the embodiment of the invention have the advantages that the more sub-working areas are compiled during compiling, the more sub-working areas can be shared by source codes, the higher the source code downloading efficiency is, and the higher the sub-working area compiling efficiency is. And the compiling process management based on the configuration file is more intuitive to operate and easy to learn and master.
Claims (12)
1. The multi-mirror image device software compiling method is characterized by comprising the following steps:
based on a software architecture of multi-mirror image equipment software to be compiled, defining a management directory for multi-mirror image compilation as a global working area, and defining the management directory for single-mirror image compilation under the global working area as a sub-working area; the multi-mirror compilation is a global compilation, and the single-mirror compilation is a sub-workspace compilation;
creating a project management configuration file of which the configuration item comprises a sub-working area name, a source code active sharing, a sharing authorization sub-working area name and a source code appointed path;
defining pre-compiling operation, in-compiling operation and post-compiling operation of the global compiling and the sub-work area compiling; creating a compiling operation configuration file of which the configuration items comprise pre-compiling operation, in-compiling operation and post-compiling operation;
creating a compiling dependency relationship configuration file of which the configuration items comprise names of the sub-working areas and names of other depended sub-working areas;
creating a source code sharing structure between the sub-workspaces based on parsing the engineering management configuration file; generating a compiling priority list of the sub-working areas based on analyzing the compiling dependency configuration file; obtaining the pre-compilation operation, the in-compilation operation and the post-compilation operation corresponding to the global compilation and the sub-workspace compilation based on analyzing the compilation operation configuration file;
the sub-working areas except the sharing authorization sub-working area download the source codes through the source code designated path, and the sharing authorization sub-working area obtains the source codes from the sub-working areas actively shared by the source codes based on the source code sharing structure between the sub-working areas;
compiling the sub-working areas based on the compiling priority list of the sub-working areas and the pre-compiling operation, the in-compiling operation and the post-compiling operation corresponding to the compiling of the sub-working areas to obtain a single mirror image file;
and executing the pre-compiling operation, the in-compiling operation and the post-compiling operation of the global compiling, and combining the single mirroring file into a multi-mirroring file.
2. The multi-mirroring device software compiling method according to claim 1, wherein the step of compiling the sub-work areas based on the compiling priority list of the sub-work areas and the pre-compiling operation, the in-compiling operation, and the post-compiling operation corresponding to the compiling of the sub-work areas comprises:
compiling the sub-working areas according to the priority order of the compiling priority list of the sub-working areas, and compiling each sub-working area with the same priority in parallel; when each sub-working area is compiled, the pre-compiling operation, the in-compiling operation and the post-compiling operation are executed in sequence.
3. The multi-mirroring device software compiling method of claim 1 or 2, wherein the step of creating a source code sharing structure between sub-workspaces based on parsing the engineering management configuration file comprises:
analyzing the project management configuration file to obtain the sub-working areas actively shared by the source codes, and establishing a source code sharing structure between the sub-working areas based on the sharing relation between the sub-working areas actively shared by the source codes and the sharing authorization sub-working areas and the source code designated path; and the sub-working area actively shared by the source code is the sub-working area needing to download the source code.
4. The multi-mirroring device software compiling method of claim 1 or 2, wherein the step of generating a compiling priority list of sub-workspaces based on parsing the compiling dependency configuration file comprises:
analyzing the compiling dependency relationship configuration file, compiling in advance according to the depended sub-working areas, compiling in the later of the depended sub-working areas, determining the compiling priority of each sub-working area, and generating a compiling priority list of the sub-working areas based on the compiling priority of each sub-working area; and each sub-working area in the same compiling priority in the compiling priority list of the sub-working areas is arranged to be compiled in parallel.
5. The multi-mirroring device software compiling method according to claim 1 or 2, wherein the step of obtaining the pre-compiling operation, the in-compiling operation, and the post-compiling operation corresponding to the global compiling and the sub-workspace compiling based on parsing the compiling operation configuration file comprises:
analyzing the compiling operation configuration file, and obtaining the pre-compiling operation, the in-compiling operation and the post-compiling operation of the global compiling from the global compiling item of the compiling operation configuration file; and obtaining the pre-compilation operation, the in-compilation operation and the post-compilation operation compiled by the sub-work area from the sub-work area compiling item of the compiling operation configuration file.
6. A multi-mirror device software compiling apparatus, wherein the compiling apparatus comprises:
the compiling work area setting unit is used for defining a management directory for multi-mirror compiling as a global work area and defining the management directory for single-mirror compiling under the global work area as a sub-work area based on a software architecture of multi-mirror equipment software to be compiled; the multi-mirror compilation is a global compilation, and the single-mirror compilation is a sub-workspace compilation;
the engineering management configuration file creating unit is used for creating an engineering management configuration file with configuration items including the names of the sub-working areas, the names of the source codes actively shared and sharing authorized sub-working areas and the designated paths of the source codes;
a compiling operation configuration file creating unit for defining pre-compiling operation, in-compiling operation and post-compiling operation of the global compiling and the sub-work area compiling; creating a compiling operation configuration file of which the configuration items comprise pre-compiling operation, in-compiling operation and post-compiling operation;
the compiling dependency configuration file creating unit is used for creating a compiling dependency configuration file with configuration items including names of the sub-working areas and names of other depended sub-working areas;
the configuration file analysis unit comprises a source code sharing structure establishing unit, a source code sharing structure establishing unit and a compiling operation acquisition unit; wherein,
a source code sharing structure creating unit, configured to create a source code sharing structure between the sub-work areas based on analyzing the engineering management configuration file;
the compiling priority list generating unit is used for generating a compiling priority list of the sub-working area based on analyzing the compiling dependency configuration file;
a compiling operation obtaining unit, configured to obtain the pre-compiling operation, the in-compiling operation, and the post-compiling operation corresponding to the global compiling and the sub-work area compiling based on analyzing the compiling operation configuration file;
the source code downloading and sharing execution unit is used for downloading a source code by a sub-working area except the sharing authorization sub-working area through the source code designated path, and the sharing authorization sub-working area acquires the source code from the sub-working area actively shared by the source code based on a source code sharing structure between the sub-working areas;
the single image compilation execution unit is used for compiling the sub-working areas based on the compilation priority list of the sub-working areas and the pre-compilation operation, the in-compilation operation and the post-compilation operation corresponding to the compilation of the sub-working areas to obtain a single image file;
and the multi-mirror compiling execution unit is used for executing the pre-compiling operation, the in-compiling operation and the post-compiling operation of the global compiling and merging the single mirror files into the multi-mirror files.
7. The multi-mirroring device software compiling apparatus of claim 6,
the single-mirror compiling execution unit is specifically configured to compile the sub-work areas according to a priority order of the compiling priority list of the sub-work areas, and compile each sub-work area with the same priority in parallel; when each sub-working area is compiled, the pre-compiling operation, the in-compiling operation and the post-compiling operation are executed in sequence.
8. The multi-mirroring device software compiling apparatus of claim 6,
the compiling operation configuration file creating unit includes:
a pre-compilation operation specifying unit for specifying an operation to be executed before compilation;
the operation appointing unit in compiling is used for appointing the operation which needs to be executed in the compiling process;
and the post-compilation operation specifying unit is used for specifying the operation to be executed after compilation.
9. The multi-mirroring device software compiling apparatus of any one of claims 6 to 8,
the source code sharing structure creating unit is specifically configured to parse the engineering management configuration file, obtain sub-work areas actively shared by the source code, and create a source code sharing structure between the sub-work areas based on a sharing relationship between the sub-work areas actively shared by the source code and the sharing authorized sub-work areas and the source code designated path; and the sub-working area actively shared by the source code is the sub-working area needing to download the source code.
10. The multi-mirroring device software compiling apparatus of any one of claims 6 to 8,
the compiling priority list generating unit of the sub-working areas is specifically configured to parse the compiling dependency configuration file, compile before the dependent sub-working areas and compile after the dependent sub-working areas, determine the compiling priority of each sub-working area, and generate the compiling priority list of the sub-working areas based on the compiling priority of each sub-working area; and each sub-working area in the same compiling priority in the compiling priority list of the sub-working areas is arranged to be compiled in parallel.
11. The multi-mirroring device software compiling apparatus of any one of claims 6 to 8,
the compiling operation obtaining unit is specifically configured to parse the compiling operation configuration file, and obtain the pre-compiling operation, the in-compiling operation, and the post-compiling operation of the global compiling from a global compiling item of the compiling operation configuration file; and obtaining the pre-compilation operation, the in-compilation operation and the post-compilation operation compiled by the sub-work area from the sub-work area compiling item of the compiling operation configuration file.
12. Compiling device characterized in that it comprises a multi-mirroring device software compiling apparatus according to any one of claims 6 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610751723.4A CN108304189B (en) | 2016-08-29 | 2016-08-29 | Multi-mirror image equipment software compiling method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610751723.4A CN108304189B (en) | 2016-08-29 | 2016-08-29 | Multi-mirror image equipment software compiling method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108304189A CN108304189A (en) | 2018-07-20 |
CN108304189B true CN108304189B (en) | 2021-03-12 |
Family
ID=62871381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610751723.4A Active CN108304189B (en) | 2016-08-29 | 2016-08-29 | Multi-mirror image equipment software compiling method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108304189B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112394942B (en) * | 2020-11-24 | 2021-06-04 | 深圳君南信息系统有限公司 | Distributed software development compiling method and software development platform based on cloud computing |
CN113986236B (en) * | 2021-09-30 | 2025-03-28 | 展讯通信(上海)有限公司 | Engineering compilation method, device, electronic device, and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750364A (en) * | 2012-06-13 | 2012-10-24 | 华为技术有限公司 | Method, compiler and system for distributing memory address space for image files |
CN103279376A (en) * | 2011-10-17 | 2013-09-04 | 霍尼韦尔国际公司 | Methods and reconfigurable systems to incorporate customized executable code within a condition based health maintenance system |
CN103729184A (en) * | 2013-12-29 | 2014-04-16 | 国云科技股份有限公司 | Software component combining and constructing method |
CN104077140A (en) * | 2014-07-04 | 2014-10-01 | 用友软件股份有限公司 | Automatic compiling method and compiling device for continuous integration |
CN104137057A (en) * | 2012-02-13 | 2014-11-05 | 微软公司 | Generating and caching software code |
CN104423960A (en) * | 2013-09-10 | 2015-03-18 | 阿里巴巴集团控股有限公司 | Continuous project integration method and continuous project integration system |
CN104978194A (en) * | 2015-06-25 | 2015-10-14 | 北京京东尚科信息技术有限公司 | Web page front-end development method and apparatus |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8856724B2 (en) * | 2011-06-20 | 2014-10-07 | Ebay Inc. | Systems and methods for incremental software development |
US10204028B2 (en) * | 2013-09-20 | 2019-02-12 | Drexel University | Rule spaces and architecture root detection |
-
2016
- 2016-08-29 CN CN201610751723.4A patent/CN108304189B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103279376A (en) * | 2011-10-17 | 2013-09-04 | 霍尼韦尔国际公司 | Methods and reconfigurable systems to incorporate customized executable code within a condition based health maintenance system |
CN104137057A (en) * | 2012-02-13 | 2014-11-05 | 微软公司 | Generating and caching software code |
CN102750364A (en) * | 2012-06-13 | 2012-10-24 | 华为技术有限公司 | Method, compiler and system for distributing memory address space for image files |
CN104423960A (en) * | 2013-09-10 | 2015-03-18 | 阿里巴巴集团控股有限公司 | Continuous project integration method and continuous project integration system |
CN103729184A (en) * | 2013-12-29 | 2014-04-16 | 国云科技股份有限公司 | Software component combining and constructing method |
CN104077140A (en) * | 2014-07-04 | 2014-10-01 | 用友软件股份有限公司 | Automatic compiling method and compiling device for continuous integration |
CN104978194A (en) * | 2015-06-25 | 2015-10-14 | 北京京东尚科信息技术有限公司 | Web page front-end development method and apparatus |
Non-Patent Citations (3)
Title |
---|
"How to Share Resources Across Projects in Maven";Brian Fox;《https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/》;20080417;第1-9页 * |
"一种基于docker构件化集成交付的软件仓库模式设计与实现";叶翼安;《中国优秀硕士学位论文全文数据库 信息科技辑》;20151215(第12期);I138-295 * |
"分享Qt多工程多目录的编译案例,subdirs";libaineu2004;《https://blog.csdn.net/libaineu2004/article/details/23625441》;20140413;第1-9页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108304189A (en) | 2018-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Borgdorff et al. | Distributed multiscale computing with MUSCLE 2, the multiscale coupling library and environment | |
US12086575B2 (en) | System and method for a hybrid development platform | |
KR102283736B1 (en) | Method and apparatus for generating automatically setup code of application software baesed autosar | |
CN111190823A (en) | UI automation test method, electronic device and computer readable storage medium | |
CN107807815B (en) | Method and device for processing tasks in distributed mode | |
CN108733553B (en) | Docker-based test device configuration method, device and system | |
CN103997544A (en) | Resource downloading method and device | |
CN111124420B (en) | Compiling method, compiling device, electronic equipment and readable storage medium | |
CN113805882A (en) | Method and device for developing application program, electronic equipment and storage medium | |
CN107479984B (en) | Distributed spatial data processing system based on message | |
Garbervetsky et al. | Toward full elasticity in distributed static analysis: The case of callgraph analysis | |
CN114168255A (en) | Method and device for running heterogeneous instruction set container in container cloud platform | |
CN113467817B (en) | Application management method, system, medium and electronic terminal | |
US20110138353A1 (en) | Procedure And Development Environment For Generation Of An Executable Overall Control Program | |
US20170277170A1 (en) | Hmi system | |
EP2769302B1 (en) | Use of dynamic profiles for creating and using a distributed computing environment | |
CN112631600A (en) | Software construction method and system based on Flutter | |
Freire et al. | OPLA-Tool v2. 0: a tool for product line architecture design optimization | |
CN108304189B (en) | Multi-mirror image equipment software compiling method, device and equipment | |
Zhong et al. | Model-based parallelizer for embedded control systems on single-isa heterogeneous multicore processors | |
CN113986239A (en) | Distributed compiling method, device, equipment and readable storage medium | |
CN114764331B (en) | Code generation method, device, electronic equipment and computer readable storage medium | |
CN113495723B (en) | Method, device and storage medium for calling functional component | |
CN109508193B (en) | Application deployment and operation method, device, terminal equipment and medium | |
CN115016862B (en) | Software startup method, device, server and storage medium based on Kubernetes cluster |
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 |