CN107145365B - Method for generating application program installation package and method and device for loading application program - Google Patents

Method for generating application program installation package and method and device for loading application program Download PDF

Info

Publication number
CN107145365B
CN107145365B CN201710221997.7A CN201710221997A CN107145365B CN 107145365 B CN107145365 B CN 107145365B CN 201710221997 A CN201710221997 A CN 201710221997A CN 107145365 B CN107145365 B CN 107145365B
Authority
CN
China
Prior art keywords
installation package
application program
file
program installation
generating
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.)
Expired - Fee Related
Application number
CN201710221997.7A
Other languages
Chinese (zh)
Other versions
CN107145365A (en
Inventor
周新元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201710221997.7A priority Critical patent/CN107145365B/en
Publication of CN107145365A publication Critical patent/CN107145365A/en
Application granted granted Critical
Publication of CN107145365B publication Critical patent/CN107145365B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Abstract

The invention relates to the technical field of application programs, in particular to a method for generating an application program installation package, a method for loading an application program and a device, wherein the method comprises the following steps: cutting a target application program developed based on a real Native framework, and cutting an So library file from the target application program at least; and generating a main application program installation package according to the cut target application program, and generating a subordinate application program installation package according to the cut So library file. According to the method and the device, the So library file occupying a large storage space is cut out from the target application program, the main application program installation package is generated according to the cut target application program, and the So library file is independently placed in the auxiliary application program installation package, So that the technical effect of reducing the storage space occupied by the main application program installation package is achieved.

Description

Method for generating application program installation package and method and device for loading application program
Technical Field
The invention relates to the technical field of application programs, in particular to a method for generating an application program installation package, and a method and a device for loading an application program.
Background
The React Native framework is a derivative product of React on a Native mobile application platform, is a cross-platform mobile application development framework, combines the advantages of Web application and Natice application, and can use Javascript language to develop Native applications of iOS and android platforms.
However, the fact that the real Native framework is bulky, an application developed by the real Native framework has a problem of occupying a large storage space.
Disclosure of Invention
In view of the above, the present invention is proposed to provide a method of generating an application installation package, a method of loading an application, and an apparatus that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a method of generating an application installation package, the method comprising:
cutting a target application program developed based on a real Native framework, and cutting an So library file from the target application program at least;
and generating a main application program installation package according to the cut target application program, and generating a subordinate application program installation package according to the cut So library file.
According to another aspect of the present invention, there is provided a method of loading an application, the method comprising:
detecting whether a trigger operation for starting a slave application program installation package corresponding to a master application program installation package exists in the master application program installation package corresponding to a target application program developed based on a read Native framework, wherein the slave application program installation package is generated according to an So library file cut out from the target application program, and the master application program installation package is generated according to the cut target application program;
when the trigger operation exists, copying the So library file in the slave application program installation package into the master application program installation package;
and loading the So library file in the main application program installation package.
According to another aspect of the present invention, there is provided an apparatus for generating an application installation package, the apparatus comprising:
the cutting module is used for cutting a target application program developed based on the real Native framework and cutting an So library file from the target application program at least;
and the installation package generation module is used for generating a main application installation package according to the cut target application and generating a subordinate application installation package according to the cut So library file.
According to another aspect of the present invention, there is provided an apparatus for loading an application, the apparatus comprising:
the detection module is used for detecting whether a trigger operation for starting a slave application program installation package corresponding to a master application program installation package exists in the master application program installation package corresponding to a target application program developed based on a read Native framework, wherein the slave application program installation package is generated according to an So library file cut out from the target application program, and the master application program installation package is generated according to the cut target application program;
the copy module is used for copying the So library file in the slave application program installation package to the master application program installation package when the trigger operation exists;
and the loading module is used for loading the So library file in the main application program installation package.
According to the method for generating the application program installation package and the method and device for loading the application program, firstly, the target application program developed based on the read Native framework is cut, at least the So library file is cut from the target application program, the slave application program installation package is generated according to the cut So library file, and meanwhile, the master application program installation package is generated according to the cut target application program.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating a method of generating an application installation package according to a first embodiment of the present invention;
FIG. 2 is a block diagram showing an apparatus for generating an application installation package according to a first embodiment of the present invention;
FIG. 3 is a flow chart illustrating a method of loading an application according to a second embodiment of the invention;
fig. 4 is a block diagram showing an apparatus for loading an application according to a second embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a flowchart of a method for generating an application installation package according to a first embodiment of the present invention. Specifically, the method comprises the following steps:
step 101: and cutting a target application program developed based on the real Native framework, and cutting at least an So library file from the target application program.
Step 102: and generating a main application program installation package according to the cut target application program, and generating a subordinate application program installation package according to the cut So library file.
Specifically, for a certain target application program, after the target application program is developed based on the read Native framework, a plurality of file resources are generated, where the file resources include an So library file, and the So library file may specifically include: the method comprises the following steps of (1) clipping target application programs developed based on a React Native framework, and at least clipping So library files from the target application programs. Further, after the So library file is cut out from the target application program, a slave application program installation package is generated according to the cut So library file, and meanwhile, a master application program installation package is generated according to the target application program obtained after cutting. Therefore, according to the application, for the target application program developed based on the ReactNative framework, the So library file occupying a large storage space is cut out of the target application program, the main application program installation package is generated according to the cut target application program, and the So library file is independently placed in the auxiliary application program installation package, So that the technical effect of reducing the storage space occupied by the main application program installation package is achieved.
Further, in step 102, generating a host application installation package according to the clipped target application, which may specifically include: and generating a main application program installation package according to the cut Java source code of the real Native framework in the target application program and the Jar package of the real Native framework.
Specifically, after the So library file is cut out from the target application, the host application installation package may be generated by compiling the Java source code of the real Native framework and the Jar package of the real Native framework remaining in the target application. Wherein, Jar package specifically can include: bolts-android-1.1.4.jar, fresh-dry-0.8.1. jar, fresh-fbcore-0.8.1. jar, fresh-0.8.1. jar, fresh-image pipeline-okhttp-0.8.1.jar, jsr305-3.0.0.jar, okhttp-2.5.0.jar, and okio-1.6.0. jar.
Further, in this application, regarding step 102, in order to enable resource sharing between the master application installation package and the slave application installation package when the master application installation package and the slave application installation package are generated, a first file signature is added to the master application installation package, and a second file signature is added to the slave application installation package, where the first file signature and the second file signature match with each other, that is, step 102 may include: and generating a main application program installation package with a first file signature according to the cut target application program, and generating a subordinate application program installation package with a second file signature according to the cut So library file. Therefore, when the copying of the resources is carried out between the master application program installation package and the slave application program installation package and the mutual jump is carried out between the two application program installation packages, the matching of the file signatures is carried out, and the copying of the resources or the jump of the application program installation packages can be carried out only after the matching of the file signatures between the master application program installation package and the slave application program installation packages is successful, so that the safety of the master application program installation package loading the slave application program installation packages is improved.
In the present application, regarding step 101, in another embodiment, the following steps may be performed: and cutting out an So library file and a Js Bundle file from the target application program. Thus, in step 102, the dependent application installation package is generated from the So library file and the Js Bundle file. The Js Bundle file and the So library file are cut out from the target application program together, So that the storage space occupied by the main application program installation package can be further reduced.
Based on the same inventive concept, a second embodiment of the present invention further provides an application loading method, where the application loading method is used to load the application installation package generated in the first embodiment, as shown in fig. 2, and the method includes:
step 201: detecting whether a trigger operation for starting a slave application program installation package corresponding to a master application program installation package exists in the master application program installation package corresponding to a target application program developed based on a read Native framework, wherein the slave application program installation package is generated according to an So library file cut out from the target application program, and the master application program installation package is generated according to the cut target application program.
Step 202: and when the trigger operation exists, copying the So library file in the slave application program installation package into the master application program installation package.
Step 203: and loading the So library file in the main application program installation package.
Specifically, corresponding to the foregoing first embodiment, for a certain target application developed based on the read Native framework, the target application corresponds to a master application installation package and a slave application installation package, and thus, the present application detects whether there is a trigger operation for enabling the slave application installation package in the master application installation package. Specifically, a user may perform a trigger operation on a slave application installation package in a master application installation package, and when the trigger operation on a certain slave application installation package exists, it indicates that the slave application installation package needs to be loaded and a function corresponding to the slave application installation package is executed. Further, in the present application, when the trigger operation exists, the So library file in the slave application installation package is copied to the master application installation package for subsequent loading.
Further, in the present application, before step 202, the method further includes:
judging whether the client side where the main application program installation package is located has the slave application program installation package;
and if the client does not have the subordinate application program installation package, downloading the subordinate application program installation package to the client according to a specified path.
Specifically, when the client has the slave application installation package, the So library file in the slave application installation package is directly copied to the master application installation package, and when the client does not have the slave application installation package, the slave application installation package can be downloaded to the client according to the specified download path because the slave application installation package usually has the specified download path.
In the present application, the following two implementations can be adopted for step 202:
in a first implementation manner, the master application installation package actively calls the slave application installation package, and So library files are copied from the slave application installation package. In this implementation, the So library file in the slave application installation package is actively copied into its program by the master application installation package.
In a second implementation manner, the main application program installation package jumps to the subordinate application program installation package, and the subordinate application program copies the So library file contained in the subordinate application program installation package to the main application program installation package. In the implementation mode, when the trigger operation exists, skipping of the application program installation package is carried out, the display interface of the client is skipped from the interface of the main application program installation package to the interface of the subordinate application program installation package, and the So library file contained in the subordinate application program installation package is copied to the main application program installation package by the subordinate application program installation package. Further, after the copying is finished, the interface of the slave application program installation package jumps to the interface of the master application program installation package, and the So library file is loaded in the master application program installation package.
In this application, for step 202, when the master application installation package has a first file signature and the slave application installation package has a second file signature corresponding to the first file signature, copying So library files in the slave application installation package into the master application installation package includes:
judging whether the first file signature is matched with the second file signature;
and if the first file signature is matched with the second file signature, copying the So library file in the slave application program installation package into the master application program installation package.
Specifically, in the present application, the So library file in the slave application installation package is copied to the master application installation package only if the first file signature and the second file signature match, and the So library file is not copied when the first file signature and the second file signature do not match. According to the method and the device, the matching of the file signatures is carried out on the main application program installation package and the slave application program installation package, and the copying of the resource can be carried out after the file signatures between the main application program installation package and the slave application program installation package are successfully matched, so that the safety of loading the slave application program installation package by the main application program installation package is improved.
Based on the same inventive concept, an embodiment of the present invention provides an apparatus for generating an application installation package corresponding to the first embodiment, as shown in fig. 3, the apparatus including:
the cutting module 301 is used for cutting a target application program developed based on a read Native framework, and cutting an So library file from the target application program at least;
an installation package generating module 302, configured to generate a master application installation package according to the clipped target application, and generate a slave application installation package according to the clipped So library file.
Wherein, cutting module 301 includes:
the first cutting unit is used for cutting out an So library file and a Js Bundle file from the target application program;
the installation package generation module includes:
and the first generating unit is used for generating a subordinate application program installation package according to the So library file and the Js Bundle file.
The installation package generating module 302 includes:
and the second generation unit is used for generating a main application program installation package according to the cut Java source code of the ReactNative framework in the target application program and the Jar package of the React Native framework.
The installation package generating module 302 includes:
and the third generating unit is used for generating a main application program installation package with a first file signature according to the cut target application program and generating a subordinate application program installation package with a second file signature according to the cut So library file, wherein the first file signature and the second file signature are matched with each other.
Based on the same inventive concept, an embodiment of the present invention provides an apparatus for loading an application program corresponding to the second embodiment, as shown in fig. 4, the apparatus including:
the detection module 401 is configured to detect whether a trigger operation for enabling a slave application installation package corresponding to a master application installation package exists in the master application installation package corresponding to a target application developed based on a read Native framework, where the slave application installation package is generated according to an So library file cut out from the target application, and the master application installation package is generated according to the cut target application;
a copying module 402, configured to copy the So library file in the slave application installation package to the master application installation package when the trigger operation exists;
a loading module 403, configured to load the So library file in the main application installation package.
Wherein the apparatus further comprises:
the judging module is used for judging whether the client side where the main application program installation package is located has the subordinate application program installation package;
and the downloading module is used for downloading the subordinate application program installation package to the client according to a specified path if the subordinate application program installation package does not exist in the client.
Wherein, the copy module 402 includes:
the first copying unit is used for the master application program installation package to initiatively call the slave application program installation package and copy the So library file from the slave application program installation package; or
And the second copying unit is used for jumping from the main application program installation package to the slave application program installation package, and the slave application program copies the So library file contained in the slave application program installation package to the main application program installation package.
Wherein, when the master application installation package has a first file signature and the slave application installation package has a second file signature corresponding to the first file signature, the copying module 402 comprises:
a judging unit configured to judge whether the first file signature and the second file signature match;
and the third copying unit is used for copying the So library file in the slave application program installation package to the master application program installation package if the first file signature is matched with the second file signature.
In summary, according to the method for generating an application installation package, the method for loading an application and the device thereof, firstly, a target application developed based on a read Native framework is cut, at least an So library file is cut from the target application, a slave application installation package is generated according to the cut So library file, and simultaneously, a master application installation package is generated according to the cut target application.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the apparatus for generating an application installation package and the apparatus for loading an application according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses a1, a method for generating an application program installation package, which is characterized by comprising the following steps:
cutting a target application program developed based on a real Native framework, and cutting an So library file from the target application program at least;
and generating a main application program installation package according to the cut target application program, and generating a subordinate application program installation package according to the cut So library file.
A2, the method according to A1, wherein the cutting out So library files from at least the target application program comprises:
cutting out an So library file and a Js Bundle file from the target application program;
the generating of the slave application program installation package according to the cut So library file comprises the following steps:
and generating a subordinate application program installation package according to the So library file and the Js Bundle file.
A3, the method according to A1, wherein the generating a host application installation package according to the clipped target application comprises:
and generating a main application program installation package according to the cut Java source code of the real Native framework in the target application program and the Jar package of the real Native framework.
A4, the method according to A1, wherein the generating a master application installation package according to the clipped target application and a slave application installation package according to the clipped So library file comprises:
and generating a main application program installation package with a first file signature according to the cut target application program, and generating a subordinate application program installation package with a second file signature according to the cut So library file, wherein the first file signature and the second file signature are matched with each other.
B5, a method for loading an application program, the method comprising:
detecting whether a trigger operation for starting a slave application program installation package corresponding to a master application program installation package exists in the master application program installation package corresponding to a target application program developed based on a read Native framework, wherein the slave application program installation package is generated according to an So library file cut out from the target application program, and the master application program installation package is generated according to the cut target application program;
when the trigger operation exists, copying the So library file in the slave application program installation package into the master application program installation package;
and loading the So library file in the main application program installation package.
B6, the method according to B5, wherein before the copying the So library file in the slave application installation package into the master application installation package, the method further comprises:
judging whether the client side where the main application program installation package is located has the slave application program installation package;
and if the client does not have the subordinate application program installation package, downloading the subordinate application program installation package to the client according to a specified path.
B7, the method according to B5, wherein the copying the So library file in the slave application installation package into the master application installation package comprises:
the master application program installation package actively calls the slave application program installation package, and the So library file is copied from the slave application program installation package; or
And jumping to the slave application installation package by the master application installation package, and copying the So library file contained in the slave application installation package into the master application installation package by the slave application.
The method of B8, the method of B5, wherein when the master application installation package has a first file signature and the slave application installation package has a second file signature corresponding to the first file signature, the copying the So library file in the slave application installation package into the master application installation package comprises:
judging whether the first file signature is matched with the second file signature;
and if the first file signature is matched with the second file signature, copying the So library file in the slave application program installation package into the master application program installation package.
C9, an apparatus for generating an application installation package, the apparatus comprising:
the cutting module is used for cutting a target application program developed based on the real Native framework and cutting an So library file from the target application program at least;
and the installation package generation module is used for generating a main application installation package according to the cut target application and generating a subordinate application installation package according to the cut So library file.
C10, the device according to C9, characterized in that the cutting module comprises:
the first cutting unit is used for cutting out an So library file and a Js Bundle file from the target application program;
the installation package generation module includes:
and the first generating unit is used for generating a subordinate application program installation package according to the So library file and the Js Bundle file.
C11, the apparatus according to C9, wherein the installation package generating module comprises:
and the second generation unit is used for generating a main application program installation package according to the cut Java source code of the real Native framework in the target application program and the Jar package of the real Native framework.
C12, the apparatus according to C9, wherein the installation package generating module comprises:
and the third generating unit is used for generating a main application program installation package with a first file signature according to the cut target application program and generating a subordinate application program installation package with a second file signature according to the cut So library file, wherein the first file signature and the second file signature are matched with each other.
D13, an apparatus for loading an application, comprising:
the detection module is used for detecting whether a trigger operation for starting a slave application program installation package corresponding to a master application program installation package exists in the master application program installation package corresponding to a target application program developed based on a read Native framework, wherein the slave application program installation package is generated according to an So library file cut out from the target application program, and the master application program installation package is generated according to the cut target application program;
the copy module is used for copying the So library file in the slave application program installation package to the master application program installation package when the trigger operation exists;
and the loading module is used for loading the So library file in the main application program installation package.
D14, the device according to D13, characterized in that the device further comprises:
the judging module is used for judging whether the client side where the main application program installation package is located has the subordinate application program installation package;
and the downloading module is used for downloading the subordinate application program installation package to the client according to a specified path if the subordinate application program installation package does not exist in the client.
D15, the device according to D13, wherein the copy module comprises:
the first copying unit is used for the master application program installation package to initiatively call the slave application program installation package and copy the So library file from the slave application program installation package; or
And the second copying unit is used for jumping from the main application program installation package to the slave application program installation package, and the slave application program copies the So library file contained in the slave application program installation package to the main application program installation package.
D16, the apparatus of D13, wherein when the master application installation package has a first file signature and the slave application installation package has a second file signature corresponding to the first file signature, the copy module comprises:
a judging unit configured to judge whether the first file signature and the second file signature match;
and the third copying unit is used for copying the So library file in the slave application program installation package to the master application program installation package if the first file signature is matched with the second file signature.

Claims (8)

1. A method of generating an application installation package, the method comprising:
cutting a target application program developed based on a real Native framework, and cutting an So library file and a Js Bundle file from the target application program at least;
generating a main application program installation package according to the cut target application program, and generating a subordinate application program installation package according to the cut So library file and the Js Bundle file;
wherein the generating a main application program installation package according to the clipped target application program comprises: generating a main application program installation package according to the cut Java source code of the real Native framework in the target application program and the Jar package of the real Native framework;
generating a main application program installation package according to the cut target application program, and generating a subordinate application program installation package according to the cut So library file and the Js Bundle file, wherein the method comprises the following steps: generating a main application program installation package with a first file signature according to the cut target application program, and generating a subordinate application program installation package with a second file signature according to the cut So library file and the Js Bundle file, wherein the first file signature and the second file signature are matched with each other.
2. A method of loading an application, the method comprising:
detecting, in the master application installation package generated by the method of generating an application installation package of claim 1, whether there is a trigger operation for enabling the slave application installation package generated by the method of generating an application installation package of claim 1;
when the trigger operation exists, copying the So library file and the Js Bundle file in the slave application program installation package into the master application program installation package;
loading the So library file and the Js Bundle file in the main application program installation package;
when the master application installation package has a first file signature and the slave application installation package has a second file signature corresponding to the first file signature, the copying the So library file and the Js Bundle file in the slave application installation package into the master application installation package includes:
judging whether the first file signature is matched with the second file signature;
and if the first file signature is matched with the second file signature, copying the So library file and the Js Bundle file in the slave application program installation package into the master application program installation package.
3. The method of claim 2, wherein prior to the copying the So library file and the Js Bundle file in the slave application installation package into the master application installation package, the method further comprises:
judging whether the client side where the main application program installation package is located has the slave application program installation package;
and if the client does not have the subordinate application program installation package, downloading the subordinate application program installation package to the client according to a specified path.
4. The method of claim 2, wherein the copying the So library file and the Js Bundle file in the slave application installation package to the master application installation package comprises:
the master application program installation package actively calls the slave application program installation package, and the So library file and the Js Bundle file are copied from the slave application program installation package; or
And jumping to the slave application installation package by the master application installation package, and copying the So library file and the Js Bundle file contained in the slave application to the master application installation package by the slave application.
5. An apparatus for generating an application installation package, the apparatus comprising:
the cutting module is used for cutting a target application program developed based on a real Native framework, and cutting an So library file and a Js Bundle file from the target application program at least;
the installation package generating module is used for generating a main application installation package according to the cut target application and generating a subordinate application installation package according to the cut So library file and the Js Bundle file;
the cutting module comprises:
the first cutting unit is used for cutting out an So library file and a Js Bundle file from the target application program;
the installation package generation module includes:
the first generation unit is used for generating a subordinate application program installation package according to the So library file and the Js Bundle file;
the installation package generation module includes:
a second generation unit, configured to generate a host application installation package according to the cut Java source code of the real Native framework and the Jar package of the real Native framework in the target application;
the installation package generation module includes:
and the third generating unit is used for generating a main application program installation package with a first file signature according to the cut target application program and generating a subordinate application program installation package with a second file signature according to the cut So library file and the Js Bundle file, wherein the first file signature and the second file signature are matched with each other.
6. An apparatus for loading an application, the apparatus comprising:
a detection module, configured to detect, in a master application installation package generated by the method for generating an application installation package of claim 1, whether there is a trigger operation for enabling a slave application installation package generated by the method for generating an application installation package of claim 1;
the copy module is used for copying the So library file and the Js Bundle file in the slave application program installation package to the master application program installation package when the trigger operation exists;
the loading module is used for loading the So library file and the Js Bundle file in the main application program installation package;
when the master application installation package has a first file signature and the slave application installation package has a second file signature corresponding to the first file signature, the copy module includes:
a judging unit configured to judge whether the first file signature and the second file signature match;
and the third copying unit is used for copying the So library file and the Js Bundle file in the slave application program installation package into the master application program installation package if the first file signature is matched with the second file signature.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the judging module is used for judging whether the client side where the main application program installation package is located has the subordinate application program installation package;
and the downloading module is used for downloading the subordinate application program installation package to the client according to a specified path if the subordinate application program installation package does not exist in the client.
8. The apparatus of claim 6, wherein the copy module comprises:
the first copying unit is used for the master application program installation package to actively call the slave application program installation package and copy the So library file and the Js Bundle file from the slave application program installation package; or
And the second copying unit is used for jumping from the main application program installation package to the slave application program installation package, and the slave application program copies the So library file and the Js Bundle file contained in the slave application program installation package to the main application program installation package.
CN201710221997.7A 2017-04-06 2017-04-06 Method for generating application program installation package and method and device for loading application program Expired - Fee Related CN107145365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710221997.7A CN107145365B (en) 2017-04-06 2017-04-06 Method for generating application program installation package and method and device for loading application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710221997.7A CN107145365B (en) 2017-04-06 2017-04-06 Method for generating application program installation package and method and device for loading application program

Publications (2)

Publication Number Publication Date
CN107145365A CN107145365A (en) 2017-09-08
CN107145365B true CN107145365B (en) 2021-03-26

Family

ID=59774703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710221997.7A Expired - Fee Related CN107145365B (en) 2017-04-06 2017-04-06 Method for generating application program installation package and method and device for loading application program

Country Status (1)

Country Link
CN (1) CN107145365B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321134A (en) * 2018-03-30 2019-10-11 深圳Tcl新技术有限公司 A kind of method of application installation package, the storage medium of generating is with application server
CN109815650B (en) * 2019-01-18 2022-06-24 深圳智游网安科技有限公司 Method, device and medium for calling frame based on iOS
CN109800034B (en) * 2019-01-18 2022-06-24 深圳智游网安科技有限公司 Method, device and storage medium for calling so library based on Android
CN111475171B (en) * 2019-01-23 2024-04-12 阿里巴巴集团控股有限公司 Application program component downloading method and device and electronic equipment
CN111813423A (en) * 2020-08-31 2020-10-23 腾讯科技(深圳)有限公司 Application installation package processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824900A (en) * 2016-03-14 2016-08-03 传线网络科技(上海)有限公司 Page display system based on react-native
CN106445583A (en) * 2016-08-31 2017-02-22 广州品唯软件有限公司 Page display method, equipment and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824900A (en) * 2016-03-14 2016-08-03 传线网络科技(上海)有限公司 Page display system based on react-native
CN106445583A (en) * 2016-08-31 2017-02-22 广州品唯软件有限公司 Page display method, equipment and system

Also Published As

Publication number Publication date
CN107145365A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
CN107145365B (en) Method for generating application program installation package and method and device for loading application program
US20190324772A1 (en) Method and device for processing smart contracts
CN106971098B (en) Method and device for preventing repacking
EP3499364B1 (en) Method and device for loading kernel module
CN104866293B (en) A kind of method and device to Android application extensions for Microsoft Internet Explorer & Microsoft Office
CN108121543B (en) Software code compiling processing method and device
CN106202100B (en) Page loading method and device
US20140337980A1 (en) Method, device and terminal for scanning virus
JP6412276B2 (en) Virtual machine creation method and apparatus
WO2020177429A1 (en) Method and apparatus for embedding codes in application, and electronic device
CN104063247A (en) Application program calling method and system
CN110362416B (en) Page component loading method and device, electronic equipment and storage medium
CN107506623B (en) Application program reinforcing method and device, computing equipment and computer storage medium
CN106598662B (en) Android-based application loading method and device
CN110688198B (en) System calling method and device and electronic equipment
CN107092472B (en) Dynamic publishing method and device
CN110825391B (en) Service management method, device, electronic equipment and storage medium
CN107301105B (en) Method and device for checking hot patch or dynamic library
CN110555181B (en) Page cross-skip method and device
CN106648788B (en) Application program installation method and device
CN111367519B (en) Page part using method and device, computing equipment and computer storage medium
CN110688320A (en) Global variable detection method and device and terminal equipment
CN109144595B (en) Method and device for starting assembly based on plug-in framework
CN105260196A (en) Method for making Android system support QT APP
CN111198708A (en) Method and device for solving conflict of jar packets

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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210326