CN103729184B - Software component combining and constructing method - Google Patents

Software component combining and constructing method Download PDF

Info

Publication number
CN103729184B
CN103729184B CN201310744540.6A CN201310744540A CN103729184B CN 103729184 B CN103729184 B CN 103729184B CN 201310744540 A CN201310744540 A CN 201310744540A CN 103729184 B CN103729184 B CN 103729184B
Authority
CN
China
Prior art keywords
component
script
product
source code
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.)
Active
Application number
CN201310744540.6A
Other languages
Chinese (zh)
Other versions
CN103729184A (en
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.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud 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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201310744540.6A priority Critical patent/CN103729184B/en
Priority to PCT/CN2014/071919 priority patent/WO2015096275A1/en
Publication of CN103729184A publication Critical patent/CN103729184A/en
Application granted granted Critical
Publication of CN103729184B publication Critical patent/CN103729184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention relates to the technical field of software development, in particular to a software component combining and constructing method. The method comprises the steps that firstly, an independent construction script is established under a source code catalog of each component and a constructing switch is set; a script for detecting the dependent environment is established under the source code catalog of each component; dependent descriptions of other components are added into the construction scripts of the components; construction attribute description files are established under the source code catalogs of a product; scripts for detecting the dependent environment under the source code catalogs of the components in a script calling list are established; a construction script under each component source code catalog in the script calling list is called through the construction script, and whether other dependent components meet the conditions or not is detected; the source code compiling is executed, and a product package is generated and issued. The method solves the problems that a traditional product construction component combining and constructing method is not flexible and prone to making mistakes and the method can be used for the construction and management of large software products.

Description

A kind of component software combines construction method
Technical field
The present invention relates to technical field of software development, particularly relates to a kind of component software combination construction method.
Background technology
As the development of software product, the selectable component in product are more and more, derivative version is got on product line Come more, and the cycle that product requirement is paid is shorter and shorter, also can more and more higher to the requirement that product builds.The difference of product Version depends on the various combination of product component, and the structure of software itself need to rely on environment (operating system, data base Deng), traditional product builds the script for having relied on make formulas come what is carried out, and general step is as follows:
1st, check whether constructing environment meets the structure requirement of particular version by precompile script;
2nd, increase the option of conditional compilation when code is write, be easy to be added in makefile compiling condition to determine spy Whether fixed product component is compiled;
3rd, perform make and compile out object code;
4th, object code is packaged into the software kits such as rpm, deb to be issued.
This construction method is suffered from the drawback that:
1st, the mode underaction of component combination, when product component module number is more, can between component The quantity of the product version that combination is formed is very surprising, and the method for the above must write different for different versions Makefile, it is therefore desirable to workload also can be very big.
2nd, the degree of coupling of constructing environment inspection and product mix version is too high, and each needs the product component for building pre- Compilation script is quoted, and when the constructing environment of one of product component needs to change, precompile script is required for being rewritten, and The environment that the constructing environment that other product components are relied on may be checked with amended precompile script produces inconsistent feelings Condition, the result so often brought is exactly to compile unsuccessful, needs to coordinate again the software version that environment is relied between different components This etc..
It is therefore desirable to have a kind of can complete the method that product component combination builds with simple configuration.
The content of the invention
Present invention solves the technical problem that being to provide a kind of component software to combine construction method, realization is simply configured Combination into product component builds.
The present invention solves the technical scheme of above-mentioned technical problem:Comprise the steps:
Step 1:Independent structure script is set up under the source code directory of each component, a structure is set in script and is opened Close, the value for building switch is obtained by the structure property description file outside reading assembly source code directory;
Step 2:One is set up under the source code directory of each component and checks the script for relying on environment, only checked in script Whether the software version that the component construction is relied on meets;
Step 3:The dependence to other assemblies is added to describe in the structure script of component, only meeting description just can enter The structure of the capable component;
Step 4:Set up under the source code directory of product and build property description file, the component to be compiled described in file List;
Step 5:Write product and build script, read the component list built in property description file, it is every in invocation list Under individual component source code catalogue inspection rely on environment script, if be unsatisfactory for, stop product structure, installation lack according to Bad environment, re-executes step 5, if it is satisfied, execution step 6;
Step 6:The structure script under each component source code catalogue is called, checks that other rely on whether component meets, such as Fruit is unsatisfactory for, and stops the structure of product, and the component for lacking is added in property description file is built, and re-executes step 6, if Meet, execution step 7;
Step 7:Compilation of source code is performed, release product bag is generated;
Described structure refers to generate the process that product software bag is issued, the source generation of product from the source code of product Code deposits the structure script of product under a file under this file, the component source code of product is deposited in this file Under sub-folder under.
Described structure switch, refers to the component option whether to be compiled, and each component distributes a mark, The structure that carry out the component is represented with the mark of component in list in property description file is built.
Described inspection relies on the script of environment is whether whether an inspection software install software required for structure Whether installation and version meet the script of requirement, can be shell scripts or bat scripts.
It is a mark for listing the component required for specific product version that described foundation builds property description file Process, builds the property file that property description file is a simple key-value pair, and each describes the specific version of product in file The component for including is needed in this.
The method of the present invention has the advantages that:
1st, the method that the present invention is provided only needs to safeguard simple property file to different versions, relative to complicated For makefile, construction work amount is greatly reduced.
2nd, the present invention provide method in component for constructing environment definition by the way of self-described, certain component for The inspection of constructing environment and the definition of construction step all only affect this component itself, will not cause any to the structure of other assemblies Affect, therefore, different editions need not write the special precompile script of particular version when building, and workload is few, it is not easy to Error.
Description of the drawings
Below in conjunction with the accompanying drawings the present invention is further described:
Accompanying drawing is the inventive method flow chart.
Specific embodiment
As shown in drawings, invention software component combination construction method comprises the steps:
Step 1:Independent structure script is set up under the source code directory of each component, a structure is set in script and is opened Close, the value for building switch is obtained by the structure property description file outside reading assembly source code directory;
Step 2:One is set up under the source code directory of each component and checks the script for relying on environment, only checked in script Whether the software version that the component construction is relied on meets;
Step 3:The dependence to other assemblies is added to describe in the structure script of component, only meeting description just can enter The structure of the capable component;
Step 4:Set up under the source code directory of product and build property description file, the component to be compiled described in file List;
Step 5:Write product and build script, read the component list built in property description file, it is every in invocation list Under individual component source code catalogue inspection rely on environment script, if be unsatisfactory for, stop product structure, installation lack according to Bad environment, re-executes step 5, if it is satisfied, execution step 6;
Step 6:The structure script under each component source code catalogue is called, checks that other rely on whether component meets, such as Fruit is unsatisfactory for, and stops the structure of product, and the component for lacking is added in property description file is built, and re-executes step 6, if Meet, execution step 7;
Step 7:Compilation of source code is performed, release product bag is generated.
Described structure refers to generate the process that product software bag is issued, the source generation of product from the source code of product Code deposits the structure script of product under a file under this file, the component source code of product is deposited in this file Under sub-folder under.
Described structure switch, refers to the component option whether to be compiled, and each component distributes a mark, The structure that carry out the component is represented with the mark of component in list in property description file is built.
Described inspection relies on the script of environment is whether whether an inspection software install software required for structure Whether installation and version meet the script of requirement, can be shell scripts or bat scripts.
It is a mark for listing the component required for specific product version that described foundation builds property description file Process, builds the property file that property description file is a simple key-value pair, and each describes the specific version of product in file The component for including is needed in this.
By taking ant the build tools as an example, products Presentation builds the foundation of attribute configuration file, and product to implementation below The building process of one of component.
Distribute one to virtual machine modification configuration component first to be designated:
VM.CHANGE_CONFIGURATION
Then the switch of structure is increased in ant builds script:
Set up a product and build configuration describing document, comprising such as next line content:
VM.CHANGE_CONFIGURATION=true
Represent virtual machine modification configuration component to be put in this version of product and built.
A sh script is set up under virtual machine modification configuration component source code directory, checks that it relies on environment, content is such as Under:
Wherein check whether half virtualization startup is installed in constructing environment.
Dependence of the virtual machine modification configuration component to other assemblies described in script is being built in ant, content is as follows:
Read in structure script under product source code directory and build configuration describing document, and therefrom read virtual machine maintenance Change the option whether configuration component is fabricated:
Change the current directory under product source code directory, performing antjar orders carries out the structure of the version product.

Claims (3)

1. a kind of component software combines construction method, it is characterised in that:Comprise the steps:
Step 1:Independent structure script is set up under the source code directory of each component, one is arranged in script and is built switch, The value for building switch is obtained by the structure property description file outside reading assembly source code directory;
Step 2:One is set up under the source code directory of each component and checks the script for relying on environment, the group is only checked in script Part builds whether relied on software version meets;
Step 3:The dependence to other assemblies is added to describe in the structure script of component, only meeting description can just carry out this The structure of component;
Step 4:Set up under the source code directory of product and build property description file, the column of assemblies to be compiled described in file Table;
Step 5:Write product and build script, read the component list built in property description file, each group in invocation list Inspection under part source code directory relies on the script of environment, if be unsatisfactory for, stops the structure of product, installs the dependence ring for lacking Border, re-executes step 5, if it is satisfied, execution step 6;
Step 6:The structure script under each component source code catalogue is called, checks that other rely on whether component meets, if not Meet, stop the structure of product, the component for lacking is added in property description file is built, re-execute step 6, if full Foot, execution step 7;
Step 7:Compilation of source code is performed, release product bag is generated;
Described structure refers to generate the process that product software bag is issued from the source code of product, and the source code of product exists Under one file, the structure script of product is deposited under this file, the component source code of product is deposited under this file Under sub-folder;
Described structure switch, refers to the component option whether to be compiled, and each component distributes a mark, in structure The structure that carry out the component is represented with the mark of component in the list built in property description file.
2. component software according to claim 1 combines construction method, it is characterised in that:Described inspection relies on environment Script be one check software whether install build required for software whether installed and whether version meets the foot of requirement This, can be shell scripts or bat scripts.
3. component software according to claim 2 combines construction method, it is characterised in that:Described foundation builds attribute and retouches The process that file is a mark for listing the component required for specific product version is stated, it is a letter to build property description file The property file of single key-value pair, needs the component for including in each description product particular version in file.
CN201310744540.6A 2013-12-29 2013-12-29 Software component combining and constructing method Active CN103729184B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310744540.6A CN103729184B (en) 2013-12-29 2013-12-29 Software component combining and constructing method
PCT/CN2014/071919 WO2015096275A1 (en) 2013-12-29 2014-02-10 Software construction method for supporting component composition construction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310744540.6A CN103729184B (en) 2013-12-29 2013-12-29 Software component combining and constructing method

Publications (2)

Publication Number Publication Date
CN103729184A CN103729184A (en) 2014-04-16
CN103729184B true CN103729184B (en) 2017-05-17

Family

ID=50453270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310744540.6A Active CN103729184B (en) 2013-12-29 2013-12-29 Software component combining and constructing method

Country Status (2)

Country Link
CN (1) CN103729184B (en)
WO (1) WO2015096275A1 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9250893B2 (en) * 2014-05-14 2016-02-02 Western Digital Technologies, Inc. Virtualized and automated software build system
CN104077140B (en) * 2014-07-04 2017-11-07 用友网络科技股份有限公司 Automation Compilation Method and compilation device for continuous integrating
CN104298597A (en) * 2014-10-11 2015-01-21 无锡天脉聚源传媒科技有限公司 Method and device for performing packet management in development process
CN104331665B (en) * 2014-10-29 2017-08-08 中国农业银行股份有限公司 A kind of generation method for reviewing object code and target code generator can be reviewed
CN104484172A (en) * 2014-12-11 2015-04-01 上海天脉聚源文化传媒有限公司 Method and device for packaging files
CN104536744B (en) * 2014-12-19 2018-07-13 微梦创科网络科技(中国)有限公司 A kind of method and server of automation structure and deployment code
CN104915214B (en) * 2015-06-25 2018-09-07 走遍世界(北京)信息技术有限公司 The dissemination method and device of system
CN105893104A (en) * 2016-03-28 2016-08-24 乐视控股(北京)有限公司 Code compiling method and device
CN106201481A (en) * 2016-06-30 2016-12-07 传线网络科技(上海)有限公司 Assembly management method and apparatus in application development system
CN106293763B (en) * 2016-08-19 2019-10-22 广州品唯软件有限公司 The management method and device of application component version
CN108304189B (en) * 2016-08-29 2021-03-12 迈普通信技术股份有限公司 Multi-mirror image equipment software compiling method, device and equipment
CN106406911B (en) * 2016-10-26 2019-11-15 国云科技股份有限公司 A kind of method of computer software functional unit
CN108170465B (en) * 2018-01-04 2021-01-01 武汉斗鱼网络科技有限公司 Version information management method, electronic equipment and readable storage medium
CN110457040B (en) * 2018-05-08 2022-02-25 腾讯科技(深圳)有限公司 Method and device for distributed construction of source code

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514361A (en) * 2002-12-31 2004-07-21 北京科泰世纪科技有限公司 Construction member self description packaging method and method of operation
CN1916842A (en) * 2006-09-06 2007-02-21 上海科泰世纪科技有限公司 Method of packaging component for implementing reflection mechanism in structurized software system
CN101027639A (en) * 2004-07-21 2007-08-29 索芙特瑞斯提股份有限公司 System and method for extraction and creation of application meta-information within a software application repository
CN102156654A (en) * 2011-04-28 2011-08-17 中兴通讯股份有限公司 Installation method and system thereof for software installation package

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514361A (en) * 2002-12-31 2004-07-21 北京科泰世纪科技有限公司 Construction member self description packaging method and method of operation
CN101027639A (en) * 2004-07-21 2007-08-29 索芙特瑞斯提股份有限公司 System and method for extraction and creation of application meta-information within a software application repository
CN1916842A (en) * 2006-09-06 2007-02-21 上海科泰世纪科技有限公司 Method of packaging component for implementing reflection mechanism in structurized software system
CN102156654A (en) * 2011-04-28 2011-08-17 中兴通讯股份有限公司 Installation method and system thereof for software installation package

Also Published As

Publication number Publication date
WO2015096275A1 (en) 2015-07-02
CN103729184A (en) 2014-04-16

Similar Documents

Publication Publication Date Title
CN103729184B (en) Software component combining and constructing method
Cinar Android apps with Eclipse
US20200110695A1 (en) Dynamic integration of command line utilities
US7890930B2 (en) Method and system for allowing an eclipse feature to create/remove/update program groups and shortcuts, via an eclipse install handler
CN102279750B (en) Iterative code generation method based on domain knowledge sharing
Molkentin The book of Qt 4: The art of building Qt applications
Milano Android application testing guide
US11635977B2 (en) Enhanced target selection for robotic process automation
US9715440B2 (en) Test scope determination based on code change(s)
CN101859244A (en) Multi-toolchain engineering construction method and system
Chowdhury Mastering Visual Studio 2017
CN102364442A (en) Method for transplanting Wine from x86 to advanced risc machine (ARM) platform
CN103645888A (en) System and method for automatically building operation system
Heffelfinger Java EE 7 with GlassFish 4 Application Server
Bilgin Mobile Development with. NET: Build cross-platform mobile applications with Xamarin. Forms 5 and ASP. NET Core 5
CN105446788A (en) Information processing method and electronic equipment
Rajput Mastering Spring Boot 2.0: Build modern, cloud-native, and distributed systems using Spring Boot
Deitel et al. Java SE 8 for programmers
Bilgin Hands-on Mobile Development with. NET Core: Build Cross-platform Mobile Applications with Xamarin, Visual Studio 2019, and. NET Core 3
Stoneman Docker on Windows: From 101 to production with Docker on Windows
Burnette Google web toolkit
US8135943B1 (en) Method, apparatus, and computer-readable medium for generating a dispatching function
Jones et al. Visual C# 2010 Recipes: A Problem-Solution Approach
CN109901844A (en) A kind of bootstrap technique suitable for different processor
Marchioni JBoss AS 7 Development

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee after: G-Cloud Technology Co., Ltd.

Address before: 523808 No. 14 Building, Songke Garden, Songshan Lake Science and Technology Industrial Park, Dongguan City, Guangdong Province

Patentee before: G-Cloud Technology Co., Ltd.