IDE program publishing method and device, electronic equipment and storage medium
By remotely connecting to the target device and sending the corresponding instructions and source code of the target operating system, the cumbersome process of obtaining the packages of different operating systems in the prior art is solved, and a simplified package acquisition process is realized, which improves efficiency and accuracy.
Patent Information
- Application Number
- CN202411831874.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the process of obtaining program packages on different operating system devices is cumbersome, and requires manual input of operation instructions and downloading of packaging results, which leads to time-consuming and error-prone.
By remotely connecting to the target device, sending the corresponding instructions of the target operating system and the IDE project source code, so that the target device can be packaged or compiled under the target operating system, generating the target file, and publishing it to the host.
The process of obtaining packages from different operating system devices is simplified, the steps of manually entering operation instructions and downloading packaged results are reduced, efficiency is improved, and error rates are reduced.
Smart Images

Figure CN119759358A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a method, device, electronic device and storage medium for publishing an IDE program. Background Art
[0002] To adapt to the complexity of embedded development requirements, embedded development platforms (such as IDE) usually run on multiple devices using different types of operating systems. Based on the embedded development platform, programming development is carried out in different operating system environments, and then the programs completed in each operating system are packaged based on different operating commands in each operating system environment.
[0003] However, for the developed program, the operation instructions are input one by one on each device using a different operating system to package it, and then the program package is downloaded from each device using a different operating system, which makes the process of obtaining the program package from each device using a different operating system very cumbersome. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method, device, electronic device and storage medium for publishing an IDE program to simplify the process of obtaining program packages from various devices using different operating systems.
[0005] In a first aspect, the present application provides a method for publishing an IDE program, the method comprising:
[0006] Get the IDE project source code;
[0007] By remotely connecting to the target device, bind the target operating system used by the target device;
[0008] Based on a first input from a user, a first instruction corresponding to a target operating system is sent to a target device, so that the target device executes the first instruction and enters a packaging or compiling environment;
[0009] Based on the second input of the user, a second instruction corresponding to the target operating system and the IDE project source code are sent to the target device, so that the target device executes the second instruction, packages or compiles the source code, and generates a target file;
[0010] Get the target file from the target device and publish it to the host machine.
[0011] According to the IDE program publishing method of the present application, the first instruction and the second instruction corresponding to the target operating system and the IDE project source code are sent to the target device in sequence through a remote connection with the target device, so that the target device enters the packaging environment or compilation environment corresponding to the target operating system in sequence, packages or compiles the source code, generates a target file corresponding to the IDE project source code, obtains the target file from the target device and publishes it to the host machine, so that by sending remote instructions to the target device using the target operating system, the target device executes the instructions to package the IDE project source code in the packaging environment under the target operating system, so that there is no need to input the operation instructions one by one on each device using a different operating system for packaging, and then download and obtain the packaging results from each device using a different operating system, thereby simplifying the process of obtaining program packages from each device using a different operating system.
[0012] According to one embodiment of the present application, the target device executes the first instruction to enter the packaging or compilation environment, including:
[0013] According to the first instruction, automatically matching the target operating system environment corresponding to the packaging environment mode or automatically matching the target operating system environment corresponding to the compilation mechanism;
[0014] Enter the packaging environment according to the matched packaging environment entry method, or enter the compilation environment according to the matched compilation mechanism.
[0015] According to an embodiment of the present application, obtaining a target file from a target device and publishing it to a host machine includes:
[0016] Obtaining and displaying a target log sent by a target device; the target log is used to store information about the target device executing the second instruction;
[0017] When the target log indicates that the target device successfully executes the second instruction, based on a third input of the user, sending a third instruction to the target device so that the target device returns the target file;
[0018] Receive the target file and publish it to the host machine.
[0019] According to one embodiment of the present application, before binding the target operating system used by the target device by remotely connecting to the target device, the method further includes:
[0020] sending a fourth instruction to the target device;
[0021] receiving feedback information returned by the target device based on the fourth instruction;
[0022] Based on the feedback information, the operating system used by the target device is identified, and the target operating system is determined.
[0023] According to one embodiment of the present application, based on the login information of the target device, before remotely connecting to the target device and binding the target operating system used by the target device, the method further includes:
[0024] Based on the login information, a remote connection based on the secure shell protocol is established with the target device.
[0025] According to one embodiment of the present application, the method further includes:
[0026] The user's input is obtained through each target input component in the interface, and corresponding instructions or actions are generated according to the user's input.
[0027] In a second aspect, the present application provides a publishing platform for an IDE program, the platform comprising:
[0028] The first acquisition module is used to obtain the source code of the IDE project;
[0029] A binding module, used to bind a target operating system used by a target device by remotely connecting to the target device;
[0030] A first sending module, configured to send a first instruction corresponding to a target operating system to a target device based on a first input of a user, so that the target device executes the first instruction and enters a packaging or compiling environment;
[0031] A second sending module is used to send a second instruction corresponding to the target operating system and the IDE project source code to the target device based on a second input of the user, so that the target device executes the second instruction, packages or compiles the source code, and generates a target file;
[0032] The second acquisition module is used to acquire the target file from the target device and publish it to the host machine.
[0033] According to the publishing platform of the IDE program of the present application, the first instruction and the second instruction corresponding to the target operating system and the IDE project source code are sent to the target device in sequence through a remote connection with the target device, so that the target device enters the packaging environment or compilation environment corresponding to the target operating system in sequence, packages or compiles the source code, generates the target file corresponding to the IDE project source code, obtains the target file from the target device and publishes it to the host machine, so that by sending remote instructions to the target device using the target operating system, the target device executes the instructions to package the IDE project source code in the packaging environment under the target operating system, so that there is no need to input the operation instructions one by one on each device using a different operating system for packaging, and then download and obtain the packaging results from each device using a different operating system, thereby simplifying the process of obtaining program packages from each device using a different operating system.
[0034] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for publishing an IDE program as described in the first aspect above is implemented.
[0035] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for publishing an IDE program as described in the first aspect above.
[0036] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for publishing an IDE program as described in the first aspect above.
[0037] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0039] Figure 1 It is a flowchart of a method for packaging a program in the related art;
[0040] Figure 2 This is one of the flow charts of the method for publishing an IDE program provided in an embodiment of the present application;
[0041] Figure 3 This is the second flow chart of the method for publishing an IDE program provided in an embodiment of the present application;
[0042] Figure 4 This is the third flow chart of the method for publishing an IDE program provided in an embodiment of the present application;
[0043] Figure 5 It is a structural diagram of a publishing platform for an IDE program provided in an embodiment of the present application;
[0044] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0046] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0047] In related technologies, such as Figure 1 As shown, after the developer completes the development of the IDE program, he manually copies the source code of the IDE program developed with a programming language with cross-platform capabilities (such as Python) to each device using a different operating system, such as a device using a Windows operating system, an Ubuntu operating system, and a Linux operating system, and manually enters the command corresponding to the operating system used by the device in each device in turn to enter the packaging environment under the operating system used by the device, and then enters the packaging command corresponding to the operating system to package the source code of the IDE program, and then manually copies the packaged program package to another device. In order to obtain the packaged program package of each different operating system, the developer needs to execute the above packaging process in each operating system, making the process of obtaining the program package from each device using a different operating system very cumbersome. And with the continuous development of the IDE program, the source code directory structure of the IDE program gradually becomes complex, and the structure of the source code of the IDE program is adjusted to a large extent. Executing the above packaging process makes the process of obtaining the program package from each device using a different operating system very time-consuming and prone to errors.
[0048] In conjunction with the accompanying drawings, the IDE program publishing method, IDE program publishing platform, electronic device and readable storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.
[0049] The method for publishing an IDE program may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.
[0050] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).
[0051] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.
[0052] The publishing method of the IDE program provided in the embodiment of the present application, the execution subject of the publishing method of the IDE program can be an electronic device or a functional module or functional entity in the electronic device that can implement the publishing method of the IDE program. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras and wearable devices, etc. The publishing method of the IDE program provided in the embodiment of the present application is described below using the electronic device as an execution subject as an example.
[0053] like Figure 2 As shown, the publishing method of the IDE program includes: step 210, step 220, step 230, step 240 and step 250.
[0054] Step 210: Obtain IDE project source code.
[0055] Step 220: remotely connect to the target device to bind the target operating system used by the target device.
[0056] In actual execution, a remote connection may be established with the target device based on login information of the target device; the login information may include an IP address, a user name, and a password of the target device.
[0057] In actual execution, the login information of the target device can be obtained based on the target platform, which can be a visual packaging platform or a program that performs a visual packaging function. In some embodiments, the login information of the target device input by the user can be obtained based on the target platform, and a remote connection is made with the target device based on the login information of the target device.
[0058] In some embodiments, the login information of the target device input by the user may be obtained based on a target component in the target platform. The target component may be an input box for obtaining the login information of the target device input by the user.
[0059] In actual execution, the target platform can run on a device using any operating system, and the device can be remotely connected to the target device based on the target platform. The device can also be remotely connected to multiple devices using different operating systems based on the target platform. The device can be a PC or a mobile terminal. For example, the device can be a computer, a mobile phone, a tablet computer, or any theoretically feasible device, and this application does not make specific restrictions on this.
[0060] In some embodiments, the target platform may include a target configuration file, which may include configuration rules corresponding to each operating system in various operating systems, and the configuration rules may include the way in which the operating system starts the packaging environment, the compilation parameters of the packaging command, and the location of the packaging result after the packaging command is executed. The target configuration file may be in XML format, or in EXCEL format, or in any theoretically feasible format, and this application does not impose specific restrictions on this.
[0061] In some embodiments, the login information of the target device may include the IP address, username and password of the target device. After obtaining the IP address, username and password of the target device, a remote connection can be made to the target device based on a target protocol, which may be a Secure SHell (SSH) protocol.
[0062] In actual execution, after establishing a remote connection with the target device, the type of operating system used by the target device can be obtained based on the remote connection, such as any operating system such as Windows operating system, Ubuntu operating system or Linux operating system.
[0063] In some embodiments, a binding relationship similar to registration can be established between the target device and the target platform based on the login information of the target device to complete the remote connection with the target device. Based on the target platform, an instruction to obtain information about the operating system used by the target device can be sent to the target device through the remote connection, and the operating system used by the target device can be determined based on the information fed back by the target device.
[0064] Step 230: Based on the first input of the user, a first instruction corresponding to the target operating system is sent to the target device, so that the target device executes the first instruction and enters a packaging or compiling environment.
[0065] In actual execution, the user's first input can be obtained based on the target platform, and based on the obtained first input, a first instruction corresponding to the target operating system is sent to the target device. The first instruction can be an instruction instructing the target device to enter the packaging environment under the target operating system.
[0066] In some embodiments, the first input of the user can be obtained based on the target component on the target platform, and the target component can be a button, an input box, a drop-down menu or other theoretically feasible forms in the interface. After obtaining the first input of the user, the first instruction corresponding to the target operating system can be determined based on the target configuration file on the target platform, and the first instruction corresponding to the target operating system can be sent to the target device, so that the target device executes the first instruction and enters the packaging environment.
[0067] Step 240: Based on the second input of the user, a second instruction corresponding to the target operating system and the IDE project source code are sent to the target device, so that the target device executes the second instruction, packages or compiles the source code, and generates a target file.
[0068] In some embodiments, the IDE project source code may be first obtained based on the user's input operation, and the user's input operation may be an operation of importing the IDE project source code. After obtaining the IDE project source code, based on the user's second input, a second instruction corresponding to the target operating system and the IDE project source code are sent to the target device, so that the target device executes the second instruction, packages or compiles the source code, and generates a target file corresponding to the IDE project source code.
[0069] In actual execution, the user's second input can be obtained based on the target platform, and based on the obtained second input, a second instruction corresponding to the target operating system is sent to the target device. The second instruction can be an instruction instructing the target device to package or compile the IDE project source code in the packaging environment of the target operating system.
[0070] In some embodiments, the second input of the user can be obtained based on the target component on the target platform, and the target component can be a button or other theoretically feasible forms. After obtaining the second input of the user, the second instruction corresponding to the target operating system can be determined based on the target configuration file on the target platform, and the second instruction corresponding to the target operating system can be sent to the target device, so that the target device executes the second instruction, packages or compiles the source code, and generates a target file corresponding to the IDE project source code.
[0071] Step 250: Obtain the target file from the target device and publish it to the host machine.
[0072] In actual execution, the target file may be a program package file generated by packaging the IDE project source code in the target operating environment. The target file may be obtained from the target device based on a remote connection with the target device.
[0073] In some embodiments, after sending the second instruction to the target device, a target log of the target device may be obtained, and based on the record information in the target log, it is determined whether to obtain the target file from the target device.
[0074] According to the publishing method of the IDE program provided in the embodiment of the present application, the first instruction and the second instruction corresponding to the target operating system and the IDE project source code are sent to the target device in sequence through a remote connection with the target device, so that the target device enters the packaging environment or compilation environment corresponding to the target operating system in sequence, packages or compiles the source code, generates the target file corresponding to the IDE project source code, obtains the target file from the target device and publishes it to the host machine, so that by sending remote instructions to the target device using the target operating system, the target device executes the instructions to package the IDE project source code in the packaging environment under the target operating system, so that there is no need to input the operation instructions one by one on each device using a different operating system for packaging, and then download and obtain the packaging results from each device using a different operating system, thereby simplifying the process of obtaining program packages from each device using a different operating system.
[0075] In some embodiments, a first input from a user directed to a first target component in a first interface may be received; in response to the first input, a first instruction corresponding to a target operating system may be determined; and the first instruction may be sent to a target device.
[0076] In actual execution, the first interface may be an interface on the target platform for obtaining a user instruction to send a first instruction, and the first interface may include a first target component, which may be a button. When the user clicks the first target component on the first interface, a first input is received, and in response to the first input, a first instruction corresponding to the target operating system is determined; and the first instruction is sent to the target device.
[0077] In some embodiments, when the first input is received, a first instruction corresponding to the target operating system can be determined based on a configuration file on the target platform. The first instruction corresponding to the target operating system can be an instruction instructing the target device to enter a packaging environment under the target operating system.
[0078] In actual execution, the target platform may include a target configuration file, which may include configuration rules corresponding to each operating system in various operating systems, and the configuration rules may include a method for the operating system to start the packaging environment, compilation parameters of the packaging command, and the location of the packaging result after the packaging command is executed, etc. When the first input is received, based on the type of the target operating system, the method for the target operating system to start the packaging environment may be determined from various methods for starting the packaging environment of the operating system pre-stored in the target configuration file, so as to generate a first instruction for entering the packaging environment of the target operating system.
[0079] In some embodiments, the first instruction may be sent to the target device based on a remote connection with the target device.
[0080] In some embodiments, according to the first instruction, the packaging environment entry method corresponding to the target operating system environment or the compilation mechanism corresponding to the target operating system environment can be automatically matched; the packaging environment is entered according to the matched packaging environment entry method, or the compilation environment is entered according to the matched compilation mechanism.
[0081] In actual execution, the packaging environment entry method corresponding to the target operating system environment can be automatically matched according to the first instruction, and the packaging environment corresponding to the target operating system is entered based on the matched packaging environment entry method.
[0082] In actual execution, the compilation mechanism corresponding to the target operating system environment can be automatically matched according to the first instruction, and based on the matched compilation mechanism, the compilation environment corresponding to the target operating system is entered.
[0083] According to the publishing method of the IDE program provided in the embodiment of the present application, after establishing a remote connection with the target device, a first instruction corresponding to the target operating system is sent to the target device through the remote connection, so that the target device executes an operation to enter the packaging environment of the target operating system, and then generates a target file corresponding to the IDE project source code, and obtains the target file from the target device, so that by sending a remote instruction to the target device using the target operating system, the target device executes the instruction to perform an operation of packaging the source code in the packaging environment under the target operating system, so that there is no need to enter the operation instructions one by one on each device using a different operating system for packaging, and then download and obtain the packaging results from each device using a different operating system, thereby simplifying the process of obtaining program packages from each device using a different operating system.
[0084] In some embodiments, a second input from a user directed to a second target component in a second interface may be received; in response to the second input, a second instruction corresponding to the target operating system may be determined; and the second instruction may be sent to the target device.
[0085] In actual execution, the second interface may be an interface on the target platform for obtaining user instructions to send the second instruction, and the second interface may include a second target component, which may be a button. When the user clicks the second target component on the second interface, the second input is received, and in response to the second input, the second instruction corresponding to the target operating system is determined; and the second instruction is sent to the target device.
[0086] In some embodiments, when a second input is received, a second instruction corresponding to the target operating system can be determined based on a target configuration file on the target platform. The second instruction corresponding to the target operating system can be an instruction instructing the target device to package the IDE project source code in a packaging environment of the target operating system.
[0087] In actual execution, the target platform may include a target configuration file, which may include configuration rules corresponding to each operating system in various operating systems, and the configuration rules may include the way in which the operating system starts the packaging environment, the compilation parameters of the packaging command, and the location of the packaging result after executing the packaging command, etc. When the second input is received, the compilation parameters of the packaging command corresponding to the target operating system may be determined from the compilation parameters of the packaging commands of various operating systems pre-stored in the target configuration file based on the type of the target operating system, so as to generate a second instruction for instructing the target operating system to package the IDE project source code.
[0088] In some embodiments, the second instruction may be sent to the target device based on a remote connection with the target device.
[0089] According to the publishing method of the IDE program provided in the embodiment of the present application, after establishing a remote connection with the target device, a second instruction corresponding to the target operating system is sent to the target device through the remote connection, so that the target device performs a packaging operation on the IDE project source code, generates a target file, and obtains the target file from the target device, so that by sending a remote instruction to the target device using the target operating system, the target device executes the instruction to perform an operation of packaging the source code in a packaging environment under the target operating system, so that the developer does not need to pay attention to the complex commands of each operating system, but automatically determines the second instruction corresponding to the target operating system and sends it to the target device, and the target device performs a packaging operation based on the second instruction, thereby improving the fault tolerance of packaging the IDE project source code.
[0090] In some embodiments, a target log sent by a target device can be obtained and displayed; the target log is used to store information about the target device executing a second instruction; when the target log indicates that the target device successfully executes the second instruction, based on a third input from a user, a third instruction is sent to the target device so that the target device returns a target file; the target file is received and published to a host machine.
[0091] In actual execution, the target log may include an execution status of the target device executing the second instruction under the target operating system, and the execution status may include that the target device successfully executes the second instruction, or that the target device fails to execute the second instruction.
[0092] In actual execution, the user's third input can be obtained based on the target platform, and based on the obtained third input, a third instruction corresponding to the target operating system is sent to the target device. The third instruction can be an instruction instructing the target device to send the target file and publish the target file to the host machine.
[0093] In some embodiments, the third input of the user can be obtained based on the target component on the target platform, and the target component can be a button or other theoretically feasible forms. After obtaining the third input of the user, the third instruction corresponding to the target operating system can be determined based on the target file on the target platform, and the third instruction corresponding to the target operating system can be sent to the target device, so that the target device executes the third instruction, sends the target file, and publishes the target file to the host machine.
[0094] According to the IDE program publishing method provided in the embodiment of the present application, a second instruction corresponding to the target operating system is sent to the target device through a remote connection, so that the target device packages the IDE project source code and generates a target file. When the target log indicates that the target device has successfully executed the second instruction, a third instruction is sent to the target device based on a third input from the user, so that the target device returns the target file; the target file is received from the target device, and there is no need to manually download the target file from the target device where the target operating system is located, thereby simplifying the process of obtaining program packages from devices using different operating systems.
[0095] In some embodiments, a third input from a user directed to a third target component in a third interface may be received; and in response to the third input, a third instruction corresponding to the target operating system is determined.
[0096] In actual execution, the third interface may be an interface on the target platform for obtaining a user trigger to send the third instruction, and the third interface may include a third target component, which may be a button. When the user clicks the third target component on the third interface, a third input is received, and in response to the third input, a third instruction corresponding to the target operating system is determined; and the third instruction is sent to the target device.
[0097] In some embodiments, when the third input is received, a third instruction corresponding to the target operating system may be determined based on the target file on the target platform, and the third instruction corresponding to the target operating system may be an instruction instructing the target device to send the target file.
[0098] In actual execution, the target platform may include a target file, and the target file may include configuration rules corresponding to each operating system in various operating systems, and the configuration rules may include the mode of starting the packaging environment of the operating system, the compilation parameters of the packaging command, and the location of the packaging result after executing the packaging command, etc. In the case of receiving the third input, based on the type of the target operating system, the location of the packaging result after executing the packaging command of various operating systems pre-stored in the target file can be determined, so as to generate a third instruction for instructing the target operating system to send the target file.
[0099] In some embodiments, the third instruction may be sent to the target device based on a remote connection with the target device.
[0100] According to the publishing method of the IDE program provided in the embodiment of the present application, after the target file is generated, when the target log indicates that the target device has successfully executed the second instruction, a third instruction is sent to the target device based on a third input from the user, so that the target device returns the target file; the target file is received in a manner to obtain the target file from the target device, without manually downloading the target file from the target device where the target operating system is located, thereby simplifying the process of obtaining program packages from devices using different operating systems.
[0101] In some embodiments, in step 220, before remotely connecting to the target device and binding the target operating system used by the target device, a fourth instruction may be sent to the target device; feedback information returned by the target device based on the fourth instruction may be received; and based on the feedback information, the operating system used by the target device may be identified to determine the target operating system.
[0102] In actual execution, a fourth instruction may be sent to the target device based on the target platform, and the fourth instruction may be an instruction instructing the target device to feedback information about the operating system used by the target device. The feedback information may include information about the operating system used by the target device, such as the operating system type, operating system version, and other information.
[0103] In actual execution, the operating system used by the target device, such as Linux, can be identified based on the operating system type, operating system version and other information included in the feedback information, and the operating system elsewhere can be determined as the target operating system.
[0104] In actual execution, the device where the target platform is located can send a fourth instruction to the target device, and the fourth instruction can be an instruction including a uname instruction for obtaining the type of operating system used by the target device. After receiving the feedback information including the type information of the target operating system used sent by the target device, the target operating system type information is matched with the configuration information in the target configuration file built into the target platform to obtain the way in which the target operating system enters the packaging environment in the target operating system and the command line for executing the packaging command in the target operating system. In some embodiments, based on the way to enter the packaging environment in the target operating system, a first instruction for triggering the target device to enter the packaging environment under the target operating system can be generated. In some embodiments, based on the command line for executing the packaging command in the target operating system, a second instruction for triggering the target device to perform a packaging operation on the IDE project source code in the packaging environment of the target operating system can be generated.
[0105] According to the publishing method of the IDE program provided in the embodiment of the present application, a fourth instruction can be sent to the target device; feedback information returned by the target device based on the fourth instruction is received; based on the feedback information, the operating system used by the target device is identified, the target operating system is determined, and the first instruction and the second instruction corresponding to the target operating system are sent to the target device, so that the developer does not need to pay attention to the complex commands of each operating system, but automatically determines the second instruction corresponding to the target operating system and sends it to the target device, and the target device performs a packaging operation based on the second instruction, thereby improving the fault tolerance of packaging the IDE project source code.
[0106] In some embodiments, before remotely connecting to the target device based on the login information of the target device, a fourth input from the user for a fourth target component in the fourth interface may be received; the fourth input carries the login information.
[0107] In actual execution, the fourth input of the user can be obtained based on the fourth interface of the target platform, and the target device can be remotely connected based on the obtained fourth input. The fourth interface can include a fourth target component for obtaining the fourth input of the user, and the fourth target component can be in the form of an input box or a drop-down menu.
[0108] In actual execution, the user can enter the login information such as the IP address, user name and password of the target device in the fourth target component in the fourth interface of the target platform, and remotely connect to the target device based on the login information of the target device.
[0109] According to the publishing method of the IDE program provided in the embodiment of the present application, the login information carried in the fourth input of the user for the fourth target component in the fourth interface can be received, and a remote connection can be established with the target device, so that the first instruction and the second instruction corresponding to the target operating system and the IDE project source code are sent to the target device in sequence through the remote connection, and the target file corresponding to the IDE project source code is generated, and the target file is obtained from the target device, so that by sending remote instructions to the target device using the target operating system, the target device executes the instructions to package the source code in the packaging environment under the target operating system, so that there is no need to enter the operation instructions one by one on each device using a different operating system for packaging, and then download and obtain the packaging results from each device using a different operating system, thereby simplifying the process of obtaining program packages from each device using a different operating system.
[0110] In some embodiments, before sending the second instruction and the IDE project source code corresponding to the target operating system to the target device based on the second input of the user, the IDE project source code may be acquired in response to the fifth input of the user.
[0111] In actual execution, the fifth input of the user may be an input for obtaining the source code of the IDE project. In some embodiments, the fifth input of the user may be obtained based on the target platform. For example, based on the Get Source Code File component on the target platform, the IDE project source code is obtained locally.
[0112] According to the publishing method of the IDE program provided in the embodiment of the present application, in response to the fifth input of the user, the source code is obtained, so that after a remote connection is established with the target device, the first instruction and the second instruction corresponding to the target operating system and the IDE project source code are sent to the target device in sequence through the remote connection, and a target file corresponding to the IDE project source code is generated, so that the packaging result is obtained by sending remote instructions to the target device using the target operating system, and the target device executes the instructions to package the source code in a packaging environment under the target operating system, thereby simplifying the process of obtaining program packages from devices using different operating systems.
[0113] In some embodiments, a remote connection based on a secure shell (SSH) protocol may be established with a target device based on the login information.
[0114] In actual implementation, the SSH communication protocol has good security and flexibility. SSH not only supports remote login, but also supports file transfer (such as SCP, SFTP). Based on the target device's IP address, user name, password and other login information, a remote connection based on the secure shell protocol can be established with the target device.
[0115] According to the IDE program publishing method provided in the embodiment of the present application, based on the login information, a remote connection based on the Secure SHell (SSH) protocol is established with the target device to facilitate the transmission of instructions and files with the target device and the packaging environment of the target operating system used by the target device.
[0116] In some embodiments, the user's input may be obtained through various target input components in the interface of the target platform, and corresponding instructions may be generated or corresponding actions may be performed according to the user's input.
[0117] In order to better understand the publishing method of the IDE program provided in the embodiment of the present application, further explanation is given below. It should be understood that the discussion below is only exemplary.
[0118] This application provides a method for publishing an IDE program. The specific steps can be as follows: Figure 3 As shown:
[0119] Step 310: Build the target platform and obtain the IDE project source code.
[0120] In actual execution, the target platform can be a visual packaging platform, which may include an entry for importing IDE project source code, an entry for establishing a remote connection with the target device, a target configuration file, and other functional interfaces. Based on the entry for importing IDE project source code, the user can upload the IDE project source code to be packaged. The target configuration file may include configuration rules corresponding to each operating system in various operating systems, and the configuration rules may include the way the operating system starts the packaging environment, the compilation parameters of the packaging command, and the location of the packaging result after executing the packaging command.
[0121] In actual execution, the target platform can be implemented based on Java language, and SWT can be used as the basic visualization framework. The target platform can configure storage and parsing tools based on the Dom4j toolkit to store information such as full inspection version numbers and historical binding records.
[0122] Step 320: remotely connect to the target device based on the login information of the target device.
[0123] In actual execution, the login information of the target device can be obtained based on the target platform, and the login information can include the IP address, user name and password of the target device. In some embodiments, the login information of the target device input by the user can be obtained based on the target component in the target platform, and the target component can be an input box for obtaining the login information of the target device input by the user.
[0124] In some embodiments, a remote connection can be made with a target device based on a target protocol, and the target protocol can be a secure shell (Secure SHell, SSH) protocol. A remote connection based on the SSH protocol can be implemented based on a JSCH toolkit.
[0125] In actual execution, after establishing a remote connection with the target device, the type of operating system used by the target device can be obtained based on the remote connection, such as any operating system such as Windows operating system, Ubuntu operating system or Linux operating system.
[0126] In some embodiments, based on the target platform, an instruction for obtaining information about the operating system used by the target device may be sent to the target device through a remote connection, and the operating system used by the target device may be determined based on the information fed back by the target device.
[0127] Step 330: Based on the first input of the user, a first instruction corresponding to the target operating system is sent to the target device, so that the target device executes the first instruction and enters the packaging environment; the target operating system is the operating system used by the target device.
[0128] In actual execution, the user's first input can be obtained based on the target platform, and based on the obtained first input, a first instruction corresponding to the target operating system is sent to the target device. The first instruction can be an instruction for triggering the target device to enter a packaging environment or a compilation environment under the target operating system.
[0129] In some embodiments, the first input of the user can be obtained based on the target component on the target platform, and the target component can be a button or other theoretically feasible forms. After obtaining the first input of the user, the first instruction corresponding to the target operating system can be determined based on the target configuration file on the target platform, and the first instruction corresponding to the target operating system can be sent to the target device, so that the target device executes the first instruction and enters the packaging environment or the compilation environment.
[0130] In actual execution, the target platform may include a target configuration file, which may include configuration rules corresponding to each operating system in various operating systems, and the configuration rules may include a method for the operating system to start a packaging environment, compilation parameters of a packaging command, and the location of a packaging result after executing the packaging command, etc. When the first input is received, based on the type of the target operating system, a method for the target operating system to start a packaging environment may be determined from various methods for starting a packaging environment for the operating system pre-stored in the target configuration file, so as to generate a first instruction for triggering the target operating system to enter a packaging environment or a compilation environment.
[0131] In some embodiments, the target configuration file may be in XML format, or in EXCEL format, or in any theoretically feasible format, which is not specifically limited in this application. The content of the target configuration file may be as follows:
[0132]
[0133]
[0134] Step 340: Based on the second input of the user, a second instruction corresponding to the target operating system and the IDE project source code are sent to the target device, so that the target device executes the second instruction, packages the IDE project source code, and generates a target file corresponding to the IDE project source code.
[0135] In actual execution, the user's second input can be obtained based on the target platform, and based on the obtained second input, a second instruction corresponding to the target operating system is sent to the target device. The second instruction can be an instruction for triggering the target device to package the IDE project source code in the packaging environment of the target operating system.
[0136] In some embodiments, the second input of the user can be obtained based on the target component on the target platform, and the target component can be a button or other theoretically feasible forms. After obtaining the second input of the user, the compilation parameters of the packaging command corresponding to the target operating system can be determined from the compilation parameters of various operating system packaging commands pre-stored in the target file based on the type of the target operating system, so as to generate a second instruction for triggering the target operating system to package the source code of the IDE project source code, and send the second instruction corresponding to the target operating system to the target device, so that the target device executes the second instruction, packages the source code, and generates a target file corresponding to the IDE project source code.
[0137] Step 350: Obtain and display the target log sent by the target device; the target log is used to store information about the target device executing the second instruction.
[0138] In actual execution, the target log may include an execution status of the target device executing the second instruction under the target operating system, and the execution status may include that the target device successfully executes the second instruction, or that the target device fails to execute the second instruction.
[0139] In actual execution, the target log can be recorded based on the Log4j toolkit.
[0140] Step 360: When the target log indicates that the target device successfully executes the second instruction, based on a third input from the user, send a third instruction to the target device so that the target device returns the target file; and receive the target file.
[0141] In actual execution, the user's third input can be obtained based on the target platform, and based on the obtained third input, a third instruction corresponding to the target operating system is sent to the target device. The third instruction can be an instruction instructing the target device to send the target file and publish the target file to the host machine.
[0142] In some embodiments, the third input of the user can be obtained based on the target component on the target platform, and the target component can be a button or other theoretically feasible forms. After obtaining the third input of the user, the third instruction corresponding to the target operating system can be determined based on the target configuration file on the target platform, and the third instruction corresponding to the target operating system can be sent to the target device, so that the target device executes the third instruction, sends the target file, and publishes the target file to the host machine.
[0143] In some embodiments, a remote connection with a Windows operating system and a Linux operating system can be established through a target device, and an executable test file can be obtained based on the publishing method of the IDE program provided in any of the above embodiments to verify the publishing method of the above IDE program.
[0144] In some embodiments, the publishing method of the IDE program provided in any of the above embodiments can be implemented as follows: Figure 4 The release process of the IDE program shown:
[0145] After the developer completes the development of the IDE project source code, the IDE project source code is imported into the target platform. The target platform binds multiple devices using different operating systems (such as Ubuntu operating system and Linux operating system) to achieve remote connection with multiple devices using different operating systems. Based on the built-in configuration rules of the target platform, the command line for each operating system in each different operating system to enter the packaging environment and perform packaging operations is matched, and based on the remote connection, each operating system in each different operating system is instructed to execute the command line for entering the packaging environment and performing packaging operations accordingly, so as to generate a corresponding program package for each operating system in each different operating system. The program package can be the target file mentioned above. Based on the remote connection, the program package generated by each operating system in each different operating system is automatically obtained.
[0146] The embodiment of the present application also provides a publishing platform for IDE programs.
[0147] like Figure 5 As shown, the publishing platform 500 of the IDE program includes: a first acquisition module 510 , a binding module 520 , a first sending module 530 , a second sending module 540 and a second acquisition module 550 .
[0148] The first acquisition module 510 is used to acquire the source code of the IDE project;
[0149] A binding module 520 is used to bind a target operating system used by the target device by remotely connecting to the target device;
[0150] A first sending module 530 is used to send a first instruction corresponding to a target operating system to a target device based on a first input of a user, so that the target device executes the first instruction and enters a packaging or compiling environment;
[0151] The second sending module 540 is used to send a second instruction corresponding to the target operating system and the IDE project source code to the target device based on the second input of the user, so that the target device executes the second instruction, packages or compiles the source code, and generates a target file;
[0152] The second acquisition module 550 is used to acquire the target file from the target device and publish it to the host machine.
[0153] According to the publishing platform of the IDE program of the present application, the first instruction and the second instruction corresponding to the target operating system and the IDE project source code are sent to the target device in sequence through a remote connection with the target device, so that the target device enters the packaging environment or compilation environment corresponding to the target operating system in sequence, packages or compiles the source code, generates the target file corresponding to the IDE project source code, obtains the target file from the target device and publishes it to the host machine, so that by sending remote instructions to the target device using the target operating system, the target device executes the instructions to package the IDE project source code in the packaging environment under the target operating system, so that there is no need to input the operation instructions one by one on each device using a different operating system for packaging, and then download and obtain the packaging results from each device using a different operating system, thereby simplifying the process of obtaining program packages from each device using a different operating system.
[0154] In some embodiments, the first sending module 530 includes:
[0155] A matching unit, configured to automatically match a packaging environment entry mode corresponding to the target operating system environment or automatically match a compilation mechanism corresponding to the target operating system environment according to the first instruction;
[0156] The execution unit is used to enter the packaging environment according to the matched packaging environment entry method, or enter the compilation environment according to the matched compilation mechanism.
[0157] In some embodiments, the second acquisition module 550 includes:
[0158] An acquisition unit, used for acquiring and displaying a target log sent by a target device; the target log is used for storing information about the target device executing the second instruction;
[0159] a sending unit, configured to send a third instruction to the target device based on a third input of a user, so that the target device returns a target file, when the target log indicates that the target device successfully executes the second instruction;
[0160] The publishing unit is used to receive the target file and publish the target file to the host machine.
[0161] In some embodiments, the IDE program publishing device 500 includes:
[0162] A third sending module, used for sending a fourth instruction to the target device;
[0163] A receiving module, used for receiving feedback information returned by the target device based on the fourth instruction;
[0164] The determination module is used to identify the operating system used by the target device based on the feedback information and determine the target operating system.
[0165] In some embodiments, the IDE program publishing device 500 further includes:
[0166] The connection module is used to establish a remote connection based on the secure shell protocol with the target device based on the login information.
[0167] In some embodiments, the IDE program publishing device 500 further includes:
[0168] The generation module is used to obtain the user's input through each target input component in the interface, and generate corresponding instructions or perform corresponding actions according to the user's input.
[0169] The publishing platform of the IDE program in the embodiment of the present application can be deployed in an electronic device, or it can be a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
[0170] The publishing platform of the IDE program in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0171] The IDE program publishing platform 500 provided in the embodiment of the present application can realize Figures 2 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0172] In some embodiments, Figure 6As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the program is executed by the processor 601, each process of the above-mentioned IDE program publishing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0173] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0174] The embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned IDE program publishing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0175] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0176] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned IDE program publishing method when executed by a processor.
[0177] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0178] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned IDE program publishing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0179] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0180] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0181] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0182] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0183] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0184] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A method for publishing an IDE program, characterized in that: include: Get the IDE project source code; By remotely connecting to a target device, binding a target operating system used by the target device; Based on a first input from a user, sending a first instruction corresponding to a target operating system to the target device, so that the target device executes the first instruction and enters a packaging or compiling environment; Based on a second input from a user, sending a second instruction corresponding to the target operating system and the IDE project source code to the target device, so that the target device executes the second instruction, packages or compiles the source code, and generates a target file; The target file is obtained from the target device and published to the host machine.
2. The method for publishing an IDE program according to claim 1, characterized in that: The target device executes the first instruction and enters a packaging or compiling environment, including: According to the first instruction, automatically matching the target operating system environment corresponding to the packaging environment mode or automatically matching the target operating system environment corresponding to the compilation mechanism; Enter the packaging environment according to the matched packaging environment entry method, or enter the compilation environment according to the matched compilation mechanism.
3. The method for publishing an IDE program according to claim 1, characterized in that: The step of obtaining the target file from the target device and publishing it to the host machine includes: Obtaining and displaying a target log sent by the target device; the target log is used to store information about the target device executing the second instruction; When the target log indicates that the target device successfully executes the second instruction, based on a third input of a user, sending a third instruction to the target device so that the target device returns the target file; The target file is received and published to a host machine.
4. The method for publishing an IDE program according to claim 1, characterized in that: Before binding the target operating system used by the target device by remotely connecting to the target device, the method further includes: Sending a fourth instruction to the target device; receiving feedback information returned by the target device based on the fourth instruction; Based on the feedback information, an operating system used by the target device is identified, and the target operating system is determined.
5. The method for publishing an IDE program according to any one of claim 1, characterized in that: Before binding the target operating system used by the target device by remotely connecting to the target device, the method further includes: Based on the login information, a remote connection based on the secure shell protocol is established with the target device.
6. The method for publishing an IDE program according to any one of claims 1 to 5, characterized in that: The method further comprises: The user's input is obtained through each target input component in the interface, and corresponding instructions or actions are generated according to the user's input.
7. A publishing platform for IDE programs, characterized in that: include: The first acquisition module is used to obtain the source code of the IDE project; A binding module, used to bind a target operating system used by the target device by remotely connecting to the target device; A first sending module, configured to send a first instruction corresponding to a target operating system to the target device based on a first input of a user, so that the target device executes the first instruction and enters a packaging or compiling environment; A second sending module is used to send a second instruction corresponding to the target operating system and the IDE project source code to the target device based on a second input of the user, so that the target device executes the second instruction, packages or compiles the source code, and generates a target file; The second acquisition module is used to acquire the target file from the target device and publish it to the host machine.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for publishing the IDE program according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for publishing an IDE program as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for publishing an IDE program according to any one of claims 1 to 6 is implemented.