CN115599350A - Intelligent packaging method, system and storage medium for customized software - Google Patents

Intelligent packaging method, system and storage medium for customized software Download PDF

Info

Publication number
CN115599350A
CN115599350A CN202211158688.7A CN202211158688A CN115599350A CN 115599350 A CN115599350 A CN 115599350A CN 202211158688 A CN202211158688 A CN 202211158688A CN 115599350 A CN115599350 A CN 115599350A
Authority
CN
China
Prior art keywords
main code
software
software main
modification
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211158688.7A
Other languages
Chinese (zh)
Inventor
李阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Oribo Technology Co Ltd
Original Assignee
Shenzhen Oribo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Oribo Technology Co Ltd filed Critical Shenzhen Oribo Technology Co Ltd
Priority to CN202211158688.7A priority Critical patent/CN115599350A/en
Publication of CN115599350A publication Critical patent/CN115599350A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring

Abstract

The invention relates to an intelligent packaging method, a system and a storage medium of customized software, wherein the intelligent packaging method of the customized software comprises the following steps: adding modification rule codes to the software main codes, wherein the modification rule codes comprise modification rules related to OEM customization requirements; analyzing the modification rule codes to obtain corresponding modification rules; and when the software main code is compiled, modifying the software main code according to the modification rule. By implementing the technical scheme of the invention, the OEM customization requirements of customers are met, and the development cost and the maintenance cost are greatly reduced.

Description

Intelligent packaging method, system and storage medium for customized software
Technical Field
The invention relates to the field of software development, in particular to an intelligent packaging method, system and storage medium for customized software.
Background
After the project software is developed, when the project software is delivered to different customers, the project software often needs to be modified according to OEM (Original Equipment Manufacturer) customization requirements of the different customers. Currently, there are generally two modifications:
1. pulling a new OEM branch from the existing code branch, and modifying the pulled OEM branch, for example, modifying the picture resource of the project, and the OEM manufacturer-related text; different two-dimensional codes and the like are generated by modification, however, the OEM branches after modification cannot be merged into the main branches, and as the development continues, the difference between the OEM branches and the main branches gradually increases, so that the maintenance is difficult, and the development cost is increased;
2. when the main branch is developed, modification contents (such as OEM manufacturer picture resources, related texts, two-dimensional code data and the like) are integrated into the main branch, condition judgment is added, and different data resources are called when the OEM is in different manufacturer versions.
Disclosure of Invention
In order to solve the problems of high development cost and difficult maintenance in the prior art, the invention provides an intelligent packaging method, a system and a storage medium of customized software.
The technical scheme adopted by the invention for solving the technical problems is as follows: the intelligent packaging method for the customized software comprises the following steps:
adding modification rule codes to the software main codes, wherein the modification rule codes comprise modification rules related to OEM customization requirements;
analyzing the modification rule codes to obtain corresponding modification rules;
and when the software main code is compiled, modifying the software main code according to the modification rule.
Preferably, before the step of modifying the software main code according to the modification rule when the software main code is compiled, the method further includes:
backing up the main code of the software before modification;
after the step of modifying the software main code according to the modification rule when the software main code is compiled, the method further comprises the following steps:
and restoring the modified software main code.
Preferably, the modification rule includes: file replacement rules and/or resource modification rules;
the modifying the software main code according to the modification rule comprises the following steps:
replacing a corresponding first file in the software main code according to the file replacement rule; and/or the presence of a gas in the atmosphere,
and modifying the corresponding resource data in the corresponding second file in the software main code according to the resource modification rule.
Preferably, after the step of parsing the modification rule code to obtain the corresponding modification rule, and before the step of modifying the software main code according to the modification rule when compiling the software main code, the method further includes:
creating a backup catalog;
according to the file replacement rule, backing up a corresponding first file in the software main code to the backup directory; and/or
According to the resource modification rule, backing up corresponding resource data in a corresponding second file in the software main code to the backup directory;
after the step of modifying the software main code according to the modification rule when the software main code is compiled, the method further includes:
restoring the first file in the backup catalog into the software main code according to the file replacement rule; and/or
And restoring the corresponding resource data in the backup catalog to a second file of the software main code according to the resource modification rule.
The invention also constructs an intelligent packaging system of the customized software, which comprises the following components:
the system comprises an adding module, a processing module and a control module, wherein the adding module is used for adding modification rule codes into software main codes, and the modification rule codes are related to OEM customization requirements;
the analysis module is used for analyzing the modification rule codes to obtain corresponding modification rules;
and the compiling module is used for modifying the software main code according to the modification rule when the software main code is compiled.
Preferably, the method further comprises the following steps:
the first backup module is used for backing up the software main code before modification before compiling the software main code;
and the first restoring module is used for restoring the modified software main code after the software main code is compiled.
Preferably, the modification rule includes: file replacement rules and/or resource modification rules;
the compiling module comprises:
the replacing unit is used for replacing a corresponding first file in the software main code according to the file replacing rule; and/or the presence of a gas in the gas,
and the modification unit is used for modifying the corresponding resource data in the corresponding second file in the software main code according to the resource modification rule.
Preferably, the method further comprises the following steps:
the creating module is used for creating a backup catalog;
the second backup module is used for backing up a corresponding first file in the software main code to the backup directory according to the file replacement rule before the software main code is compiled; and/or backing up corresponding resource data in a corresponding second file in the software main code to the backup directory according to the resource modification rule;
the second restoring module is used for restoring the first file in the backup catalog into the software main code according to the file replacement rule after the software main code is compiled; and/or restoring the corresponding resource data in the backup catalog to a second file of the software main code according to the resource modification rule.
The invention also constructs an intelligent packaging system of the customized software, which comprises a processor, wherein the processor realizes the intelligent packaging method of the customized software when executing the stored computer program.
The present invention also constructs a storage medium storing a computer program which, when executed by a processor, implements the above-described intelligent packaging method of customized software.
By implementing the technical scheme of the invention, when the OEM customization requirements of different customers are met, the software main code does not need to be modified, the corresponding modification rule code is compiled according to the OEM customization requirements of the corresponding customer, then the modification rule code is added into the software main code, and the modification rule code is analyzed to obtain the corresponding modification rule.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of a method for intelligently packaging customized software according to the present invention;
fig. 2 is a schematic structural diagram of a first embodiment of the intelligent packaging system for customized software provided by the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a first embodiment of an intelligent packaging method for customized software according to the present invention, where the intelligent packaging method for customized software according to the present invention can be applied to a computer or a server for software development and compilation. The intelligent packaging method of the customized software of the embodiment comprises the following steps:
step S10, adding modification rule codes into the software main codes, wherein the modification rule codes comprise modification rules related to OEM customization requirements;
in this step, the main code is set separately from the modification rule codes corresponding to different customers, and the modification rule codes are written in advance according to OEM customization requirements of the corresponding customers, for example, according to the OEM customization requirements of a certain customer, defined in the modification rules: a certain file needs to be replaced integrally; modification of resource data of a file is required, and the like. When a software project of a certain client needs to be packaged, a modification rule code corresponding to the client can be added to the main code.
Step S20, analyzing the modification rule codes to obtain corresponding modification rules;
and S30, when the software main code is compiled, modifying the software main code according to the modification rule.
In this step, after the modification rule code is parsed, the current software main code (including the software main code before addition and the modification rule code added) may be compiled, and at the time of compiling, the modification may be automatically performed on the software main code according to the modification rule.
In the embodiment, when the OEM customization requirements of different customers are met, the software main code does not need to be modified, the corresponding modification rule code is written according to the OEM customization requirements of the corresponding customer, then the modification rule code is added into the software main code, the modification rule code is analyzed, the corresponding modification rule can be obtained, and when the software main code is compiled, the software main code can be automatically modified according to the analyzed modification rule, so that the OEM customization requirements of the customers are met, and the development cost and the maintenance cost are greatly reduced.
Further, in an optional embodiment, before step S30, further performing: backing up the software main code before modification; after step S30, further: and restoring the modified software main code. In this embodiment, since the software main code before compiling can be backed up and the compiled software main code can be restored, the resources or files related to the OEM customization needs of the current customers are not retained in the software main code, and the generated application program is not increased in volume.
Further, in an optional embodiment, modifying the rule comprises: file replacement rules and/or resource modification rules; furthermore, in step S30, the modifying the software main code according to the modification rule includes:
replacing a corresponding first file in the software main code according to the file replacement rule; and/or the presence of a gas in the atmosphere,
and modifying the corresponding resource data in the corresponding second file in the software main code according to the resource modification rule.
It should be understood that, in practical applications, there may be more than one file to be replaced and more than one resource data to be modified, and regardless of the number, it is only necessary to write each file to be replaced and resource data to be modified in the modification rule code one by one.
Further, between step S20 and step S30, the method further includes:
creating a backup catalog;
according to the file replacement rule, backing up a corresponding first file in the software main code to the backup directory; and/or
And according to the resource modification rule, backing up corresponding resource data in a corresponding second file in the software main code to the backup directory.
Correspondingly, after step S30, the method further includes:
restoring the first file in the backup catalog into the software main code according to the file replacement rule; and/or
And restoring the corresponding resource data in the backup catalog to a second file of the software main code according to the resource modification rule.
In this embodiment, when performing backup, it is not necessary to backup all the software main codes before compiling, but only the files that need to be replaced and/or the resources that need to be modified are backed up, and similarly, when performing restore, only the replaced files and/or the modified resources need to be restored, so that the amount of data that is backed up and restored is smaller, and the speed of software customization packaging can be further improved.
In one embodiment, suppose a customer (with the vendor name "OEM _ name") has the following OEM customization needs: replacing the logo with the logo of the manufacturer; replacing the app header "orvibo" with "OEM _ name", then the following modification rule code may be written according to the customer's OEM customization needs:
name:“oem_name”
replace:
src:“oem_name/assets/images/logo.webp”
dst:“assets/images/logo.webp”
modify:
path:“lib/main.dart”
src:“oem_name”
dst:“orvibo”
after the modification rule code is added to the software main code, the modification rule can be determined to be: replacing a file (original logo file) under the path of the assets/images/logo.webp in the software main code with a file (new logo file) under the path of oem _ name/assets/images/logo.webp; dart path "orvibo (original app title)" in the file is replaced with "oem _ name". Then, a backup (backup) directory is created in the project directory, and the orvibos in the files under the assets/images/logo.
Then, the modification rule can be applied, specifically, according to src and dst in the file replacement rule (replace), the file corresponding to dst is deleted, and the file corresponding to src is copied to dst; according to a resource modification rule (modification), the content of the file specified by the path is read, and the dst corresponding character string (ovibo) in the file content is replaced by the src corresponding character string (oem _ name).
And finally, after compiling is completed, reading the modification rule, and restoring the file or resource backed up in the backup directory according to the path corresponding to the path and dst in the modification rule, namely restoring the original logo file and restoring the orvibo character string.
Referring to fig. 2, the present invention further provides a schematic structural diagram of a first embodiment of an intelligent packaging system for customized software, the software customization packaging system of the embodiment includes: the system comprises an adding module 10, a resolving module 20 and a compiling module 30, wherein the adding module 10 is used for adding modification rule codes to software main codes, and the modification rule codes are relevant to OEM customization requirements; the analysis module 20 is configured to analyze the modification rule code to obtain a corresponding modification rule; the compiling module 30 is configured to modify the software main code according to the modification rule when the software main code is compiled.
In the embodiment, when the OEM customization requirements of different customers are met, the software main code does not need to be modified, the corresponding modification rule code is written according to the OEM customization requirements of the corresponding customer, then the modification rule code is added into the software main code, the modification rule code is analyzed, the corresponding modification rule can be obtained, and when the software main code is compiled, the software main code can be automatically modified according to the analyzed modification rule, so that the OEM customization requirements of the customers are met, and the development cost and the maintenance cost are greatly reduced.
Further, in an optional embodiment, the intelligent packaging system for customized software of the present invention further includes a first backup module and a first restore module, where the first backup module is configured to backup the software main code before modification before compiling the software main code; and the first restoring module is used for restoring the modified software main code after the software main code is compiled. In this embodiment, since the pre-compiled software main code can be backed up and the compiled software main code can be restored, the resources or files related to the OEM customization needs of the current customers are not retained in the software main code, which in turn does not result in an increase in the volume of the generated application.
Further, in an optional embodiment, the modifying rule includes: file replacement rules and/or resource modification rules; moreover, the compiling module 30 comprises a replacing unit and/or a modifying unit, wherein the replacing unit is used for replacing the corresponding first file in the software main code according to the file replacing rule; and the modification unit is used for modifying the corresponding resource data in the corresponding second file in the software main code according to the resource modification rule.
Further, in an optional embodiment, the system for intelligently packaging customized software of the present invention further comprises: the device comprises a creating module, a second backup module and a second restoring module, wherein the creating module is used for creating a backup catalog; the second backup module is used for backing up a corresponding first file in the software main code to the backup directory according to the file replacement rule before the software main code is compiled; and/or backing up corresponding resource data in a corresponding second file in the software main code to the backup directory according to the resource modification rule; the second restoring module is used for restoring the first file in the backup catalog into the software main code according to the file replacement rule after the software main code is compiled; and/or restoring the corresponding resource data in the backup catalog to a second file of the software main code according to the resource modification rule. In this embodiment, the speed of software custom packaging can be further increased due to the smaller amount of data backed up and restored.
The present invention also constructs a storage medium, which may be various computer-readable storage media such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk. The storage medium stores therein a computer program that, when executed by a processor, implements the steps of the above-described smart packaging method for customized software.
The present invention also constructs an intelligent packaging system for customized software, which comprises a processor that implements the above-described intelligent packaging method for customized software when executing a stored computer program.
The software customization packaging system can be a computer or a server, and the server can be an independent server or a server cluster formed by a plurality of servers. The processor in the host has computing and control capabilities to support the operation of the entire host. It should be understood that in the embodiments of the present Application, the Processor may be a Central Processing Unit (CPU), and the Processor may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Finally, it should be noted that the steps in the method according to the embodiment of the present invention may be sequentially adjusted, combined, and deleted according to actual needs. The modules in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing a host related hardware, and the program may be stored in a computer readable storage medium, and the storage medium may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.

Claims (10)

1. An intelligent packaging method for customized software, comprising:
adding modification rule codes to the software main codes, wherein the modification rule codes comprise modification rules related to OEM customization requirements;
analyzing the modification rule codes to obtain corresponding modification rules;
and when the software main code is compiled, modifying the software main code according to the modification rule.
2. The intelligent packaging method for customized software according to claim 1, further comprising, before the step of modifying the software main code according to the modification rule when compiling the software main code:
backing up the software main code before modification;
after the step of modifying the software main code according to the modification rule when the software main code is compiled, the method further includes:
and restoring the modified software main code.
3. The intelligent packaging method for customized software according to claim 1, wherein said modifying rules comprises: file replacement rules and/or resource modification rules;
the modifying the software main code according to the modification rule comprises the following steps:
replacing a corresponding first file in the software main code according to the file replacement rule; and/or the presence of a gas in the gas,
and modifying the corresponding resource data in the corresponding second file in the software main code according to the resource modification rule.
4. The intelligent packaging method for customized software according to claim 3, further comprising, after the step of parsing the modification rule code to obtain the corresponding modification rule, before the step of modifying the software main code according to the modification rule when compiling the software main code:
creating a backup catalog;
according to the file replacement rule, backing up a corresponding first file in the software main code to the backup directory; and/or
According to the resource modification rule, backing up corresponding resource data in a corresponding second file in the software main code to the backup directory;
after the step of modifying the software main code according to the modification rule when the software main code is compiled, the method further includes:
restoring the first file in the backup catalog into the software main code according to the file replacement rule; and/or
And restoring the corresponding resource data in the backup catalog to a second file of the software main code according to the resource modification rule.
5. An intelligent packaging system for customized software, comprising:
the system comprises an adding module, a processing module and a control module, wherein the adding module is used for adding modification rule codes into software main codes, and the modification rule codes are related to OEM customization requirements;
the analysis module is used for analyzing the modification rule codes to obtain corresponding modification rules;
and the compiling module is used for modifying the software main code according to the modification rule when the software main code is compiled.
6. The intelligent packaging system of customized software according to claim 5, further comprising:
the first backup module is used for backing up the software main code before modification before compiling the software main code;
and the first restoring module is used for restoring the modified software main code after the software main code is compiled.
7. The intelligent packaging system of customized software according to claim 5, wherein said modification rules comprise: file replacement rules and/or resource modification rules;
the compiling module comprises:
the replacing unit is used for replacing the corresponding first file in the software main code according to the file replacing rule; and/or the presence of a gas in the gas,
and the modification unit is used for modifying the corresponding resource data in the corresponding second file in the software main code according to the resource modification rule.
8. The intelligent packaging system for customized software according to claim 7, further comprising:
the creating module is used for creating a backup catalog;
the second backup module is used for backing up a corresponding first file in the software main code to the backup directory according to the file replacement rule before the software main code is compiled; and/or backing up corresponding resource data in a corresponding second file in the software main code to the backup directory according to the resource modification rule;
the second restoring module is used for restoring the first file in the backup catalog into the software main code according to the file replacement rule after the software main code is compiled; and/or restoring the corresponding resource data in the backup catalog to a second file of the software main code according to the resource modification rule.
9. An intelligent packaging system for customized software, comprising a processor, characterized in that the processor, when executing a stored computer program, implements the intelligent packaging method for customized software according to any of claims 1-4.
10. A storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the intelligent packaging method for customized software according to any one of claims 1 to 4.
CN202211158688.7A 2022-09-22 2022-09-22 Intelligent packaging method, system and storage medium for customized software Pending CN115599350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211158688.7A CN115599350A (en) 2022-09-22 2022-09-22 Intelligent packaging method, system and storage medium for customized software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211158688.7A CN115599350A (en) 2022-09-22 2022-09-22 Intelligent packaging method, system and storage medium for customized software

Publications (1)

Publication Number Publication Date
CN115599350A true CN115599350A (en) 2023-01-13

Family

ID=84844409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211158688.7A Pending CN115599350A (en) 2022-09-22 2022-09-22 Intelligent packaging method, system and storage medium for customized software

Country Status (1)

Country Link
CN (1) CN115599350A (en)

Similar Documents

Publication Publication Date Title
US10481884B2 (en) Systems and methods for dynamically replacing code objects for code pushdown
WO2020006910A1 (en) Business componentization development method and apparatus, computer device, and storage medium
US9792284B2 (en) System, method and computer program product for multilingual content management
US20240045850A1 (en) Systems and methods for database orientation transformation
US20150178062A1 (en) Automated computer application update analysis
US20200167143A1 (en) Systems and methods for automated retrofitting of customized code objects
US10067856B2 (en) Employing code overlays to facilitate software development
US9128723B2 (en) Method and apparatus for dynamic document object model (DOM) aware code editing
US8832125B2 (en) Extensible event-driven log analysis framework
US9552214B2 (en) Tool for automated extraction and loading of configuration settings
US20170315830A1 (en) On-demand loading of dynamic scripting language code for reduced memory usage
CN104794048A (en) Automatic UI testing method and system
US11244025B2 (en) Systems and methods for updating data pipelines
CN112667246A (en) Application function extension method and device and electronic equipment
US11645058B2 (en) User interface resource file optimization
US20110321037A1 (en) Data only solution package
CN115599350A (en) Intelligent packaging method, system and storage medium for customized software
CN111367512B (en) Method and device for creating Android library module dependency relationship in application development
CN115048083A (en) Visualization method and device for assembly, storage medium and electronic equipment
CN102254155B (en) accurate font activation
CN114911541A (en) Configuration information processing method and device, electronic equipment and storage medium
CN111984300B (en) Code copying method and device, electronic equipment and computer readable storage medium
CN115048082A (en) Micro front-end system construction method and device, server and readable storage medium
CN114168875A (en) Page program generation method and device, computer equipment and storage medium
CN109960498B (en) C + + based HTML editor editing and upgrading method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination