[go: up one dir, main page]

CN105511933A - Compiling method of source code and related equipment - Google Patents

Compiling method of source code and related equipment Download PDF

Info

Publication number
CN105511933A
CN105511933A CN201510885903.7A CN201510885903A CN105511933A CN 105511933 A CN105511933 A CN 105511933A CN 201510885903 A CN201510885903 A CN 201510885903A CN 105511933 A CN105511933 A CN 105511933A
Authority
CN
China
Prior art keywords
source code
directory
user
server
compilation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510885903.7A
Other languages
Chinese (zh)
Inventor
廖晓兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Digital Technology Co Ltd
Shenzhen Skyworth Software Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
Shenzhen Skyworth Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth Digital Technology Co Ltd, Shenzhen Skyworth Software Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN201510885903.7A priority Critical patent/CN105511933A/en
Publication of CN105511933A publication Critical patent/CN105511933A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

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

Abstract

本发明实施例公开了一种源代码的编译方法及相关设备,其中源代码的编译方法可包括:显示用于存放源代码的目录集合以提示用户进行选取;当获取到用户选取的所述目录集合中的一个目录时,显示所述目录下的源代码的版本所支持的硬件号以提示用户进行选取;将用户选取的所述目录及硬件号发送至编译服务器,以使所述编译服务器从存储服务器的所述目录中下载待编译源代码,并将所述待编译源代码编译为能够支持所述硬件号的软件。采用本发明实施例,可在客户端需要对源代码进行编译时简化人机交互过程,优化了编译过程的自动化程度。

The embodiment of the present invention discloses a source code compiling method and related equipment, wherein the source code compiling method may include: displaying a set of directories for storing source codes to prompt the user to select; when the directory selected by the user is obtained, When a directory in the collection is displayed, the hardware number supported by the version of the source code under the directory is displayed to prompt the user to make a selection; the directory and hardware number selected by the user are sent to the compilation server, so that the compilation server starts The source code to be compiled is downloaded from the directory of the storage server, and the source code to be compiled is compiled into software capable of supporting the hardware number. By adopting the embodiment of the present invention, the human-computer interaction process can be simplified when the client needs to compile the source code, and the automation degree of the compilation process can be optimized.

Description

一种源代码的编译方法及相关设备A source code compiling method and related equipment

技术领域technical field

本发明涉及软件编程技术领域,尤其涉及一种源代码的编译方法及相关设备。The invention relates to the technical field of software programming, in particular to a source code compiling method and related equipment.

背景技术Background technique

当前在软件开发的项目中,可通过版本控制系统管理不同开发者所写的源代码。具体的,开发者可在版本控制系统的客户端将编写的源代码上传至版本控制系统的服务器端,也可从服务器端下载最新版本或其他版本的源代码。目前,常用的版本控制系统可包括SVN(英文:Subversion)系统、CVS(英文:Concurrentversionsystem)系统等。在上述系统中,可实现不同客户端对相同源代码的下载,也可实现不同的开发者共同编写同一版本的代码。目前,当开发者完成对源代码的编写后,可通过上述系统对源代码进行进一步编译。其中,若客户端不具备编译环境时,上述系统可包括存储服务器,编译服务器以及客户端。上述系统可针对不同的平台,对同一个版本的源代码进行编译,从而使一个软件能够支持不同的平台。如开发的一体机DTV软件,可在不同的一体机终端上运行,从而实现了一体机软件的高度集成化。In current software development projects, source code written by different developers can be managed through a version control system. Specifically, the developer can upload the source code written on the client side of the version control system to the server side of the version control system, and can also download the latest version or other versions of the source code from the server side. Currently, commonly used version control systems may include SVN (English: Subversion) system, CVS (English: Concurrentversionsystem) system, and the like. In the above system, different clients can download the same source code, and different developers can jointly write the same version of the code. At present, after the developer finishes writing the source code, the source code can be further compiled through the above system. Wherein, if the client does not have a compiling environment, the above system may include a storage server, a compiling server and a client. The above system can compile the source code of the same version for different platforms, so that one software can support different platforms. For example, the developed all-in-one DTV software can run on different all-in-one terminals, thus realizing the high integration of all-in-one software.

当前,在通过版本控制系统对源代码进行编译时,需要开发者手工输入大量信息,如编译环境、多个源代码的存储地址等。并且在人为输入的过程中,需要开发者严格遵守输入规则,若出现误输入的情况,如开发者在某一个输入项中多了一个空格等,会直接导致编译失败。综上所述,客户端在需要对源代码进行编译时人机交互过程复杂,自动化程度低。Currently, when compiling source code through a version control system, developers need to manually input a large amount of information, such as compilation environment, storage addresses of multiple source codes, and the like. And in the process of manual input, the developer needs to strictly abide by the input rules. If there is a wrong input, such as a developer adding a space in a certain input item, it will directly cause the compilation to fail. To sum up, when the client needs to compile the source code, the human-computer interaction process is complicated and the degree of automation is low.

发明内容Contents of the invention

本发明实施例提供一种源代码的编译方法及相关设备,可在客户端需要对源代码进行编译时简化人机交互过程,优化了编译过程的自动化程度。The embodiments of the present invention provide a source code compiling method and related equipment, which can simplify the human-computer interaction process when the client needs to compile the source code, and optimize the automation degree of the compiling process.

本发明实施例第一方面提供了一种源代码的编译方法,所述方法可包括:The first aspect of the embodiments of the present invention provides a source code compilation method, the method may include:

显示用于存放源代码的目录集合以提示用户进行选取;Display a collection of directories for storing source code to prompt the user to select;

当获取到用户选取的所述目录集合中的一个目录时,显示所述目录下的源代码的版本所支持的硬件号以提示用户进行选取;When obtaining a directory in the directory set selected by the user, display the hardware number supported by the version of the source code in the directory to prompt the user to select;

将用户选取的所述目录及硬件号发送至编译服务器,以使所述编译服务器从存储服务器的所述目录中下载待编译源代码,并将所述待编译源代码编译为能够支持所述硬件号的软件。Send the directory and hardware number selected by the user to the compilation server, so that the compilation server downloads the source code to be compiled from the directory of the storage server, and compiles the source code to be able to support the hardware number of software.

作为可选的实施例,所述显示用于存放源代码的目录集合以提示用户进行选取之前还包括:As an optional embodiment, before displaying the set of directories for storing the source code to prompt the user to make a selection, it also includes:

从与源代码相关联的配置文件中读取在存储服务器中存放所述源代码的总目录;read from a configuration file associated with the source code a general directory storing the source code in the storage server;

获取所述总目录下的子目录集合,其中,不同的子目录下存放不同版本的源代码;Obtain a set of subdirectories under the general directory, wherein different versions of the source code are stored in different subdirectories;

其中,所述显示用于存放源代码的目录集合以提示用户进行选取包括:Wherein, the displaying a collection of directories for storing source codes to prompt the user to select includes:

显示所述子目录集合以提示用户进行选取。The set of subcategories is displayed to prompt the user for selection.

作为可选的实施例,所述将用户选取的所述目录及硬件号发送至编译服务器之前还包括:As an optional embodiment, before sending the directory and the hardware number selected by the user to the compiling server, it also includes:

从所述配置文件中读取编译服务器的端口信息;Read the port information of the compilation server from the configuration file;

与所述端口信息对应的编译服务器建立通信连接。A communication connection is established with the compiling server corresponding to the port information.

作为可选的实施例,所述将用户选取的所述目录及硬件号发送至编译服务器,包括:As an optional embodiment, the sending the directory and hardware number selected by the user to the compiling server includes:

将用户选取的目录及硬件号组合成符合传输协议的字符串数据;Combine the directory and hardware number selected by the user into string data that conforms to the transmission protocol;

将所述字符串数据发送至所述编译服务器。Send the string data to the compiling server.

作为可选的实施例,所述将用户选取的所述目录及硬件号发送至编译服务器之后还包括:As an optional embodiment, after sending the directory and the hardware number selected by the user to the compiling server, it also includes:

接收所述编译服务器发送的编译结果信息;receiving compilation result information sent by the compilation server;

在信息输出框中显示所述编译结果信息。The compilation result information is displayed in the information output box.

本发明实施例第二方面提供了一种源代码的编译方法,所述方法可包括:The second aspect of the embodiment of the present invention provides a source code compilation method, the method may include:

接收客户端发送的字符串数据;Receive the string data sent by the client;

解析所述字符串数据中的目录及硬件号;Parse the directory and hardware number in the character string data;

根据所述目录从存储服务器中下载待编译源代码;Download the source code to be compiled from the storage server according to the directory;

将所述待编译源代码编译为能够支持所述硬件号的软件。compiling the to-be-compiled source code into software capable of supporting the hardware number.

作为可选的实施例,还包括:As an optional embodiment, it also includes:

从所述目录中获取所述硬件号对应的配置文件;Obtain the configuration file corresponding to the hardware number from the directory;

读取所述配置文件中的编译信息;Read the compilation information in the configuration file;

其中,所述将所述待编译源代码编译为能够支持所述硬件号的软件包括:Wherein, said compiling said source code to be compiled into software capable of supporting said hardware number includes:

根据所述编译信息对所述待编译源代码进行编译。Compile the to-be-compiled source code according to the compilation information.

作为可选的实施例,所述将所述待编译源代码编译为能够支持所述硬件号的软件之后还包括:As an optional embodiment, after compiling the source code to be compiled into software capable of supporting the hardware number, it further includes:

将在编译过程中产生的编译结果信息发送至所述客户端。Send the compilation result information generated during the compilation process to the client.

本发明实施例第三方面提供了一种客户端,包括:The third aspect of the embodiment of the present invention provides a client, including:

第一显示模块,用于显示用于存放源代码的目录集合以提示用户进行选取;The first display module is used to display a set of directories for storing source codes to prompt the user to select;

第二显示模块,用于当获取到用户选取的所述目录集合中的一个目录时,显示所述目录下的源代码的版本所支持的硬件号以提示用户进行选取;The second display module is used to display the hardware number supported by the version of the source code under the directory when obtaining a directory in the directory set selected by the user to prompt the user to select;

发送模块,用于将用户选取的所述目录及硬件号发送至编译服务器,以使所述编译服务器从存储服务器的所述目录中下载待编译源代码,并将所述待编译源代码编译为能够支持所述硬件号的软件。A sending module, configured to send the directory and the hardware number selected by the user to the compiling server, so that the compiling server downloads the source code to be compiled from the directory of the storage server, and compiles the source code to be compiled into Software capable of supporting said hardware number.

作为可选的实施例,还包括:As an optional embodiment, it also includes:

读取模块,用于从与源代码相关联的配置文件中读取在存储服务器中存放所述源代码的总目录;A reading module, configured to read the general directory storing the source code in the storage server from a configuration file associated with the source code;

获取模块,用于获取所述总目录下的子目录集合,其中,不同的子目录下存放不同版本的源代码;An acquisition module, configured to acquire a set of subdirectories under the general directory, wherein different versions of the source code are stored in different subdirectories;

其中,所述第一显示模块还用于:Wherein, the first display module is also used for:

显示所述子目录集合以提示用户进行选取。The set of subcategories is displayed to prompt the user for selection.

作为可选的实施例,所述读取模块还用于从所述配置文件中读取编译服务器的端口信息;As an optional embodiment, the reading module is also used to read the port information of the compiling server from the configuration file;

所述客户端还包括:The client also includes:

连接模块,用于在所述发送模块将用户选取的所述目录及硬件号发送至编译服务器之前,与所述读取模块读取的端口信息对应的编译服务器建立通信连接。The connection module is configured to establish a communication connection with the compilation server corresponding to the port information read by the reading module before the sending module sends the directory and the hardware number selected by the user to the compilation server.

作为可选的实施例,所述发送模块包括:As an optional embodiment, the sending module includes:

组合单元,用于将用户选取的目录及硬件号组合成符合传输协议的字符串数据;Combination unit, used to combine the directory and hardware number selected by the user into string data conforming to the transmission protocol;

发送单元,用于将所述字符串数据发送至所述编译服务器。a sending unit, configured to send the character string data to the compilation server.

作为可选的实施例,还包括:As an optional embodiment, it also includes:

接收模块,用于在所述发送模块将用户选取的所述目录及硬件号发送至编译服务器之后,接收所述编译服务器发送的编译结果信息;A receiving module, configured to receive the compilation result information sent by the compilation server after the sending module sends the directory and the hardware number selected by the user to the compilation server;

第三显示模块,用于在信息输出框中显示所述编译结果信息。The third display module is used to display the compilation result information in the information output box.

本发明实施例第四方面提供了一种服务器,包括:A fourth aspect of the embodiment of the present invention provides a server, including:

接收模块,用于接收客户端发送的字符串数据;The receiving module is used to receive the string data sent by the client;

解析模块,用于解析所述字符串数据中的目录及硬件号;A parsing module, configured to parse the directory and the hardware number in the character string data;

下载模块,用于根据所述目录从存储服务器中下载待编译源代码;A download module, configured to download the source code to be compiled from the storage server according to the directory;

编译模块,用于将所述待编译源代码编译为能够支持所述硬件号的软件。The compiling module is configured to compile the source code to be compiled into software capable of supporting the hardware number.

作为可选的实施例,,还包括:As an optional embodiment, also includes:

获取模块,用于从所述解析模块解析出的目录中获取所述硬件号对应的配置文件;An obtaining module, configured to obtain the configuration file corresponding to the hardware number from the directory parsed by the parsing module;

读取模块,用于读取所述配置文件中的编译信息;A reading module, configured to read the compilation information in the configuration file;

其中,所述编译模块还用于:Wherein, the compilation module is also used for:

根据所述编译信息对所述待编译源代码进行编译。Compile the to-be-compiled source code according to the compilation information.

作为可选的实施例,还包括:As an optional embodiment, it also includes:

发送模块,用于将所述编译模块在编译过程中产生的编译结果信息发送至所述客户端。A sending module, configured to send the compilation result information generated by the compilation module during the compilation process to the client.

本发明实施例中,通过显示用于存放源代码的目录集合,可提示用户从目录集合中选取其中一个,从而选取的目录下的源代码即待编译源代码,当获取到用户选取的目录后,可显示该目录下的待编译源代码能够支持的硬件号,以提示用户进行选择,当用户进行选择后,可将用户选择的目录及对应的硬件号发送至编译服务器,从而可使编译服务器根据目录查找到待编译源代码,并根据硬件号对待编译源代码进行编译。即用户无需进行信息输入,仅通过简单的选取操作,编译服务器即可获取编译中所需的信息,简化了人机交互过程,优化了编译过程的自动化程度。In the embodiment of the present invention, by displaying the directory collection used to store the source code, the user can be prompted to select one of the directory collections, so that the source code under the selected directory is the source code to be compiled. When the directory selected by the user is obtained , which can display the hardware number supported by the source code to be compiled in this directory to prompt the user to make a selection. After the user makes a selection, the directory selected by the user and the corresponding hardware number can be sent to the compilation server, so that the compilation server can Find the source code to be compiled according to the directory, and compile the source code to be compiled according to the hardware number. That is, the user does not need to input information, and the compilation server can obtain the information required for compilation only through simple selection operations, which simplifies the human-computer interaction process and optimizes the automation of the compilation process.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are some implementations of the present invention For example, those skilled in the art can also obtain other drawings based on these drawings without paying creative labor.

图1是本发明实施例提供的源代码的编译方法的一实施例的流程示意图;Fig. 1 is a schematic flow chart of an embodiment of a source code compiling method provided by an embodiment of the present invention;

图2是本发明实施例提供的源代码的编译方法的另一实施例的流程示意图;Fig. 2 is a schematic flow chart of another embodiment of the source code compiling method provided by the embodiment of the present invention;

图3是本发明实施例提供的源代码的编译方法的又一实施例的结构示意图;FIG. 3 is a schematic structural diagram of another embodiment of the source code compiling method provided by the embodiment of the present invention;

图4是本发明实施例提供的客户端的一实施例的结构示意图;FIG. 4 is a schematic structural diagram of an embodiment of a client provided by an embodiment of the present invention;

图5是本发明实施例提供的客户端的另一实施例的结构示意图;Fig. 5 is a schematic structural diagram of another embodiment of the client provided by the embodiment of the present invention;

图6是本发明实施例提供的服务器的一实施例的结构示意图;FIG. 6 is a schematic structural diagram of an embodiment of a server provided by an embodiment of the present invention;

图7是一种编译信息输入框的显示示意图;FIG. 7 is a schematic display of a compiling information input box;

图8是本发明实施例提供的一种编译信息输入框的显示示意图;Fig. 8 is a schematic display diagram of a compiling information input box provided by an embodiment of the present invention;

图9是本发明实施例提供的一种编译系统的结构示意图。FIG. 9 is a schematic structural diagram of a compiling system provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例公开了一种源代码的编译方法及终端,以下将结合附图进行详细说明。The embodiment of the present invention discloses a source code compiling method and a terminal, which will be described in detail below with reference to the accompanying drawings.

请参阅图1,图1是本发明实施例提供的源代码的编译方法的一实施例的流程示意图。本发明实施例的方法可通过客户端,如一体机等来实现。如图1所示,该方法可以包括以下步骤。Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of an embodiment of a source code compiling method provided by an embodiment of the present invention. The method in the embodiment of the present invention can be implemented by a client, such as an all-in-one machine. As shown in Fig. 1, the method may include the following steps.

步骤S101,显示用于存放源代码的目录集合以提示用户进行选取。Step S101, displaying a set of directories for storing source codes to prompt the user to select.

在一个实施例中,客户端可通过读取相应的配置文件,获得用于存放所需要编译的源代码的目录,并可将获取到的目录集合提示给用户,使用户进行选择。其中,该目录为存储服务器上的目录,即通过该目录可在存储服务器上查找到需要编译的源代码。本发明实施例所述的源代码可包括主代码、\install路径下的代码、\loader路径下的代码、以及HDI文件对应的代码等。通过上述目录可获取到该源代码的所有信息,而无需通过多个目录查找对应的代码及与代码相关联的信息。In one embodiment, the client can obtain the directory for storing the source code to be compiled by reading the corresponding configuration file, and can prompt the user with the obtained directory set so that the user can make a selection. Wherein, the directory is a directory on the storage server, that is, the source code to be compiled can be found on the storage server through the directory. The source code described in the embodiment of the present invention may include the main code, the code under the \install path, the code under the \loader path, and the code corresponding to the HDI file. All the information of the source code can be obtained through the above directory, without searching for the corresponding code and the information associated with the code through multiple directories.

其中,可通过读取所需要编译的源代码的配置文件,获取存放源代码的总目录。例如,当需要编译的为一体机DTV的软件,且使用的系统为SVN时,通常该软件的源代码可存放在SVN存储服务器上关于DTV的软件项目的tag文件夹下,如获取到的总目录可为svn://192.168.0.x/sw05_ce/iDtv/Android/tags;当获取到总目录时,可通过调用getSvnEntries()函数获取该总目录下的子目录合集,其中,每个子目录下存放源代码的一个版本,并可通过子目录名称得知源代码的版本号,从而可方便用户选择需要编译的源代码版本。举例说明,上述总目录下的子目录可为svn://192.168.0.x/sw05_ce/iDtv/Android/tags/0x.0y_01等,其中,不同的x、y代表不同的版本号。Among them, the general directory for storing the source code can be obtained by reading the configuration file of the source code to be compiled. For example, when the all-in-one DTV software needs to be compiled and the system used is SVN, usually the source code of the software can be stored in the tag folder of the DTV software project on the SVN storage server. The directory can be svn://192.168.0.x/sw05_ce/iDtv/Android/tags; when the general directory is obtained, the collection of subdirectories under the general directory can be obtained by calling the getSvnEntries() function, wherein each subdirectory A version of the source code is stored under the subdirectory, and the version number of the source code can be known through the name of the subdirectory, which makes it convenient for users to select the version of the source code that needs to be compiled. For example, the subdirectory under the above general directory may be svn://192.168.0.x/sw05_ce/iDtv/Android/tags/0x.0y_01, etc., where different x and y represent different version numbers.

可选的,当获取到存放不同版本的源代码的目录集合后,可通过多种形式提示用户进行选取。如通过下拉列表的方式在编译器信息输入框内显示目录集合,也可将目录集合全部显示在编译器信息输入框内,以提示用户进行勾选等。当目录集合以下拉列表的方式显示时,可在显示框内默认显示最新版本的目录。Optionally, after obtaining the collection of directories storing source codes of different versions, the user may be prompted to select in various forms. For example, the directory collection can be displayed in the compiler information input box by means of a drop-down list, or all the directory collections can be displayed in the compiler information input box to prompt the user to check, etc. When the directory set is displayed in the form of a drop-down list, the latest version of the directory can be displayed by default in the display box.

步骤S102,当获取到用户选取的所述目录集合中的一个目录时,显示所述目录下的源代码的版本所支持的硬件号以提示用户进行选取。Step S102, when a directory in the directory set selected by the user is acquired, display the hardware number supported by the version of the source code under the directory to prompt the user to select.

在一个实施例中,当获取到用户选取的目录集合中的一个目录中,其中,用户可通过输入设备如鼠标或键盘等点击选取目录集合中的一个目录,从而表明用户需要编译该目录下的源代码版本,其中,可获取该源代码版本所支持的硬件号以提示用户进行进一步选取,从而编译服务器可根据该硬件号选取对源代码的编译方式,其中,不同的硬件号可对应不同的编译方式,从而相同的源代码能够支持不同的硬件设备。当选取到一个目录后,可在该目录下的/install文件夹中通过调用getSvnEntries()函数获取到该目录下的源代码的版本所支持的硬件号。其中,硬件号可为多个,可在编译器信息输入框内分别显示多个硬件号,也可显示all,表明需要通过不同编译方式进行编译,以能够支持该版本下的所有硬件号。In one embodiment, when a directory in the directory collection selected by the user is obtained, the user can click and select a directory in the directory collection through an input device such as a mouse or a keyboard, thereby indicating that the user needs to compile the directory under the directory. The source code version, where the hardware number supported by the source code version can be obtained to prompt the user to make further selections, so that the compilation server can select the source code compilation method according to the hardware number, where different hardware numbers can correspond to different Compilation method, so that the same source code can support different hardware devices. When a directory is selected, the hardware number supported by the version of the source code in the directory can be obtained by calling the getSvnEntries() function in the /install folder under the directory. Among them, there can be multiple hardware numbers, and multiple hardware numbers can be displayed in the compiler information input box, or all can be displayed, indicating that different compilation methods need to be used to compile to support all hardware numbers under this version.

可选的,硬件号及上述目录集合可在同一个显示框内进行显示,如显示框可为编译服务器信息输入显示框;硬件号及上述目录集合也可在不同的显示框内进行显示,如第一显示框提示用户选取目录,第二显示框在用户选取某一目录后,显示对应的硬件号提示用户进行选取。Optionally, the hardware number and the above-mentioned directory collection can be displayed in the same display frame, for example, the display frame can be a compilation server information input display box; the hardware number and the above-mentioned directory collection can also be displayed in different display frames, such as The first display frame prompts the user to select a directory, and the second display frame displays the corresponding hardware number to prompt the user to select a certain directory after the user selects a certain directory.

步骤S103,将用户选取的所述目录及硬件号发送至编译服务器,以使所述编译服务器从存储服务器的所述目录中下载待编译源代码,并将所述待编译源代码编译为能够支持所述硬件号的软件。Step S103, sending the directory and hardware number selected by the user to the compilation server, so that the compilation server downloads the source code to be compiled from the directory of the storage server, and compiles the source code to be compiled to support The software of the hardware number.

在一个实施例中,当用户选取到目录及硬件号后,还可提示用户是否确认,或在编译器信息输入框内显示确认按钮。当用户点击该确认按钮后,可触发客户端将用户选取的目录及硬件号发送到编译服务器中,从而编译服务器可根据获取的信息进行编译,生成运行软件。可选的,客户端与编译服务器之间的通信可应用TCP/IP传输协议。可将用户选取的目录及硬件号拼接成满足该协议的字符串进行传输。具体的,当编译服务器接收到该字符串时,可解析出对应的目录及硬件号,从而可根据该目录从存储服务器中下载到待编译源代码,并可通过硬件号确定编译方式。In one embodiment, after the user selects the directory and the hardware number, the user may be prompted whether to confirm, or a confirm button is displayed in the compiler information input box. When the user clicks the confirmation button, the client can be triggered to send the directory and hardware number selected by the user to the compilation server, so that the compilation server can compile and generate running software according to the obtained information. Optionally, the communication between the client and the compiling server may use the TCP/IP transmission protocol. The directory and hardware number selected by the user can be concatenated into a character string that meets the protocol for transmission. Specifically, when the compilation server receives the character string, it can parse out the corresponding directory and hardware number, so that the source code to be compiled can be downloaded from the storage server according to the directory, and the compilation method can be determined through the hardware number.

本发明实施例中,通过显示用于存放源代码的目录集合,可提示用户从目录集合中选取其中一个,从而选取的目录下的源代码即待编译源代码,当获取到用户选取的目录后,可显示该目录下的待编译源代码能够支持的硬件号,以提示用户进行选择,当用户进行选择后,可将用户选择的目录及对应的硬件号发送至编译服务器,从而可使编译服务器根据目录查找到待编译源代码,并根据硬件号对待编译源代码进行编译。即用户无需进行信息输入,仅通过简单的选取操作,编译服务器即可获取编译中所需的信息,简化了人机交互过程,优化了编译过程的自动化程度。In the embodiment of the present invention, by displaying the directory collection used to store the source code, the user can be prompted to select one of the directory collections, so that the source code under the selected directory is the source code to be compiled. When the directory selected by the user is obtained , which can display the hardware number supported by the source code to be compiled in this directory to prompt the user to make a selection. After the user makes a selection, the directory selected by the user and the corresponding hardware number can be sent to the compilation server, so that the compilation server can Find the source code to be compiled according to the directory, and compile the source code to be compiled according to the hardware number. That is, the user does not need to input information, and the compilation server can obtain the information required for compilation only through simple selection operations, which simplifies the human-computer interaction process and optimizes the automation of the compilation process.

请参阅图2,图2是本发明实施例提供的源代码的编译方法的另一实施例的流程示意图。本发明实施例的方法可通过客户端,如一体机等来实现。如图2所示,该方法可以包括以下步骤。Please refer to FIG. 2 . FIG. 2 is a schematic flowchart of another embodiment of the source code compiling method provided by the embodiment of the present invention. The method in the embodiment of the present invention can be implemented by a client, such as an all-in-one machine. As shown in Fig. 2, the method may include the following steps.

步骤S201,从与源代码相关联的配置文件中读取在存储服务器中存放所述源代码的总目录。Step S201, read the general directory storing the source code in the storage server from the configuration file associated with the source code.

在一个实施例中,当需要对源代码进行编译以生成运行软件时,可从与源代码相关联的配置文件中读取在存储服务器内存放该源代码的总目录。本发明实施例所述的源代码可包括主代码、\install路径下的代码、\loader路径下的代码、以及HDI文件对应的代码等。通过上述目录可获取到该源代码的所有信息,而无需通过多个目录查找对应的代码及与代码相关联的信息。可通过读取所需要编译的源代码的配置文件,获取存放源代码的总目录。例如,当需要编译的为一体机DTV的软件,且使用的系统为SVN时,通常该软件的源代码可存放在SVN存储服务器上关于DTV的软件项目的tag文件夹下,如获取到的总目录可为svn://192.168.0.x/sw05_ce/iDtv/Android/tags。In one embodiment, when the source code needs to be compiled to generate running software, the general directory storing the source code in the storage server can be read from a configuration file associated with the source code. The source code described in the embodiment of the present invention may include the main code, the code under the \install path, the code under the \loader path, and the code corresponding to the HDI file. All the information of the source code can be obtained through the above directory, without searching for the corresponding code and the information associated with the code through multiple directories. The general directory where the source code is stored can be obtained by reading the configuration file of the source code to be compiled. For example, when the all-in-one DTV software needs to be compiled and the system used is SVN, usually the source code of the software can be stored in the tag folder of the DTV software project on the SVN storage server. The directory can be svn://192.168.0.x/sw05_ce/iDtv/Android/tags.

步骤S202,获取所述总目录下的子目录集合,其中,不同的子目录下存放不同版本的源代码。Step S202, obtaining a set of subdirectories under the general directory, wherein different versions of source codes are stored in different subdirectories.

在一个实施例中,当获取到总目录时,可通过调用getSvnEntries()函数获取该总目录下的子目录合集,其中,每个子目录下存放源代码的一个版本,并可通过子目录名称得知源代码的版本号,从而可方便用户选择需要编译的源代码版本。举例说明,上述总目录下的子目录可为svn://192.168.0.x/sw05_ce/iDtv/Android/tags/0x.0y_01等,其中,不同的x、y代表不同的版本号。In one embodiment, when the general directory is obtained, the collection of subdirectories under the general directory can be obtained by calling the getSvnEntries() function, wherein a version of the source code is stored in each subdirectory, and can be obtained through the name of the subdirectory. Knowing the version number of the source code, it is convenient for the user to select the version of the source code that needs to be compiled. For example, the subdirectory under the above general directory may be svn://192.168.0.x/sw05_ce/iDtv/Android/tags/0x.0y_01, etc., where different x and y represent different version numbers.

步骤S203,显示所述子目录集合以提示用户进行选取。Step S203, displaying the set of subdirectories to prompt the user to select.

在一个实施例中,当获取到存放不同版本的源代码的目录集合后,可通过多种形式提示用户进行选取。如通过下拉列表的方式在编译器信息输入框内显示目录集合,也可将目录集合全部显示在编译器信息输入框内,以提示用户进行勾选等。当目录集合以下拉列表的方式显示时,可在显示框内默认显示最新版本的目录。In one embodiment, after obtaining the collection of directories storing source codes of different versions, the user may be prompted to select in various forms. For example, the directory collection can be displayed in the compiler information input box by means of a drop-down list, or all the directory collections can be displayed in the compiler information input box to prompt the user to check, etc. When the directory set is displayed in the form of a drop-down list, the latest version of the directory can be displayed by default in the display box.

步骤S204,当获取到用户选取的所述子目录集合中的一个目录时,显示所述目录下的源代码的版本所支持的硬件号以提示用户进行选取。Step S204, when a directory in the subdirectory set selected by the user is obtained, display the hardware number supported by the version of the source code in the directory to prompt the user to select.

在一个实施例中,当获取到用户选取的目录集合中的一个目录中,其中,用户可通过输入设备如鼠标或键盘等点击选取目录集合中的一个目录,从而表明用户需要编译该目录下的源代码版本,其中,可获取该源代码版本所支持的硬件号以提示用户进行进一步选取,从而编译服务器可根据该硬件号选取对源代码的编译方式,其中,不同的硬件号可对应不同的编译方式,从而相同的源代码能够支持不同的硬件设备。当选取到一个目录后,可在该目录下的/install文件夹中通过调用getSvnEntries()函数获取到该目录下的源代码的版本所支持的硬件号。其中,硬件号可为多个,可在编译器信息输入框内分别显示多个硬件号,也可显示all,表明需要通过不同编译方式进行编译,以能够支持该版本下的所有硬件号。In one embodiment, when a directory in the directory collection selected by the user is obtained, the user can click and select a directory in the directory collection through an input device such as a mouse or a keyboard, thereby indicating that the user needs to compile the directory under the directory. The source code version, where the hardware number supported by the source code version can be obtained to prompt the user to make further selections, so that the compilation server can select the source code compilation method according to the hardware number, where different hardware numbers can correspond to different Compilation method, so that the same source code can support different hardware devices. When a directory is selected, the hardware number supported by the version of the source code in the directory can be obtained by calling the getSvnEntries() function in the /install folder under the directory. Among them, there can be multiple hardware numbers, and multiple hardware numbers can be displayed in the compiler information input box, or all can be displayed, indicating that different compilation methods need to be used to compile to support all hardware numbers under this version.

可选的,硬件号及上述目录集合可在同一个显示框内进行显示,如显示框可为编译服务器信息输入显示框;硬件号及上述目录集合也可在不同的显示框内进行显示,如第一显示框提示用户选取目录,第二显示框在用户选取某一目录后,显示对应的硬件号提示用户进行选取。Optionally, the hardware number and the above-mentioned directory collection can be displayed in the same display frame, for example, the display frame can be a compilation server information input display box; the hardware number and the above-mentioned directory collection can also be displayed in different display frames, such as The first display frame prompts the user to select a directory, and the second display frame displays the corresponding hardware number to prompt the user to select a certain directory after the user selects a certain directory.

步骤S205,从所述配置文件中读取编译服务器的端口信息。Step S205, read the port information of the compiling server from the configuration file.

在一个实施例中,还可从该配置文件中读取到需要建立连接的编译服务器的端口信息。其中,该端口信息可包括编译服务器的IP地址,端口号(PORT值)等。从而客户端根据该端口信息,可查找到对应的编译服务器,并与之建立连接。In an embodiment, the port information of the compiling server that needs to be connected can also be read from the configuration file. Wherein, the port information may include the IP address of the compiling server, the port number (PORT value) and the like. Therefore, according to the port information, the client can find the corresponding compilation server and establish a connection with it.

步骤S206,与所述端口信息对应的编译服务器建立通信连接。Step S206, establishing a communication connection with the compiling server corresponding to the port information.

在一个实施例中,当读取到需要建立连接的编译服务器的端口信息时,可与编译服务器通过协议建立通信连接。其中,若客户端为一体机,编译的软件为DTV软件时,客户端与编译服务器之间的通信协议主要应用TCP/IP传输协议,从而在读取到端口信息时,可创建socket,从而可与编译服务器建立通信连接。In one embodiment, when the port information of the compiling server that needs to be established is read, a communication connection can be established with the compiling server through a protocol. Wherein, if the client is an all-in-one machine and the compiled software is DTV software, the communication protocol between the client and the compiling server mainly uses the TCP/IP transmission protocol, so that when the port information is read, a socket can be created, thereby enabling Establish a communication connection with the compilation server.

需要说明的是,建立通信连接的过程不受本发明实施例所述限制,即可在客户端或编译服务器开启时建立通信连接,也可在其他的时间点建立连接。It should be noted that the process of establishing a communication connection is not limited by the embodiments of the present invention, that is, the communication connection can be established when the client or the compiling server is started, or it can be established at other time points.

步骤S207,将用户选取的目录及硬件号组合成符合传输协议的字符串数据。Step S207, combining the directory selected by the user and the hardware number into character string data conforming to the transmission protocol.

在一个实施例中,当客户端与编译服务器通过通信协议建立通信连接后,可将用户选取的目录及硬件号组合成符合传输协议的字符串数据,以使编译服务器能够进行识别并解析。如客户端与编译服务器通过TCP/IP协议时,可组成为符合该协议的字符串。In one embodiment, after the client establishes a communication connection with the compiling server through a communication protocol, the directory and hardware number selected by the user can be combined into string data conforming to the transmission protocol, so that the compiling server can identify and analyze it. If the client and the compiling server use the TCP/IP protocol, they can be composed into character strings that conform to the protocol.

步骤S208,将所述字符串数据发送至所述编译服务器。Step S208, sending the character string data to the compiling server.

在一个实施例中,可将组合后的字符串发送至编译服务器,从而编译服务器可根据接收到的数据进行编译。具体的,当编译服务器接收到该字符串时,可解析出对应的目录及硬件号,从而可根据该目录从存储服务器中下载到待编译源代码,并可通过硬件号确定编译方式。若客户端与编译服务器通过TCP/IP协议时,客户端可通过connect模块发送上述字符串数据。In one embodiment, the combined character string can be sent to the compilation server, so that the compilation server can compile according to the received data. Specifically, when the compilation server receives the character string, it can parse out the corresponding directory and hardware number, so that the source code to be compiled can be downloaded from the storage server according to the directory, and the compilation method can be determined through the hardware number. If the client and the compilation server use the TCP/IP protocol, the client can send the above string data through the connect module.

步骤S209,接收所述编译服务器发送的编译结果信息。Step S209, receiving the compiling result information sent by the compiling server.

步骤S210,在信息输出框中显示所述编译结果信息。Step S210, display the compilation result information in the information output box.

在一个实施例中,当编译服务器进行编译的过程中,客户端可实时接收编译服务器在编译过程中发送的编译结果信息。如编译服务器发送处理Log,而客户端可接收到编译服务器发送的log,并可将该log在信息输出框中显示出来,从而客户端无需建立编译环境,即可获取编译结果,降低了对客户端的配置要求。In one embodiment, when the compiling server is compiling, the client can receive the compiling result information sent by the compiling server during the compiling process in real time. For example, the compilation server sends the processing log, and the client can receive the log sent by the compilation server and display the log in the information output box, so that the client can obtain the compilation result without establishing a compilation environment, which reduces the burden on the client. end configuration requirements.

本发明实施例中,通过显示用于存放源代码的目录集合,可提示用户从目录集合中选取其中一个,从而选取的目录下的源代码即待编译源代码,当获取到用户选取的目录后,可显示该目录下的待编译源代码能够支持的硬件号,以提示用户进行选择,当用户进行选择后,可将用户选择的目录及对应的硬件号发送至编译服务器,从而可使编译服务器根据目录查找到待编译源代码,并根据硬件号对待编译源代码进行编译。即用户无需进行信息输入,仅通过简单的选取操作,编译服务器即可获取编译中所需的信息,简化了人机交互过程,优化了编译过程的自动化程度。In the embodiment of the present invention, by displaying the directory collection used to store the source code, the user can be prompted to select one of the directory collections, so that the source code under the selected directory is the source code to be compiled. When the directory selected by the user is obtained , which can display the hardware number supported by the source code to be compiled in this directory to prompt the user to make a selection. After the user makes a selection, the directory selected by the user and the corresponding hardware number can be sent to the compilation server, so that the compilation server can Find the source code to be compiled according to the directory, and compile the source code to be compiled according to the hardware number. That is, the user does not need to input information, and the compilation server can obtain the information required for compilation only through simple selection operations, which simplifies the human-computer interaction process and optimizes the automation of the compilation process.

请参阅图3,图3是本发明实施例提供的源代码的编译方法的又一实施例的结构示意图。本发明实施例的方法可通过编译服务器实现,其中,编译服务器中可配置Linux操作系统。如图3所示,该方法可以包括以下步骤。Please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of another embodiment of the source code compiling method provided by the embodiment of the present invention. The method in the embodiment of the present invention can be implemented by a compiling server, wherein a Linux operating system can be configured in the compiling server. As shown in Fig. 3, the method may include the following steps.

步骤S301,接收客户端发送的字符串数据。Step S301, receiving the character string data sent by the client.

在一个实施例中,编译服务器可首先与客户端建立连接,若编译服务器与客户端通过TCP/IP传输协议进行通信连接,编译服务器可首先获取客户端的端口信息,其中,端口信息可包括客户端的IP地址,及端口号等。并可根据获取的端口信息建立socket,从而可等待客户端进行通信连接,并可通过Rev()模块接收客户端发送的字符串数据,其中,字符串数据可包括待编译的源代码所在存储服务器上的目录以及硬件号。In one embodiment, the compiling server can first establish a connection with the client. If the compiling server and the client communicate through the TCP/IP transmission protocol, the compiling server can first obtain the port information of the client, wherein the port information can include the client's IP address, port number, etc. A socket can be established according to the obtained port information, so that the client can wait for the communication connection, and the string data sent by the client can be received through the Rev() module, wherein the string data can include the storage server where the source code to be compiled is located directory and hardware number on the

步骤S302,解析所述字符串数据中的目录及硬件号。Step S302, parsing the directory and hardware number in the character string data.

在一个实施例中,当接收到客户端发送的字符串数据后,可从字符串数据中按照规则解析出目录及硬件号。其中,解析规则可为客户端与服务器之间制定的协议,也可为通用协议。In one embodiment, after receiving the string data sent by the client, the directory and the hardware number can be parsed out according to the rules from the string data. Wherein, the parsing rule may be an agreement established between the client and the server, or may be a general agreement.

步骤S303,根据所述目录从存储服务器中下载待编译源代码。Step S303, downloading the source code to be compiled from the storage server according to the directory.

在一个实施例中,当获取到目录及硬件号后,可在存储服务器上查找到对应的目录,从而可下载该目录下的源代码,该目录下的源代码即为待编译源代码。具体的,可通过pathon语言对源代码及对应的编译脚本进行下载。若系统为SVN系统,则可调用checkout函数进行下载。需要说明的是,可根据该目录下载到该目录下的所有内容,其中包括主代码、/install路径下的代码、/loader路径下的代码以及HDI文件对应的代码等。当下载该目录后,可获取需要编译的源代码。In one embodiment, after the directory and the hardware number are obtained, the corresponding directory can be found on the storage server, so that the source code in the directory can be downloaded, and the source code in the directory is the source code to be compiled. Specifically, the source code and the corresponding compilation script can be downloaded through the pathon language. If the system is an SVN system, you can call the checkout function to download. It should be noted that all content in the directory can be downloaded according to the directory, including the main code, the code under the /install path, the code under the /loader path, and the code corresponding to the HDI file. After downloading this directory, you can get the source code that needs to be compiled.

当下载该目录后,可从目录的/install子目录中获取到硬件号对应的配置文件(config.txt),其中,举例说明,该配置文件可具体包括如下内容:After downloading the directory, the configuration file (config.txt) corresponding to the hardware number can be obtained from the /install subdirectory of the directory. Among them, for example, the configuration file can specifically include the following content:

realtek/rtk2991/lollipop#Android编译环境的目录;realtek/rtk2991/lollipop#Android compilation environment directory;

Shark#主代码名称;Shark# main code name;

null#预留项;null#reserved items;

releasedtv.sh#编译脚本的名称。releasedtv.sh#The name of the compiled script.

步骤S304,将所述待编译源代码编译为能够支持所述硬件号的软件。Step S304, compiling the to-be-compiled source code into software capable of supporting the hardware number.

在一个实施例中,可根据上述获取的配置文件中的编译信息对源代码进行编译。其中,编译环境目录(即编译平台),主代码名称等可通过读取配置文件获取,而无需用户进行输入,进一步简化了用户的输入过程,降低了编译实务的概率。需要说明的是,每一个硬件号可对应一个配置文件,可均存放在/install子目录下,若用户选取的硬件号为all,则需要读取/install子目录中每个硬件号对应的配置文件。In one embodiment, the source code may be compiled according to the compilation information in the obtained configuration file. Among them, the compiling environment directory (that is, compiling platform), the name of the main code, etc. can be obtained by reading the configuration file without user input, which further simplifies the user input process and reduces the probability of compiling practice. It should be noted that each hardware number can correspond to a configuration file, which can be stored in the /install subdirectory. If the hardware number selected by the user is all, you need to read the configuration corresponding to each hardware number in the /install subdirectory. document.

可选的,本发明实施例还可在编译的过程中将编译结果信息通过send()模块发送至客户端,从而可使客户端实时显示编译结果,便与开发人员进行监测。Optionally, the embodiment of the present invention can also send the compilation result information to the client through the send() module during the compilation process, so that the client can display the compilation result in real time for monitoring with the developer.

本发明实施例中,服务器端可根据客户端传输的目录及硬件号便可完成对源代码的编译操作。简化了用户在编译过程中的输入操作,优化了编译过程的自动化程度。In the embodiment of the present invention, the server can complete the compiling operation of the source code according to the directory and the hardware number transmitted by the client. It simplifies the user's input operation in the compilation process, and optimizes the automation degree of the compilation process.

请参阅图4,图4是本发明实施例提供的客户端的一实施例的结构示意图。该客户端可包括:第一显示模块401、第二显示模块402及发送模块403。Please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of an embodiment of a client provided by an embodiment of the present invention. The client may include: a first display module 401 , a second display module 402 and a sending module 403 .

其中,第一显示模块401,用于显示用于存放源代码的目录集合以提示用户进行选取。Wherein, the first display module 401 is used for displaying a set of directories for storing source codes to prompt the user to select.

在一个实施例中,客户端可通过读取相应的配置文件,获得用于存放所需要编译的源代码的目录,并可通过第一显示模块401将获取到的目录集合提示给用户,使用户进行选择。其中,该目录为存储服务器上的目录,即通过该目录可在存储服务器上查找到需要编译的源代码。本发明实施例所述的源代码可包括主代码、\install路径下的代码、\loader路径下的代码、以及HDI文件对应的代码等。通过上述目录可获取到该源代码的所有信息,而无需通过多个目录查找对应的代码及与代码相关联的信息。In one embodiment, the client can obtain the directory for storing the source code to be compiled by reading the corresponding configuration file, and can prompt the user with the obtained directory set through the first display module 401, so that the user Make a selection. Wherein, the directory is a directory on the storage server, that is, the source code to be compiled can be found on the storage server through the directory. The source code described in the embodiment of the present invention may include the main code, the code under the \install path, the code under the \loader path, and the code corresponding to the HDI file. All the information of the source code can be obtained through the above directory, without searching for the corresponding code and the information associated with the code through multiple directories.

其中,可通过读取所需要编译的源代码的配置文件,获取存放源代码的总目录。例如,当需要编译的为一体机DTV的软件,且使用的系统为SVN时,通常该软件的源代码可存放在SVN存储服务器上关于DTV的软件项目的tag文件夹下,如获取到的总目录可为svn://192.168.0.x/sw05_ce/iDtv/Android/tags;当获取到总目录时,可通过调用getSvnEntries()函数获取该总目录下的子目录合集,其中,每个子目录下存放源代码的一个版本,并可通过子目录名称得知源代码的版本号,从而可方便用户选择需要编译的源代码版本。举例说明,上述总目录下的子目录可为svn://192.168.0.x/sw05_ce/iDtv/Android/tags/0x.0y_01等,其中,不同的x、y代表不同的版本号。Among them, the general directory for storing the source code can be obtained by reading the configuration file of the source code to be compiled. For example, when the all-in-one DTV software needs to be compiled and the system used is SVN, usually the source code of the software can be stored in the tag folder of the DTV software project on the SVN storage server. The directory can be svn://192.168.0.x/sw05_ce/iDtv/Android/tags; when the general directory is obtained, the collection of subdirectories under the general directory can be obtained by calling the getSvnEntries() function, wherein each subdirectory A version of the source code is stored under the subdirectory, and the version number of the source code can be known through the name of the subdirectory, which makes it convenient for users to select the version of the source code that needs to be compiled. For example, the subdirectory under the above general directory may be svn://192.168.0.x/sw05_ce/iDtv/Android/tags/0x.0y_01, etc., where different x and y represent different version numbers.

可选的,当获取到存放不同版本的源代码的目录集合后,可通过多种形式提示用户进行选取。如通过下拉列表的方式在编译器信息输入框内显示目录集合,也可将目录集合全部显示在编译器信息输入框内,以提示用户进行勾选等。当目录集合以下拉列表的方式显示时,可在显示框内默认显示最新版本的目录。Optionally, after obtaining the collection of directories storing source codes of different versions, the user may be prompted to select in various forms. For example, the directory collection can be displayed in the compiler information input box by means of a drop-down list, or all the directory collections can be displayed in the compiler information input box to prompt the user to check, etc. When the directory set is displayed in the form of a drop-down list, the latest version of the directory can be displayed by default in the display box.

第二显示模块402,用于当获取到用户选取的所述目录集合中的一个目录时,显示所述目录下的源代码的版本所支持的硬件号以提示用户进行选取。The second display module 402 is configured to, when a directory in the directory set selected by the user is acquired, display the hardware number supported by the version of the source code under the directory to prompt the user to select.

在一个实施例中,当获取到用户选取的目录集合中的一个目录中,其中,用户可通过输入设备如鼠标或键盘等点击选取目录集合中的一个目录,从而表明用户需要编译该目录下的源代码版本,其中,第二显示模块402可获取该源代码版本所支持的硬件号以提示用户进行进一步选取,从而编译服务器可根据该硬件号选取对源代码的编译方式,其中,不同的硬件号可对应不同的编译方式,从而相同的源代码能够支持不同的硬件设备。当选取到一个目录后,可在该目录下的/install文件夹中通过调用getSvnEntries()函数获取到该目录下的源代码的版本所支持的硬件号。其中,硬件号可为多个,可在编译器信息输入框内分别显示多个硬件号,也可显示all,表明需要通过不同编译方式进行编译,以能够支持该版本下的所有硬件号。In one embodiment, when a directory in the directory collection selected by the user is obtained, the user can click and select a directory in the directory collection through an input device such as a mouse or a keyboard, thereby indicating that the user needs to compile the directory under the directory. Source code version, wherein the second display module 402 can obtain the hardware number supported by the source code version to prompt the user to make further selections, so that the compiling server can select the source code compilation method according to the hardware number, wherein different hardware The number can correspond to different compilation methods, so that the same source code can support different hardware devices. When a directory is selected, the hardware number supported by the version of the source code in the directory can be obtained by calling the getSvnEntries() function in the /install folder under the directory. Among them, there can be multiple hardware numbers, and multiple hardware numbers can be displayed in the compiler information input box, or all can be displayed, indicating that different compilation methods need to be used to compile to support all hardware numbers under this version.

可选的,硬件号及上述目录集合可在同一个显示框内进行显示,如显示框可为编译服务器信息输入显示框;硬件号及上述目录集合也可在不同的显示框内进行显示,如第一显示框提示用户选取目录,第二显示框在用户选取某一目录后,显示对应的硬件号提示用户进行选取。Optionally, the hardware number and the above-mentioned directory collection can be displayed in the same display frame, for example, the display frame can be a compilation server information input display box; the hardware number and the above-mentioned directory collection can also be displayed in different display frames, such as The first display frame prompts the user to select a directory, and the second display frame displays the corresponding hardware number to prompt the user to select a certain directory after the user selects a certain directory.

发送模块403,用于将用户选取的所述目录及硬件号发送至编译服务器,以使所述编译服务器从存储服务器的所述目录中下载待编译源代码,并将所述待编译源代码编译为能够支持所述硬件号的软件。The sending module 403 is configured to send the directory and hardware number selected by the user to the compiling server, so that the compiling server downloads the source code to be compiled from the directory of the storage server, and compiles the source code to be compiled It is the software that can support the hardware number.

在一个实施例中,当用户选取到目录及硬件号后,还可提示用户是否确认,或在编译器信息输入框内显示确认按钮。当用户点击该确认按钮后,可触发客发送模块403将用户选取的目录及硬件号发送到编译服务器中,从而编译服务器可根据获取的信息进行编译,生成运行软件。可选的,客户端与编译服务器之间的通信可应用TCP/IP传输协议。可将用户选取的目录及硬件号拼接成满足该协议的字符串进行传输。具体的,当编译服务器接收到该字符串时,可解析出对应的目录及硬件号,从而可根据该目录从存储服务器中下载到待编译源代码,并可通过硬件号确定编译方式。In one embodiment, after the user selects the directory and the hardware number, the user may be prompted whether to confirm, or a confirm button is displayed in the compiler information input box. When the user clicks the confirmation button, the customer sending module 403 can be triggered to send the directory and hardware number selected by the user to the compiling server, so that the compiling server can compile and generate running software according to the obtained information. Optionally, the communication between the client and the compiling server may use the TCP/IP transmission protocol. The directory and hardware number selected by the user can be concatenated into a character string that meets the protocol for transmission. Specifically, when the compilation server receives the character string, it can parse out the corresponding directory and hardware number, so that the source code to be compiled can be downloaded from the storage server according to the directory, and the compilation method can be determined through the hardware number.

本发明实施例中,通过显示用于存放源代码的目录集合,可提示用户从目录集合中选取其中一个,从而选取的目录下的源代码即待编译源代码,当获取到用户选取的目录后,可显示该目录下的待编译源代码能够支持的硬件号,以提示用户进行选择,当用户进行选择后,可将用户选择的目录及对应的硬件号发送至编译服务器,从而可使编译服务器根据目录查找到待编译源代码,并根据硬件号对待编译源代码进行编译。即用户无需进行信息输入,仅通过简单的选取操作,编译服务器即可获取编译中所需的信息,简化了人机交互过程,优化了编译过程的自动化程度。In the embodiment of the present invention, by displaying the directory collection used to store the source code, the user can be prompted to select one of the directory collections, so that the source code under the selected directory is the source code to be compiled. When the directory selected by the user is obtained , which can display the hardware number supported by the source code to be compiled in this directory to prompt the user to make a selection. After the user makes a selection, the directory selected by the user and the corresponding hardware number can be sent to the compilation server, so that the compilation server can Find the source code to be compiled according to the directory, and compile the source code to be compiled according to the hardware number. That is, the user does not need to input information, and the compilation server can obtain the information required for compilation only through simple selection operations, which simplifies the human-computer interaction process and optimizes the automation of the compilation process.

请参阅图5,图5是本发明实施例提供的客户端的另一实施例的结构示意图。该客户端可包括:读取模块501、获取模块502、第一显示模块503、第二显示模块504、连接模块505、发送模块506、接收模块507、第三显示模块508。Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of another embodiment of a client provided by an embodiment of the present invention. The client may include: a reading module 501 , an acquiring module 502 , a first display module 503 , a second display module 504 , a connection module 505 , a sending module 506 , a receiving module 507 , and a third display module 508 .

其中,读取模块501,用于从与源代码相关联的配置文件中读取在存储服务器中存放所述源代码的总目录。Wherein, the reading module 501 is configured to read the general directory storing the source code in the storage server from the configuration file associated with the source code.

在一个实施例中,当需要对源代码进行编译以生成运行软件时,读取模块501可从与源代码相关联的配置文件中读取在存储服务器内存放该源代码的总目录。本发明实施例所述的源代码可包括主代码、\install路径下的代码、\loader路径下的代码、以及HDI文件对应的代码等。通过上述目录可获取到该源代码的所有信息,而无需通过多个目录查找对应的代码及与代码相关联的信息。可通过读取所需要编译的源代码的配置文件,获取存放源代码的总目录。例如,当需要编译的为一体机DTV的软件,且使用的系统为SVN时,通常该软件的源代码可存放在SVN存储服务器上关于DTV的软件项目的tag文件夹下,如获取到的总目录可为svn://192.168.0.x/sw05_ce/iDtv/Android/tags。In one embodiment, when the source code needs to be compiled to generate running software, the reading module 501 can read the general directory storing the source code in the storage server from the configuration file associated with the source code. The source code described in the embodiment of the present invention may include the main code, the code under the \install path, the code under the \loader path, and the code corresponding to the HDI file. All the information of the source code can be obtained through the above directory, without searching for the corresponding code and the information associated with the code through multiple directories. The general directory where the source code is stored can be obtained by reading the configuration file of the source code to be compiled. For example, when the all-in-one DTV software needs to be compiled and the system used is SVN, usually the source code of the software can be stored in the tag folder of the DTV software project on the SVN storage server. The directory can be svn://192.168.0.x/sw05_ce/iDtv/Android/tags.

获取模块502,用于获取所述总目录下的子目录集合,其中,不同的子目录下存放不同版本的源代码。The acquiring module 502 is configured to acquire a set of subdirectories under the general directory, wherein different versions of source codes are stored in different subdirectories.

在一个实施例中,当读取模块501读取到总目录时,获取模块502可通过调用getSvnEntries()函数获取该总目录下的子目录合集,其中,每个子目录下存放源代码的一个版本,并可通过子目录名称得知源代码的版本号,从而可方便用户选择需要编译的源代码版本。举例说明,上述总目录下的子目录可为svn://192.168.0.x/sw05_ce/iDtv/Android/tags/0x.0y_01等,其中,不同的x、y代表不同的版本号。In one embodiment, when the reading module 501 reads the general directory, the obtaining module 502 can obtain a collection of subdirectories under the general directory by calling the getSvnEntries() function, wherein each subdirectory stores a version of the source code , and the version number of the source code can be obtained through the name of the subdirectory, so that users can easily select the version of the source code that needs to be compiled. For example, the subdirectory under the above general directory may be svn://192.168.0.x/sw05_ce/iDtv/Android/tags/0x.0y_01, etc., where different x and y represent different version numbers.

第一显示模块503,用于显示所述子目录集合以提示用户进行选取。The first display module 503 is configured to display the set of subdirectories to prompt the user to select.

在一个实施例中,当获取模块502获取到存放不同版本的源代码的目录集合后,第一显示模块503可通过多种形式提示用户进行选取。如通过下拉列表的方式在编译器信息输入框内显示目录集合,也可将目录集合全部显示在编译器信息输入框内,以提示用户进行勾选等。当目录集合以下拉列表的方式显示时,可在显示框内默认显示最新版本的目录。In one embodiment, after the obtaining module 502 obtains the collection of directories storing source codes of different versions, the first display module 503 may prompt the user to select in various forms. For example, the directory collection can be displayed in the compiler information input box by means of a drop-down list, or all the directory collections can be displayed in the compiler information input box to prompt the user to check, etc. When the directory set is displayed in the form of a drop-down list, the latest version of the directory can be displayed by default in the display box.

第二显示模块504,用于当获取到用户选取的所述子目录集合中的一个目录时,显示所述目录下的源代码的版本所支持的硬件号以提示用户进行选取。The second display module 504 is configured to display the hardware number supported by the version of the source code under the directory when obtaining a directory in the set of subdirectories selected by the user, so as to prompt the user to make a selection.

在一个实施例中,当获取到用户选取的目录集合中的一个目录中,其中,用户可通过输入设备如鼠标或键盘等点击选取目录集合中的一个目录,从而表明用户需要编译该目录下的源代码版本,其中,第二显示模块504可获取该源代码版本所支持的硬件号以提示用户进行进一步选取,从而编译服务器可根据该硬件号选取对源代码的编译方式,其中,不同的硬件号可对应不同的编译方式,从而相同的源代码能够支持不同的硬件设备。当选取到一个目录后,可在该目录下的/install文件夹中通过调用getSvnEntries()函数获取到该目录下的源代码的版本所支持的硬件号。其中,硬件号可为多个,可在编译器信息输入框内分别显示多个硬件号,也可显示all,表明需要通过不同编译方式进行编译,以能够支持该版本下的所有硬件号。In one embodiment, when a directory in the directory collection selected by the user is obtained, the user can click and select a directory in the directory collection through an input device such as a mouse or a keyboard, thereby indicating that the user needs to compile the directory under the directory. Source code version, wherein the second display module 504 can obtain the hardware number supported by the source code version to prompt the user to make further selections, so that the compiling server can select the source code compilation method according to the hardware number, wherein different hardware The number can correspond to different compilation methods, so that the same source code can support different hardware devices. When a directory is selected, the hardware number supported by the version of the source code in the directory can be obtained by calling the getSvnEntries() function in the /install folder under the directory. Among them, there can be multiple hardware numbers, and multiple hardware numbers can be displayed in the compiler information input box, or all can be displayed, indicating that different compilation methods need to be used to compile to support all hardware numbers under this version.

可选的,硬件号及上述目录集合可在同一个显示框内进行显示,如显示框可为编译服务器信息输入显示框;硬件号及上述目录集合也可在不同的显示框内进行显示,如第一显示框提示用户选取目录,第二显示框在用户选取某一目录后,显示对应的硬件号提示用户进行选取。Optionally, the hardware number and the above-mentioned directory collection can be displayed in the same display frame, for example, the display frame can be a compilation server information input display box; the hardware number and the above-mentioned directory collection can also be displayed in different display frames, such as The first display frame prompts the user to select a directory, and the second display frame displays the corresponding hardware number to prompt the user to select a certain directory after the user selects a certain directory.

读取模块501,还用于从所述配置文件中读取编译服务器的端口信息。The reading module 501 is further configured to read the port information of the compiling server from the configuration file.

在一个实施例中,读取模块501还可从该配置文件中读取到需要建立连接的编译服务器的端口信息。其中,该端口信息可包括编译服务器的IP地址,端口号(PORT值)等。从而客户端根据该端口信息,可查找到对应的编译服务器,并与之建立连接。In one embodiment, the reading module 501 can also read the port information of the compiling server that needs to establish a connection from the configuration file. Wherein, the port information may include the IP address of the compiling server, the port number (PORT value) and the like. Therefore, according to the port information, the client can find the corresponding compilation server and establish a connection with it.

连接模块505,用于与所述端口信息对应的编译服务器建立通信连接。A connection module 505, configured to establish a communication connection with the compilation server corresponding to the port information.

在一个实施例中,当读取模块501读取到需要建立连接的编译服务器的端口信息时,连接模块505可与编译服务器通过协议建立通信连接。其中,若客户端为一体机,编译的软件为DTV软件时,客户端与编译服务器之间的通信协议主要应用TCP/IP传输协议,从而在读取到端口信息时,可创建socket,从而可与编译服务器建立通信连接。In one embodiment, when the reading module 501 reads the port information of the compilation server that needs to establish a connection, the connection module 505 can establish a communication connection with the compilation server through a protocol. Wherein, if the client is an all-in-one machine and the compiled software is DTV software, the communication protocol between the client and the compiling server mainly uses the TCP/IP transmission protocol, so that when the port information is read, a socket can be created, thereby enabling Establish a communication connection with the compilation server.

需要说明的是,建立通信连接的过程不受本发明实施例所述限制,即可在客户端或编译服务器开启时建立通信连接,也可在其他的时间点建立连接。It should be noted that the process of establishing a communication connection is not limited by the embodiments of the present invention, that is, the communication connection can be established when the client or the compiling server is started, or it can be established at other time points.

本发明实施例中,发送模块506可包括:组合单元及发送单元。In the embodiment of the present invention, the sending module 506 may include: a combining unit and a sending unit.

其中,组合单元,用于将用户选取的目录及硬件号组合成符合传输协议的字符串数据。Wherein, the combination unit is used to combine the directory and the hardware number selected by the user into character string data conforming to the transmission protocol.

在一个实施例中,当连接模块505与编译服务器通过通信协议建立通信连接后,组合单元可将用户选取的目录及硬件号组合成符合传输协议的字符串数据,以使编译服务器能够进行识别并解析。如客户端与编译服务器通过TCP/IP协议时,可组成为符合该协议的字符串。In one embodiment, after the connection module 505 establishes a communication connection with the compiling server through a communication protocol, the combination unit can combine the directory and hardware number selected by the user into string data conforming to the transmission protocol, so that the compiling server can identify and parse. If the client and the compiling server use the TCP/IP protocol, they can be composed into character strings that conform to the protocol.

发送单元,用于将所述字符串数据发送至所述编译服务器。a sending unit, configured to send the character string data to the compilation server.

在一个实施例中,发送单元可将组合后的字符串发送至编译服务器,从而编译服务器可根据接收到的数据进行编译。具体的,当编译服务器接收到该字符串时,可解析出对应的目录及硬件号,从而可根据该目录从存储服务器中下载到待编译源代码,并可通过硬件号确定编译方式。若客户端与编译服务器通过TCP/IP协议时,客户端可通过connect模块发送上述字符串数据。In one embodiment, the sending unit can send the combined character string to the compiling server, so that the compiling server can compile according to the received data. Specifically, when the compilation server receives the character string, it can parse out the corresponding directory and hardware number, so that the source code to be compiled can be downloaded from the storage server according to the directory, and the compilation method can be determined through the hardware number. If the client and the compilation server use the TCP/IP protocol, the client can send the above string data through the connect module.

接收模块507,用于接收所述编译服务器发送的编译结果信息。The receiving module 507 is configured to receive the compiling result information sent by the compiling server.

第三显示模块508,用于在信息输出框中显示所述编译结果信息。The third display module 508 is configured to display the compilation result information in the information output box.

在一个实施例中,当编译服务器进行编译的过程中,接收模块507可实时接收编译服务器在编译过程中发送的编译结果信息。如编译服务器发送处理Log,而客户端可接收到编译服务器发送的log,并可通过第三显示模块508将该log在信息输出框中显示出来,从而客户端无需建立编译环境,即可获取编译结果,降低了对客户端的配置要求。In one embodiment, when the compiling server is compiling, the receiving module 507 can receive compiling result information sent by the compiling server during compiling in real time. For example, the compilation server sends the processing log, and the client can receive the log sent by the compilation server, and can display the log in the information output box through the third display module 508, so that the client can obtain the compilation log without establishing a compilation environment. As a result, configuration requirements on clients are reduced.

本发明实施例中,通过显示用于存放源代码的目录集合,可提示用户从目录集合中选取其中一个,从而选取的目录下的源代码即待编译源代码,当获取到用户选取的目录后,可显示该目录下的待编译源代码能够支持的硬件号,以提示用户进行选择,当用户进行选择后,可将用户选择的目录及对应的硬件号发送至编译服务器,从而可使编译服务器根据目录查找到待编译源代码,并根据硬件号对待编译源代码进行编译。即用户无需进行信息输入,仅通过简单的选取操作,编译服务器即可获取编译中所需的信息,简化了人机交互过程,优化了编译过程的自动化程度。In the embodiment of the present invention, by displaying the directory collection used to store the source code, the user can be prompted to select one of the directory collections, so that the source code under the selected directory is the source code to be compiled. When the directory selected by the user is obtained , which can display the hardware number supported by the source code to be compiled in this directory to prompt the user to make a selection. After the user makes a selection, the directory selected by the user and the corresponding hardware number can be sent to the compilation server, so that the compilation server can Find the source code to be compiled according to the directory, and compile the source code to be compiled according to the hardware number. That is, the user does not need to input information, and the compilation server can obtain the information required for compilation only through simple selection operations, which simplifies the human-computer interaction process and optimizes the automation of the compilation process.

请参阅图6,图6是本发明实施例提供的服务器的一实施例的结构示意图。其中,服务器中可配置Linux操作系统,从而能够使该服务器进行编译。该服务器可包括:接收模块601、解析模块602、下载模块603、编译模块604。Please refer to FIG. 6 . FIG. 6 is a schematic structural diagram of an embodiment of a server provided by an embodiment of the present invention. Wherein, the Linux operating system can be configured in the server, so that the server can be compiled. The server may include: a receiving module 601 , an analyzing module 602 , a downloading module 603 and a compiling module 604 .

其中,接收模块601,用于接收客户端发送的字符串数据。Wherein, the receiving module 601 is configured to receive the string data sent by the client.

在一个实施例中,编译服务器可首先与客户端建立连接,若编译服务器与客户端通过TCP/IP传输协议进行通信连接,编译服务器可首先获取客户端的端口信息,其中,端口信息可包括客户端的IP地址,及端口号等。并可根据获取的端口信息建立socket,从而可等待客户端进行通信连接,并可通过接收模块601接收客户端发送的字符串数据,其中,字符串数据可包括待编译的源代码所在存储服务器上的目录以及硬件号。In one embodiment, the compiling server can first establish a connection with the client. If the compiling server and the client communicate through the TCP/IP transmission protocol, the compiling server can first obtain the port information of the client, wherein the port information can include the client's IP address, port number, etc. A socket can be established according to the obtained port information, so that the client can wait for the communication connection, and the string data sent by the client can be received through the receiving module 601, wherein the string data can include the source code to be compiled on the storage server directory and hardware number.

解析模块602,用于解析所述字符串数据中的目录及硬件号。The parsing module 602 is configured to parse the directory and hardware number in the character string data.

在一个实施例中,当接收模块601接收到客户端发送的字符串数据后,解析模块602可从字符串数据中按照规则解析出目录及硬件号。其中,解析规则可为客户端与服务器之间制定的协议,也可为通用协议。In one embodiment, after the receiving module 601 receives the string data sent by the client, the parsing module 602 can parse out the directory and the hardware number from the string data according to rules. Wherein, the parsing rule may be an agreement established between the client and the server, or may be a general agreement.

下载模块603,用于根据所述目录从存储服务器中下载待编译源代码。The download module 603 is configured to download the source code to be compiled from the storage server according to the directory.

在一个实施例中,当获取到目录及硬件号后,下载模块603可在存储服务器上查找到对应的目录,从而可下载该目录下的源代码,该目录下的源代码即为待编译源代码。具体的,可通过pathon语言对源代码及对应的编译脚本进行下载。若系统为SVN系统,则可调用checkout函数进行下载。需要说明的是,可根据该目录下载到该目录下的所有内容,其中包括主代码、/install路径下的代码、/loader路径下的代码以及HDI文件对应的代码等。当下载该目录后,可获取需要编译的源代码。In one embodiment, after obtaining the directory and the hardware number, the download module 603 can search for the corresponding directory on the storage server, so as to download the source code under the directory, and the source code under the directory is the source code to be compiled. code. Specifically, the source code and the corresponding compilation script can be downloaded through the pathon language. If the system is an SVN system, you can call the checkout function to download. It should be noted that all content in the directory can be downloaded according to the directory, including the main code, the code under the /install path, the code under the /loader path, and the code corresponding to the HDI file. After downloading this directory, you can get the source code that needs to be compiled.

当下载该目录后,服务器还可包括获取模块,用于从目录的/install子目录中获取到硬件号对应的配置文件(config.txt),其中,举例说明,该配置文件可具体包括如下内容:After downloading the directory, the server can also include an acquisition module, which is used to obtain the configuration file (config.txt) corresponding to the hardware number from the /install subdirectory of the directory, wherein, for example, the configuration file can specifically include the following content :

realtek/rtk2991/lollipop#Android编译环境的目录;realtek/rtk2991/lollipop#Android compilation environment directory;

Shark#主代码名称;Shark# main code name;

null#预留项;null#reserved items;

releasedtv.sh#编译脚本的名称。releasedtv.sh#The name of the compiled script.

编译模块604,用于将所述待编译源代码编译为能够支持所述硬件号的软件。The compiling module 604 is configured to compile the to-be-compiled source code into software capable of supporting the hardware number.

在一个实施例中,编译模块604可根据上述获取的配置文件中的编译信息对源代码进行编译。其中,编译环境目录(即编译平台),主代码名称等可通过服务器包括的读取模块读取配置文件获取到,而无需用户进行输入,进一步简化了用户的输入过程,降低了编译实务的概率。需要说明的是,每一个硬件号可对应一个配置文件,可均存放在/install子目录下,若用户选取的硬件号为all,则需要读取/install子目录中每个硬件号对应的配置文件。In one embodiment, the compiling module 604 can compile the source code according to the compiling information in the obtained configuration file. Among them, the compilation environment directory (that is, the compilation platform), the name of the main code, etc. can be obtained by reading the configuration file through the reading module included in the server, without the need for user input, which further simplifies the user input process and reduces the probability of compilation practice . It should be noted that each hardware number can correspond to a configuration file, which can be stored in the /install subdirectory. If the hardware number selected by the user is all, you need to read the configuration corresponding to each hardware number in the /install subdirectory. document.

可选的,本发明实施例还可在编译的过程中将编译结果信息通过发送模块发送至客户端,从而可使客户端实时显示编译结果,便与开发人员进行监测。Optionally, the embodiment of the present invention can also send the compilation result information to the client through the sending module during the compilation process, so that the client can display the compilation result in real time for monitoring with the developer.

本发明实施例中,服务器端可根据客户端传输的目录及硬件号便可完成对源代码的编译操作。简化了用户在编译过程中的输入操作,优化了编译过程的自动化程度。In the embodiment of the present invention, the server can complete the compiling operation of the source code according to the directory and the hardware number transmitted by the client. It simplifies the user's input operation in the compilation process, and optimizes the automation degree of the compilation process.

请参阅图7及图8,其中,图7是一种编译信息输入框的显示示意图,而图8是本发明实施例提供的一种编译信息输入框的显示示意图,图8可由上述实施例所述方式实现。下面具体对图7及图8进行比较说明。Please refer to FIG. 7 and FIG. 8, wherein, FIG. 7 is a schematic display of a compilation information input box, and FIG. 8 is a schematic display of a compilation information input box provided by an embodiment of the present invention. FIG. implemented in the manner described above. 7 and 8 will be specifically compared and described below.

在图7中,由于开发者在编写代码时每个部分代码所对应的目录分散,导致用户在进行编译时,需要输入多个目录地址,并且还需要手动输入软件编译平台、硬件号、编译脚本、tag名称等多种信息。而在图8中,可将所有源代码存放在一个目录下,并且目录名称可体现源代码的版本号,并通过下拉菜单的方式进行显示,其中,在图8-1中,目录在显示框内可默认显示初始版本或最新版本,在图8-2中,硬件号在显示框内可默认显示所有硬件号,即all。如图所示,用户无需进行手动输入编译信息,即可使编译系统完成自动化编译,简化了用户在编译过程中的输入操作,优化了编译过程的自动化程度。In Figure 7, since the directories corresponding to each part of the code are scattered when the developer writes the code, the user needs to enter multiple directory addresses when compiling, and also needs to manually enter the software compilation platform, hardware number, and compilation script. , tag name and other information. In Figure 8, all source codes can be stored in one directory, and the directory name can reflect the version number of the source code, and can be displayed through the drop-down menu, wherein, in Figure 8-1, the directory is displayed in the display box The initial version or the latest version can be displayed by default. In Figure 8-2, the hardware number can display all hardware numbers by default in the display box, that is, all. As shown in the figure, the compilation system can complete automatic compilation without the need for the user to manually input compilation information, which simplifies the input operation of the user during the compilation process and optimizes the automation of the compilation process.

请参阅图9,图9是本发明实施例提供的一种编译系统的结构示意图。其中,编译系统可包括存储服务器901、至少一个客户端902及至少一个编译服务器903。Please refer to FIG. 9 . FIG. 9 is a schematic structural diagram of a compiling system provided by an embodiment of the present invention. Wherein, the compiling system may include a storage server 901 , at least one client 902 and at least one compiling server 903 .

存储服务器901可作为多个客户端的版本库,并可与每个客户端建立不同的访问权限,可支持客户端902对版本库中数据的上传及下载;也可支持编译服务器903对版本库中数据的下载。客户端902可与用户进行交互,接收用户输入的信息,其中,可通过输入模块包括键盘、鼠标等接收用户输入的信息,并可与编译服务器903及存储服务器901建立通信连接,进行用户输入的数据传输。编译服务器903可通过TCP/IP传输协议与客户端902建立通信连接,在建立通信连接后,可接收客户端902传输的数据,并根据客户端902传输的目录数据对存储服务器进行访问,从而下载到待编译源代码,并可根据客户端902传输的硬件号,建立不同的编译环境,采取不同的编译方式,从而可使软件集成化,并能够适应不同的硬件配置。简化了用户在编译过程中的输入操作,优化了编译过程的自动化程度。The storage server 901 can be used as a version library of multiple clients, and can establish different access rights with each client, and can support the upload and download of data in the version library by the client 902; Download of data. The client 902 can interact with the user and receive the information input by the user, wherein the information input by the user can be received through an input module including a keyboard, a mouse, etc., and can establish a communication connection with the compiling server 903 and the storage server 901 to perform user input. data transmission. The compiling server 903 can establish a communication connection with the client 902 through the TCP/IP transmission protocol. After the communication connection is established, it can receive the data transmitted by the client 902, and access the storage server according to the catalog data transmitted by the client 902, thereby downloading To the source code to be compiled, and according to the hardware number transmitted by the client 902, different compilation environments can be established, and different compilation methods can be adopted, so that the software can be integrated and can adapt to different hardware configurations. It simplifies the user's input operation in the compilation process, and optimizes the automation degree of the compilation process.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative effort.

本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the methods of the embodiments of the present invention can be adjusted, combined and deleted according to actual needs.

本发明实施例装置中的模块或单元可以根据实际需要进行合并、划分和删减。The modules or units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs.

本发明实施例的模块或模块,可以以通用集成电路(如中央处理器CPU),或以专用集成电路(ASIC)来实现。The modules or modules in the embodiments of the present invention can be realized by a general-purpose integrated circuit (such as a central processing unit CPU) or by an application-specific integrated circuit (ASIC).

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the implementations, those skilled in the art can clearly understand that each implementation can be implemented by means of software plus a necessary general hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.

以上所述的实施方式,并不构成对该技术方案保护范围的限定。任何在上述实施方式的精神和原则之内所作的修改、等同替换和改进等,均应包含在该技术方案的保护范围之内。The implementation methods described above do not constitute a limitation to the scope of protection of the technical solution. Any modifications, equivalent replacements and improvements made within the spirit and principles of the above implementation methods shall be included in the protection scope of the technical solution.

Claims (10)

1. a Compilation Method for source code, is characterized in that, comprising:
Display is chosen to point out user for the catalogue set of depositing source code;
When getting a catalogue in the described catalogue set that user chooses, the hardware supported of the version showing the source code under described catalogue is number to point out user to choose;
Described catalogue user chosen and hardware number are sent to compiler server, to make described compiler server download source code to be compiled from the described catalogue of storage server, and are the software can supporting described hardware number by described compilation of source code to be compiled.
2. method as claimed in claim 1, is characterized in that, described display for the catalogue set of depositing source code with point out user choose before also comprise:
The composite catalog depositing described source code is read in storage server from the configuration file be associated with source code;
Obtain the sub-directory set under described composite catalog, wherein, under different sub-directories, deposit the source code of different editions;
Wherein, described display is carried out choosing comprising to point out user for the catalogue set of depositing source code:
Show described sub-directory set to choose to point out user.
3. method as claimed in claim 2, is characterized in that, the described described catalogue user chosen and hardware number also comprise before being sent to compiler server:
The port information of compiler server is read from described configuration file;
The compiler server corresponding with described port information establishes a communications link.
4. method as claimed in claim 3, is characterized in that, the described described catalogue user chosen and hardware number are sent to compiler server, comprising:
Catalogue user chosen and hardware number are combined into the string data meeting host-host protocol;
Described string data is sent to described compiler server.
5. any one method as described in claim 1-4, is characterized in that, the described described catalogue user chosen and hardware number also comprise after being sent to compiler server:
Receive the compiling object information that described compiler server sends;
Described compiling object information is shown in information output box.
6. a client, is characterized in that, comprising:
First display module, chooses to point out user for the catalogue set shown for depositing source code;
Second display module, for when getting a catalogue in the described catalogue set that user chooses, the hardware supported of the version showing the source code under described catalogue is number to point out user to choose;
Sending module, compiler server is sent to for the described catalogue user chosen and hardware number, to make described compiler server download source code to be compiled from the described catalogue of storage server, and be the software can supporting described hardware number by described compilation of source code to be compiled.
7. client as claimed in claim 6, is characterized in that, also comprise:
Read module, for reading in storage server the composite catalog depositing described source code from the configuration file be associated with source code;
Acquisition module, for obtaining the sub-directory set under described composite catalog, wherein, deposits the source code of different editions under different sub-directories;
Wherein, described first display module also for:
Show described sub-directory set to choose to point out user.
8. client as claimed in claim 7, is characterized in that,
Described read module also for reading the port information of compiler server from described configuration file;
Described client also comprises:
Link block, before being sent to compiler server for the described catalogue user chosen at described sending module and hardware number, the compiler server corresponding with the port information that described read module reads establishes a communications link.
9. client as claimed in claim 8, it is characterized in that, described sending module comprises:
Assembled unit, is combined into for the catalogue user chosen and hardware number the string data meeting host-host protocol;
Transmitting element, for being sent to described compiler server by described string data.
10. client as described in claim 6-9 any one, is characterized in that, also comprise:
Receiver module, after being sent to compiler server, receives the compiling object information that described compiler server sends for the described catalogue user chosen at described sending module and hardware number;
3rd display module, for showing described compiling object information in information output box.
CN201510885903.7A 2015-12-03 2015-12-03 Compiling method of source code and related equipment Pending CN105511933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510885903.7A CN105511933A (en) 2015-12-03 2015-12-03 Compiling method of source code and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510885903.7A CN105511933A (en) 2015-12-03 2015-12-03 Compiling method of source code and related equipment

Publications (1)

Publication Number Publication Date
CN105511933A true CN105511933A (en) 2016-04-20

Family

ID=55719940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510885903.7A Pending CN105511933A (en) 2015-12-03 2015-12-03 Compiling method of source code and related equipment

Country Status (1)

Country Link
CN (1) CN105511933A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648812A (en) * 2016-08-31 2017-05-10 上海锐鸿通信技术有限公司 Method and system of automatic compilation
CN106992980A (en) * 2017-03-30 2017-07-28 南京维能信息技术有限公司 A kind of gateway translation-protocol teaching method and device based on Internet of Things
CN107145377A (en) * 2017-03-17 2017-09-08 广州视源电子科技股份有限公司 Software compiling method and system
CN107678752A (en) * 2017-08-31 2018-02-09 北京百度网讯科技有限公司 A kind of task processing method and device towards isomeric group
CN108984183A (en) * 2018-08-28 2018-12-11 郑州云海信息技术有限公司 A kind of software cross-region construction method, device, equipment and storage medium
CN109558121A (en) * 2018-11-26 2019-04-02 上海达梦数据库有限公司 Development approach, device, equipment and the storage medium of interface drive program
CN110502239A (en) * 2019-08-19 2019-11-26 武汉蓝星科技股份有限公司 A kind of method for developing and producing and device of onboard system SDK
CN110908666A (en) * 2019-10-31 2020-03-24 北京浪潮数据技术有限公司 Source code sharing management method, device, equipment and computer storage medium
CN111045680A (en) * 2019-10-31 2020-04-21 天地(常州)自动化股份有限公司 Generation method of static link library file with configurable parameters
CN111145764A (en) * 2019-12-26 2020-05-12 苏州思必驰信息科技有限公司 Source code compiling method, device, equipment and medium
CN111273912A (en) * 2020-01-19 2020-06-12 深圳创维-Rgb电子有限公司 A method for allocating an independent environment, an intelligent terminal and a storage medium
CN112130858A (en) * 2019-06-25 2020-12-25 深圳Tcl新技术有限公司 Code compiling method and compiling server
CN114168184A (en) * 2021-11-24 2022-03-11 北京五八信息技术有限公司 Data sending method and device, electronic equipment and readable storage medium
WO2024041135A1 (en) * 2022-08-22 2024-02-29 华为技术有限公司 Compilation method, compiler, computing device, and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5881289A (en) * 1996-11-26 1999-03-09 Hewlett-Packard Company Remote compiling of source code for cross development
US20050120340A1 (en) * 2003-12-01 2005-06-02 Skazinski Joseph G. Apparatus, system, and method for automated generation of embedded systems software
CN101276279A (en) * 2008-05-21 2008-10-01 天柏宽带网络科技(北京)有限公司 Unified development system and method
US20110154305A1 (en) * 2009-07-31 2011-06-23 Leroux Brian System and method for remotely compiling multi-platform native applications for mobile devices
CN102143224A (en) * 2011-01-25 2011-08-03 张金海 Mobile phone Internet accessing-based user behavior analysis method and device
US20120204162A1 (en) * 2011-02-08 2012-08-09 Nokia Corporation Methods and apparatuses for facilitating execution of applications requiring runtime compilation
CN103530137A (en) * 2013-11-05 2014-01-22 中国联合网络通信集团有限公司 Java web application deploying method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5881289A (en) * 1996-11-26 1999-03-09 Hewlett-Packard Company Remote compiling of source code for cross development
US20050120340A1 (en) * 2003-12-01 2005-06-02 Skazinski Joseph G. Apparatus, system, and method for automated generation of embedded systems software
CN101276279A (en) * 2008-05-21 2008-10-01 天柏宽带网络科技(北京)有限公司 Unified development system and method
US20110154305A1 (en) * 2009-07-31 2011-06-23 Leroux Brian System and method for remotely compiling multi-platform native applications for mobile devices
CN102143224A (en) * 2011-01-25 2011-08-03 张金海 Mobile phone Internet accessing-based user behavior analysis method and device
US20120204162A1 (en) * 2011-02-08 2012-08-09 Nokia Corporation Methods and apparatuses for facilitating execution of applications requiring runtime compilation
CN103530137A (en) * 2013-11-05 2014-01-22 中国联合网络通信集团有限公司 Java web application deploying method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙更新,宾晟,宫生文: "《Java程序开发大全 基于MyEclipse平台+Struts+Hibernate+Spring主流框架开发》", 31 August 2010 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648812A (en) * 2016-08-31 2017-05-10 上海锐鸿通信技术有限公司 Method and system of automatic compilation
CN107145377A (en) * 2017-03-17 2017-09-08 广州视源电子科技股份有限公司 Software compiling method and system
CN106992980A (en) * 2017-03-30 2017-07-28 南京维能信息技术有限公司 A kind of gateway translation-protocol teaching method and device based on Internet of Things
CN106992980B (en) * 2017-03-30 2020-03-17 南京维能信息技术有限公司 Gateway conversion protocol teaching method and device based on Internet of things
CN107678752A (en) * 2017-08-31 2018-02-09 北京百度网讯科技有限公司 A kind of task processing method and device towards isomeric group
US10977076B2 (en) 2017-08-31 2021-04-13 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for processing a heterogeneous cluster-oriented task
CN108984183A (en) * 2018-08-28 2018-12-11 郑州云海信息技术有限公司 A kind of software cross-region construction method, device, equipment and storage medium
CN109558121A (en) * 2018-11-26 2019-04-02 上海达梦数据库有限公司 Development approach, device, equipment and the storage medium of interface drive program
CN109558121B (en) * 2018-11-26 2022-03-11 上海达梦数据库有限公司 Interface driver development method, device, equipment and storage medium
CN112130858A (en) * 2019-06-25 2020-12-25 深圳Tcl新技术有限公司 Code compiling method and compiling server
CN110502239A (en) * 2019-08-19 2019-11-26 武汉蓝星科技股份有限公司 A kind of method for developing and producing and device of onboard system SDK
CN111045680B (en) * 2019-10-31 2022-05-06 天地(常州)自动化股份有限公司 Generation method of static link library file with configurable parameters
CN111045680A (en) * 2019-10-31 2020-04-21 天地(常州)自动化股份有限公司 Generation method of static link library file with configurable parameters
CN110908666A (en) * 2019-10-31 2020-03-24 北京浪潮数据技术有限公司 Source code sharing management method, device, equipment and computer storage medium
CN110908666B (en) * 2019-10-31 2022-03-22 北京浪潮数据技术有限公司 Source code sharing management method, device, equipment and computer storage medium
CN111145764A (en) * 2019-12-26 2020-05-12 苏州思必驰信息科技有限公司 Source code compiling method, device, equipment and medium
CN111273912A (en) * 2020-01-19 2020-06-12 深圳创维-Rgb电子有限公司 A method for allocating an independent environment, an intelligent terminal and a storage medium
CN111273912B (en) * 2020-01-19 2024-04-02 深圳创维-Rgb电子有限公司 A method for allocating independent environment, intelligent terminal and storage medium
CN114168184A (en) * 2021-11-24 2022-03-11 北京五八信息技术有限公司 Data sending method and device, electronic equipment and readable storage medium
WO2024041135A1 (en) * 2022-08-22 2024-02-29 华为技术有限公司 Compilation method, compiler, computing device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN105511933A (en) Compiling method of source code and related equipment
US9519654B2 (en) Method, device, processing center and system for desktop synchronization
CN106325847B (en) Method and device for acquiring application program function based on iOS platform
CN108920359B (en) Application program testing method and device, storage medium and electronic device
CN112835568A (en) A project construction method and device
CN113268245A (en) Code analysis method, device and storage medium
CN110716786B (en) Page display method, system and storage medium
CN111090423A (en) Webhook framework system and method for realizing active calling and event triggering
CN111666079B (en) Method, apparatus, system, device and computer readable medium for software upgrade
CN113485722A (en) Application program shelf loading method and processing method for application store and computer equipment
CN112732265A (en) Data processing method and related device
CN113094086B (en) Component integration method, device, computer readable storage medium and electronic equipment
CN116820445A (en) Front-end project deployment method and device based on VS Code
CN112783903B (en) Method and device for generating update log
CN113157348A (en) Game starting method and device, computer equipment and storage medium
CN113094085A (en) Component integration method and device, computer-readable storage medium and electronic equipment
CN112256326A (en) Information processing method, device, equipment and storage medium
CN110647331A (en) Method and device for acquiring development tool, storage medium, and electronic device
CN115080077B (en) Plug-in updating method, device, electronic device, system and storage medium
CN112306324B (en) Information processing method, apparatus, device and medium
CN112835609B (en) Method and device for modifying download address of dependent packet
CN111181836B (en) Message pushing method and device
US9207925B2 (en) Platform specific payload management
CN113326054A (en) Software deployment method and device, computer-readable storage medium and electronic equipment
US12216627B2 (en) Systems and methods for providing a database driver management architecture

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160420