CN108228196A - The packaging method and device of application program - Google Patents

The packaging method and device of application program Download PDF

Info

Publication number
CN108228196A
CN108228196A CN201611141287.5A CN201611141287A CN108228196A CN 108228196 A CN108228196 A CN 108228196A CN 201611141287 A CN201611141287 A CN 201611141287A CN 108228196 A CN108228196 A CN 108228196A
Authority
CN
China
Prior art keywords
executable file
task
script
file
installation kit
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
CN201611141287.5A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201611141287.5A priority Critical patent/CN108228196A/en
Publication of CN108228196A publication Critical patent/CN108228196A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/62Uninstallation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses the packaging methods and device of a kind of application program.Wherein, this method includes:Preset instructions are received, first task is performed, generates the first executable file for unloading intended application, wherein, the first executable file is the executable file unsigned;After first task has been performed, signature operation, the second executable file after being signed are carried out to the first executable file by performing the second task;The resource file that generation target installation kit needs are used is obtained, wherein, target installation kit is the installation kit applied for installation targets;The second executable file and resource file are packaged as target installation kit by performing third task.The present invention solves the technical issues of client of installation on a computing device cannot unload.

Description

The packaging method and device of application program
Technical field
The present invention relates to computer software fields, in particular to the packaging method and device of a kind of application program.
Background technology
NSIS, English full name are Nullsoft Scriptable Install System, are a Windows to increase income The tools of installation procedure under system, it provides the functions such as the peace loading, unloading of software, system setting, file decompression.
In order to meet the individual demand of enterprises and individuals, user often independently writes some some journeys as needed Sequence, after the source code of software is write, it is possible to which, using the installation kit of NSIS tool making programs, installation on computers is pacified Dress Bao Shihui is automatically generated for the Uninstaller of unloading client, is generated after the installation procedure installation made due to the use of NSIS Uninstaller be automatically generated (such as uninst.exe), cause installation procedure can because uninst.exe not sign due to be pacified Full software intercepts, and so as to run, causes client that can not be unloaded.
The technical issues of cannot being unloaded for the client of above-mentioned installation on a computing device, not yet proposes effective at present Solution.
Invention content
An embodiment of the present invention provides the packaging method and device of a kind of application program, at least to solve to be mounted on computer The technical issues of client in equipment cannot unload.
One side according to embodiments of the present invention, provides a kind of packaging method of application program, and this method includes:It connects Preset instructions are received, first task is performed, generates the first executable file for unloading intended application, wherein, first is executable File is the executable file unsigned;It is executable literary to first by performing the second task after first task has been performed Part carries out signature operation, the second executable file after being signed;Obtain the resource text that generation target installation kit needs are used Part, wherein, target installation kit is the installation kit applied for installation targets;By performing third task by the second executable file Target installation kit is packaged as with resource file.
Another aspect according to embodiments of the present invention, additionally provides a kind of packing apparatus of application program, which includes: Receiving unit for receiving preset instructions, performs first task, generates the first executable file for unloading intended application, Wherein, the first executable file is the executable file unsigned;Signature unit, for after first task has been performed, leading to It crosses second task that performs and signature operation, the second executable file after being signed is carried out to the first executable file;It obtains single Member, for obtaining the resource file that generation target installation kit needs are used, wherein, target installation kit is for installation targets application Installation kit;Packaged unit, for pass through perform third task by the second executable file and resource file be packaged as target peace Dress packet.
In embodiments of the present invention, by performing task on the computing device, obtaining for the first executable file can be realized It takes and signature operation, and the second executable file after signature and resource file is packaged as target installation kit, installing in this way The Uninstaller (i.e. the second executable file) of signature is just had in the catalogue file of the intended application obtained after target installation kit, It can solve the technical issues of client of installation on a computing device cannot unload, and then reach smoothly unloading computer Client and raising application in equipment are packaged the technique effect of efficiency.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and forms the part of the application, this hair Bright illustrative embodiments and their description do not constitute improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of the hardware environment of the packaging method of application program according to embodiments of the present invention;
Fig. 2 is a kind of flow chart of the packaging method of optional application program according to embodiments of the present invention;
Fig. 3 is the schematic diagram of the device of the packaging method of executing application according to embodiments of the present invention;
Fig. 4 is a kind of flow chart of the packaging method of optional application program according to embodiments of the present invention;
Fig. 5 is a kind of schematic diagram of the packing apparatus of optional application program according to embodiments of the present invention;
Fig. 6 is a kind of schematic diagram of the packing apparatus of optional application program according to embodiments of the present invention;And
Fig. 7 is a kind of structure diagram of terminal according to embodiments of the present invention.
Specific embodiment
In order to which those skilled in the art is made to more fully understand the present invention program, below in conjunction in the embodiment of the present invention The technical solution in the embodiment of the present invention is clearly and completely described in attached drawing, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people Member's all other embodiments obtained without making creative work should all belong to the model that the present invention protects It encloses.
It should be noted that term " first " in description and claims of this specification and above-mentioned attached drawing, " Two " etc. be the object for distinguishing similar, and specific sequence or precedence are described without being used for.It should be appreciated that it uses in this way Data can be interchanged in the appropriate case, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, be not necessarily limited to for example, containing the process of series of steps or unit, method, system, product or equipment Those steps or unit clearly listed, but may include not listing clearly or for these processes, method, product Or the intrinsic other steps of equipment or unit.
First, the part noun or term occurred during the embodiment of the present invention is described is suitable for as follows It explains:
Process:English name is Process, is that the program in computer is lived about the primary operation on certain data acquisition system It is dynamic, it is the base unit that system carries out Resource Distribution and Schedule, is the basis of operating system configuration.In early stage towards process design Computer configuation in, process is that the basic of program performs entity;In computer configuation of the present age towards threaded design, process It is the container of thread.Program is the description of instruction, data and its organizational form, and process is the entity of program.
Executable file:English name is executable file, refers to that load and execution can be carried out by operating system File.Under different operating system environments, the presentation mode of executable program is different.Such as it is operated in windows and is Under system, executable program can be the type files such as " .exe " file, " .sys " file, " .com ".
Signature:Operating system (such as Microsoft Windows) judges potential Malware using digital signature, if The installation kit file of (generally " setup.exe ") without progress digital authenticating certificate signature, the considerations of for secure context, This kind of application does not allow then to be run.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the method for the packaging method of application program is provided.
Optionally, in the present embodiment, the packaging method of above application program can be applied to as shown in Figure 1 by servicing In the hardware environment that device 102 and terminal 104 are formed.As shown in Figure 1, server 102 is connected by network and terminal 104 It connects, above-mentioned network includes but not limited to:Wide area network, Metropolitan Area Network (MAN) or LAN, terminal 104 are not limited to PC, mobile phone, tablet electricity Brain etc..The method of the embodiment of the present invention can be performed by server 102, can also be performed by terminal 104, can also be by Server 102 and terminal 104 perform jointly.Wherein, the method that terminal 104 performs the embodiment of the present invention can also be by being mounted on Client thereon performs.
Fig. 2 is a kind of flow chart of the packaging method of optional application program according to embodiments of the present invention, such as Fig. 2 institutes Show, this method may comprise steps of:
Step S202 receives preset instructions, performs first task, generates the first executable text for unloading intended application Part, the first executable file are the executable file unsigned;First specifically can be performed by the process on computer equipment Task, to obtain the first executable file for unloading the first client.When receiving preset instructions such as computer, according to this The instruction of instruction performs first task, then generates corresponding first executable file by performing first task.
Step S204 after first task has been performed, signs the first executable file by performing the second task Name operation, the second executable file after being signed;Process can specifically be continued through and perform the second task, with can to first It performs file and carries out signature operation, the second executable file after being signed.
Step S206 obtains the resource file that generation target installation kit needs are used, and target installation kit is for installing mesh Mark the installation kit of application.
Second executable file and resource file are packaged as target installation kit by step S208 by performing third task; Process can specifically be continued through and perform third task, the second executable file and resource file are packaged as target installation Packet.
By above-mentioned steps S202 to step S208, by performing task on the computing device, it can realize that first can hold The acquisition of style of writing part and signature operation, and the second executable file after signature and resource file are packaged as target installation kit, The Uninstaller of signature is just had in the catalogue file of the intended application obtained after installation targets installation kit in this way, and (i.e. second can Perform file), can solve the technical issues of client of installation on a computing device cannot unload, and then reach smooth It unloads the client on computer equipment and improves the technique effect that application is packaged efficiency.
Optionally, the software code corresponding to above-mentioned step S202 to step S208 can be placed on above-mentioned computer and set Standby upper operation is such as run this partial code by specified client, is such as exclusively used in client (the i.e. default mould of program packing Block), and this client then corresponds to a process, above-mentioned task (including first task, the second task and third task) It can be run by the process, i.e., it can be with the above-mentioned step of automatic running by the process;Step S202 is being performed to step It during S208, is automatically processed, can be improved using the efficiency being packaged by using this process.
Optionally, above-mentioned method can be applied to computer equipment, and operating system used in the computer equipment can Think the types such as Windows, Linux, the application is illustrated by taking Windows operating system as an example.
Above-mentioned preset instructions can be the instruction of user's triggering when carrying out packaging operation, after this just should not user Carry out remaining operation, obtain the operations such as the first executable file (i.e. uninstall file), signature, packing will automatic running, without Manual intervention.
Above-mentioned target installation kit and executable file are the program for allowing to run on a computing device, such as Windows " .exe " file in operating system.
Above-mentioned step S206 can be put to be run after step s 204, is run before can also being placed on step S202, this Application is not construed as limiting this.
In the technical solution provided in step S206, when obtaining the resource file that generation target installation kit needs are used, The resource file refers to need the installation resource file for being released to installation directory during installation targets installation kit (as schemed Piece, installation file, library file etc.).
Optionally, before execution step S202 is by computer equipment execution first task, the first script can be created, First script includes being used to indicate the first code set that computer equipment performs first task;Create the second script, second Script includes being used to indicate the second code set that computer equipment performs third task.Using being pre-created script, from And above-mentioned step can be performed by perform script, the efficiency of packing can be improved;In addition, for arbitrarily applying, Above-mentioned script can be used to perform, can further improve using the efficiency being packaged.
Optionally, the first above-mentioned script and the second script are division functionally, can be with during actual use The above-mentioned code having the function of in the first script and the second script is placed in same script file.
In the technical solution provided in step S202, it is used for by performing the first task generation indicated by preset instructions When unloading the first executable file of intended application, default mould can be called by running the first code set in the first script Block (being used for the client that application is packaged) first executable file of generation, first code set include being used to indicate generation the The instruction of one executable file.
Specifically, the first script can be run in presetting module, the first script can need to use according to generation target installation kit The relevant information of the resource file that arrives generates an intermediate installation kit, in operation between will obtain above-mentioned unload after installation kit Carry the first executable file of intended application.
Need what is illustrated, above-mentioned intermediate installation kit is not a complete installation kit, due in the first script only The instruction generation relevant instruction of the first executable file is described, other information (such as library file, picture are generated without indicating Deng) instruction, so installation after do not have resource file.
It is that resource file is packaged as one using script during obtaining the first executable file in the related art Complete installation kit, then this installation kit is installed, a complete client is obtained, and looked for from the installation directory of the client It to the first executable file of unloading intended application, also needs to unload mounted client after finding, due to the of generation One executable file is the executable file unsigned, and may lead to not unload the client.
And in this application, only can get the first executable file by running the first script, and without manually into Row client installs and uninstalls, and does not have to more the first of unloading intended application to hold to looking in the installation directory of client manually Style of writing part can cause the first executable file of acquisition to obtain flow and be simplified.
In the technical solution provided in step S204, signature behaviour is carried out to the first executable file by performing the second task Work includes:By computer equipment perform the second task, triggering presetting module perform signature function, to the first executable file into Row signature operation.
Specifically, it can individually be write as a script with the above-mentioned relevant code of the second task, can also be put into the first foot Originally or in the second script, thus the signature function of presetting module can be called by performing corresponding script, so as to real Now to the signature operation of the first executable file.
In this embodiment, intended application is unloaded different from being found in the installation directory of client in the relevant technologies It after first executable file, signs manually to the first executable file, using the technical solution of the application, work can be improved Make the efficiency of personnel, only by writing one section of shell script, you can that puts things right once and for all solves the problems, such as that script is signed.
It should be noted that the function of the second executable file is for unloading destination client, i.e., it is executable second File can be using oneself position in installation directory, according to the relative position relation known to the resource text in installation directory Part etc. performs delete operation, therefore, at the second executable file needs in correct position, that is, needs will be obtained after signature the Two executable files are moved to designated position, can be by mobile second executable file extremely in order to improve using the efficiency being packaged The logical code of designated position is written in script associated with the second task, the second executable file after being signed it Afterwards, the second task (performing corresponding script) is performed by computer equipment, the second executable file after signature is moved Designated position in catalogue where to resource file.
In this embodiment, can the second executable file after signature be automatically moved by correspondence by perform script program Position, and without being moved manually, and then the efficiency using packing can be improved.
In the technical solution provided in step S208, by performing third task by the second executable file and resource file Target installation kit is packaged as to include:On a computing device by running the second code set in the second script, call default Second executable file and resource file are packaged as target installation kit by module, and presetting module is the mould for being packaged installation kit Block.
Specifically, the second script can be run in presetting module, the second script can need to use according to generation target installation kit The resource file arrived and the second executable file generation target installation kit, can be by resource text during installation targets installation kit Part and the release of the second executable file are in the corresponding position of installation directory.
It should be noted that do not include generating when being used to indicate installation targets installation kit the in above-mentioned second code set The instruction code of one executable file in this way, during installation targets installation kit, would not generate new Uninstaller, New Uninstaller can be avoided to override the second executable file.
Using above-described embodiment provide packaging method, without human intervention, cost it is relatively low, meanwhile, in the process of packing In do not need to modification scripted code, reduce the bit error rate, can realize Uninstaller a key signature.
Embodiments herein is described in detail by taking Windows operating system as an example below:
When the present processes are performed in Windows operating system, individual script uninstall.nsi can be passed through (i.e. the first script) is packaged generation installation procedure, this installation procedure only generates Uninstaller to designated position, need not thus change Dynamic setup.nsi scripts (i.e. the second script), simultaneously as each script and parameter etc. are all fixed, can easily pass through Client-side program realizes the automation of flow.
In technical solution described herein, as shown in figure 3, software code can be divided into 4 according to software function Module is to be packaged command module 32, be packaged script module 34, signature blocks 36 and client modules 38 respectively.
(1) it is packaged command module 32
The module mainly parses the interrelated logic in script module by calling NSIS tools (i.e. presetting module), and The logic fabrication and installation program provided according to script.
(2) it is packaged script module 34
The module mainly describes and controls the behavior of installation procedure and logic by script, so that NSIS tools make It is divided into two parts with, script, one is script setup.nsi for generating normal mounting packet, and one is for only generating The script uninstall.nsi of uninst.exe (i.e. the second executable file).
Setup.nsi scripts include installing and uninstalling logic, but need to delete generation in logic is installed Uninst.exe before packing can be added to installation and is released under the installation directory of file resource by the logic of uninst.exe Listed files in.
Optionally, in the script uninstall.nsi for generating uninst.exe, installation logic can not also be deleted.
Uninstall.nsi scripts can be based on setup.nsi and generate, but need to delete the interrelated logic of installation, replace For generation uninst.exe to designated position.To retain the interrelated logic of unloading simultaneously, to ensure the uninst.exe energy of generation It is enough normal to perform unloading task, just without changing script again in this way in the case where unloading logic is constant, improve script signature and Using the efficiency of packing.
(3) signature blocks 36
The module is mainly responsible for signing to the second executable file uninst.exe of generation.
(4) client modules 38
That is the so-called software of user (referring specifically to presetting module), the client are packaged command module by calling, are packaged foot This module and signature blocks, and the integration for carrying out flow can reach key signature Uninstaller and generate the mesh of installation procedure 's.
The flow that the above method is run in presetting module is as shown in Figure 4:
Step S401 after the operation that client is packaged in the request for detecting user, sends enabled instruction to packing Command module, enabled instruction are packaged command module to parse script module, and then generate installation procedure for client call;
Step S402 is packaged command module parsing script module, so as to generate installation procedure setup_ uninstall.exe;
Step S403, the installation procedure setup_uninstall.exe that packing command module transmission generates to client mould Block;
Step S404, client modules perform installation procedure setup_uninstall.exe, generate Uninstaller Uninst.exe (i.e. the first executable file);
Step S405, client modules call signature blocks to sign Uninstaller uninst.exe, after signature Uninstaller uninst.exe is the second executable file;
Uninstaller uninst.exe after signature is copied to and is needed to be released under installation directory by step S406 The catalogue at the same level (i.e. designated position) of file;
Step S407, client call is packaged command module and equally parses script module and can generate final to be unloaded comprising signature Carry the installation procedure setup.exe (i.e. target installation kit) of program.
In the above-described embodiments, this method, which can be applied to exist, can not run unloading application because of not being signed In application program, so as to solve the technical issues of application can not unload;Meanwhile using the technical solution of the application, without It is artificial to participate in, by performing executable script, it can quickly realize signature and the packing of application.
It should be noted that for aforementioned each method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because According to the present invention, certain steps may be used other sequences or be carried out at the same time.Secondly, those skilled in the art should also know It knows, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the invention It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but it is very much In the case of the former be more preferably embodiment.Based on such understanding, technical scheme of the present invention is substantially in other words to existing The part that technology contributes can be embodied in the form of software product, which is stored in a storage In medium (such as ROM/RAM, magnetic disc, CD), used including some instructions so that a station terminal equipment (can be mobile phone, calculate Machine, server or network equipment etc.) perform method described in each embodiment of the present invention.
Embodiment 2
According to embodiments of the present invention, a kind of application program for the packaging method for being used to implement above application program is additionally provided Packing apparatus.Fig. 5 is a kind of schematic diagram of the packing apparatus of optional application program according to embodiments of the present invention, such as Fig. 5 Shown, which can include:Receiving unit 52, signature unit 54, acquiring unit 56 and packaged unit 58.
Receiving unit 52 for receiving preset instructions, performs first task, generating can for unloading the first of intended application File is performed, wherein, the first executable file is the executable file unsigned;
Signature unit 54, for after first task has been performed, by performing the second task to the first executable file Carry out signature operation, the second executable file after being signed;
Acquiring unit 56, for obtaining the resource file that generation target installation kit needs are used, wherein, target installation kit is For the installation kit of installation targets application;
Packaged unit 58, for pass through perform third task by the second executable file and resource file be packaged as target peace Dress packet.
It should be noted that the receiving unit 52 in the embodiment can be used for performing the step in the embodiment of the present application 1 S202, the signature unit 54 in the embodiment can be used for performing the step S204 in the embodiment of the present application 1, in the embodiment Acquiring unit 56 can be used for performing the step S206 in the embodiment of the present application 1, and the packaged unit 58 in the embodiment can be used In performing the step S208 in the embodiment of the present application 1.
Herein it should be noted that above-mentioned module is identical with example and application scenarios that corresponding step is realized, but not It is limited to 1 disclosure of that of above-described embodiment.It should be noted that above-mentioned module as a part for device may operate in as It in hardware environment shown in FIG. 1, can be realized by software, hardware realization can also be passed through.
By above-mentioned module, by performing task on the computing device, can realize the first executable file acquisition and Signature operation, and the second executable file after signature and resource file are packaged as target installation kit, in this way in installation targets The Uninstaller (i.e. the second executable file) of signature is just had in the catalogue file of the intended application obtained after installation kit, it can be with It solves the technical issues of client of installation on a computing device cannot unload, and then reaches smoothly unloading computer equipment On client and improve application be packaged efficiency technique effect.
Optionally, above-mentioned device can be applied to computer equipment, and operating system used in the computer equipment can Think the types such as Windows, Linux, be particularly suitable for Windows operating system.
Above-mentioned target installation kit and executable file are the program for allowing to run on a computing device, such as Windows " .exe " file in operating system.
Optionally, in the resource file that the generation target installation kit needs got in acquiring unit are used, resource text Part refers to need the installation resource file for being released to installation directory (such as picture, installation text during installation targets installation kit Part, library file etc.).
Optionally, as shown in fig. 6, the device of the application can also include the first creating unit 62, for passing through calculating Before machine equipment performs first task, the first script is created, wherein, the first script includes being used to indicate computer equipment execution The first code set of first task;Second creating unit 64, for creating the second script, wherein, the second script includes using The second code set of third task is performed in instruction computer equipment.Using script has been pre-created, so as to by holding It travels far and wide and performs above-mentioned step originally, the efficiency of packing can be improved;In addition, for arbitrarily applying, can be used above-mentioned Script performs, and can further improve using the efficiency being packaged.
Optionally, the first above-mentioned script and the second script are division functionally, can be with during actual use The above-mentioned code having the function of in the first script and the second script is placed in same script file.
Optionally, receiving unit is additionally operable to, by running the first code set in the first script, call presetting module life Into the first executable file, wherein, first code set includes being used to indicate the instruction of the first executable file of generation.
Specifically, the first script can be run in presetting module, the first script can need to use according to generation target installation kit The relevant information of the resource file that arrives generates an intermediate installation kit, in operation between will obtain above-mentioned unload after installation kit Carry the first executable file of intended application.
Need what is illustrated, above-mentioned intermediate installation kit is not a complete installation kit, due in the first script only The instruction generation relevant instruction of the first executable file is described, other information (such as library file, picture are generated without indicating Deng) instruction, so installation after do not have resource file.
It is that resource file is packaged as one using script during obtaining the first executable file in the related art Complete installation kit, then this installation kit is installed, a complete client is obtained, and looked for from the installation directory of the client It to the first executable file of unloading intended application, also needs to unload mounted client after finding, due to the of generation One executable file is the executable file unsigned, and may lead to not unload the client.
And in this application, only can get the first executable file by running the first script, and without manually into Row client installs and uninstalls, and does not have to more the first of unloading intended application to hold to looking in the installation directory of client manually Style of writing part can cause the first executable file of acquisition to obtain flow and be simplified.
Optionally, signature unit is additionally operable to trigger presetting module execution signature function by performing the second task, to first Executable file carries out signature operation.
Specifically, it can individually be write as a script with the above-mentioned relevant code of the second task, can also be put into the first foot Originally or in the second script, thus the signature function of presetting module can be called by performing corresponding script, so as to real Now to the signature operation of the first executable file.
In this embodiment, intended application is unloaded different from being found in the installation directory of client in the relevant technologies It after first executable file, signs manually to the first executable file, using the technical solution of the application, work can be improved Make the efficiency of personnel, only by writing one section of shell script, you can that puts things right once and for all solves the problems, such as that script is signed.
It should be noted that the function of the second executable file is for unloading destination client, i.e., it is executable second File can be using oneself position in installation directory, according to the relative position relation known to the resource text in installation directory Part etc. performs delete operation, therefore, at the second executable file needs in correct position, that is, needs will be obtained after signature the Two executable files are moved to designated position, can be by mobile second executable file extremely in order to improve using the efficiency being packaged The logical code of designated position is written in script associated with the second task, the second executable file after being signed it Afterwards, receiving unit is additionally operable to after the second executable file after being signed, and the second task is performed by computer equipment The second executable file after signature is moved to the specific bit in the catalogue of resource file place by (performing corresponding script) It puts.
In this embodiment, can the second executable file after signature be automatically moved by correspondence by perform script program Position, and without being moved manually, and then the efficiency using packing can be improved.
Optionally, packaged unit is additionally operable to, by running the second code set in the second script, call presetting module will Second executable file and resource file are packaged as target installation kit, wherein, presetting module is the module for being packaged installation kit.
Specifically, it can individually be write as a script with the above-mentioned relevant code of the second task, can also be put into the first foot Originally or in the second script, thus the signature function of presetting module can be called by performing corresponding script, so as to real Now to the signature operation of the first executable file.
In this embodiment, intended application is unloaded different from being found in the installation directory of client in the relevant technologies It after first executable file, signs manually to the first executable file, using the technical solution of the application, work can be improved Make the efficiency of personnel, only by writing one section of shell script, you can that puts things right once and for all solves the problems, such as that script is signed.
It should be noted that the packaged unit of packing command module quite in this present embodiment in previous embodiment;It beats Packet script module is equivalent to receiving unit;Signature blocks are equivalent to signature blocks.In addition, since two aforementioned embodiments is draw The different embodiment of merotype, some modules either between unit there may be overlap or including situation.
Herein it should be noted that above-mentioned module is identical with example and application scenarios that corresponding step is realized, but not It is limited to 1 disclosure of that of above-described embodiment.It should be noted that above-mentioned module as a part for device may operate in as In hardware environment shown in FIG. 1, can be realized by software, can also by hardware realization, wherein, hardware environment include network Environment.
Embodiment 3
According to embodiments of the present invention, additionally provide it is a kind of for implement above application program packaging method server or Terminal.
Fig. 7 is a kind of structure diagram of terminal according to embodiments of the present invention, as shown in fig. 7, the terminal can include:One A or multiple (one is only shown in figure) processor 701, memory 703 and transmitting device 705 are (in above-described embodiment Sending device), as shown in fig. 7, the terminal can also include input-output equipment 707.
Wherein, memory 703 can be used for storage software program and module, such as the application program in the embodiment of the present invention Packaging method and the corresponding program instruction/module of device, processor 701 are stored in the software journey in memory 703 by operation Sequence and module so as to perform various functions application and data processing, that is, realize the packaging method of above-mentioned application program.It deposits Reservoir 703 may include high speed random access memory, can also include nonvolatile memory, as one or more magnetic storage fills It puts, flash memory or other non-volatile solid state memories.In some instances, memory 703 can further comprise relative to place The remotely located memory of device 701 is managed, these remote memories can pass through network connection to terminal.The example packet of above-mentioned network It includes but is not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
Above-mentioned transmitting device 705 is used to receive via network or transmission data, can be also used for processor with Data transmission between memory.Above-mentioned network specific example may include cable network and wireless network.In an example, Transmitting device 705 includes a network adapter (Network Interface Controller, NIC), can pass through cable It is connected to be communicated with internet or LAN with other network equipments with router.In an example, transmission dress 705 are put as radio frequency (Radio Frequency, RF) module, is used to wirelessly be communicated with internet.
Wherein, specifically, memory 703 is used to store application program.
Processor 701 can call the application program that memory 703 stores by transmitting device 705, to perform following steps Suddenly:Preset instructions are received, first task is performed, generates the first executable file for unloading intended application, wherein, first can It is the executable file unsigned to perform file;After first task has been performed, it can be held to first by performing the second task Part of composing a piece of writing carries out signature operation, the second executable file after being signed;Obtain the money that generation target installation kit needs are used Source file, wherein, target installation kit is the installation kit applied for installation targets;Second can perform by performing third task File and resource file are packaged as target installation kit.
Processor 701 is additionally operable to perform following step:The first script is created, wherein, the first script includes being used to indicate Computer equipment performs the first code set of first task;The second script is created, wherein, the second script includes being used to indicate Computer equipment performs the second code set of third task.
Processor 701 is additionally operable to perform following step:By running the second code set in the second script, call default Second executable file and resource file are packaged as target installation kit by module, wherein, presetting module is for being packaged installation kit Module.
Processor 701 is additionally operable to perform following step:By running the first code set in the first script, call default Module generates the first executable file, wherein, first code set includes being used to indicate the finger of the first executable file of generation It enables.
Using the embodiment of the present invention, by performing task on the computing device, obtaining for the first executable file can be realized It takes and signature operation, and the second executable file after signature and resource file is packaged as target installation kit, installing in this way The Uninstaller (i.e. the second executable file) of signature is just had in the catalogue file of the intended application obtained after target installation kit, It can solve the technical issues of client of installation on a computing device cannot unload, and then reach smoothly unloading computer Client and raising application in equipment are packaged the technique effect of efficiency.
Optionally, the specific example in the present embodiment can refer to showing described in above-described embodiment 1 and embodiment 2 Example, details are not described herein for the present embodiment.
It will appreciated by the skilled person that structure shown in Fig. 7 is only to illustrate, terminal can be smart mobile phone (such as Android phone, iOS mobile phones), tablet computer, palm PC and mobile internet device (Mobile Internet Devices, MID), the terminal devices such as PAD.Fig. 7 it does not cause to limit to the structure of above-mentioned electronic device.For example, terminal is also May include than shown in Fig. 7 more either less components (such as network interface, display device) or with shown in Fig. 7 Different configurations.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can To be completed by program come command terminal device-dependent hardware, which can be stored in a computer readable storage medium In, storage medium can include:Flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc..
Embodiment 4
The embodiment of the present invention additionally provides a kind of storage medium.Optionally, in the present embodiment, above-mentioned storage medium can For the program code of the packaging method of executing application.
Optionally, in the present embodiment, above-mentioned storage medium can be located at multiple in the network shown in above-described embodiment On at least one of network equipment network equipment.
Optionally, in the present embodiment, storage medium is arranged to store the program code for performing following steps:
S11 obtains the resource file that generation target installation kit needs are used, wherein, target installation kit is for installing mesh Mark the installation kit of application;
S12 receives preset instructions, performs first task, generates the first executable file for unloading intended application, In, the first executable file is the executable file unsigned;
After first task has been performed, signature behaviour is carried out by performing the second task to the first executable file by S13 Make, the second executable file after being signed;
Second executable file and resource file are packaged as target installation kit by S14 by performing third task.
Optionally, storage medium is also configured to store the program code for performing following steps:
S21 creates the first script, wherein, the first script includes being used to indicate computer equipment execution first task First code set;
S22 creates the second script, wherein, the second script includes being used to indicate computer equipment execution third task Second code set.
Optionally, the specific example in the present embodiment can refer to showing described in above-described embodiment 1 and embodiment 2 Example, details are not described herein for the present embodiment.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to:USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or The various media that can store program code such as CD.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and is independent product Sale or in use, the storage medium that above computer can be read can be stored in.Based on such understanding, skill of the invention The part or all or part of the technical solution that art scheme substantially in other words contributes to the prior art can be with soft The form of part product embodies, which is stored in storage medium, is used including some instructions so that one Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) perform each embodiment institute of the present invention State all or part of step of method.
In the above embodiment of the present invention, all emphasize particularly on different fields to the description of each embodiment, do not have in some embodiment The part of detailed description may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one Kind of division of logic function, can there is an other dividing mode in actual implementation, for example, multiple units or component can combine or It is desirably integrated into another system or some features can be ignored or does not perform.Another point, it is shown or discussed it is mutual it Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, unit or module It connects, can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also That each unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (14)

1. a kind of packaging method of application program, which is characterized in that including:
Preset instructions are received, first task is performed, generates the first executable file for unloading intended application, wherein, it is described First executable file is the executable file unsigned;
After the first task has been performed, signature behaviour is carried out to first executable file by performing the second task Make, the second executable file after being signed;
The resource file that generation target installation kit needs are used is obtained, wherein, the target installation kit is for installing the mesh Mark the installation kit of application;
Second executable file and the resource file are packaged as the target installation kit by performing third task.
2. according to the method described in claim 1, it is characterized in that, first indicated by the preset instructions by performing Before the first executable file of the business generation for unloading intended application, the method further includes:
The first script is created, wherein, first script includes being used to indicate the first generation code collection for performing the first task It closes;
The second script is created, wherein, second script includes being used to indicate the second generation code collection for performing the third task It closes.
3. according to the method described in claim 2, it is characterized in that, by performing third task by second executable file The target installation kit is packaged as with the resource file to include:
By running the second code set in second script, presetting module is called by second executable file The target installation kit is packaged as with the resource file, wherein, the presetting module is the module for being packaged installation kit.
4. according to the method described in claim 3, it is characterized in that, do not include being used to indicate installation in the second code set The instruction code of first executable file is generated during the target installation kit.
5. according to the method described in claim 2, it is characterized in that, by performing the first task indicated by the preset instructions Generation includes for unloading the first executable file of intended application:
By running the first code set in first script, the described first executable text of presetting module generation is called Part, wherein, the first code set includes being used to indicate the instruction for generating first executable file.
6. according to the method described in claim 3, it is characterized in that, by performing the second task to first executable file Signature operation is carried out to include:
The presetting module execution signature function is triggered by performing the second task, is signed to first executable file Operation.
7. according to the method described in claim 1, it is characterized in that, second executable file after being signed it Afterwards, the method further includes:
Continue through mesh where second executable file after signature is moved to the resource file by second task that performs Designated position in record.
8. a kind of packing apparatus of application program, which is characterized in that including:
Receiving unit for receiving preset instructions, performs first task, generates the first executable text for unloading intended application Part, wherein, first executable file is the executable file unsigned;
Signature unit, for after the first task has been performed, text to be can perform to described first by performing the second task Part carries out signature operation, the second executable file after being signed;
Acquiring unit, for obtaining the resource file that generation target installation kit needs are used, wherein, the target installation kit is uses In the installation kit for installing the intended application;
Packaged unit, for pass through perform third task second executable file and the resource file be packaged as it is described Target installation kit.
9. device according to claim 8, which is characterized in that described device further includes:
First creating unit, for being answered by performing the first task generation indicated by the preset instructions for unloading target Before first executable file, the first script is created, wherein, first script includes being used to indicate execution described the The first code set of one task;
Second creating unit, for creating the second script, wherein, second script, which includes being used to indicate, performs the third The second code set of task.
10. device according to claim 9, which is characterized in that the packaged unit is additionally operable to by running described second The second code set in script calls presetting module to be packaged as second executable file and the resource file The target installation kit, wherein, the presetting module is the module for being packaged installation kit.
11. device according to claim 10, which is characterized in that do not include being used to indicate peace in the second code set The instruction code of first executable file is generated when filling the target installation kit.
12. device according to claim 9, which is characterized in that the receiving unit is additionally operable to by running described first The first code set in script calls presetting module to generate first executable file, wherein, the first code Set includes being used to indicate the instruction for generating first executable file.
13. device according to claim 10, which is characterized in that the signature unit is additionally operable to by performing the second task It triggers the presetting module and performs signature function, signature operation is carried out to first executable file.
14. device according to claim 8, which is characterized in that the receiving unit is additionally operable to the institute after being signed After stating the second executable file, continue through second task that performs and second executable file after signature is moved to institute Designated position in catalogue where stating resource file.
CN201611141287.5A 2016-12-12 2016-12-12 The packaging method and device of application program Pending CN108228196A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611141287.5A CN108228196A (en) 2016-12-12 2016-12-12 The packaging method and device of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611141287.5A CN108228196A (en) 2016-12-12 2016-12-12 The packaging method and device of application program

Publications (1)

Publication Number Publication Date
CN108228196A true CN108228196A (en) 2018-06-29

Family

ID=62637404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611141287.5A Pending CN108228196A (en) 2016-12-12 2016-12-12 The packaging method and device of application program

Country Status (1)

Country Link
CN (1) CN108228196A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010029605A1 (en) * 1998-06-19 2001-10-11 Jonathan A. Forbes Software package management
CN102736939A (en) * 2012-06-25 2012-10-17 腾讯科技(深圳)有限公司 Software installation method, device and system
CN102955689A (en) * 2011-08-23 2013-03-06 腾讯科技(深圳)有限公司 Software installation package producing method and software installation package device
CN104573416A (en) * 2013-10-25 2015-04-29 腾讯科技(深圳)有限公司 Method and device for generating application installation package and executing application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010029605A1 (en) * 1998-06-19 2001-10-11 Jonathan A. Forbes Software package management
CN102955689A (en) * 2011-08-23 2013-03-06 腾讯科技(深圳)有限公司 Software installation package producing method and software installation package device
CN102736939A (en) * 2012-06-25 2012-10-17 腾讯科技(深圳)有限公司 Software installation method, device and system
CN104573416A (en) * 2013-10-25 2015-04-29 腾讯科技(深圳)有限公司 Method and device for generating application installation package and executing application

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HELLOKANDY: ""NSIS关于uninst.exe的签名问题"", 《CSDN》 *
PETER SMITH著,仲田等译: ""软件打包与安装"", 《深入理解软件构造***原理与最佳实践》 *

Similar Documents

Publication Publication Date Title
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN110046101B (en) Page automatic testing method and device and computer storage medium
CN103795759B (en) The dispatching method and system of a kind of virtual machine image file
US7886292B2 (en) Methodology of individualized software deployment for hardware-independent personal computer mass development
CN106126273B (en) A kind of method of upgrading BIOS
CN112181602A (en) Resource arranging method and device, electronic equipment and storage medium
CN107733985B (en) Method and device for deploying functional components of cloud computing system
CN109726067B (en) Process monitoring method and client device
CN103970563B (en) The method of dynamic load Android class
CN104754032A (en) Method and device for deploying OpenStack
CN106648724B (en) Application program hot repair method and terminal
CN107239309B (en) Patch generation method and device, updating method, electronic device and storage medium
CN109800005B (en) Client hot update method and device
CN106201657A (en) A kind of network interface card information processing method based on virtual machine and device
CN108234551B (en) Data processing method and device
CN106776064B (en) Method and device for managing logs in multiple systems
CN106293842B (en) Software installation method and device
CN104731626B (en) The installation method and device of application
CN109597627A (en) A kind of component mounting method, device, storage medium and processor
CN109766123A (en) Application program packaging method and device
CN106506163B (en) ROM packet processing method and device
US10635467B1 (en) Deployable console-based virtual application deployment and configuration systems and methods
CN112395096A (en) Remote function call processing method and device, electronic equipment and storage medium
CN108228196A (en) The packaging method and device of application program
CN113254158B (en) Deployment method and device of deep learning system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180629