CN106897049A - The packaging method and device of a kind of installation kit - Google Patents
The packaging method and device of a kind of installation kit Download PDFInfo
- Publication number
- CN106897049A CN106897049A CN201510961704.XA CN201510961704A CN106897049A CN 106897049 A CN106897049 A CN 106897049A CN 201510961704 A CN201510961704 A CN 201510961704A CN 106897049 A CN106897049 A CN 106897049A
- Authority
- CN
- China
- Prior art keywords
- installation kit
- channel number
- configuration file
- channel
- installation
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/73—Program documentation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Library & Information Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses the packaging method and device of a kind of installation kit, methods described includes:The channel number of installation kit is read in configuration file;By way of channel number is stored under the assets catalogues of installation kit, channel information is added in installation kit, and installation kit to the addition of channel information carries out packing treatment.Installation kit packing scheme of the present invention is due to that need not recompilate any file, so having saved the substantial amounts of time, getting the time of single channel bag less than 5s, and read channel number only needs 10ms.The program is reasonable in design compared with other schemes, and packing speed is fast, and reading speed is fast, and can replace a large amount of channel resource files as needed.
Description
Technical field
The present invention relates to Internet technical field, more particularly to a kind of installation kit packaging method and device.
Background technology
With the development of Android smartphone, various application market channels are on the increase.And APP (third parties
Application program) in issuing process, generally require to issue different APP according to different channels, to meet not
With the demand and the use data of distributing canal road counting user of cooperation channel.For APP exploitations, just need
Different APK bags (Android Package, Android installation kit) are sequentially generated as needed.By hand
Change and go the method for generating different channels not only very expensive, and lose time, easily malfunction.Therefore seek
Look for a kind of the very necessary of method change that efficiently can in batches quickly generate APK bags.
At present, existing batch quickly generates the mode of APK bags and has:
Mode one:Most traditional mode, i.e., using the channel number of ant script varying cyclically configuration files, circulation
Packing.Specifically, the program is that channel information is placed in AndroidManifest configuration files.During packing,
Recursive call packing script, required APK bags are got after changing channel information with script every time.
However, which is only to be changed needing the channel information of modification by hand to change into automation, every time
Accent is needed to start to get APK bags, the time of single channel bag does not change in speed.
Mode two:It is a kind of relatively efficient packing manner compared with mode one.This scheme is by channel number
Character string is placed in the signature file of APK.When batch bag is played, it is only necessary on the basis of single APK
On, replicate APK, the channel information in modification signature file.
However, which is due to that need not compile, speed is fast, and the time of each batch bag is less than 1s.But
There is obvious shortcoming in the program, channel is placed on the mode in signature file against design principle, while signing
Name file only adds fairly small content, it is impossible to go to be adapted to more resources.
Mode three:It is a kind of new packing manner, is packed using the Flavor configuration modes of gradle.
Generally be placed on channel information in AndroidManifest configuration files by which.Exist every time during packing
Channel information is configured in AndroidManifest, using incremental update compiling generation APK.
Which only needs to compile configuration file every time, and speed is relatively fast, but plays single channel bag and still need to tens
Second.
The content of the invention
The present invention provides a kind of packaging method and device of installation kit, is used to solve the problems of the prior art peace
Fill the low problem of the packing efficiency of bag.
According to one aspect of the present invention, there is provided a kind of packaging method of installation kit, including:
The channel number of installation kit is read in configuration file;
By way of channel number is stored under the assets catalogues of installation kit, channel letter is added in installation kit
Breath, and installation kit to the addition of channel information carries out packing treatment.
Alternatively, in the method for the invention, when the multiple support channels for including the installation kit in configuration file
Number when, it is described to add channel information in installation kit, and installation kit to the addition of channel information packs
Treatment, specifically includes:
A channel number is sequentially read from the configuration file;
By the channel number storage under the assets catalogues of installation kit, packing treatment is carried out to the installation kit;
The installation kit that duplication has been packed, and carry out decompression;
Next channel number is sequentially read from the configuration file, and decompression is changed according to the channel number
The channel number under assets catalogues in installation kit afterwards;
Installation kit after processing modification carries out packing treatment;
Return to copy step, all channels number until having traveled through the installation kit.
Alternatively, in the method for the invention, when the multiple support channels for including the installation kit in configuration file
Number when, it is described that channel information is added in installation kit, specifically include:
According to the number of channel number, duplication obtains multiple installation kits;
According to a channel number mode corresponding with an installation kit, by channel number storage in correspondence installation kit
Assets catalogues under.
Alternatively, in the method for the invention, before the channel number for reading installation kit in configuration file, also
Including:The step of obtaining installation kit.
Alternatively, in the method for the invention, also include after carrying out packing treatment to the installation kit:Air exercise
Installation kit after bag is signed.
According to another aspect of the present invention, there is provided a kind of packing apparatus of installation kit, including:
Configuration module, for generating configuration file;Include the channel number of installation kit in the configuration file;
Data obtaining module, the channel number for reading installation kit in the configuration file;
Processing module, for by way of channel number is stored under the assets catalogues of installation kit, installing
Channel information is added in bag;
Packetization module, for carrying out packing treatment to the installation kit that with the addition of channel information.
Alternatively, in device of the present invention, when the multiple support channels for including the installation kit in configuration file
Number when, the processing module, specifically for sequentially reading a channel number from the configuration file, will be described
After channel number is stored under the assets catalogues of installation kit, the packetization module is triggered;The installation that duplication has been packed
Bag, and after carrying out decompression, sequentially reads next channel number from the configuration file, and according to
After the channel number under the assets catalogues in installation kit after the current channel number modification decompression for reading, touch
Send out packetization module described;Return to reproduction process, all channels number until having traveled through the installation kit.
Alternatively, in device of the present invention, when the multiple support channels for including the installation kit in configuration file
Number when, the processing module, specifically for the number according to channel number, duplication obtains multiple installation kits;Press
According to a channel number mode corresponding with an installation kit, channel number is stored into the assets in correspondence installation kit
Under catalogue.
Alternatively, in device of the present invention, described information acquisition module reads in configuration file and installs
The channel number of bag performs the operation for obtaining installation kit before, also.
Alternatively, device of the present invention also includes:Signature blocks, for being carried out to the installation kit after packing
Signature.
The present invention has the beneficial effect that:
Installation kit packing scheme of the present invention is due to that need not recompilate any file, so saving
The substantial amounts of time, getting the time of single channel bag less than 5s, and read channel number only needs 10ms.The program
Reasonable in design compared with other schemes, packing speed is fast, and reading speed is fast, and can replace as needed
Change a large amount of channel resource files.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to implementing
Example or the accompanying drawing to be used needed for description of the prior art are briefly described, it should be apparent that, retouch below
Accompanying drawing in stating only some embodiments of the present invention, for those of ordinary skill in the art, not
On the premise of paying creative labor, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of flow chart of the packaging method of installation kit that the embodiment of the present invention one is provided;
Fig. 2 is the installation kit batch packing corresponding flow chart of processing mode one in the embodiment of the present invention one;
Fig. 3 is the installation kit batch packing corresponding flow chart of processing mode two in the embodiment of the present invention one;
Fig. 4 is a kind of structured flowchart of the packing apparatus of installation kit that the embodiment of the present invention two is provided.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearly
Chu, it is fully described by, it is clear that described embodiment is only a part of embodiment of the invention, rather than
Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creation
Property work under the premise of the every other embodiment that is obtained, belong to the scope of protection of the invention.
Embodiment one
The embodiment of the present invention provides a kind of packaging method of installation kit, and the method is by changing installation kit (APK
Bag) assets files, the rapid batch packing scheme for repacking and signing to realize.
The specific implementation process of 1 pair of the present embodiment methods described is illustrated below in conjunction with the accompanying drawings, such as Fig. 1 institutes
Show, methods described comprises the following steps:
Step S101, reads the channel number of installation kit in configuration file;
It is noted that before step implementation, the installation kit of application program to be packed should have been obtained.
Step S102, by way of channel number is stored under the assets catalogues of installation kit, in installation kit
Middle addition channel information;
Step S103, the installation kit to the addition of channel information carries out packing treatment.
The present embodiment methods described can be realized by script command.
In the embodiment of the present invention, if the corresponding channel number of installation kit is one, directly the channel number is stored
Packed after under the assets catalogues of installation kit.
If the corresponding channel number of installation kit is multiple, the embodiment of the present invention is given at the following two kinds batch packing
Reason mode:
Batch packing processing mode one, as shown in Fig. 2 including following process step:
Step S201, sequentially reads a channel number from the configuration file;
Step S202, by the channel number storage under the assets catalogues of installation kit;
Step S203, packing treatment is carried out to the installation kit;
Step S204, the installation kit that duplication has been packed, and carry out decompression;
Step S205, sequentially reads next channel number, and change according to the channel number from the configuration file
The channel number under assets catalogues in installation kit after decompression;
Step S206, the installation kit after processing modification carries out packing treatment;
Step S207, return to step S204, all channels number until having traveled through the installation kit terminate.
It can be seen that, which is that first a channel information is placed under the assets catalogues of Android installation kit, and generation is single
Individual installation kit, then, then by replicating installation kit, decompression, modification channel number, the program repacked,
Complete the batch packing process of installation kit.
Batch packing processing mode two, as shown in figure 3, comprising the following steps:
Step S301, according to the number of channel number, duplication obtains multiple installation kits;
Step S302, according to a channel number mode corresponding with an installation kit, channel number storage is existed
Under the assets catalogues of correspondence installation kit;
Step S303, each installation kit to the addition of channel information carries out packing treatment respectively.
It can be seen that, which is that first installation kit is replicated, and channel information then is placed in into corresponding installation again
Under the assets catalogues of bag, so as to complete the batch packing process of installation kit.
The batch that can be efficiently completed installation kit by any one mode in above two mode is packed.
Further, in the embodiment of the present invention, also need to carry out installation kit after carrying out installation kit packing treatment
Signature treatment.
Installation kit packaging method provided in an embodiment of the present invention, reasonable in design compared with other schemes, packing
Speed is fast, and reading speed is fast, and can replace a large amount of channel resource files as needed.
Embodiment two
The embodiment of the present invention provides a kind of packing apparatus of installation kit, as shown in figure 4, including:
Configuration module 410, for generating configuration file;Include the channel number of installation kit in the configuration file;
Data obtaining module 420, the channel number for reading installation kit in the configuration file;
Processing module 430, for by channel number store under the assets catalogues of installation kit by way of,
Channel information is added in installation kit;
Packetization module 440, for carrying out packing treatment to the installation kit that with the addition of channel information.
Based on said structure framework and implementation principle, under the above constitution several specific and preferably is given below
Implementation method, is used to refine and optimize the function of device of the present invention, so that the implementation of the present invention program is more
It is convenient, accurately.Specifically related to following content:
In the embodiment of the present invention, data obtaining module 420, in configuration file read installation kit channel number it
Before, also perform the operation of the installation kit of the application program for obtaining to be packed.
Further, in the embodiment of the present invention, when the multiple support channels of installation kit are included in configuration file,
Processing module 430 can combine packetization module 440 and complete batch packing treatment one of in the following manner.
Mode one:Processing module 430, sequentially reads a channel number from the configuration file, by the channel
After number storage is under the assets catalogues of installation kit, packetization module 440 is triggered;The installation kit that duplication has been packed,
And after carrying out decompression, next channel number is sequentially read from the configuration file, and according to current
After the channel number under the assets catalogues in installation kit after the channel number modification decompression of reading, triggering is beaten
Bag module 440;Return to reproduction process, all channels number until having traveled through the installation kit.
Mode two:Processing module 430, according to the number of channel number, duplication obtains multiple installation kits;According to one
The individual channel number mode corresponding with an installation kit, the assets catalogues in correspondence installation kit are stored by channel number
Under.Packetization module 440 carries out packing treatment to each installation kit after the treatment of processing module 430.
Further, embodiment of the present invention described device also includes:Signature blocks, for the peace after packing
Dress bag is signed.
Installation kit packing scheme provided in an embodiment of the present invention, reasonable in design compared with other schemes, packing
Speed is fast, and reading speed is fast, and can replace a large amount of channel resource files as needed.
Each embodiment in this specification is described by the way of progressive, identical phase between each embodiment
As part mutually referring to, what each embodiment was stressed be its it is different from other embodiment it
Place.For particularly with device embodiment, due to its substantially similar and embodiment of the method, so, description
Fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment
Program be can be by instruct the hardware of correlation to complete, the program can be stored in a computer-readable and deposit
In storage media, storage medium can include:ROM, RAM, disk or CD etc..
In a word, presently preferred embodiments of the present invention is the foregoing is only, guarantor of the invention is not intended to limit
Shield scope.All any modification, equivalent substitution and improvements within the spirit and principles in the present invention, made etc.,
Should be included within the scope of the present invention.
Claims (10)
1. a kind of packaging method of installation kit, it is characterised in that including:
The channel number of installation kit is read in configuration file;
By way of channel number is stored under the assets catalogues of installation kit, channel letter is added in installation kit
Breath, and installation kit to the addition of channel information carries out packing treatment.
2. the method for claim 1, it is characterised in that when including the installation in configuration file
It is described that channel information is added in installation kit during the multiple support channels of bag, and to the addition of the peace of channel information
Dress bag carries out packing treatment, specifically includes:
A channel number is sequentially read from the configuration file;
By the channel number storage under the assets catalogues of installation kit, packing treatment is carried out to the installation kit;
The installation kit that duplication has been packed, and carry out decompression;
Next channel number is sequentially read from the configuration file, and decompression is changed according to the channel number
The channel number under assets catalogues in installation kit afterwards;
Installation kit after processing modification carries out packing treatment;
Return to copy step, all channels number until having traveled through the installation kit.
3. the method for claim 1, it is characterised in that when including the installation in configuration file
It is described that channel information is added in installation kit during the multiple support channels of bag, specifically include:
According to the number of channel number, duplication obtains multiple installation kits;
According to a channel number mode corresponding with an installation kit, by channel number storage in correspondence installation kit
Assets catalogues under.
4. the method as described in claim 1 or 2 or 3, it is characterised in that peace is read in configuration file
Fill the channel number of bag before, also include:The step of obtaining installation kit.
5. the method as described in claim 1 or 2 or 3, it is characterised in that beaten the installation kit
Also include after bag treatment:Installation kit after packing is signed.
6. a kind of packing apparatus of installation kit, it is characterised in that including:
Configuration module, for generating configuration file;Include the channel number of installation kit in the configuration file;
Data obtaining module, the channel number for reading installation kit in the configuration file;
Processing module, for by way of channel number is stored under the assets catalogues of installation kit, installing
Channel information is added in bag;
Packetization module, for carrying out packing treatment to the installation kit that with the addition of channel information.
7. device as claimed in claim 6, it is characterised in that when including the installation in configuration file
During the multiple support channels of bag, the processing module, specifically for sequentially reading a canal from the configuration file
Taoist monastic name, after the channel number is stored under the assets catalogues of installation kit, triggers the packetization module;Replicate
The installation kit packed, and after carrying out decompression, next channel is sequentially read from the configuration file
Number, and according under the assets catalogues in the installation kit after the current channel number modification decompression for reading
After channel number, the packetization module is triggered;Reproduction process is returned to, until having traveled through all of the installation kit
Channel number.
8. device as claimed in claim 6, it is characterised in that when including the installation in configuration file
During the multiple support channels of bag, the processing module, specifically for the number according to channel number, duplication obtains many
Individual installation kit;According to a channel number mode corresponding with an installation kit, by channel number storage in correspondence
Under the assets catalogues of installation kit.
9. the device as described in claim 6 or 7 or 8, it is characterised in that described information acquisition module,
Before the channel number for reading installation kit in configuration file, the operation for obtaining installation kit is also performed.
10. the device as described in claim 6 or 7 or 8, it is characterised in that also include:
Signature blocks, for being signed to the installation kit after packing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510961704.XA CN106897049A (en) | 2015-12-21 | 2015-12-21 | The packaging method and device of a kind of installation kit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510961704.XA CN106897049A (en) | 2015-12-21 | 2015-12-21 | The packaging method and device of a kind of installation kit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106897049A true CN106897049A (en) | 2017-06-27 |
Family
ID=59190643
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510961704.XA Pending CN106897049A (en) | 2015-12-21 | 2015-12-21 | The packaging method and device of a kind of installation kit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106897049A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107992311A (en) * | 2017-12-27 | 2018-05-04 | 北京酷我科技有限公司 | A kind of method of rapid batch packing generation APK file |
CN111209001A (en) * | 2019-12-19 | 2020-05-29 | 福建升腾资讯有限公司 | Method, system, equipment and medium for batch generation of APKs of android channels |
CN111611007A (en) * | 2020-05-21 | 2020-09-01 | 掌阅科技股份有限公司 | Script-based application program installation package packaging method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346184A (en) * | 2013-08-01 | 2015-02-11 | 中兴通讯股份有限公司 | Application packaging device and application packaging method |
CN104346167A (en) * | 2014-08-25 | 2015-02-11 | 腾讯科技(深圳)有限公司 | Method and device for generating application channel package |
CN105068853A (en) * | 2015-07-16 | 2015-11-18 | 贵阳语玩科技有限公司 | Channel package output method and apparatus |
-
2015
- 2015-12-21 CN CN201510961704.XA patent/CN106897049A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346184A (en) * | 2013-08-01 | 2015-02-11 | 中兴通讯股份有限公司 | Application packaging device and application packaging method |
CN104346167A (en) * | 2014-08-25 | 2015-02-11 | 腾讯科技(深圳)有限公司 | Method and device for generating application channel package |
CN105068853A (en) * | 2015-07-16 | 2015-11-18 | 贵阳语玩科技有限公司 | Channel package output method and apparatus |
Non-Patent Citations (1)
Title |
---|
吴传龙: ""更改已经签名的app中的内容"", 《HTTP://SUO.IM/5HO9CJ》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107992311A (en) * | 2017-12-27 | 2018-05-04 | 北京酷我科技有限公司 | A kind of method of rapid batch packing generation APK file |
CN111209001A (en) * | 2019-12-19 | 2020-05-29 | 福建升腾资讯有限公司 | Method, system, equipment and medium for batch generation of APKs of android channels |
CN111611007A (en) * | 2020-05-21 | 2020-09-01 | 掌阅科技股份有限公司 | Script-based application program installation package packaging method and device |
CN111611007B (en) * | 2020-05-21 | 2023-08-29 | 掌阅科技股份有限公司 | Method and equipment for packaging application program installation package based on script realization |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10055216B2 (en) | Minimizing image copying during partition updates | |
CN111290778B (en) | AI model packaging method, platform and electronic equipment | |
CN110058856A (en) | Page configuration method and device | |
CN104965757A (en) | Virtual machine live migration method, virtual machine migration management apparatus, and virtual machine live migration system | |
CN105700925B (en) | A kind of interface implementing method and device of APP | |
CN104714788A (en) | Method and device for automatically generating software installation package | |
CN104516738A (en) | Integrated implementing method for development and release of APP | |
CN108829378A (en) | A kind of development approach of application software, device and electronic equipment | |
CN104077146A (en) | Personalized customization method and system for application programs of mobile terminal | |
CN103970908A (en) | Virtual machine template IVF storage method | |
CN111090433A (en) | Data processing method, device and storage medium | |
CN103577225B (en) | A kind of software installation method and device | |
CN109542459A (en) | Application program packaging method and device, computer installation and computer storage medium | |
CN103177078A (en) | Method and system for processing theme package | |
CN106502715A (en) | A kind of application program collocation method and device by all kinds of means | |
CN105488210B (en) | A kind of batch data matching process and device | |
CN106598672A (en) | Application configuration method and apparatus | |
CN106843939A (en) | The generation method and device of the channel bag of application | |
CN108647032A (en) | Using loading method and device, computer installation and computer readable storage medium | |
JP6211110B2 (en) | Content providing system and content providing method | |
CN106897049A (en) | The packaging method and device of a kind of installation kit | |
CN104298534A (en) | Programming method and device based on Lua language | |
CN109828759A (en) | Code compiling method, device, computer installation and storage medium | |
CN108197440A (en) | A kind of Code obfuscation method, equipment and computer readable storage medium | |
CN107066257A (en) | A kind of method for packing and device by Unity to Android |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170627 |
|
RJ01 | Rejection of invention patent application after publication |