Multi-system software development data generation method and device, storage medium and electronic device
By analyzing software construction requests and using built-in projects of the software development platform to build platform products of HarmonyOS and other operating systems, the problem that existing technology cannot directly carry out software development of HarmonyOS projects is solved, and efficient compatibility of cross-platform development technology and applicability.
Patent Information
- Application Number
- CN202411594094.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-21
AI Technical Summary
The existing cross-platform development technology cannot directly develop the HarmonyOS project software, resulting in the limitation of the compatibility and applicability of cross-platform development technology.
By analyzing software construction requests, using built-in projects in the software development platform to build platform products for the target operating system, and storing platform products and configuration files into the development requirements dependency directory, and generating target development data based on system development tools.
It realizes automatic management and construction of projects with different operating system platforms, eliminating the tedious steps of project configuration and manual construction, greatly improving development efficiency, and solving the development compatibility problems of various operating systems such as HarmonyOS.
Smart Images

Figure CN119493555A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, and more specifically, to a method, device, storage medium and electronic device for generating multi-system software development data. Background Art
[0002] With the rapid development of mobile computing technology, cross-platform development technology has become an important branch in the field of software development. Especially with the opening of HarmonyOS (Hongmeng system), many Internet manufacturers have begun to contact applications adapted to the Hongmeng system. This poses new challenges to existing cross-platform development technologies. Because existing cross-platform development technologies usually rely on mature frameworks and tool chains, they can only support the development of project software for iOS and Android. However, due to its unique architecture, HarmonyOS is difficult to integrate with cross-platform development technology and has not yet been fully compatible with cross-platform development technology. Therefore, the current cross-platform development technology cannot directly develop Harmony OS project software, which also makes the implementation of cross-platform development technology including HarmonyOS an urgent need.
[0003] In the related technology, there is a technical solution on how to use cross-platform development technology to develop software for multiple operating systems including HarmonyOS and generate development data.
[0004] Regarding the technical issues of how to use cross-platform development technology to develop software for multiple operating systems including HarmonyOS and generate development data in related technologies, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method, device, storage medium and electronic device for generating multi-system software development data, so as to at least solve the technical problem in the related art of how to use cross-platform development technology to develop software for multiple operating systems including HarmonyOS, and generate development data.
[0006] According to one embodiment of the embodiments of the present application, a method for generating multi-system software development data is provided, including: parsing a software build request to obtain a software type contained in the software build request, wherein the software type corresponds to a target operating system among the different operating systems; using built-in projects in the software development platform to build a platform product for the target operating system; storing the platform product and the configuration files of the platform product in a development requirement dependency directory corresponding to the software type, and generating target development data according to a system development tool corresponding to the development requirement dependency directory.
[0007] In an exemplary embodiment, before using the built-in project in the software development platform to build a platform product for the target operating system, the method further includes: creating a project root directory, wherein the project root directory includes a project configuration file of the built-in project and a platform configuration file of the different operating system platforms, and the project root directory is used to provide an operating environment; executing the project configuration file of the built-in project in the operating environment to generate the built-in project.
[0008] In an exemplary embodiment, a platform product is constructed for the target operating system using built-in projects in the software development platform, including: determining a target platform configuration file for the target operating system platform from platform configuration files of the different operating system platforms; executing the target platform configuration file in the operating environment to generate the platform product for the target operating system platform, wherein the product types supported by the platform product include at least one of the following: static library files and dynamic library files.
[0009] In an exemplary embodiment, the software type is iOS software, the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and target development data is generated according to the system development tool corresponding to the development requirement dependency directory, including: determining the iOS platform corresponding to the iOS software, obtaining the first platform product built for the iOS platform, and calling the external interface of the built-in project to generate the configuration file of the first platform product; storing the first platform product and the configuration file of the first platform product in the first development requirement dependency directory corresponding to the iOS software; using the command line tool corresponding to the first development requirement dependency directory to run the first generated code to generate iOS development data.
[0010] In an exemplary embodiment, the software type is Android software, the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and target development data is generated according to the system development tool corresponding to the development requirement dependency directory, including: determining the Android platform corresponding to the Android software, obtaining a second platform product built for the Android platform and a configuration file of the second platform product; storing the second platform product and the configuration file of the second platform product in a second development requirement dependency directory corresponding to the Android software; using the Android system development tool corresponding to the second development requirement dependency directory to run the second generated code obtained by the first calling interface to generate Android development data, wherein the first calling interface is generated based on the external interface of the built-in project.
[0011] In an exemplary embodiment, the software type is Harmony OS software, the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and target development data is generated according to a system development tool corresponding to the development requirement dependency directory, including: determining a Harmony OS platform corresponding to the Harmony OS software, obtaining a third platform product built for the Harmony OS platform and a configuration file of the third platform product; generating a second calling interface corresponding to the Harmony OS platform based on an external interface of the built-in project, and generating an interface declaration file corresponding to the second calling interface; storing the third platform product, the configuration file of the third platform product and the interface declaration file in a third development requirement dependency directory corresponding to the Harmony OS software; and using the Harmony OS system development tool corresponding to the third development requirement dependency directory to run the third generated code obtained by the second calling interface to generate Harmony OS development data.
[0012] In an exemplary embodiment, before generating target development data according to the system development tool corresponding to the development requirement dependency directory, the method also includes: generating interface information of the target operating system platform according to the configuration file of the platform product; and determining the system development tool corresponding to the interface information from the preset system development tools.
[0013] According to another aspect of an embodiment of the present application, a device for generating multi-system software development data is also provided, including: a parsing module, used to parse a software build request to obtain a software type contained in the software build request, wherein the software type corresponds to a target operating system among the different operating systems; a building module, used to use built-in projects in the software development platform to build a platform product for the target operating system; a generating module, used to store the platform product and the configuration files of the platform product in a development requirement dependency directory corresponding to the software type, and generate target development data according to the system development tools corresponding to the development requirement dependency directory.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for generating multi-system software development data when running.
[0015] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for generating multi-system software development data through the computer program.
[0016] In an embodiment of the present application, a software build request is parsed to obtain a software type included in the software build request, wherein the software type corresponds to a target operating system among the different operating systems; a platform product is built for the target operating system using a built-in project in the software development platform; the platform product and a configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and target development data is generated according to a system development tool corresponding to the development requirement dependency directory. Development data for different operating system platforms can be automatically managed and constructed based on the software development platform, eliminating tedious steps such as project configuration and manual construction, greatly improving development efficiency, and solving technical problems in related technologies such as how to use cross-platform development technology to develop software for multiple operating systems including HarmonyOS and generate development data. Project software can be developed for multiple operating systems, thereby improving the compatibility and applicability of the software development platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a hardware environment diagram of a method for generating multi-system software development data in an embodiment of the present application;
[0020] Figure 2 is a flowchart of a method for generating multi-system software development data according to an embodiment of the present application;
[0021] Figure 3 is a timing diagram (I) of a method for generating multi-system software development data according to an embodiment of the present application;
[0022] Figure 4 is a timing diagram (II) of a method for generating multi-system software development data according to an embodiment of the present application;
[0023] Figure 5 is a timing diagram (III) of a method for generating multi-system software development data according to an embodiment of the present application;
[0024] Figure 6 is a timing diagram (IV) of a method for generating multi-system software development data according to an embodiment of the present application;
[0025] Figure 7 It is a structural block diagram of a device for generating multi-system software development data according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] According to one aspect of an embodiment of the present application, a method for generating multi-system software development data is provided. The method for generating multi-system software development data is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for generating multi-system software development data can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0029] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0030] In this embodiment, a method for generating multi-system software development data is provided, which is applied to the above-mentioned terminal device. Figure 2 : is a flowchart of a method for generating multi-system software development data according to an embodiment of the present application, the process comprising the following steps:
[0031] Step S202, parsing the software building request to obtain a software type included in the software building request, wherein the software type corresponds to a target operating system among the different operating systems;
[0032] It should be noted that the above-mentioned different operating system platforms include at least one of the following: Android system platform, iOS system platform and Harmony system platform.
[0033] Step S204, using the built-in projects in the software development platform to build a platform product for the target operating system;
[0034] Step S206: storing the platform product and the configuration file of the platform product in a development requirement dependency directory corresponding to the software type, and generating target development data according to a system development tool corresponding to the development requirement dependency directory.
[0035] Through the above steps, the software build request is parsed to obtain the software type contained in the software build request, wherein the software type corresponds to the target operating system among the different operating systems; the built-in projects in the software development platform are used to build a platform product for the target operating system; the platform product and the configuration files of the platform product are stored in the development requirement dependency directory corresponding to the software type, and the target development data is generated according to the system development tool corresponding to the development requirement dependency directory. Projects for different operating system platforms can be automatically managed and built based on the software development platform, eliminating tedious steps such as project configuration and manual construction, greatly improving development efficiency, and solving the technical problems in related technologies such as how to use cross-platform development technology to develop software for multiple operating systems including HarmonyOS and generate development data. Project software can be developed for multiple operating systems, thereby improving the compatibility and applicability of the software development platform.
[0036] Rust is a memory-safe development language, and its compiled products support running in multiple operating systems such as OpenHarmony (ohos, HarmonyOS NEXT kernel). Cargo, as a package management tool and build system for the Rust language, can simplify the dependency management, construction and release work in the Rust project development process. In this application, Cargo is used to implement a software development platform that can support cross-platform development of Android, iOS and OpenHarmony. In this process, Rust projects, iOS software projects, Android software projects and Harmony OS software projects can be automatically created, and then the dependence of each project on Rust products can be configured. Then use the Rust project to build iOS platform products, Android platform products, and ohos platform products respectively, and then generate cross-language interfaces for the corresponding platforms, and then realize the automatic generation of multi-operating system platform products through cross-language interfaces.
[0037] Optionally, this application can use the software development platform generated by Cargo mobile. Specifically, the subcommands of the Cargo command line tool are used to generate Rust Mobile Multiplatform, referred to as RMP, and the implementation code is, for example: "cargo rmp new projectName". Or "cargo rmp build[ios|android|ohos]".
[0038] Among them, Cargo mobile is a software development platform based on Cargo that manages Rust mobile cross-platform development. Mobile cross-platform projects created through Cargo mobile include Rust, Android, and iOS projects.
[0039] In this embodiment, a process of creating a cross-platform project using RMP is provided, such as Figure 3 As shown, the specific steps are as follows:
[0040] Step 1. Create a project root directory as the workspace for the entire project, which will include the Rust project, iOS software project, Android software project, and Harmony OS software project.
[0041] Step 2: Create a workspace configuration file.
[0042] Step 3: Initialize the workspace as a git repository and configure the ".gitignore" file of each project.
[0043] Step 4: Create a Rust project (i.e. a built-in project).
[0044] Step 5, check the environment variables, including whether Xcode, CommandLineTools, JDK, AndroidSDK, NDK are installed, etc.
[0045] Step 6: Configure the products of each platform for the Rust project. The iOS platform product is a static library .a file, and Android and Harmony are dynamic library .so files.
[0046] Step 7, create an iOS template project.
[0047] Step 7.1, configure the iOS project and add the Rust product dependency configuration to the iOS project (indicates building the dependency directory in advance).
[0048] Step 8, create an Android template project.
[0049] Step 8.1, configure the Android project and add the Rust product dependency configuration to the Android project.
[0050] Step 9, create a Harmony template project.
[0051] Step 9.1, configure the Harmony OS project and add the Rust product dependency configuration for the Harmony OS project.
[0052] Step 10: Generate build scripts for each end (Rust, iOS, Android, Harmony).
[0053] In an exemplary embodiment, before using the built-in project in the software development platform to build a platform product for the target operating system, a project root directory may be further created, wherein the project root directory includes a project configuration file of the built-in project and a platform configuration file of the different operating system platforms, and the project root directory is used to provide an operating environment; the project configuration file of the built-in project is executed in the operating environment to generate the built-in project. This embodiment can configure the operating environment in advance, so as to speed up the subsequent generation of the built-in project.
[0054] In an exemplary embodiment, the process of building a platform product for the target operating system using the built-in projects in the software development platform specifically includes: determining a target platform configuration file for the target operating system platform from platform configuration files of the different operating system platforms; executing the target platform configuration file in the operating environment to generate the platform product of the target operating system platform, wherein the product types supported by the platform product include at least one of the following: static library files and dynamic library files.
[0055] Exemplarily, the platform products in this embodiment may include a ".a static library" built for the iOS platform, a ".so library" built for the Android platform, and a ".so library" built for the ohos platform.
[0056] In an exemplary embodiment, if the software type is iOS software, the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and the implementation process of generating target development data according to the system development tool corresponding to the development requirement dependency directory includes: determining the iOS platform corresponding to the iOS software, obtaining the first platform product built for the iOS platform, and calling the external interface of the built-in project to generate the configuration file of the first platform product; storing the first platform product and the configuration file of the first platform product in the first development requirement dependency directory corresponding to the iOS software; and using the command line tool corresponding to the first development requirement dependency directory to run the first generated code to generate iOS development data.
[0057] The first generated code is generated based on the first platform product and a configuration file of the first platform product, and may be written by a programmer, for example.
[0058] Optionally, in this embodiment, the external interface of the Rust project (corresponding to the built-in project) can be used to generate a .h header file (corresponding to the configuration file) for the .a static library (corresponding to the first platform product) for Objective-C / Swift language calling, and then the .a static library and .h header file are copied to the dependency directory of the iOS project, and then the Xcode command line tool "xcodebuild" is used to build the iOS software project product. Among them, Xcode represents the iOS software development platform and build system. The implementation process of building iOS products is as follows Figure 4 As shown:
[0059] 1. Send the cargo build ios command.
[0060] 2. Build the Rust project through cargo and construct the Rust code as an iOS platform product, that is, create a Rust project and configure the iOS platform product for the Rust project.
[0061] 3. Send the ".a static library" built for the iOS platform to RMP.
[0062] 4. Generate a ".h header file" for the ".a static library" based on Rust's external interface for Objective-C / Swift language calls.
[0063] 5. Copy the ".a library" and ".h header file" to the dependency directory of the iOS software project.
[0064] 6. Xcode command line tool xcodebuild.
[0065] 6.1, build iOS products (representing development data).
[0066] Among them, iOS products include ".a static library", ".framework static library / dynamic library", and various application software. The product type can be determined by the command line parameters during creation. For example: setting "cargo rmp new projectName--framework" means that the build product of the current project iOS is specified as a framework.
[0067] In an exemplary embodiment, the software type is Android software, and the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and the technical solution for generating target development data according to the system development tool corresponding to the development requirement dependency directory includes: determining the Android platform corresponding to the Android software, obtaining a second platform product built for the Android platform and a configuration file of the second platform product; storing the second platform product and the configuration file of the second platform product in a second development requirement dependency directory corresponding to the Android software; using the Android system development tool corresponding to the second development requirement dependency directory to run the second generated code obtained by the first calling interface to generate Android development data, wherein the first calling interface is generated based on the external interface of the built-in project.
[0068] Optionally, in this embodiment, the Rust project external interface can be used to generate a JNI interface (corresponding to the first calling interface) for Java / Kotlin language calls. Then, the Rust project is built into an Android platform product .so library (corresponding to the second platform product) through cargo. The .so library and related configuration files are copied to the Android development requirement dependency directory, and then the Android software project product is built through gradle. Among them, Gradle represents the Android project build system (representing the system development tool). The process of building an Android software project product is as follows: Figure 5 As shown, the specific steps are as follows:
[0069] 1. Generate a JNI interface (corresponding to the project interface) based on the external interface of the Rust project for Java / Kotlin language calls.
[0070] 2. Send the cargo build android command.
[0071] 3. Build the Rust project as an Android platform product. Use cargo to build the Rust project as an Android platform product ".so library".
[0072] 4. Send the ".a static library" built for the Android platform to RMP.
[0073] 5. Copy the ".so library" to the Android development dependency directory.
[0074] 6. Send the gradlew assemble command.
[0075] 6.1 Build Android project products (representing development data) through gradle.
[0076] Android project products can include ".so library", ".aar", and application software. The product type can be determined by the command line parameters during creation. For example, use "cargo rmp new projectName--aar" to specify that the build product of the current Android project is "aar".
[0077] The second generated code may be generated by a programmer based on the second platform product and a configuration file of the second platform product, or may be implemented by a predetermined program, which is not limited in the present application.
[0078] In an exemplary embodiment, if the software type is Harmony OS software, the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and the process of generating target development data according to the system development tool corresponding to the development requirement dependency directory may include the following steps: determining the Harmony OS platform corresponding to the Harmony OS software, obtaining a third platform product built for the Harmony OS platform and a configuration file of the third platform product; generating a second calling interface corresponding to the Harmony OS platform based on the external interface of the built-in project, and generating an interface declaration file corresponding to the second calling interface; storing the third platform product, the configuration file of the third platform product and the interface declaration file in a third development requirement dependency directory corresponding to the Harmony OS software; and using the Harmony OS system development tool corresponding to the third development requirement dependency directory to run the third generated code obtained by the second calling interface to generate Harmony OS development data.
[0079] It should be noted that in this application, the Harmony OS platform specifically refers to the HarmonyOS Next platform, which is a brand-new operating system designed to provide a unified operating experience for various devices. Since HarmonyOS Next supports running programs developed in C / C++, and C / C++ is widely used in underlying technology development due to its performance advantages and wide hardware support, this provides certain convenience for this application to implement cross-platform development technology that supports HarmonyOS Next.
[0080] However, the memory management of C / C++ language is complex and there are certain memory safety issues. Therefore, this application realizes cross-platform development through the software development platform built by Rust language, which solves the hidden dangers of C / C++ language in memory safety. The technical solution of this application uses a single code base to create project products (such as applications) for multiple operating system platforms, which helps to promote the development of Hongmeng ecosystem, provides more flexible and efficient development options, and reduces development costs and time.
[0081] Optionally, in this embodiment, a NAPI interface (corresponding to the second calling interface) can be generated according to the external interface of the Rust project, and then the Hongmeng interface declaration file "projectName.d.ts" can be generated for ArkTS language calling. Use cargo to build the Rust project into an ohos platform product ".so library" (corresponding to the third platform product). Copy the ".so library" and "projectName.d.ts" files to the Hongmeng development requirement dependency directory, and then use hvigor to build the Hongmeng software project product. Among them, hvigor represents the Hongmeng build system. The process of building the Hongmeng software project product is as follows: Figure 6 As shown, the steps are as follows:
[0082] 1. Generate NAPI interface according to the external interface of Rust project.
[0083] 2. Generate Hongmeng's interface declaration file "projectName.d.ts" file for ArkTS language calling.
[0084] 3. Send the cargo build ohos command.
[0085] 4. Use cargo to build the Rust project into the ohos platform product ".so library" (corresponding to the third platform product), that is, create a Rust project and configure the platform ohos product for the Rust project.
[0086] 5. Send the ".so library" built for the ohos platform to RMP.
[0087] 6. Copy the ".so library" and "projectName.d.ts file" to the Hongmeng development dependency directory.
[0088] 7. Send hvigorw assembleApp.
[0089] 8. Build Hongmeng project products (i.e. development data) through hvigor.
[0090] The products of the Hongmeng project can include "har" or various application software. The product type is determined by the command line parameters during creation. For example, set "cargo rmp new projectName--har" to specify that the build product of the current Hongmeng project is "har.".
[0091] Among them, the generation process of the third generated code can refer to the above-mentioned first generated code and second generated code, and this application does not limit this.
[0092] In order to better understand the process of the above-mentioned method for generating multi-system software development data, the implementation method flow of the above-mentioned method for generating multi-system software development data is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.
[0093] In an exemplary embodiment, before generating target development data according to the system development tool corresponding to the development requirement dependency directory, further, interface information of the target operating system platform can be generated according to the configuration file of the platform product; and the system development tool corresponding to the interface information is determined from the preset system development tools.
[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment 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 software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0095] Figure 7 is a structural block diagram of a device for generating multi-system software development data according to an embodiment of the present application; Figure 7 As shown, including:
[0096] A parsing module 72, configured to parse the software building request to obtain a software type included in the software building request, wherein the software type corresponds to a target operating system among the different operating systems;
[0097] A construction module 74, for constructing a platform product for the target operating system using built-in projects in the software development platform;
[0098] The generation module 76 is used to store the platform product and the configuration file of the platform product in the development requirement dependency directory corresponding to the software type, and generate target development data according to the system development tool corresponding to the development requirement dependency directory.
[0099] Through the above-mentioned device, the software build request is parsed to obtain the software type contained in the software build request, wherein the software type corresponds to the target operating system among the different operating systems; the built-in project in the software development platform is used to build a platform product for the target operating system; the platform product and the configuration file of the platform product are stored in the development requirement dependency directory corresponding to the software type, and the target development data is generated according to the system development tool corresponding to the development requirement dependency directory. Projects for different operating system platforms can be automatically managed and built based on the software development platform, eliminating tedious steps such as project configuration and manual construction, greatly improving development efficiency, and solving the technical problems in related technologies such as how to use cross-platform development technology to develop software for multiple operating systems including HarmonyOS and generate development data. Project software can be developed for multiple operating systems, thereby improving the compatibility and applicability of the software development platform.
[0100] Wherein, the software development platform supports different operating systems.
[0101] In an exemplary embodiment, the construction module is also used to: before using the built-in project in the software development platform to build a platform product for the target operating system, further, create a project root directory, wherein the project root directory includes a project configuration file of the built-in project and a platform configuration file of the different operating system platforms, and the project root directory is used to provide an operating environment; execute the project configuration file of the built-in project in the operating environment to generate the built-in project.
[0102] In an exemplary embodiment, the construction module is also used to: determine the target platform configuration file of the target operating system platform from the platform configuration files of the different operating system platforms; execute the target platform configuration file in the operating environment to generate the platform product of the target operating system platform, wherein the product types supported by the platform product include at least one of the following: static library files and dynamic library files.
[0103] In an exemplary embodiment, if the software type is iOS software, the generation module is also used to: determine the iOS platform corresponding to the iOS software, obtain the first platform product built for the iOS platform, and call the external interface of the built-in project to generate a configuration file for the first platform product; store the first platform product and the configuration file of the first platform product in a first development requirement dependency directory corresponding to the iOS software; and use the command line tool corresponding to the first development requirement dependency directory to run the first generated code to generate iOS development data.
[0104] In an exemplary embodiment, if the software type is Android software, the generation module is further used to: determine the Android platform corresponding to the Android software, obtain a second platform product built for the Android platform and a configuration file of the second platform product; store the second platform product and the configuration file of the second platform product in a second development requirement dependency directory corresponding to the Android software; use the Android system development tool corresponding to the second development requirement dependency directory to run the second generated code obtained by the first calling interface to generate Android development data, wherein the first calling interface is generated based on the external interface of the built-in project.
[0105] In an exemplary embodiment, if the software type is Harmony OS software, the generation module is further used to: determine the Harmony OS platform corresponding to the Harmony OS software, obtain a third platform product built for the Harmony OS platform and a configuration file of the third platform product; generate a second calling interface corresponding to the Harmony OS platform based on the external interface of the built-in project, and generate an interface declaration file corresponding to the second calling interface; store the third platform product, the configuration file of the third platform product and the interface declaration file in a third development requirement dependency directory corresponding to the Harmony OS software; use the Harmony OS system development tool corresponding to the third development requirement dependency directory to run the third generated code obtained by the second calling interface to generate Harmony OS development data.
[0106] In an exemplary embodiment, the construction module is also used to: before generating target development data according to the system development tool corresponding to the development requirement dependency directory, further generate interface information of the target operating system platform according to the configuration file of the platform product; determine the system development tool corresponding to the interface information from the preset system development tools.
[0107] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0108] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0109] S1, parsing a software building request to obtain a software type included in the software building request, wherein the software type corresponds to a target operating system among the different operating systems;
[0110] S2, using the built-in projects in the software development platform to build a platform product for the target operating system;
[0111] S3, storing the platform product and the configuration file of the platform product in a development requirement dependency directory corresponding to the software type, and generating target development data according to a system development tool corresponding to the development requirement dependency directory.
[0112] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0113] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0114] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0115] S1, parsing a software building request to obtain a software type included in the software building request, wherein the software type corresponds to a target operating system among the different operating systems;
[0116] S2, using the built-in projects in the software development platform to build a platform product for the target operating system;
[0117] S3, storing the platform product and the configuration file of the platform product in a development requirement dependency directory corresponding to the software type, and generating target development data according to a system development tool corresponding to the development requirement dependency directory.
[0118] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0119] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0120] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0121] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for generating multi-system software development data, characterized in that: Applied to a software development platform that supports different operating systems, including: Parsing the software building request to obtain a software type included in the software building request, wherein the software type corresponds to a target operating system among the different operating systems; Use the built-in projects in the software development platform to build a platform product for the target operating system; store the platform product and the configuration file of the platform product in a development requirement dependency directory corresponding to the software type, and use the system development tool corresponding to the development requirement dependency directory to generate target development data.
2. The method for generating multi-system software development data according to claim 1, characterized in that: Before using the built-in project in the software development platform to build a platform product for the target operating system, the method further includes: Creating a project root directory, wherein the project root directory includes a project configuration file of the built-in project and a platform configuration file of the different operating system platforms, and the project root directory is used to provide an operating environment; The project configuration file of the built-in project is executed in the running environment to generate the built-in project.
3. The method for generating multi-system software development data according to claim 2, characterized in that: Using built-in projects in the software development platform to build a platform product for the target operating system includes: Determine a target platform configuration file of the target operating system platform from the platform configuration files of the different operating system platforms; The target platform configuration file is executed in the operating environment to generate the platform product of the target operating system platform, wherein the product types supported by the platform product include at least one of the following: static library files and dynamic library files.
4. The method for generating multi-system software development data according to claim 1, characterized in that: The software type is iOS software, the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and target development data is generated according to a system development tool corresponding to the development requirement dependency directory, including: Determine an iOS platform corresponding to the iOS software, obtain a first platform product built for the iOS platform, and call the external interface of the built-in project to generate a configuration file of the first platform product; store the first platform product and the configuration file of the first platform product in a first development requirement dependency directory corresponding to the iOS software; Use the command line tool corresponding to the first development requirement dependency directory to run the first generated code to generate iOS development data.
5. The method for generating multi-system software development data according to claim 1, characterized in that: The software type is Android software, the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and target development data is generated according to a system development tool corresponding to the development requirement dependency directory, including: Determine an Android platform corresponding to the Android software, and obtain a second platform product built for the Android platform and a configuration file of the second platform product; Storing the second platform product and the configuration file of the second platform product in a second development requirement dependency directory corresponding to the Android software; Use the Android system development tool corresponding to the second development requirement dependency directory to run the second generated code obtained by the first calling interface to generate Android development data, wherein the first calling interface is generated based on the external interface of the built-in project.
6. The method for generating multi-system software development data according to claim 1, characterized in that: The software type is Harmony OS software, the platform product and the configuration file of the platform product are stored in a development requirement dependency directory corresponding to the software type, and target development data is generated according to a system development tool corresponding to the development requirement dependency directory, including: Determine a Harmony OS platform corresponding to the Harmony OS software, and obtain a third platform product built for the Harmony OS platform and a configuration file of the third platform product; Generate a second calling interface corresponding to the Harmony OS platform based on the external interface of the built-in project, and generate an interface declaration file corresponding to the second calling interface; Storing the third platform product, the configuration file of the third platform product and the interface declaration file in a third development requirement dependency directory corresponding to the Harmony OS software; The Harmony OS system development tool corresponding to the third development requirement dependency directory is used to run the third generated code obtained by the second calling interface to generate Harmony OS development data.
7. The method for generating multi-system software development data according to claim 1, characterized in that: Before generating target development data according to the system development tool corresponding to the development requirement dependency catalog, the method further includes: Generate interface information of the target operating system platform according to the configuration file of the platform product; A system development tool corresponding to the interface information is determined from preset system development tools.
8. A device for generating multi-system software development data, characterized in that: include: A parsing module, used to parse the software building request to obtain a software type included in the software building request, wherein the software type corresponds to a target operating system among different operating systems; A construction module, used to construct a platform product for the target operating system using built-in projects in the software development platform; A generation module is used to store the platform product and the configuration file of the platform product in the development requirement dependency directory corresponding to the software type, and generate target development data according to the system development tool corresponding to the development requirement dependency directory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Application installation package generation method and device, server and storage medium
CN115390863A