Embodiment
To enable goal of the invention, feature, the advantage of the present invention more obvious and understandable, below in conjunction with the present inventionAccompanying drawing in embodiment, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described realityIt is only part of the embodiment of the present invention to apply example, and not all embodiments.Based on the embodiment in the present invention, people in the artThe every other embodiment that member is obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Referring to Fig. 1, Fig. 1 is the implementation process schematic diagram for the program packaging method that one embodiment of the invention provides, the partyMethod can be applied in server.As shown in figure 1, this method mainly includes the following steps that:
101st, when packing task is triggered, the installation file and script file of program to be packed is obtained, is included in script fileThe configuration parameter of the startup interface of the program, the customized information that program distribution platform is related is included in the startup interface;
Specifically, in the development process of program, terminal device generates installation file and script text according to the operation of developerPart, and the preservation that uploads onto the server.It should be understood that store in server the different editions of multiple programs installation file andScript file.Therefore when packing task is triggered, it is necessary to determine installation file and script file according to demand.Wherein, wheneverWhen uploading new installation file, installation file is replaced with into the installation file after renewal.
Exemplary, if desired the script file of the installation file of latest edition and latest edition, then obtain latest editionInstallation file and script file.The configuration parameter of startup interface comprising program in script file.The configuration parameter is used to match somebody with somebodyPut the startup interface of program.The startup interface includes the related customized information of program distribution platform, and the customized information is sent out with programCloth platform is corresponding, such as:The version of the title of program distribution platform and the program installation kit on the program distribution platformInformation.
102nd, packing script file and installation file obtain the installation kit of the program;
Specifically, the script file of program and installation file are packed to obtain corresponding installation kit in packing platform.At thisDuring, it is necessary to according to the identification information of program to be packed, the title of such as program, it is determined that and obtaining the peace of the programFile and script file are filled, the installation file and script file are the installation consistent with the identification information of program to be packedFile and script file.Then installation file and script file are packed.In actual applications, the installation file of program is usedIn the installation of program, script file is then used for the individual demand for meeting the startup interface of program.Therefore, when in face of different journeysWhen the program installation kit of sequence distribution platform obtains request, by the way that the script file of needs and installation file are packed, and then improveIn the efficiency of different program distribution platform release process installation kits, and meet individual requirements.
103rd, the acquisition request that receiving terminal apparatus is sent, the mark comprising program distribution platform is believed in acquisition requestBreath;
Specifically, being mounted with the client-side program of program distribution platform on terminal device, the program distribution platform can be using city, or browser.Preferably, terminal device inputs in response to user on the client-side program of application market or browserProgram identification information, such as the title of program, installed in the client-side program search utility of application market or browserBag.If terminal device finds the program installation kit consistent with the program name in the server, then exported in terminal interfaceDownload the page, be provided with download program button on the download page, terminal device listen to user click on download program installation byDuring the event of button, the acquisition request of program installation kit is sent to server.Comprising program distribution platform in acquisition requestIdentification information, such as the title of program distribution platform.
104th, obtain the target program installation kit corresponding with identification information and be sent to terminal device.
Exemplary, asked in response to the acquisition that terminal device is sent, comprising program distribution platform in acquisition requestIdentification information, the identification information can be the title of program distribution platform, then server determines that program is installed according to the identification informationWrap, then server obtains the target program installation kit corresponding with identification information and is sent to terminal device.In actual applications,The terminal device can be the electronic data-processing equipment that smart mobile phone, tablet personal computer, notebook computer etc. can use on the moveAnd the non-electronic data-processing equipment that can be used on the move such as desktop computer.
In the embodiment of the present invention, the startup interface of program is configured by using script file, and the script is literaryPart and installation file are packaged with so that terminal device is controlled using the script file in the startup interface of the program of installationContent, so as to meet the individual demand of startup interface, can greatly improve and issue journey in different program distribution platformThe efficiency of sequence installation kit, and meet individual requirements.
Referring to Fig. 2, Fig. 2 is the implementation process schematic diagram for the program packaging method that another embodiment of the present invention provides, shouldMethod can be applied in server.As shown in figure 3, this method mainly includes the following steps that:
201st, when packing task is triggered, the installation file of program to be packed is obtained;Specifically, in the development process of programIn, terminal device generates installation file and script file, and the preservation that uploads onto the server according to the operation of developer.Can be withUnderstand, the installation file of the different editions of multiple programs to be packed is store in server.Therefore when packing task is triggeredWhen, it is necessary to determine installation file according to demand.Wherein, whenever new installation file is uploaded, installation file is replaced with into renewalInstallation file afterwards.
202nd, judge whether include target script file, target in multiple default script files comprising different customized informationsThe label information of script file label information corresponding with packing task is consistent;Specifically, in the development process of program, faceThe demand of different program distribution platforms, it is therefore desirable to configure the startup page of different programs, in the startup interface comprising pairThe customized information answered, therefore the default script file for including each startup interface of different customized informations is committed to server.Label information is also included in script file, a label information corresponding with packing task, target pin are pre-set in serverThe label information of this document label information corresponding with packing task is consistent.When packing task is triggered, server can pass throughJudge whether the label information of script file is unanimously believed from label information corresponding to packing task to judge to include different customizationsWhether target script file is included in multiple default script files of breath.If the label information of script file is corresponding with packing taskLabel information it is consistent, illustrate to include target script file, then perform step 203.If label information and the packing of script fileLabel information is inconsistent corresponding to task, illustrates not including target script information, then performs step 204.
If the 203rd, obtain script file of the target script file as the program comprising target script file;
Specifically, when the label information of script file label information corresponding with packing task is consistent, illustrate to wrap in serverContaining target script file, then script file is replaced with into target script file, then perform step 205.
If the 204, not including target script file, generic script file, the script file as program are obtained;
Specifically, when the label information of script file label information corresponding with packing task is inconsistent, illustrate in serverNot comprising target script file, then generic script file, the script file as program are obtained.Then step 205 is performed.
205th, packing script file and installation file obtain the installation kit of program;
Specifically, the script file of program and installation file are packed to obtain corresponding installation kit in packing platform.At thisDuring, it is necessary to according to the identification information of program to be packed, the title of such as program, it is determined that and obtaining the peace of the programFile and script file are filled, the installation file and script file can be the installation file and script file of final updating.Then willInstallation file and script file are packed.In actual applications, the installation file of program is used for the installation of program, script fileThen it is used for the individual demand for meeting the startup interface of program.Therefore, when the program installation in face of different program distribution platformsWhen bag obtains request, by the way that the script file of needs and installation file are packed, and then improve in different program distribution platformsThe efficiency of release process installation kit, and meet individual requirements.
Preferably, packing platform is Jenkins platforms, then based on Jenkins platforms packing script file and installation file.Jenkins platforms can greatly shorten the packing time, evade risk caused by modification installation file, raising program installation kitPacking efficiency.Preferably, script file is write using Python, there is readability and easy care in PythonCharacteristic.By the combination of Jenkins platforms and Python, the packing efficiency of program installation kit is not only greatly improved,And meet the individual demand of program.
206th, the acquisition request that receiving terminal apparatus is sent, obtains the identification information for including program distribution platform in request;
Specifically, being mounted with the client-side program of program distribution platform on terminal device, the program distribution platform can be using city, or browser.Preferably, terminal device inputs in response to user on the client-side program of application market or browserProgram identification information, such as the title of program, installed in the client-side program search utility of application market or browserBag.If terminal device finds the program installation kit consistent with the program name in the server, then exported in terminal interfaceDownload the page, be provided with download program button on the download page, terminal device listen to user click on download program installation byDuring the event of button, the acquisition request of program installation kit is sent to server.Comprising program distribution platform in acquisition requestIdentification information, such as the title of program distribution platform.
207th, obtain the target program installation kit corresponding with identification information and be sent to the terminal device.
Specifically, being asked in response to the acquisition that terminal device is sent, the mark of program distribution platform is included in acquisition requestKnow information, the identification information can be the title of program distribution platform, then server determines program installation kit according to the identification information,Then server obtains the target program installation kit corresponding with identification information and is sent to terminal device.In actual applications, shouldTerminal device can be the electronic data-processing equipment that can use on the move such as smart mobile phone, tablet personal computer, notebook computer withAnd the non-electronic data-processing equipment that can be used on the move such as desktop computer.
The sender that program installation kit obtains request can be terminal device.The program installation kit sent in response to terminal deviceRequest is obtained, program installation kit is sent to the sender of program installation kit acquisition request by server.Exemplary, terminal deviceOn be mounted with the client-side program of program distribution platform, user is deposited by being searched in the client-side program of program distribution platformStore up the program installation kit in server.Server obtains request in response to the program installation kit that terminal device is sent, and server willProgram installation kit is sent to terminal device.
In embodiments of the present invention, by judging that the label information label information corresponding with packing task of script file isIt is no consistent, if the label information of script file label information corresponding with packing task is consistent, by installation file and target pinThis document packs to obtain program installation kit.Finally obtain and ask in response to program installation kit, program installation kit is sent to programInstallation kit obtains terminal device, completes the packing action of program, greatly improves the packing efficiency of program.And pass through scriptFile meets the individual demand of program.
Referring to Fig. 3, Fig. 3 is the implementation process schematic diagram for the program installation method that one embodiment of the invention provides, the partyMethod can be applied to terminal, and terminal includes:The electron number that smart mobile phone, tablet personal computer, notebook computer etc. can use on the moveAccording to the non-electronic data-processing equipment that can be used on the move such as processing equipment and desktop computer.As shown in figure 3, this methodMainly include the following steps that:
301st, when detecting download program installation operation, sent to server and obtain instruction, obtained in instruction and sent out comprising programSecond identification information of the first identification information of cloth platform and the program of installation to be downloaded;
Specifically, when terminal device detects download program installation operation, sent to server and obtain instruction, obtained in instructionSecond identification information of the program of the first identification information and installation to be downloaded comprising program distribution platform.Wherein, program is sent outFirst identification information of cloth platform can be the title of program distribution platform, the second program identification information of the program of installation to be downloadedIt can be the title of the program of installation to be downloaded.
302nd, the program installation kit corresponding with the first identification information and the second identification information that the reception server is sent, programInstallation kit includes the installation file and script file of program, and the configuration parameter of the startup interface of program is included in script file,The customized information that program distribution platform is related is included in startup interface;
Specifically, the program installation corresponding with the first identification information and the second identification information that terminal device the reception server is sentBag, the program installation kit include the installation file and script file of program.Startup interface comprising program in script fileConfiguration parameter, the customized information that program distribution platform is related is included in startup interface.Wherein, the related customization of program distribution platformInformation can be program distribution platform title and on the program distribution platform program to be downloaded version information.It is exemplary, the client-side program of program distribution platform is mounted with terminal device, user is deposited by being searched on client-side programStore up the program installation kit in server.When terminal device, which listens to user, clicks on download installation operation, then by program installation kitRequest is obtained to send to server.Obtain and ask in response to program installation kit, program installation kit is sent to terminal and set by serverIt is standby.The configuration parameter of startup interface comprising program in script file.The configuration parameter is used for the startup interface for obtaining programConfiguration file, to be shown on the terminal device when program starts.
303rd, installation file is run with installation procedure, and when program starts, and the startup of program is generated according to script fileInterface simultaneously exports.
Specifically, after device end gets program installation kit, the installation file in the program installation kit is run to installProgram, and when program starts, the startup interface of the script file generation program in the program installation kit and output.
Wherein, if the configuration parameter of the startup interface of the program is configuration file, the configuration file can be picture file, thenOpen and ask in response to program, startup interface and the output of the program are generated according to the configuration file.Exemplary, picture textPart can be scenery picture, be furnished with text information on picture, to illustrate the version information of the program installation kit and channel information, thenWhen program starts, the picture is shown on the terminal device.
Wherein, if the configuration parameter of the startup interface of the program is address information and text file, the address information is used forPicture file is obtained, the text file is used for the version information and channel information for illustrating the program installation kit.Then in response to programRequest is opened, the address is accessed, the configuration file is obtained from server, the configuration file can be picture file, further according to configurationFile and text file generate the startup interface of the program and output.Exemplary, the picture can be scenery picture, in the landscapeThe text file is loaded on picture, then when program starts, shows the picture for being loaded with text file on the terminal deviceFile.
In embodiments of the present invention, when detecting download program operation, send and instruct to server, obtain and wrapped in instructionSecond identification information of the first identification information of the distribution platform containing program and the program of installation to be downloaded, according to first markInformation and the second identification information obtain program installation kit from server, and the program installation kit includes installation file and script textPart, the configuration parameter of the startup interface comprising described program in the script file.Then terminal device is according to the program installation kitInstallation procedure, startup interface and the output of the program are generated according to the script file, passes through the startup of the program in script fileThe configuration parameter at interface meets the individual demand of program.
Referring to Fig. 4, Fig. 4 is the structural representation for the program packing apparatus that one embodiment of the invention provides.The device canApplied to server, for realizing the program packaging method in embodiment as shown in Figure 1 above.As shown in figure 4, the device is mainIncluding:Acquisition module 401, for when packing task is triggered, obtaining the installation file and script file of program to be packed,The configuration parameter of the startup interface of the program is included in the script file, program distribution platform correlation is included in the startup interfaceCustomized information.
Packetization module 402, for packing, the script file and the installation file obtain the installation kit of the program.
Receiving module 403, the acquisition request sent for receiving terminal apparatus, is issued in acquisition request comprising the programThe identification information of platform.
Acquisition module 401, it is additionally operable to obtain the target program installation kit corresponding with the identification information and is sent to the terminalEquipment.
The details of the present embodiment not to the greatest extent, refers to the description of foregoing embodiment illustrated in fig. 1, here is omitted.
In embodiments of the present invention, the startup interface of program is configured by using script file, and by the scriptFile and installation file are packaged with so that terminal device controls the startup interface of the program of installation using the script fileIn content, so as to meet the individual demand of startup interface, can greatly improve in different program distribution platform issuesThe efficiency of program installation kit, and meet individual requirements.
Referring to Fig. 5, Fig. 5 is the structural representation for the program packing apparatus that another embodiment of the present invention provides.The deviceApplied to server, for realizing such as the program packaging method in above-mentioned Fig. 1 and embodiment illustrated in fig. 2.Dress as shown in Figure 5Put, essentially consisted in the device difference in embodiment illustrated in fig. 4, in the present embodiment:
Further, label information is also included in the script file, acquisition module 401 includes:
Judging submodule 501, for when the packing task is triggered, judging the multiple default scripts for including different customized informationsWhether target script file, the label information of the target script file with the packing task corresponding label information are included in fileUnanimously;
Acquisition submodule 502, if being judged as including the target script file specifically for the judging submodule 501, obtaining shouldScript file of the target script file as the program.
Further, acquisition submodule 502, it is judged as not including the target script if being additionally operable to the judging submodule 501File, then obtain generic script file, the script file as the program.
Further, packetization module 402, it is additionally operable to pack the script file and the installation file based on Jenkins platformsObtain the installation kit of the program.
The details of the present embodiment not to the greatest extent, refers to the description of earlier figures 1 and embodiment illustrated in fig. 2, here is omitted.
In the embodiment of the present invention, whether the label information label information corresponding with packing task by judging script fileUnanimously, if the label information of script file label information corresponding with packing task is consistent, by installation file and target scriptFile packs to obtain program installation kit.Finally obtain and ask in response to program installation kit, program installation kit is sent to program peaceDress bag obtains terminal device, completes the packing action of program, greatly improves the packing efficiency of program.And pass through script textPart meets the individual demand of program.
Referring to Fig. 6, Fig. 6 is the structural representation for the program erecting device that one embodiment of the invention provides.The device canApplied in terminal device, terminal device includes:What smart mobile phone, tablet personal computer, notebook computer etc. can use on the moveThe non-electronic data-processing equipment that can be used on the move such as electronic data-processing equipment and desktop computer, for realizing such asProgram installation method shown in above-mentioned Fig. 3.As shown in fig. 6, the device mainly includes:
Sending module 601, for when detecting download program installation operation, being sent to server and obtaining instruction, the acquisition refers toThe first identification information comprising program distribution platform and the second identification information of the program of installation to be downloaded in order.
Receiving module 602, for receive the server transmission with first identification information and second identification information pairThe program installation kit answered, the program installation kit include the installation file and script file of the program, included in the script fileThe configuration parameter of the startup interface of the program, the customized information that the program distribution platform is related is included in the startup interface.
Module 603 is installed, for running the installation file to install the program.
Output module 604, when the program starts, startup interface and the output of the program are generated according to the script file.
The details of the present embodiment not to the greatest extent, refers to the description of foregoing embodiment illustrated in fig. 3, here is omitted.
In embodiments of the present invention, when detecting download program operation, send and instruct to server, obtain and wrapped in instructionSecond identification information of the first identification information of the distribution platform containing program and the program of installation to be downloaded, according to first markInformation and the second identification information obtain program installation kit from server, and the program installation kit includes installation file and script textPart, the configuration parameter of the startup interface comprising described program in the script file.Then terminal device is according to the program installation kitInstallation procedure, startup interface and the output of the program are generated according to the script file, passes through the startup of the program in script fileThe configuration parameter at interface meets the individual demand of program.
In multiple embodiments provided herein, it should be understood that disclosed apparatus and method, it can be passed throughIts mode is realized.For example, embodiments described above is only schematical, for example, the division of the module, is onlyA kind of division of logic function, can there is an other dividing mode when actually realizing, for example, multiple module or components can combine orPerson is desirably integrated into another system, or some features can be ignored, or does not perform.Another, shown or discussed is mutualBetween coupling or direct-coupling or communication linkage can be by some interfaces, the INDIRECT COUPLING or communication linkage of module, canTo be electrical, mechanical or other forms.
The module illustrated as separating component can be or may not be physically separate, show as moduleThe part shown can be or may not be physical module, you can with positioned at a place, or can also be distributed to multipleOn mixed-media network modules mixed-media.Some or all of module therein can be selected to realize the mesh of this embodiment scheme according to the actual needs's.
In addition, each functional module in each embodiment of the present invention can be integrated in a processing module, can alsoThat modules are individually physically present, can also two or more modules be integrated in a module.Above-mentioned integrated mouldBlock can both be realized in the form of hardware, can also be realized in the form of software function module.
It should be noted that for foregoing each method embodiment, in order to which simplicity describes, therefore it is all expressed as a series ofCombination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement becauseAccording to the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also knowKnow, embodiment described in this description belongs to preferred embodiment, and involved action and module might not all be this hairsNecessary to bright.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodimentPoint, it may refer to the associated description of other embodiments.
It is the description to program packaging method provided by the present invention and device and program installation method and device above, it is rightIn those of ordinary skill in the art, according to the thought of the embodiment of the present invention, can in specific embodiments and applicationsThere is change part, to sum up, this specification content should not be construed as limiting the invention.