WO2021098148A1 - Software compiling method and apparatus, and electronic device and storage medium - Google Patents

Software compiling method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2021098148A1
WO2021098148A1 PCT/CN2020/087162 CN2020087162W WO2021098148A1 WO 2021098148 A1 WO2021098148 A1 WO 2021098148A1 CN 2020087162 W CN2020087162 W CN 2020087162W WO 2021098148 A1 WO2021098148 A1 WO 2021098148A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
software package
compilation
source code
target
Prior art date
Application number
PCT/CN2020/087162
Other languages
French (fr)
Chinese (zh)
Inventor
张承乾
Original Assignee
苏州浪潮智能科技有限公司
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 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2021098148A1 publication Critical patent/WO2021098148A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • This application relates to the technical field of software compilation, and more specifically, to a software compilation method and device, an electronic device, and a computer-readable storage medium.
  • the purpose of this application is to provide a software compilation method and device, an electronic device, and a computer-readable storage medium, which can realize the standardization and automation of software compilation steps, reduce the cost of manpower and material resources, and improve work efficiency.
  • this application provides a software compilation method, including:
  • the obtaining the source code of the target application software and automatically analyzing the source code to obtain the software package information that the target application software depends on includes:
  • the language type is the Java language
  • a compiler is used to parse the configuration file of the target application software to determine the name and version of the software package that the target application software depends on.
  • the method further includes:
  • the automatic detection based on the software package information whether the current operating system has installed the corresponding target software package includes:
  • the obtaining the source code of the target application software and automatically analyzing the source code to obtain the software package information that the target application software depends on includes:
  • the language type is C language
  • parse the compilation order rule file to determine the source files that need to be compiled and the compilation order of the source files;
  • the header file of the target application software is parsed according to the compilation sequence, and the third-party platform project library that the target application software depends on is determined.
  • the method further includes:
  • the automatic detection based on the software package information whether the current operating system has installed the corresponding target software package includes:
  • the method further includes:
  • the target software package is not installed in the current operating system, searching for the target software package in an operating system image or a front-end software package manager based on the software package information;
  • the target software package If the target software package is found, load the target software package from the operating system image or the front-end software package manager, and enter the step of reading server hardware information after the loading is completed.
  • the method further includes:
  • a third software package list containing non-existent software package information is generated so that the user can check and modify the source code, and determine the modified code as the source code. Enter the step of automatically analyzing the source code.
  • the reading server hardware information and automatically generating a compiled configuration file using the server hardware information includes:
  • the degree of compilation parallelism is determined based on the CPU information and the memory information, and the compilation configuration file is automatically generated according to the degree of compilation parallelism.
  • the method further includes:
  • a compilation log is created, and the compilation process for the source code is recorded in the compilation log.
  • the method further includes:
  • it also includes:
  • a dependent package check log is generated based on the detection process for whether the target software package has been installed on the current operating system.
  • this application provides a software compiling device, including:
  • the code analysis module is used to obtain the source code of the target application software, and automatically analyze the source code to obtain the software package information that the target application software depends on;
  • the software package detection module is configured to automatically detect whether the current operating system has installed the corresponding target software package based on the software package information
  • a configuration generation module configured to read server hardware information if the target software package has been installed in the current operating system, and automatically generate a compiled configuration file using the server hardware information;
  • the code compilation module is configured to compile the source code based on the compilation configuration file.
  • an electronic device including:
  • Memory used to store computer programs
  • the processor is used to implement the steps of any one of the software compilation methods disclosed above when the computer program is executed.
  • the present application provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned software compilations is realized. Method steps.
  • a software compilation method includes: obtaining the source code of the target application software, and automatically analyzing the source code to obtain the software package information that the target application software depends on; The software package information automatically detects whether the current operating system has installed the corresponding target software package; if the current operating system has installed the target software package, read the server hardware information, and use the server hardware information to automatically generate a compiled configuration file ; Compile the source code based on the compilation configuration file.
  • this application will first automatically analyze the source code of the target application software to obtain the software package information it depends on, and then automatically detect whether the target software package is installed in the current operating system. If yes, a compilation configuration file can be automatically generated to execute the process of compiling the source code based on the compilation configuration file to realize the standardization and automation of software compilation steps, which can reduce labor and material costs and improve work efficiency.
  • the application also discloses a software compiling device, an electronic device and a computer-readable storage medium, which can also achieve the above technical effects.
  • FIG. 1 is a flowchart of a software compilation method disclosed in an embodiment of the application
  • FIG. 3 is a flowchart of another specific implementation manner of the software compilation method disclosed in an embodiment of the application.
  • Fig. 5 is a structural diagram of a software compiling device disclosed in an embodiment of the application.
  • Fig. 6 is a structural diagram of an electronic device disclosed in an embodiment of the application.
  • FIG. 7 is a structural diagram of another electronic device disclosed in an embodiment of the application.
  • the embodiment of the present application discloses a software compilation method, which realizes the standardization and automation of software compilation steps, can reduce the cost of manpower and material resources, and improve work efficiency.
  • a software compilation method disclosed in an embodiment of the present application includes:
  • S101 Obtain the source code of the target application software, and automatically parse the source code to obtain software package information on which the target application software depends;
  • the source code of the target application software is first obtained.
  • the target application software is specifically the application software to be compiled.
  • the source code of the target application software can be the code manually written by the developer, or it can be the source code of the open source software.
  • the source code of the target application software can be obtained by importing the source through the preset interface Code, you can also download the source code from the Internet. After the source code is obtained, it will be automatically parsed to obtain the software package information that the target application software depends on.
  • S102 Automatically detect whether the current operating system has installed the corresponding target software package based on the software package information
  • the software package information on which the target application software is parsed and obtained in the foregoing steps can be detected in the current operating system to query whether the target software package corresponding to the software package information has been installed in the current operating system.
  • the foregoing process of detecting whether the current operating system has installed the target software package corresponding to the software package information may specifically include: firstly reading all the software packages installed in the current operating system, and then using the software package information and The installed software packages are matched one by one to determine whether the target software package has been installed.
  • the hardware information of the server can be read, and the corresponding compilation configuration file can be automatically generated according to the hardware information of the server .
  • the foregoing process of reading server hardware information and automatically generating a compilation configuration file using server hardware information may include: reading the server's CPU information and memory information; determining the degree of compilation parallelism based on the CPU information and memory information, and according to the compilation parallelism Degrees of automatic generation of compilation configuration files. That is, the performance status of the server can be obtained by reading the hardware information of the server, thereby determining the degree of compiling parallelism that the server can support, and generating a corresponding compiling configuration file according to the degree of compiling parallelism.
  • the embodiment of the present application may compile the source code of the target application software based on the compilation configuration file.
  • the embodiment of the present application may also create a compilation log in advance, and after the source code is compiled based on the compilation configuration file, the compilation process for the source code is recorded in the aforementioned compilation log.
  • the compilation process for the source code is recorded in the aforementioned compilation log.
  • it can be further checked whether the compilation process is successfully completed, and if not, the compilation failure information corresponding to the process can be written into the compilation log for recording.
  • the embodiment of the present application can also generate a source code analysis log based on the process of parsing the source code, based on whether the target software has been installed for the current operating system.
  • the package inspection process generates a dependent package inspection log, so that users can trace and query through the above two logs.
  • a software compilation method includes: obtaining the source code of the target application software, and automatically analyzing the source code to obtain the software package information that the target application software depends on; The software package information automatically detects whether the current operating system has installed the corresponding target software package; if the current operating system has installed the target software package, read the server hardware information, and use the server hardware information to automatically generate a compiled configuration file ; Compile the source code based on the compilation configuration file.
  • this application will first automatically analyze the source code of the target application software to obtain the software package information it depends on, and then automatically detect whether the target software package is installed in the current operating system. If yes, a compilation configuration file can be automatically generated to execute the process of compiling the source code based on the compilation configuration file to realize the standardization and automation of software compilation steps, which can reduce labor and material costs and improve work efficiency.
  • the embodiment of the present application discloses a specific implementation of the software compilation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. As shown in Figure 2, specific:
  • S205 Automatically detect whether the current operating system has installed the target software package recorded in the first software package list
  • the language type of the source code will be determined first. If the current source code is written in the Java language, a compiler can be used to parse the configuration file of the target application software, so as to determine the software package that the target application software depends on, and obtain the name and version information of the software package. Further, it is necessary to determine the module to which the software package belongs and its name.
  • the embodiment of the present application may generate a first software package list based on the name of the above-mentioned module, the name of the software package, and the version information, and then detect the current operating system based on the first software package list to determine whether the current operating system has been
  • the software package of the specified version under the specified module recorded in the first software package list is installed. If the target software package has been installed in the current operating system, a compilation configuration file can be automatically generated according to the hardware information of the server, and the source code can be compiled based on the compilation configuration file.
  • the pom.xml file needs to be parsed first.
  • the pom.xml file is a project-level configuration file, which mainly describes the Maven coordinates of the target application software, the dependency relationship with the software package, the rules that developers need to follow, the defect management system, organization and license certification, and all others Factors related to the target application software.
  • the embodiment of the present application discloses another specific implementation of the software compilation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. As shown in Figure 3, specific:
  • S301 Obtain the source code corresponding to the target application software, and determine the language type of the source code
  • S303 parse the header file of the target application software according to the compilation sequence, and determine to obtain the third-party platform project library that the target application software depends on;
  • S304 Generate a second software package list based on the name of the source file, the name of the header file, and the name of the third-party platform project library;
  • S305 Automatically detect whether the current operating system has installed the target software package recorded in the second software package list
  • the language type of the source code when the source code is parsed to determine the software package information that the target application software depends on, the language type of the source code will be determined first. If the current source code is written in C language, obtain the compilation order rule file and parse it, determine the source files that need to be compiled and the compilation order of the source files, and parse the header files of the target application software in turn according to the compilation order , So as to determine the third-party platform project library that the target application software depends on. Further, the second software package list may be generated based on the name of the source file, the name of the header file, and the name of the third-party platform project library, so as to detect whether the target software package has been installed in the current operating system based on the information recorded in the second software package list. If the target software package has been installed in the current operating system, a compilation configuration file can be automatically generated, and the source code can be compiled based on the compilation configuration file.
  • the Make compiler to compile software
  • the second step is to parse the corresponding header files according to the source file compilation order to determine
  • the included third-party platform project library that is, the software package on which the target application software depends
  • a second software package list is generated based on the name of the source file, the name of the header file, and the name of the third-party platform project library.
  • the embodiment of the application discloses another software compilation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. As shown in Figure 4, specific:
  • S401 Obtain the source code of the target application software, and automatically parse the source code to obtain software package information on which the target application software depends;
  • step S402 Automatically detect whether the corresponding target software package has been installed in the current operating system based on the software package information; if so, go to step S406; if not, go to step S403;
  • step S403 Search for the target software package in the operating system image or front-end software package manager based on the software package information; if not, go to step S404; if yes, go to step S405;
  • S404 Generate a third software package list containing non-existent software package information, so that the user can check and modify the source code, determine the modified code as the source code, and re-enter step S401;
  • step S405 Load the target software package from the operating system image or the front-end software package manager, and enter step S406 after the loading is completed;
  • S406 Read server hardware information, and use the server hardware information to automatically generate a compilation configuration file
  • the operating system image or front-end is further based on the above-mentioned software package information. Find the target package in the package manager. If the target software package is found in the operating system image or the front-end software package manager, it will be loaded, and the server hardware information can be read after the loading is complete, and the process of automatically generating and compiling the configuration file; If the target software package is still not found in the mirror or front-end software package manager, a third software package list can be generated according to the search results at this time.
  • the third software package list is used to record non-existent software packages, that is, they are not installed and The package could not be found. After the third software package list is generated, the third software package list can be returned to the user, thereby prompting the user that the software source code may have its own error or an error occurred in the software analysis process, resulting in the existence of wrong dependent packages.
  • the user can According to the source code analysis log, judge whether there is an error in the analysis process, or check the source code. After solving the possible errors in the source code, you can re-determine the modified code as the above source code, and return to the source code again. Analyze and get the workflow of the software package information that the target application software depends on.
  • the following describes a software compiling apparatus provided in an embodiment of the present application.
  • the software compiling apparatus described below and the software compiling method described above can be cross-referenced.
  • a software compiling apparatus provided by an embodiment of the present application includes:
  • the code analysis module 501 is configured to obtain the source code of the target application software, and automatically analyze the source code to obtain software package information on which the target application software depends;
  • the software package detection module 502 is configured to automatically detect whether the current operating system has installed the corresponding target software package based on the software package information
  • the configuration generation module 503 is configured to read server hardware information if the target software package has been installed in the current operating system, and automatically generate a compiled configuration file using the server hardware information;
  • the code compilation module 504 is configured to compile the source code based on the compilation configuration file.
  • the software compiling device when the application software needs to be compiled, will first automatically analyze the source code of the target application software to obtain the software package information it depends on, and then automatically detect whether the current operating system has the target installed The software package, if it is, can automatically generate a compilation configuration file, so as to execute the process of compiling the source code based on the compilation configuration file, realize the standardization and automation of the software compilation steps, reduce labor and material costs, and improve work efficiency.
  • an electronic device provided by an embodiment of the application includes:
  • the memory 100 is used to store computer programs
  • the processor 200 is configured to implement the steps provided in the foregoing embodiments when executing the computer program.
  • the memory 100 includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and computer-readable instructions
  • the internal memory provides an environment for running the operating system and the computer-readable instructions in the non-volatile storage medium.
  • the processor 200 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip, which provides computing and control capabilities for electronic devices, and executes the
  • the computer program stored in the memory 100 can implement the steps of the software compilation method disclosed in any of the foregoing embodiments.
  • the electronic device further includes:
  • the input interface 300 is connected to the processor 200 and is used to obtain externally imported computer programs, parameters, and instructions, and store them in the memory 100 under the control of the processor 200.
  • the input interface 300 can be connected to an input device to receive parameters or instructions manually input by the user.
  • the input device may be a touch layer covered on the display screen, a button, a trackball, or a touch pad provided on the terminal shell, or a keyboard, a touch pad, or a mouse.
  • the display unit 400 is connected to the processor 200 and is used for displaying data processed by the processor 200 and for displaying a visualized user interface.
  • the display unit 400 may be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light emitting diode) touch device, etc.
  • the network port 500 is connected to the processor 200 and is used to communicate with external terminal devices.
  • the communication technology used in the communication connection can be wired communication technology or wireless communication technology, such as mobile high-definition link technology (MHL), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, communication technology based on IEEE802.11s, etc.
  • FIG. 7 only shows an electronic device with components 100-500. Those skilled in the art can understand that the structure shown in FIG. 7 does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
  • This application also provides a computer-readable storage medium, which may include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic Various media that can store program codes, such as discs or optical discs.
  • a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the software compilation method disclosed in any of the foregoing embodiments are implemented.
  • this application When the application software needs to be compiled, this application will first automatically parse the source code of the target application software to obtain the software package information it depends on, and then automatically detect whether the target software package is installed in the current operating system. If so, you can The compilation configuration file is automatically generated, so that the process of compiling the source code is executed based on the compilation configuration file, and the standardization and automation of software compilation steps can be realized, which can reduce the cost of manpower and material resources and improve work efficiency.

Abstract

A software compiling method and apparatus, and a device and a medium. The method comprises: acquiring a source code of target application software, and automatically parsing the source code to obtain software package information on which the target application software depends; automatically detecting, on the basis of the software package information, whether a current operating system has been installed with the corresponding target software package; if the current operating system has been installed with the target software package, reading server hardware information, and using the server hardware information to automatically generate a compiling configuration file; and compiling the source code on the basis of the compiling configuration file. In the present application, a source code of target application software is firstly automatically parsed to obtain software package information on which same depends, whether a current operating system has been installed with a target software package is then automatically detected, and if so, a compiling configuration file can be automatically generated, so as to compile the source code on the basis of the compiling configuration file to achieve the standardization and automation of a software compiling step, so that human and material costs can be reduced, and the working efficiency is improved.

Description

一种软件编译方法、装置及电子设备和存储介质Software compilation method, device, electronic equipment and storage medium
本申请要求于2019年11月24日提交中国专利局、申请号为201911161217.X、发明名称为“一种软件编译方法、装置及电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201911161217.X, and the invention title is "a software compilation method, device, electronic equipment and storage medium" on November 24, 2019, all of which The content is incorporated in this application by reference.
技术领域Technical field
本申请涉及软件编译技术领域,更具体地说,涉及一种软件编译方法、装置及一种电子设备和一种计算机可读存储介质。This application relates to the technical field of software compilation, and more specifically, to a software compilation method and device, an electronic device, and a computer-readable storage medium.
背景技术Background technique
随着信息安全和国产化的普及,各种针对国产化的政策相继出台,要求核心单位优先使用安全可控的国产化服务器及其应用软件,由此专门针对国产软硬件的操作系统和应用软件应运而生。然而国产化产品种类繁多,包括CPU、服务器、数据库、中间件等多种类型,而且国产化软硬件尚在不成熟的前期发展阶段,如何在国产化服务器及操作系统上编译应用软件也成为亟待解决的问题。With the popularization of information security and localization, various policies for localization have been introduced, requiring core units to give priority to the use of safe and controllable localized servers and their application software, thereby specifically targeting domestically-made hardware and software operating systems and application software Came into being. However, there are many types of localized products, including CPU, server, database, middleware, etc., and localized software and hardware are still in the immature early stage of development. How to compile application software on localized servers and operating systems has also become an urgent need solved problem.
因此,如何提供一种有效的应用软件编译方法是需要本领域技术人员重点关注的。Therefore, how to provide an effective method for compiling application software needs to be focused on by those skilled in the art.
发明内容Summary of the invention
本申请的目的在于提供一种软件编译方法、装置及一种电子设备和一种计算机可读存储介质,实现软件编译步骤的标准化和自动化,能够降低人力和物力成本,提高了工作效率。The purpose of this application is to provide a software compilation method and device, an electronic device, and a computer-readable storage medium, which can realize the standardization and automation of software compilation steps, reduce the cost of manpower and material resources, and improve work efficiency.
为实现上述目的,本申请提供了一种软件编译方法,包括:In order to achieve the above objective, this application provides a software compilation method, including:
获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;Obtain the source code of the target application software, and automatically parse the source code to obtain the software package information that the target application software depends on;
基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;Automatically detect whether the corresponding target software package has been installed in the current operating system based on the software package information;
若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息, 并利用所述服务器硬件信息自动生成编译配置文件;If the target software package has been installed in the current operating system, read server hardware information, and use the server hardware information to automatically generate a compiled configuration file;
基于所述编译配置文件对所述源代码进行编译。Compiling the source code based on the compilation configuration file.
可选的,所述获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息,包括:Optionally, the obtaining the source code of the target application software and automatically analyzing the source code to obtain the software package information that the target application software depends on includes:
获取所述目标应用软件对应的源代码,并确定所述源代码的语言类型;Obtain the source code corresponding to the target application software, and determine the language type of the source code;
若所述语言类型为Java语言,则利用编译器解析所述目标应用软件的配置文件,确定所述目标应用软件依赖的软件包名称及版本。If the language type is the Java language, a compiler is used to parse the configuration file of the target application software to determine the name and version of the software package that the target application software depends on.
可选的,所述确定所述目标应用软件依赖的软件包名称及版本之后,还包括:Optionally, after determining the name and version of the software package that the target application software depends on, the method further includes:
获取所述目标应用软件依赖的软件包所属的模块名称;Obtaining the name of the module to which the software package that the target application software depends on belongs;
基于所述模块名称和所述软件包名称及版本生成第一软件包列表;Generating a first software package list based on the module name and the software package name and version;
相应的,所述基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包,包括:Correspondingly, the automatic detection based on the software package information whether the current operating system has installed the corresponding target software package includes:
自动检测当前操作系统是否已安装所述第一软件包列表中记录的目标软件包。Automatically detect whether the current operating system has installed the target software package recorded in the first software package list.
可选的,所述获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息,包括:Optionally, the obtaining the source code of the target application software and automatically analyzing the source code to obtain the software package information that the target application software depends on includes:
获取所述目标应用软件对应的源代码,并确定所述源代码的语言类型;Obtain the source code corresponding to the target application software, and determine the language type of the source code;
若所述语言类型为C语言,则对编译顺序规则文件进行解析,确定需要进行编译的源文件以及所述源文件的编译顺序;If the language type is C language, parse the compilation order rule file to determine the source files that need to be compiled and the compilation order of the source files;
根据所述编译顺序对所述目标应用软件的头文件进行解析,确定得到所述目标应用软件依赖的第三方平台项目库。The header file of the target application software is parsed according to the compilation sequence, and the third-party platform project library that the target application software depends on is determined.
可选的,所述确定得到所述目标应用软件依赖的第三方平台项目库之后,还包括:Optionally, after the determination of the third-party platform project library that the target application software depends on is obtained, the method further includes:
基于所述源文件的名称、所述头文件的名称以及所述第三方平台项目库的名称生成第二软件包列表;Generating a second software package list based on the name of the source file, the name of the header file, and the name of the third-party platform project library;
相应的,所述基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包,包括:Correspondingly, the automatic detection based on the software package information whether the current operating system has installed the corresponding target software package includes:
自动检测当前操作系统是否已安装所述第二软件包列表中记录的目标 软件包。Automatically detect whether the current operating system has installed the target software package recorded in the second software package list.
可选的,所述基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包之后,还包括:Optionally, after the automatic detection based on the software package information whether the current operating system has installed the corresponding target software package, the method further includes:
若所述当前操作系统未安装所述目标软件包,则基于所述软件包信息在操作系统镜像或前端软件包管理器中查找所述目标软件包;If the target software package is not installed in the current operating system, searching for the target software package in an operating system image or a front-end software package manager based on the software package information;
若查找到所述目标软件包,则从所述操作系统镜像或所述前端软件包管理器中加载所述目标软件包,并在加载完成后进入读取服务器硬件信息的步骤。If the target software package is found, load the target software package from the operating system image or the front-end software package manager, and enter the step of reading server hardware information after the loading is completed.
可选的,所述基于所述软件包信息在操作系统镜像或前端软件包管理器中查找所述目标软件包之后,还包括:Optionally, after searching for the target software package in an operating system image or a front-end software package manager based on the software package information, the method further includes:
若未查找到所述目标软件包,则生成包含不存在软件包信息的第三软件包列表,以便用户对所述源代码进行检查和修改,并将修改后代码确定为所述源代码,重新进入自动对所述源代码进行解析的步骤。If the target software package is not found, a third software package list containing non-existent software package information is generated so that the user can check and modify the source code, and determine the modified code as the source code. Enter the step of automatically analyzing the source code.
可选的,所述读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件,包括:Optionally, the reading server hardware information and automatically generating a compiled configuration file using the server hardware information includes:
读取所述服务器的CPU信息和内存信息;Read the CPU information and memory information of the server;
基于所述CPU信息和所述内存信息确定编译并行度,并根据所述编译并行度自动生成所述编译配置文件。The degree of compilation parallelism is determined based on the CPU information and the memory information, and the compilation configuration file is automatically generated according to the degree of compilation parallelism.
可选的,所述基于所述编译配置文件对所述源代码进行编译之后,还包括:Optionally, after the source code is compiled based on the compilation configuration file, the method further includes:
创建编译日志,将针对所述源代码的编译过程记录至所述编译日志中。A compilation log is created, and the compilation process for the source code is recorded in the compilation log.
可选的,所述基于所述编译配置文件对所述源代码进行编译之后,还包括:Optionally, after the source code is compiled based on the compilation configuration file, the method further includes:
检测所述编译过程是否成功完成;Detecting whether the compilation process is successfully completed;
如果否,则将相应的编译失败信息写入所述编译日志中。If not, write the corresponding compilation failure information into the compilation log.
可选的,还包括:Optionally, it also includes:
基于对所述源代码进行解析的过程生成源代码解析日志;Generating a source code analysis log based on the process of parsing the source code;
基于针对所述当前操作系统是否已安装所述目标软件包的检测过程生成依赖包检查日志。A dependent package check log is generated based on the detection process for whether the target software package has been installed on the current operating system.
为实现上述目的,本申请提供了一种软件编译装置,包括:In order to achieve the above objective, this application provides a software compiling device, including:
代码解析模块,用于获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;The code analysis module is used to obtain the source code of the target application software, and automatically analyze the source code to obtain the software package information that the target application software depends on;
软件包检测模块,用于基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;The software package detection module is configured to automatically detect whether the current operating system has installed the corresponding target software package based on the software package information;
配置生成模块,用于若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;A configuration generation module, configured to read server hardware information if the target software package has been installed in the current operating system, and automatically generate a compiled configuration file using the server hardware information;
代码编译模块,用于基于所述编译配置文件对所述源代码进行编译。The code compilation module is configured to compile the source code based on the compilation configuration file.
为实现上述目的,本申请提供了一种电子设备,包括:In order to achieve the above objective, this application provides an electronic device, including:
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于执行所述计算机程序时实现前述公开的任一种所述软件编译方法的步骤。The processor is used to implement the steps of any one of the software compilation methods disclosed above when the computer program is executed.
为实现上述目的,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现前述公开的任一种所述软件编译方法的步骤。In order to achieve the above objective, the present application provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned software compilations is realized. Method steps.
通过以上方案可知,本申请提供的一种软件编译方法,包括:获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;基于所述编译配置文件对所述源代码进行编译。由上可知,本申请在需要对应用软件进行编译时,将首先对目标应用软件的源代码进行自动解析,得到所依赖的软件包信息,进而自动检测当前操作系统是否已安装目标软件包,如果是,则可自动生成编译配置文件,以便基于该编译配置文件执行编译源代码的过程,实现软件编译步骤的标准化和自动化,能够降低人力和物力成本,提高了工作效率。It can be seen from the above solution that a software compilation method provided by this application includes: obtaining the source code of the target application software, and automatically analyzing the source code to obtain the software package information that the target application software depends on; The software package information automatically detects whether the current operating system has installed the corresponding target software package; if the current operating system has installed the target software package, read the server hardware information, and use the server hardware information to automatically generate a compiled configuration file ; Compile the source code based on the compilation configuration file. It can be seen from the above that when the application software needs to be compiled, this application will first automatically analyze the source code of the target application software to obtain the software package information it depends on, and then automatically detect whether the target software package is installed in the current operating system. If yes, a compilation configuration file can be automatically generated to execute the process of compiling the source code based on the compilation configuration file to realize the standardization and automation of software compilation steps, which can reduce labor and material costs and improve work efficiency.
本申请还公开了一种软件编译装置及一种电子设备和一种计算机可读存储介质,同样能实现上述技术效果。The application also discloses a software compiling device, an electronic device and a computer-readable storage medium, which can also achieve the above technical effects.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并 不能限制本申请。It should be understood that the above general description and the following detailed description are only exemplary and cannot limit the application.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为本申请实施例公开的一种软件编译方法的流程图;FIG. 1 is a flowchart of a software compilation method disclosed in an embodiment of the application;
图2为本申请实施例公开的软件编译方法的一种具体实施方式的流程图;2 is a flowchart of a specific implementation manner of the software compilation method disclosed in an embodiment of the application;
图3为本申请实施例公开的软件编译方法的另外一种具体实施方式的流程图;FIG. 3 is a flowchart of another specific implementation manner of the software compilation method disclosed in an embodiment of the application;
图4为本申请实施例公开的另一种软件编译方法的流程图;4 is a flowchart of another software compilation method disclosed in an embodiment of the application;
图5为本申请实施例公开的一种软件编译装置的结构图;Fig. 5 is a structural diagram of a software compiling device disclosed in an embodiment of the application;
图6为本申请实施例公开的一种电子设备的结构图;Fig. 6 is a structural diagram of an electronic device disclosed in an embodiment of the application;
图7为本申请实施例公开的另一种电子设备的结构图。FIG. 7 is a structural diagram of another electronic device disclosed in an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
在相关技术中,国产化产品种类繁多,包括CPU、服务器、数据库、中间件等多种类型,且国产化软硬件尚在不成熟的前期发展阶段,如何在国产化服务器及操作系统上编译应用软件成为本领域技术人员亟待解决的问题。In related technologies, there are many types of localized products, including CPUs, servers, databases, middleware and other types, and localized software and hardware are still in the immature early stage of development. How to compile applications on localized servers and operating systems Software has become an urgent problem for those skilled in the art.
因此,本申请实施例公开了一种软件编译方法,实现软件编译步骤的标准化和自动化,能够降低人力和物力成本,提高了工作效率。Therefore, the embodiment of the present application discloses a software compilation method, which realizes the standardization and automation of software compilation steps, can reduce the cost of manpower and material resources, and improve work efficiency.
参见图1所示,本申请实施例公开的一种软件编译方法包括:As shown in FIG. 1, a software compilation method disclosed in an embodiment of the present application includes:
S101:获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;S101: Obtain the source code of the target application software, and automatically parse the source code to obtain software package information on which the target application software depends;
本申请实施例中,首先获取目标应用软件的源代码。目标应用软件具体为待编译的应用软件,目标应用软件的源代码可以为开发人员手动编写的代码,或者可以为开源软件的源代码,获取目标应用软件源代码的方式可以通过预设接口导入源代码,也可以从网络上下载源代码。在获取到源代码之后,将自动对其进行解析,从而获取得到该目标应用软件所依赖的软件包信息。In the embodiment of the present application, the source code of the target application software is first obtained. The target application software is specifically the application software to be compiled. The source code of the target application software can be the code manually written by the developer, or it can be the source code of the open source software. The source code of the target application software can be obtained by importing the source through the preset interface Code, you can also download the source code from the Internet. After the source code is obtained, it will be automatically parsed to obtain the software package information that the target application software depends on.
S102:基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;S102: Automatically detect whether the current operating system has installed the corresponding target software package based on the software package information;
在本步骤中,可以根据上述步骤解析得到的目标应用软件所依赖的软件包信息在当前操作系统中进行检测,以查询当前操作系统中是否已经安装该软件包信息对应的目标软件包。In this step, the software package information on which the target application software is parsed and obtained in the foregoing steps can be detected in the current operating system to query whether the target software package corresponding to the software package information has been installed in the current operating system.
作为一种可行的实施方式,上述检测当前操作系统是否已安装软件包信息对应的目标软件包的过程可以具体包括:首先读取得到当前操作系统已安装的所有软件包,进而利用软件包信息与已安装的软件包进行一一匹配,以判定得到目标软件包是否已安装。As a feasible implementation manner, the foregoing process of detecting whether the current operating system has installed the target software package corresponding to the software package information may specifically include: firstly reading all the software packages installed in the current operating system, and then using the software package information and The installed software packages are matched one by one to determine whether the target software package has been installed.
S103:若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;S103: If the target software package has been installed in the current operating system, read server hardware information, and use the server hardware information to automatically generate a compilation configuration file;
在对当前操作系统是否已安装目标软件包进行检测之后,若检测得到当前操作系统已经安装了目标软件包,则可以读取服务器的硬件信息,进而根据服务器的硬件信息自动生成对应的编译配置文件。After detecting whether the current operating system has installed the target software package, if it is detected that the current operating system has installed the target software package, the hardware information of the server can be read, and the corresponding compilation configuration file can be automatically generated according to the hardware information of the server .
具体地,上述读取服务器硬件信息,并利用服务器硬件信息自动生成编译配置文件的过程可以包括:读取服务器的CPU信息和内存信息;基于CPU信息和内存信息确定编译并行度,并根据编译并行度自动生成编译配置文件。也即,可以通过读取服务器的硬件信息得到服务器的性能状态, 从而确定服务器所能支持的编译并行度,并根据该编译并行度生成对应的编译配置文件。Specifically, the foregoing process of reading server hardware information and automatically generating a compilation configuration file using server hardware information may include: reading the server's CPU information and memory information; determining the degree of compilation parallelism based on the CPU information and memory information, and according to the compilation parallelism Degrees of automatic generation of compilation configuration files. That is, the performance status of the server can be obtained by reading the hardware information of the server, thereby determining the degree of compiling parallelism that the server can support, and generating a corresponding compiling configuration file according to the degree of compiling parallelism.
S104:基于所述编译配置文件对所述源代码进行编译。S104: Compile the source code based on the compilation configuration file.
可以理解的是,生成编译配置文件之后,本申请实施例可以基于该编译配置文件对目标应用软件的源代码进行编译。It is understandable that after the compilation configuration file is generated, the embodiment of the present application may compile the source code of the target application software based on the compilation configuration file.
在一种优选的实施方式中,本申请实施例还可以预先创建编译日志,在基于编译配置文件对源代码进行编译之后,将针对源代码的编译过程记录在上述编译日志中。在具体实施中,在利用编译配置文件针对源代码进行编译之后,可以进一步检测编译过程是否成功完成,如果否,则可将该过程对应的编译失败信息写入编译日志中进行记录。In a preferred implementation manner, the embodiment of the present application may also create a compilation log in advance, and after the source code is compiled based on the compilation configuration file, the compilation process for the source code is recorded in the aforementioned compilation log. In a specific implementation, after the source code is compiled using the compilation configuration file, it can be further checked whether the compilation process is successfully completed, and if not, the compilation failure information corresponding to the process can be written into the compilation log for recording.
需要指出的是,本申请实施例除了通过创建编译日志以记录源代码的编译过程之外,还可以基于对源代码进行解析的过程生成源代码解析日志,基于针对当前操作系统是否已安装目标软件包的检测过程生成依赖包检查日志,从而用户可以通过上述两种日志实现追溯和查询。It should be pointed out that, in addition to creating a compilation log to record the compilation process of the source code, the embodiment of the present application can also generate a source code analysis log based on the process of parsing the source code, based on whether the target software has been installed for the current operating system. The package inspection process generates a dependent package inspection log, so that users can trace and query through the above two logs.
通过以上方案可知,本申请提供的一种软件编译方法,包括:获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;基于所述编译配置文件对所述源代码进行编译。由上可知,本申请在需要对应用软件进行编译时,将首先对目标应用软件的源代码进行自动解析,得到所依赖的软件包信息,进而自动检测当前操作系统是否已安装目标软件包,如果是,则可自动生成编译配置文件,以便基于该编译配置文件执行编译源代码的过程,实现软件编译步骤的标准化和自动化,能够降低人力和物力成本,提高了工作效率。It can be seen from the above solution that a software compilation method provided by this application includes: obtaining the source code of the target application software, and automatically analyzing the source code to obtain the software package information that the target application software depends on; The software package information automatically detects whether the current operating system has installed the corresponding target software package; if the current operating system has installed the target software package, read the server hardware information, and use the server hardware information to automatically generate a compiled configuration file ; Compile the source code based on the compilation configuration file. It can be seen from the above that when the application software needs to be compiled, this application will first automatically analyze the source code of the target application software to obtain the software package information it depends on, and then automatically detect whether the target software package is installed in the current operating system. If yes, a compilation configuration file can be automatically generated to execute the process of compiling the source code based on the compilation configuration file to realize the standardization and automation of software compilation steps, which can reduce labor and material costs and improve work efficiency.
本申请实施例公开了软件编译方法的一种具体实施方式,相对于上一实施例,本实施例对技术方案作了进一步的说明和优化。参见图2所示,具体的:The embodiment of the present application discloses a specific implementation of the software compilation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. As shown in Figure 2, specific:
S201:获取目标应用软件的源代码,并确定所述源代码的语言类型;S201: Obtain the source code of the target application software, and determine the language type of the source code;
S202:若所述语言类型为Java语言,则利用编译器解析所述目标应用软件的配置文件,确定所述目标应用软件依赖的软件包名称及版本;S202: If the language type is the Java language, use a compiler to parse the configuration file of the target application software to determine the name and version of the software package that the target application software depends on;
S203:获取所述目标应用软件依赖的软件包所属的模块名称;S203: Obtain the name of the module to which the software package that the target application software depends on belongs to;
S204:基于所述模块名称和所述软件包名称及版本生成第一软件包列表;S204: Generate a first software package list based on the module name and the software package name and version;
S205:自动检测当前操作系统是否已安装所述第一软件包列表中记录的目标软件包;S205: Automatically detect whether the current operating system has installed the target software package recorded in the first software package list;
S206:若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;S206: If the target software package has been installed in the current operating system, read server hardware information, and use the server hardware information to automatically generate a compiled configuration file;
S207:基于所述编译配置文件对所述源代码进行编译。S207: Compile the source code based on the compilation configuration file.
本申请实施例中,对源代码进行解析以确定目标应用软件依赖的软件包信息时,将首先确定源代码的语言类型。若当前源代码是利用Java语言编写的,则可以利用编译器对目标应用软件的配置文件进行解析,从而确定目标应用软件所依赖的软件包,得到该软件包的名称和版本信息。进一步地,需要确定该软件包所属的模块及其名称。在具体实施中,本申请实施例可以基于上述模块的名称、软件包的名称和版本信息生成第一软件包列表,进而基于第一软件包列表对当前操作系统进行检测,判断当前操作系统是否已经安装了第一软件包列表中记录的指定模块下的指定版本的软件包。若目标软件包已在当前操作系统安装,则可根据服务器的硬件信息自动生成编译配置文件,进而基于该编译配置文件编译源代码。In the embodiment of the present application, when the source code is parsed to determine the software package information that the target application software depends on, the language type of the source code will be determined first. If the current source code is written in the Java language, a compiler can be used to parse the configuration file of the target application software, so as to determine the software package that the target application software depends on, and obtain the name and version information of the software package. Further, it is necessary to determine the module to which the software package belongs and its name. In specific implementation, the embodiment of the present application may generate a first software package list based on the name of the above-mentioned module, the name of the software package, and the version information, and then detect the current operating system based on the first software package list to determine whether the current operating system has been The software package of the specified version under the specified module recorded in the first software package list is installed. If the target software package has been installed in the current operating system, a compilation configuration file can be automatically generated according to the hardware information of the server, and the source code can be compiled based on the compilation configuration file.
具体地,在实际实施场景中,若需要使用Maven编译器进行软件编译,首先则需要解析pom.xml文件。其中,pom.xml文件属于项目级别的配置文件,其主要描述了目标应用软件的Maven坐标、与软件包的依赖关系、开发者需要遵循的规则、缺陷管理系统、组织和许可证明,以及其他所有的目标应用软件相关因素。通过解析pom.xml文件,可以从中确定目标应用软件编译时所依赖的软件包名称以及版本信息,进而可根据上述信息生成第一软件包列表。Specifically, in an actual implementation scenario, if the Maven compiler needs to be used for software compilation, the pom.xml file needs to be parsed first. Among them, the pom.xml file is a project-level configuration file, which mainly describes the Maven coordinates of the target application software, the dependency relationship with the software package, the rules that developers need to follow, the defect management system, organization and license certification, and all others Factors related to the target application software. By parsing the pom.xml file, the software package name and version information on which the target application software is compiled can be determined, and then the first software package list can be generated based on the above information.
本申请实施例公开了软件编译方法的另外一种具体实施方式,相对于上一实施例,本实施例对技术方案作了进一步的说明和优化。参见图3所示,具体的:The embodiment of the present application discloses another specific implementation of the software compilation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. As shown in Figure 3, specific:
S301:获取目标应用软件对应的源代码,并确定所述源代码的语言类型;S301: Obtain the source code corresponding to the target application software, and determine the language type of the source code;
S302:若所述语言类型为C语言,则对编译顺序规则文件进行解析,确定需要进行编译的源文件以及所述源文件的编译顺序;S302: If the language type is the C language, parse the compilation order rule file to determine the source files that need to be compiled and the compilation order of the source files;
S303:根据所述编译顺序对所述目标应用软件的头文件进行解析,确定得到所述目标应用软件依赖的第三方平台项目库;S303: parse the header file of the target application software according to the compilation sequence, and determine to obtain the third-party platform project library that the target application software depends on;
S304:基于所述源文件的名称、所述头文件的名称以及所述第三方平台项目库的名称生成第二软件包列表;S304: Generate a second software package list based on the name of the source file, the name of the header file, and the name of the third-party platform project library;
S305:自动检测当前操作系统是否已安装所述第二软件包列表中记录的目标软件包;S305: Automatically detect whether the current operating system has installed the target software package recorded in the second software package list;
S306:若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;S306: If the target software package has been installed in the current operating system, read server hardware information, and use the server hardware information to automatically generate a compilation configuration file;
S307:基于所述编译配置文件对所述源代码进行编译。S307: Compile the source code based on the compilation configuration file.
本申请实施例中,对源代码进行解析以确定目标应用软件依赖的软件包信息时,将首先确定源代码的语言类型。若当前源代码是利用C语言编写的,则获取编译顺序规则文件并解析,从中确定需要进行编译的源文件以及源文件的编译顺序,并根据该编译顺序依次对目标应用软件的头文件进行解析,从而确定目标应用软件依赖的第三方平台项目库。进一步地,可以基于源文件的名称、头文件的名称以及第三方平台项目库的名称生成第二软件包列表,以便基于第二软件包列表记录的信息检测当前操作系统是否已安装目标软件包。若当前操作系统已安装目标软件包,则可自动生成编译配置文件,并基于该编译配置文件编译源代码。In the embodiment of the present application, when the source code is parsed to determine the software package information that the target application software depends on, the language type of the source code will be determined first. If the current source code is written in C language, obtain the compilation order rule file and parse it, determine the source files that need to be compiled and the compilation order of the source files, and parse the header files of the target application software in turn according to the compilation order , So as to determine the third-party platform project library that the target application software depends on. Further, the second software package list may be generated based on the name of the source file, the name of the header file, and the name of the third-party platform project library, so as to detect whether the target software package has been installed in the current operating system based on the information recorded in the second software package list. If the target software package has been installed in the current operating system, a compilation configuration file can be automatically generated, and the source code can be compiled based on the compilation configuration file.
在具体的实施场景中,若需要使用Make编译器进行软件编译,首先需要解析Makefile文件,确定需要进行编译的源文件的编译顺序;第二步则根据源文件编译顺序解析对应的头文件,确定包含的第三方平台项目库,即目标应用软件所依赖的软件包;基于上述源文件的名称、头文件的名称 以及第三方平台项目库的名称生第二软件包列表。In a specific implementation scenario, if you need to use the Make compiler to compile software, you first need to parse the Makefile file to determine the compilation order of the source files that need to be compiled; the second step is to parse the corresponding header files according to the source file compilation order to determine The included third-party platform project library, that is, the software package on which the target application software depends; a second software package list is generated based on the name of the source file, the name of the header file, and the name of the third-party platform project library.
本申请实施例公开了另一种软件编译方法,相对于上一实施例,本实施例对技术方案作了进一步的说明和优化。参见图4所示,具体的:The embodiment of the application discloses another software compilation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. As shown in Figure 4, specific:
S401:获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;S401: Obtain the source code of the target application software, and automatically parse the source code to obtain software package information on which the target application software depends;
S402:基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;如果是,则进入步骤S406;如果否,则进入步骤S403;S402: Automatically detect whether the corresponding target software package has been installed in the current operating system based on the software package information; if so, go to step S406; if not, go to step S403;
S403:基于所述软件包信息在操作系统镜像或前端软件包管理器中查找所述目标软件包;如果否,则进入步骤S404;如果是,则进入步骤S405;S403: Search for the target software package in the operating system image or front-end software package manager based on the software package information; if not, go to step S404; if yes, go to step S405;
S404:生成包含不存在软件包信息的第三软件包列表,以便用户对所述源代码进行检查和修改,并将修改后代码确定为所述源代码,重新进入步骤S401;S404: Generate a third software package list containing non-existent software package information, so that the user can check and modify the source code, determine the modified code as the source code, and re-enter step S401;
S405:从所述操作系统镜像或所述前端软件包管理器中加载所述目标软件包,并在加载完成后进入步骤S406;S405: Load the target software package from the operating system image or the front-end software package manager, and enter step S406 after the loading is completed;
S406:读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;S406: Read server hardware information, and use the server hardware information to automatically generate a compilation configuration file;
S407:基于所述编译配置文件对所述源代码进行编译。S407: Compile the source code based on the compilation configuration file.
本申请实施例中,在当前操作系统中执行完成针对是否已安装目标软件包的检测过程之后,若当前操作系统中并未安装目标软件包,则进一步根据上述软件包信息在操作系统镜像或前端软件包管理器中查找目标软件包。若在操作系统镜像或前端软件包管理器中查找到目标软件包,则对其进行加载,并在加载完成后可执行读取服务器硬件信息,并自动生成编译配置文件的过程;若在操作系统镜像或前端软件包管理器中仍未查找到目标软件包,则此时可根据查找结果生成第三软件包列表,其中,第三软件包列表用于记录不存在的软件包,即未安装且未能查找到的软件包。当生成第三软件包列表之后,可以将第三软件包列表返回至用户,从而提示用户软件源代码可能存在自身错误或是在软件解析过程中发生了错误,导致存在错误的依赖包,用户可以根据源代码解析日志判断解析过程是否发生 错误,或可对源代码进行检查,在解决源代码可能存在的错误之后,可以将修改后的代码重新确定为上述源代码,并再次返回对源代码进行解析,得到目标应用软件依赖的软件包信息的工作流程。In the embodiment of the present application, after the detection process for whether the target software package has been installed is executed in the current operating system, if the target software package is not installed in the current operating system, the operating system image or front-end is further based on the above-mentioned software package information. Find the target package in the package manager. If the target software package is found in the operating system image or the front-end software package manager, it will be loaded, and the server hardware information can be read after the loading is complete, and the process of automatically generating and compiling the configuration file; If the target software package is still not found in the mirror or front-end software package manager, a third software package list can be generated according to the search results at this time. The third software package list is used to record non-existent software packages, that is, they are not installed and The package could not be found. After the third software package list is generated, the third software package list can be returned to the user, thereby prompting the user that the software source code may have its own error or an error occurred in the software analysis process, resulting in the existence of wrong dependent packages. The user can According to the source code analysis log, judge whether there is an error in the analysis process, or check the source code. After solving the possible errors in the source code, you can re-determine the modified code as the above source code, and return to the source code again. Analyze and get the workflow of the software package information that the target application software depends on.
下面对本申请实施例提供的一种软件编译装置进行介绍,下文描述的一种软件编译装置与上文描述的一种软件编译方法可以相互参照。The following describes a software compiling apparatus provided in an embodiment of the present application. The software compiling apparatus described below and the software compiling method described above can be cross-referenced.
参见图5所示,本申请实施例提供的一种软件编译装置包括:Referring to FIG. 5, a software compiling apparatus provided by an embodiment of the present application includes:
代码解析模块501,用于获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;The code analysis module 501 is configured to obtain the source code of the target application software, and automatically analyze the source code to obtain software package information on which the target application software depends;
软件包检测模块502,用于基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;The software package detection module 502 is configured to automatically detect whether the current operating system has installed the corresponding target software package based on the software package information;
配置生成模块503,用于若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;The configuration generation module 503 is configured to read server hardware information if the target software package has been installed in the current operating system, and automatically generate a compiled configuration file using the server hardware information;
代码编译模块504,用于基于所述编译配置文件对所述源代码进行编译。The code compilation module 504 is configured to compile the source code based on the compilation configuration file.
关于上述模块501至504的具体实施过程可参考前述实施例公开的相应内容,在此不再进行赘述。For the specific implementation process of the foregoing modules 501 to 504, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
本申请实施例提供的软件编译装置,在需要对应用软件进行编译时,将首先对目标应用软件的源代码进行自动解析,得到所依赖的软件包信息,进而自动检测当前操作系统是否已安装目标软件包,如果是,则可自动生成编译配置文件,以便基于该编译配置文件执行编译源代码的过程,实现软件编译步骤的标准化和自动化,能够降低人力和物力成本,提高了工作效率。The software compiling device provided by the embodiment of the present application, when the application software needs to be compiled, will first automatically analyze the source code of the target application software to obtain the software package information it depends on, and then automatically detect whether the current operating system has the target installed The software package, if it is, can automatically generate a compilation configuration file, so as to execute the process of compiling the source code based on the compilation configuration file, realize the standardization and automation of the software compilation steps, reduce labor and material costs, and improve work efficiency.
本申请还提供了一种电子设备,参见图6所示,本申请实施例提供的一种电子设备包括:This application also provides an electronic device. As shown in FIG. 6, an electronic device provided by an embodiment of the application includes:
存储器100,用于存储计算机程序;The memory 100 is used to store computer programs;
处理器200,用于执行所述计算机程序时可以实现上述实施例所提供 的步骤。The processor 200 is configured to implement the steps provided in the foregoing embodiments when executing the computer program.
具体的,存储器100包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令,该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。处理器200在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,为电子设备提供计算和控制能力,执行所述存储器100中保存的计算机程序时,可以实现前述任一种实施例公开的软件编译方法的步骤。Specifically, the memory 100 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for running the operating system and the computer-readable instructions in the non-volatile storage medium. In some embodiments, the processor 200 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip, which provides computing and control capabilities for electronic devices, and executes the The computer program stored in the memory 100 can implement the steps of the software compilation method disclosed in any of the foregoing embodiments.
在上述实施例的基础上,作为优选实施方式,参见图7所示,所述电子设备还包括:On the basis of the foregoing embodiment, as a preferred implementation manner, referring to FIG. 7, the electronic device further includes:
输入接口300,与处理器200相连,用于获取外部导入的计算机程序、参数和指令,经处理器200控制保存至存储器100中。该输入接口300可以与输入装置相连,接收用户手动输入的参数或指令。该输入装置可以是显示屏上覆盖的触摸层,也可以是终端外壳上设置的按键、轨迹球或触控板,也可以是键盘、触控板或鼠标等。The input interface 300 is connected to the processor 200 and is used to obtain externally imported computer programs, parameters, and instructions, and store them in the memory 100 under the control of the processor 200. The input interface 300 can be connected to an input device to receive parameters or instructions manually input by the user. The input device may be a touch layer covered on the display screen, a button, a trackball, or a touch pad provided on the terminal shell, or a keyboard, a touch pad, or a mouse.
显示单元400,与处理器200相连,用于显示处理器200处理的数据以及用于显示可视化的用户界面。该显示单元400可以为LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。The display unit 400 is connected to the processor 200 and is used for displaying data processed by the processor 200 and for displaying a visualized user interface. The display unit 400 may be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light emitting diode) touch device, etc.
网络端口500,与处理器200相连,用于与外部各终端设备进行通信连接。该通信连接所采用的通信技术可以为有线通信技术或无线通信技术,如移动高清链接技术(MHL)、通用串行总线(USB)、高清多媒体接口(HDMI)、无线保真技术(WiFi)、蓝牙通信技术、低功耗蓝牙通信技术、基于IEEE802.11s的通信技术等。The network port 500 is connected to the processor 200 and is used to communicate with external terminal devices. The communication technology used in the communication connection can be wired communication technology or wireless communication technology, such as mobile high-definition link technology (MHL), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, communication technology based on IEEE802.11s, etc.
图7仅示出了具有组件100-500的电子设备,本领域技术人员可以理解的是,图7示出的结构并不构成对电子设备的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 7 only shows an electronic device with components 100-500. Those skilled in the art can understand that the structure shown in FIG. 7 does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
本申请还提供了一种计算机可读存储介质,该存储介质可以包括:U 盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。该存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现前述任一种实施例公开的软件编译方法的步骤。This application also provides a computer-readable storage medium, which may include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic Various media that can store program codes, such as discs or optical discs. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the software compilation method disclosed in any of the foregoing embodiments are implemented.
本申请在需要对应用软件进行编译时,将首先对目标应用软件的源代码进行自动解析,得到所依赖的软件包信息,进而自动检测当前操作系统是否已安装目标软件包,如果是,则可自动生成编译配置文件,以便基于该编译配置文件执行编译源代码的过程,实现软件编译步骤的标准化和自动化,能够降低人力和物力成本,提高了工作效率。When the application software needs to be compiled, this application will first automatically parse the source code of the target application software to obtain the software package information it depends on, and then automatically detect whether the target software package is installed in the current operating system. If so, you can The compilation configuration file is automatically generated, so that the process of compiling the source code is executed based on the compilation configuration file, and the standardization and automation of software compilation steps can be realized, which can reduce the cost of manpower and material resources and improve work efficiency.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method part. It should be pointed out that for those of ordinary skill in the art, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations. There is any such actual relationship or sequence between operations. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes those that are not explicitly listed Other elements of, or also include elements inherent to this process, method, article or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or equipment that includes the element.

Claims (14)

  1. 一种软件编译方法,其特征在于,包括:A software compilation method, characterized in that it comprises:
    获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;Obtain the source code of the target application software, and automatically parse the source code to obtain the software package information that the target application software depends on;
    基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;Automatically detect whether the corresponding target software package has been installed in the current operating system based on the software package information;
    若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;If the target software package has been installed in the current operating system, read server hardware information, and use the server hardware information to automatically generate a compiled configuration file;
    基于所述编译配置文件对所述源代码进行编译。Compiling the source code based on the compilation configuration file.
  2. 根据权利要求1所述的软件编译方法,其特征在于,所述获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息,包括:The software compilation method according to claim 1, wherein the obtaining the source code of the target application software and automatically analyzing the source code to obtain the software package information that the target application software depends on comprises:
    获取所述目标应用软件对应的源代码,并确定所述源代码的语言类型;Obtain the source code corresponding to the target application software, and determine the language type of the source code;
    若所述语言类型为Java语言,则利用编译器解析所述目标应用软件的配置文件,确定所述目标应用软件依赖的软件包名称及版本。If the language type is the Java language, a compiler is used to parse the configuration file of the target application software to determine the name and version of the software package that the target application software depends on.
  3. 根据权利要求2所述的软件编译方法,其特征在于,所述确定所述目标应用软件依赖的软件包名称及版本之后,还包括:The software compilation method according to claim 2, wherein after determining the name and version of the software package that the target application software depends on, the method further comprises:
    获取所述目标应用软件依赖的软件包所属的模块名称;Obtaining the name of the module to which the software package that the target application software depends on belongs;
    基于所述模块名称和所述软件包名称及版本生成第一软件包列表;Generating a first software package list based on the module name and the software package name and version;
    相应的,所述基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包,包括:Correspondingly, the automatic detection based on the software package information whether the current operating system has installed the corresponding target software package includes:
    自动检测当前操作系统是否已安装所述第一软件包列表中记录的目标软件包。Automatically detect whether the current operating system has installed the target software package recorded in the first software package list.
  4. 根据权利要求1所述的软件编译方法,其特征在于,所述获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息,包括:The software compilation method according to claim 1, wherein the obtaining the source code of the target application software and automatically analyzing the source code to obtain the software package information that the target application software depends on comprises:
    获取所述目标应用软件对应的源代码,并确定所述源代码的语言类型;Obtain the source code corresponding to the target application software, and determine the language type of the source code;
    若所述语言类型为C语言,则对编译顺序规则文件进行解析,确定需要进行编译的源文件以及所述源文件的编译顺序;If the language type is C language, parse the compilation order rule file to determine the source files that need to be compiled and the compilation order of the source files;
    根据所述编译顺序对所述目标应用软件的头文件进行解析,确定得到所述目标应用软件依赖的第三方平台项目库。The header file of the target application software is parsed according to the compilation sequence, and the third-party platform project library that the target application software depends on is determined.
  5. 根据权利要求4所述的软件编译方法,其特征在于,所述确定得到所述目标应用软件依赖的第三方平台项目库之后,还包括:The software compilation method according to claim 4, wherein after the determining the third-party platform project library that the target application software depends on is obtained, the method further comprises:
    基于所述源文件的名称、所述头文件的名称以及所述第三方平台项目库的名称生成第二软件包列表;Generating a second software package list based on the name of the source file, the name of the header file, and the name of the third-party platform project library;
    相应的,所述基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包,包括:Correspondingly, the automatic detection based on the software package information whether the current operating system has installed the corresponding target software package includes:
    自动检测当前操作系统是否已安装所述第二软件包列表中记录的目标软件包。Automatically detect whether the current operating system has installed the target software package recorded in the second software package list.
  6. 根据权利要求1所述的软件编译方法,其特征在于,所述基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包之后,还包括:The software compilation method according to claim 1, wherein after automatically detecting whether the current operating system has installed the corresponding target software package based on the software package information, the method further comprises:
    若所述当前操作系统未安装所述目标软件包,则基于所述软件包信息在操作系统镜像或前端软件包管理器中查找所述目标软件包;If the target software package is not installed in the current operating system, searching for the target software package in an operating system image or a front-end software package manager based on the software package information;
    若查找到所述目标软件包,则从所述操作系统镜像或所述前端软件包管理器中加载所述目标软件包,并在加载完成后进入读取服务器硬件信息的步骤。If the target software package is found, load the target software package from the operating system image or the front-end software package manager, and enter the step of reading server hardware information after the loading is completed.
  7. 根据权利要求6所述的软件编译方法,其特征在于,所述基于所述软件包信息在操作系统镜像或前端软件包管理器中查找所述目标软件包之后,还包括:The software compilation method according to claim 6, wherein after searching for the target software package in an operating system image or a front-end software package manager based on the software package information, the method further comprises:
    若未查找到所述目标软件包,则生成包含不存在软件包信息的第三软件包列表,以便用户对所述源代码进行检查和修改,并将修改后代码确定为所述源代码,重新进入自动对所述源代码进行解析的步骤。If the target software package is not found, a third software package list containing non-existent software package information is generated so that the user can check and modify the source code, and determine the modified code as the source code. Enter the step of automatically analyzing the source code.
  8. 根据权利要求1所述的软件编译方法,其特征在于,所述读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件,包括:The software compilation method according to claim 1, wherein said reading server hardware information and automatically generating a compilation configuration file using said server hardware information comprises:
    读取所述服务器的CPU信息和内存信息;Read the CPU information and memory information of the server;
    基于所述CPU信息和所述内存信息确定编译并行度,并根据所述编译并行度自动生成所述编译配置文件。The degree of compilation parallelism is determined based on the CPU information and the memory information, and the compilation configuration file is automatically generated according to the degree of compilation parallelism.
  9. 根据权利要求1至8任一项所述的软件编译方法,其特征在于,所述基于所述编译配置文件对所述源代码进行编译之后,还包括:The software compilation method according to any one of claims 1 to 8, wherein after the source code is compiled based on the compilation configuration file, the method further comprises:
    创建编译日志,将针对所述源代码的编译过程记录至所述编译日志中。A compilation log is created, and the compilation process for the source code is recorded in the compilation log.
  10. 根据权利要求9所述的软件编译方法,其特征在于,所述基于所述编译配置文件对所述源代码进行编译之后,还包括:The software compilation method of claim 9, wherein after the source code is compiled based on the compilation configuration file, the method further comprises:
    检测所述编译过程是否成功完成;Detecting whether the compilation process is successfully completed;
    如果否,则将相应的编译失败信息写入所述编译日志中。If not, write the corresponding compilation failure information into the compilation log.
  11. 根据权利要求9所述的软件编译方法,其特征在于,还包括:The software compilation method according to claim 9, further comprising:
    基于对所述源代码进行解析的过程生成源代码解析日志;Generating a source code analysis log based on the process of parsing the source code;
    基于针对所述当前操作系统是否已安装所述目标软件包的检测过程生成依赖包检查日志。A dependent package check log is generated based on the detection process for whether the target software package has been installed on the current operating system.
  12. 一种软件编译装置,其特征在于,包括:A software compiling device, characterized in that it comprises:
    代码解析模块,用于获取目标应用软件的源代码,并自动对所述源代码进行解析,得到所述目标应用软件依赖的软件包信息;The code analysis module is used to obtain the source code of the target application software, and automatically analyze the source code to obtain the software package information that the target application software depends on;
    软件包检测模块,用于基于所述软件包信息自动检测当前操作系统是否已安装对应的目标软件包;The software package detection module is configured to automatically detect whether the current operating system has installed the corresponding target software package based on the software package information;
    配置生成模块,用于若所述当前操作系统已安装所述目标软件包,则读取服务器硬件信息,并利用所述服务器硬件信息自动生成编译配置文件;A configuration generation module, configured to read server hardware information if the target software package has been installed in the current operating system, and automatically generate a compiled configuration file using the server hardware information;
    代码编译模块,用于基于所述编译配置文件对所述源代码进行编译。The code compilation module is configured to compile the source code based on the compilation configuration file.
  13. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    存储器,用于存储计算机程序;Memory, used to store computer programs;
    处理器,用于执行所述计算机程序时实现如权利要求1至11任一项所述软件编译方法的步骤。The processor is configured to implement the steps of the software compilation method according to any one of claims 1 to 11 when the computer program is executed.
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至11任一项所述软件编译方法的步骤。A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the software compiling method according to any one of claims 1 to 11 is implemented step.
PCT/CN2020/087162 2019-11-24 2020-04-27 Software compiling method and apparatus, and electronic device and storage medium WO2021098148A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911161217.XA CN110990020A (en) 2019-11-24 2019-11-24 Software compiling method and device, electronic equipment and storage medium
CN201911161217.X 2019-11-24

Publications (1)

Publication Number Publication Date
WO2021098148A1 true WO2021098148A1 (en) 2021-05-27

Family

ID=70086214

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/087162 WO2021098148A1 (en) 2019-11-24 2020-04-27 Software compiling method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN110990020A (en)
WO (1) WO2021098148A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990020A (en) * 2019-11-24 2020-04-10 苏州浪潮智能科技有限公司 Software compiling method and device, electronic equipment and storage medium
CN111522560A (en) * 2020-04-21 2020-08-11 北京三快在线科技有限公司 Software installation method and device, storage medium and electronic equipment
CN111638906B (en) * 2020-05-15 2023-02-03 郑州阿帕斯数云信息科技有限公司 SDK (software development kit) access method, device and system
US11934458B2 (en) * 2020-05-22 2024-03-19 The George Washington University Binary code similarity detection system
CN111782239B (en) * 2020-06-03 2023-07-11 中移(杭州)信息技术有限公司 Method, device and storage medium for software packaging and source code version information acquisition
CN111949268A (en) * 2020-06-23 2020-11-17 贝壳技术有限公司 Project compiling method and device, electronic equipment and storage medium
CN111859827B (en) * 2020-06-29 2022-06-17 山东云海国创云计算装备产业创新中心有限公司 Chip IP integration method and device, electronic equipment and storage medium
CN112214220B (en) * 2020-09-02 2023-10-10 深圳市优必选科技股份有限公司 Method, apparatus and device for integrated system
CN112130862B (en) * 2020-09-28 2024-04-05 平安国际智慧城市科技股份有限公司 Method, apparatus, device and computer readable storage medium for generating package file
CN112379915A (en) * 2020-11-06 2021-02-19 中国人寿保险股份有限公司 Source code processing method and device
CN112286534A (en) * 2020-11-25 2021-01-29 湖南麒麟信安科技股份有限公司 Automatic compiling method for software package
CN112631599B (en) * 2020-12-09 2024-03-19 潍柴动力股份有限公司 Compiling method, compiling device and storage medium
CN112748927A (en) * 2020-12-30 2021-05-04 上海微盟企业发展有限公司 Project interface analysis method and related device
CN112732300A (en) * 2021-01-07 2021-04-30 苏州浪潮智能科技有限公司 Data packet updating method and device, electronic equipment and readable storage medium
CN113176880B (en) * 2021-04-12 2022-06-14 深圳市明源云科技有限公司 Project compiling method, project compiling device and computer readable storage medium
CN113254033B (en) * 2021-05-28 2023-11-03 浪潮电子信息产业股份有限公司 Method and device for generating master disc file, electronic equipment and storage medium
CN113885936A (en) * 2021-08-16 2022-01-04 统信软件技术有限公司 Solution method for software package dependence in customized mirror image
CN114268624B (en) * 2022-03-02 2022-06-03 上海豪承信息技术有限公司 Version file transmission method and device and server
CN116931954B (en) * 2023-09-18 2023-12-19 浙江简捷物联科技有限公司 Built-in software package compiling construction method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090055809A1 (en) * 2007-08-23 2009-02-26 Accenture Global Services Gmbh Binary Library
CN102035892A (en) * 2010-12-23 2011-04-27 中科方德软件有限公司 System and method for automatically releasing operating system version and automatically updating software package
CN102419711A (en) * 2011-11-16 2012-04-18 深圳市佳创视讯技术股份有限公司 Package management system and method for embedded system of digital television receiving terminal
CN109976793A (en) * 2019-03-15 2019-07-05 北京字节跳动网络技术有限公司 A kind of operation method of application program, device, equipment and medium
CN110990020A (en) * 2019-11-24 2020-04-10 苏州浪潮智能科技有限公司 Software compiling method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5956513A (en) * 1997-08-07 1999-09-21 Mci Communications Corporation System and method for automated software build control
CN108614701B (en) * 2016-12-26 2021-08-24 中移(苏州)软件技术有限公司 Linux operating system customizing method and device
CN109918091A (en) * 2019-02-27 2019-06-21 苏州浪潮智能科技有限公司 A kind of method for rapidly mounting of linux system installation kit
CN110333872B (en) * 2019-07-09 2023-06-16 广州虎牙科技有限公司 Application processing method, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090055809A1 (en) * 2007-08-23 2009-02-26 Accenture Global Services Gmbh Binary Library
CN102035892A (en) * 2010-12-23 2011-04-27 中科方德软件有限公司 System and method for automatically releasing operating system version and automatically updating software package
CN102419711A (en) * 2011-11-16 2012-04-18 深圳市佳创视讯技术股份有限公司 Package management system and method for embedded system of digital television receiving terminal
CN109976793A (en) * 2019-03-15 2019-07-05 北京字节跳动网络技术有限公司 A kind of operation method of application program, device, equipment and medium
CN110990020A (en) * 2019-11-24 2020-04-10 苏州浪潮智能科技有限公司 Software compiling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110990020A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
WO2021098148A1 (en) Software compiling method and apparatus, and electronic device and storage medium
Sen et al. Jalangi: A selective record-replay and dynamic analysis framework for JavaScript
US10152309B2 (en) Cross-library framework architecture feature sets
Madsen et al. Static analysis of event-driven Node. js JavaScript applications
CN110383238B (en) System and method for model-based software analysis
US8850581B2 (en) Identification of malware detection signature candidate code
US9116707B2 (en) Dependency resolution in polyphasic modules
US9239774B2 (en) Classification of JavaScript code for debugging using just my code
US7318215B1 (en) Stored procedure interface language and tools
Safi et al. Detecting event anomalies in event-based systems
US8549502B2 (en) Compiler with user-defined type inference rules
Nielsen et al. Nodest: feedback-driven static analysis of Node. js applications
KR20150024842A (en) Adaptive portable libraries
BR112015011537B1 (en) STORAGE METHOD AND DEVICE FOR ASSOCIATION OF METADATA WITH SOURCE CODE
US9135591B1 (en) Analysis and assessment of software library projects
Wognsen et al. Formalisation and analysis of Dalvik bytecode
CN103365724A (en) Detecting localizable native methods and systems
Huang et al. Detecting sensitive data disclosure via bi-directional text correlation analysis
US20180032420A1 (en) Debugging Tool For A JIT Compiler
US9104781B2 (en) Obtaining metadata set by imperative statement
Hu et al. Static detection of event-based races in android apps
Loginov et al. Verifying dereference safety via expanding-scope analysis
US9141356B2 (en) Process for generating dynamic type
CN111352631A (en) Interface compatibility detection method and device
CN108595656B (en) Data processing method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20891295

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20891295

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20891295

Country of ref document: EP

Kind code of ref document: A1