WO2018086268A1 - 插件化打包方法、装置、终端及存储介质 - Google Patents

插件化打包方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2018086268A1
WO2018086268A1 PCT/CN2017/074373 CN2017074373W WO2018086268A1 WO 2018086268 A1 WO2018086268 A1 WO 2018086268A1 CN 2017074373 W CN2017074373 W CN 2017074373W WO 2018086268 A1 WO2018086268 A1 WO 2018086268A1
Authority
WO
WIPO (PCT)
Prior art keywords
plug
host
packaged
compiling
version
Prior art date
Application number
PCT/CN2017/074373
Other languages
English (en)
French (fr)
Inventor
李颖
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Priority to JP2017561419A priority Critical patent/JP6518794B2/ja
Priority to AU2017258904A priority patent/AU2017258904B2/en
Priority to US15/577,717 priority patent/US10387169B2/en
Priority to SG11201709274UA priority patent/SG11201709274UA/en
Priority to KR1020187015590A priority patent/KR102096195B1/ko
Priority to EP17794647.2A priority patent/EP3540594A4/en
Publication of WO2018086268A1 publication Critical patent/WO2018086268A1/zh

Links

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
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators

Definitions

  • the embodiments of the present invention belong to the field of software, and in particular, to a plug-in packaging method, device, terminal, and storage medium.
  • Ant is used as a process script engine to automate the calling program to complete the compilation, packaging, and testing of the project. Wait.
  • Ant is the mainstream packaging tool for Android applications, and the support for multi-plug-in applications is not good. It usually needs to manually compile each plug-in, and the main project that needs to integrate multiple plug-ins, thus causing the whole ant to be packaged. The speed is too slow and inefficient.
  • the embodiments of the present invention provide a plug-in packaging method, a device, a terminal, and a storage medium, which are designed to solve the problem that the existing Android system is packaged by the ant method, and the packaging speed is too slow.
  • a plug-in packaging method is provided, where the method includes:
  • a second aspect of the embodiments of the present invention provides a plug-in packaging device, where the device includes:
  • an executable file obtaining unit configured to obtain an executable file obtained by compiling a source code of a host project
  • a host engineering base library obtaining unit configured to acquire a host engineering base library including at least one common base method after compilation
  • a plug-in compiling unit configured to compile the plug-in to be packaged by using multiple threads according to the host engineering base library
  • the compiled plug-in storage unit is configured to store the compiled plug-in to be packaged into a resource of the host project; [0016] an Apk packet generating unit, configured to package the executable file and the resource of the host project together Into apk package
  • a third aspect of the embodiments of the present invention provides a terminal, where the terminal includes a processor and a memory; [0018] the memory is configured to store a plug-in packaging system, where the plug-in packaging system includes at least a program instruction executable by the processor;
  • the processor is configured to execute program instructions of the plug-in packaging system to perform the following steps: [0020] obtaining an executable file obtained by compiling a source code of a host project;
  • a fourth aspect of the embodiments of the present invention provides a non-transitory computer readable storage medium storing instructions executable by one or more processors to perform operations, The operations include:
  • the plug-ins to be packaged are separately compiled by using multiple threads, the compilation speed of each plug-in can be improved, thereby improving the packaging speed of the entire apk.
  • DRAWINGS 1 is a flowchart of a plug-in packaging method according to a first embodiment of the present invention
  • FIG. 2 is a structural diagram of a plug-in packaging device according to a second embodiment of the present invention.
  • FIG. 3 is a structural diagram of a terminal according to a third embodiment of the present invention.
  • an executable file obtained by compiling a source code of a host project is obtained, and a host engineering base library including at least one common base method after compilation is obtained, and the multi-thread is adopted according to the host engineering base library.
  • Compile the plug-ins to be packaged separately store the compiled plug-ins to be packaged into the resources of the host project, and package the executable files and the resources of the host project into apk packages.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • Step S1 obtaining an executable file obtained by compiling a source code of a host project.
  • the executable file here may be multiple, such as an executable file of the dex type, and one or more d ex files may form a dex package.
  • the host project corresponding to the source code to be compiled is determined (eg, determined by a unique identifier of the host project and/or a version number, etc.), and then the source code of the host project (the source code can be java code) is compiled and compiled. After the source code of the host project is obtained, the corresponding executable file is obtained.
  • step S11 there is no fixed sequence between the step S11 and the subsequent steps S12 to S14, that is, the step S11 is not necessarily performed before the step S12 to the step S14.
  • Step S12 Acquire a host engineering base library including the compiled at least one common base method.
  • the host engineering base library includes at least one public base method compiled, the public base method including a common base method required to compile the plugin, and a common base method required to compile the host project.
  • step S12 specifically includes: [0047] Al, obtaining environment information, version information, and a compilation tool.
  • the version information includes a version number of the host project.
  • the environment information includes a test environment, a grayscale environment, a production environment, etc., different environments correspond to different servers, and since different servers store different data, different data can be obtained through different servers;
  • the version information refers to the version number of the host project and other information.
  • A2. Acquire at least one common basic method according to the environmental information and the version information. Since the plug-in is compiled later, it needs to rely on the common base method of the host engineering base library. Therefore, in order to compile the plug-in accurately and quickly, at least one common base method needs to be obtained.
  • the specified public base method is a method required for subsequent compilation of all plugins, and the number of specified public base methods is related to the number of plugins to be compiled (that is, plugins to be packaged), which may be one, Can be multiple.
  • the public base method obtained through one environment information and version information does not include the specified public foundation.
  • Method ⁇ it is necessary to replace other environmental information and version information, and again determine whether the obtained public basic method includes the specified public basic method in the server corresponding to the replaced environment information and version information.
  • Step S13 based on the host engineering base library, compiling the plug-ins to be packaged by using multiple threads separately
  • the plug-in to be packaged is separately compiled according to the common basic method in the host engineering base library.
  • the number of threads used for compilation is less than or equal to the number of plugins to be packaged.
  • the number of threads used for compilation is equal to the number of plugins to be packaged, one thread compiles one package to be packaged.
  • Plug-in when the number of threads used for compilation is less than the number of plug-ins to be packaged, the plug-in to be packaged in advance
  • the priority of the settings according to the priority of the plug-ins to be packaged, prioritize the plug-ins that need to be packaged with higher priority.
  • step S13 specifically includes:
  • Bl determine whether the plug-in to be packaged is the latest version of the plug-in. Specifically, a plug-in information table is pre-configured, and the plug-in information table includes a unique identifier of the plug-in. When the information of the plug-in (such as the version number of the plug-in or the description information of the plug-in) is updated, the plug-in information table is updated synchronously.
  • the unique identifier of the plug-in to be packaged is compared with the unique identifier of the plug-in in the plug-in information table, and after matching the unique identifier of the same plug-in, determining the unique identifier of the same plug-in corresponds to Whether the plug-in information is updated or not. If there is no update, it is determined that the plug-in corresponding to the unique identifier of the same plug-in is the latest version of the plug-in. Otherwise, it is determined that the plug-in corresponding to the unique identifier of the same plug-in is not the latest version of the plug-in.
  • the plug-in to be packaged is the latest version of the plug-in. Based on the host engineering base library, the plug-in to be packaged is compiled by using multiple threads.
  • the plug-in to be packaged has a plug-in that is not the latest version
  • the user is prompted to select the latest version of the plug-in, and then the multi-threaded compiler is used to compile the latest version of the plug-in selected by the user.
  • Step S14 The compiled plug-in to be packaged is stored in the resource of the host project.
  • the host project herein can be understood as a main project, a main application, and a resource of a host project, and may also include resources such as pictures and strings.
  • the compiled plug-in to be packaged is stored in a directory specified by the host project.
  • the compiled plug-in to be packaged may be compressed and then stored in a directory specified by the host project.
  • Step S15 The executable file and the resource of the host project are packaged together into an apk packet.
  • apk package is an Android installation package.
  • the resources of the host project include not only the compiled plug-ins to be packaged, but also other resources of the host project, such as images of the host project, strings, and the like.
  • the method includes:
  • the content of the apk packet may be confused, and then performed.
  • the apk package after the operation is confused to be signed to further improve the security of the apk package.
  • an executable file obtained by compiling a source code of a host project is obtained, and a host engineering base library including at least one common base method after compilation is obtained, which is based on the host engineering base library.
  • Multi-threading separately compiles the plug-ins to be packaged, and stores the compiled plug-ins to be loaded into the resources of the host project, and packages the executable files and the resources of the host project into apk packages. Since the plug-ins to be packaged are compiled separately by using multiple threads, the compilation speed of each plug-in can be improved, and the packaging speed of the entire apk can be improved.
  • the size of the sequence numbers of the foregoing processes does not mean the order of execution sequence, and the execution order of each process should be determined by its function and internal logic, and should not be taken to the embodiment of the present invention.
  • the implementation process constitutes any limitation.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1
  • the plug-in packaging apparatus can be applied to various mobile terminals, and the mobile terminal can include a wireless access network.
  • a user equipment that communicates with one or more core networks the user equipment may be a mobile telephone (or "cellular" telephone), a computer with a mobile device, etc., for example, the user equipment may also be portable, pocket-sized, Handheld, computer built-in or in-vehicle mobile devices that exchange voice and/or data with a wireless access network.
  • the mobile device can include a smartphone, a tablet, a tutor, a personal digital assistant PDA, a sales terminal POS, or an onboard computer. For ease of explanation, only parts related to the embodiments of the present invention are shown.
  • the plug-in packaging apparatus 2 includes: an executable file acquiring unit 21, a host engineering base library acquiring unit 2, a plug-in compiling unit 23, a compiled plug-in storage unit 24, and an Apk packet generating unit 25. among them:
  • the executable file obtaining unit 21 is configured to obtain an executable file obtained by compiling the source code of the host project.
  • the host engineering base library obtaining unit 22 is configured to acquire a host engineering base library including at least one common base method after compilation.
  • the host engineering base library includes at least one public base method compiled, the public base method including a common base method required to compile the plugin, and a common base method required to compile the host project.
  • the host engineering base library obtaining unit 22 includes:
  • An environment information obtaining module configured to acquire environment information, version information, and a compilation tool.
  • the version information includes the version number of the host project.
  • the environment information includes a test environment, a grayscale environment, a production environment, etc., different environments correspond to different servers, and since different servers store different data, different data can be obtained through different servers;
  • the version information refers to information such as the version number of the host project.
  • a public basic method obtaining module configured to acquire at least one common base method according to the environment information and the version information.
  • a host engineering base library generating module configured to compile the common base method according to the compiling tool, to obtain a host engineering base library.
  • the plugin package may be compiled in order to accurately compile all plugins.
  • the device includes:
  • the public basic method matching unit is configured to determine whether the obtained public basic method includes the specified public basic method, and if not, prompts to replace the environment information and the version information to obtain the specified by the replaced environment information and version information.
  • the public base method is configured to determine whether the obtained public basic method includes the specified public basic method, and if not, prompts to replace the environment information and the version information to obtain the specified by the replaced environment information and version information.
  • the specified common base method is a method required for subsequent compilation of all plugins, and the number of the specified common base methods is related to the number of plugins to be compiled (ie, plugins to be packaged), which may be One, but also multiple.
  • the public base method obtained through one environment information and version information does not include the specified public foundation.
  • Method ⁇ it is necessary to replace other environmental information and version information, and again determine whether the obtained public basic method includes the specified public basic method in the server corresponding to the replaced environment information and version information.
  • the plug-in compiling unit 23 is configured to compile the plug-ins to be packaged by using multiple threads according to the host engineering base library.
  • the number of threads used for compilation is less than or equal to the number of plugins to be packaged.
  • the number of threads used for compilation is equal to the number of plugins to be packaged, one thread compiles one.
  • the plugin to be packaged when the number of threads used for compilation is less than the number of plugins to be packaged, the package is pre-packaged.
  • the priority set by the plugin is set according to the priority of the plugin to be packaged, and the plugin to be packaged with higher priority is compiled first.
  • the plug-in compiling unit 23 specifically includes:
  • the plug-in version determining module is configured to determine whether the plug-in to be packaged is the latest version of the plug-in. Specifically, a plug-in information table is pre-configured, and the plug-in information table includes a unique identifier of the plug-in. When the information of the plug-in (such as the version number of the plug-in or the description information of the plug-in) is updated, the plug-in information table is updated synchronously.
  • the unique identifier of the plug-in to be packaged is compared with the unique identifier of the plug-in in the plug-in information table, and after matching the unique identifier of the same plug-in, determining the unique identifier of the same plug-in corresponds to Whether the plug-in information is updated or not. If there is no update, it is determined that the plug-in corresponding to the unique identifier of the same plug-in is the latest version of the plug-in. Otherwise, it is determined that the plug-in corresponding to the unique identifier of the same plug-in is not the latest version of the plug-in.
  • the latest plug-in compiling module is used for the latest version of the plug-in to be packaged, and based on the host engineering base library, the plug-in to be packaged is compiled by using multiple threads.
  • the plug-in to be packaged has a plug-in that is not the latest version
  • the user is prompted to select the latest version of the plug-in, and then the multi-threaded compiler is used to compile the latest version of the plug-in selected by the user.
  • the compiled plug-in storage unit 24 is configured to store the compiled plug-in to be packaged into the resource of the host project.
  • the host project herein can be understood as a main project, a main application, and a resource of a host project, and may also include resources such as pictures and strings.
  • the compiled plug-in to be packaged is stored in a directory specified by the host project.
  • the compiled plug-in to be packaged may be compressed and then stored in a directory specified by the host project.
  • the Apk packet generating unit 25 is configured to package the executable file and the resources of the host project into an apk packet.
  • the plug-in packaging device includes:
  • Apk packet preceding unit configured to sign the apk packet to obtain a signed apk packet.
  • the content of the apk packet may be confusing, and then the apk packet after the confusing operation is signed to further improve the security of the apk packet.
  • the plug-ins to be packaged are separately compiled by using multiple threads, the compilation speed of each plug-in can be improved, thereby improving the packaging speed of the entire apk.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division, and the actual implementation may have another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the terminal may include a user equipment that communicates with one or more core networks via a radio access network RAN, and the user equipment may It is a mobile phone (or "cellular" phone), a computer with a mobile device, etc.
  • the user device can also be a portable, pocket, handheld, computer built-in or car-mounted mobile device, and they are connected to the wireless access network. Exchange voice and/or data.
  • the mobile device can include a smart phone, a tablet computer, a tutor, a personal digital assistant PDA, a sales terminal POS, or a car computer.
  • the terminal is a mobile phone
  • the mobile phone includes: a radio frequency (RF) circuit, a memory, an input unit, and a display unit.
  • RF radio frequency
  • Components such as sensors, audio circuits, wireless modules, processors, and power supplies.
  • the terminal 3 includes: one or more processors 31 (only one is shown), one or more input devices 32 (only one is shown), and a memory 33. among them:
  • the memory 33 is configured to store a plug-in packaging system, and the plug-in packaging system includes at least one program instruction executable by the processor;
  • the processor 31 is configured to execute program instructions of the plug-in packaging system to perform the following steps: [0105] obtaining an executable file obtained by compiling a source code of a host project;
  • obtaining a host engineering base library including the compiled at least one common base method includes: acquiring environment information, version information, and a compilation tool, where the version information includes a version number of the host project; Obtaining at least one common base method with the version information; compiling the common base method according to the compilation tool to obtain a host engineering base library.
  • the plug-in is required to be packaged by using multiple threads according to the host engineering base library, and includes: determining whether the plug-in to be packaged is the latest version of the plug-in; The plugin of the version is based on the host engineering base library, and the plug-ins to be packaged are compiled separately by using multiple threads.
  • the processor is further configured to execute program instructions of the service data processing system to perform the following steps
  • the processor is further configured to execute program instructions of the service data processing system to perform the following steps.
  • the compilation speed of each plug-in can be improved, thereby improving the packaging speed of the entire apk.
  • the processor 31 may be a central processing unit (Central)
  • the processor can also be other general purpose processors, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Ready-to-Programmable Gate Array (Field-Programmable) Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Ready-to-Programmable Gate Array
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the input device 32 may include a touch panel, a fingerprint sensor (for collecting fingerprint information of the user and direction information of the fingerprint), a microphone, a data receiving interface, and the like.
  • the output device can include a display (LCD, etc. ), speakers, data transmission interface, etc.
  • the memory 33 may include a read only memory and a random access memory, and provides instructions and data to the processor 31. A portion of the memory 33 may also include a non-volatile random access memory. For example, the memory 3 3 can also store information of the device type.
  • the terminal 3 further includes a display, which can be used to display information input by the user or information provided to the user, and the like.
  • the display may include a display panel.
  • the display panel may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
  • the display may further include a touch panel, the touch panel may cover the display panel, and when the touch panel detects a touch operation on or near the touch panel, the touch panel transmits to the processor 31 to determine the type of the touch event.
  • the processor 31 then provides a corresponding visual output on the display panel depending on the type of touch event.
  • the processor 31, the input device 32, the output device, the memory 33, and the display described in the embodiment of the present invention may implement the implementation described in the embodiment of the plug-in packaging method provided by the embodiment of the present invention.
  • the implementation manner described in the terminal in the second embodiment may also be implemented, and details are not described herein again.
  • Embodiments of the present invention also provide a non-transitory computer readable storage medium, wherein the non-transitory computer readable storage medium stores instructions executable by one or more processors to perform operations, The operations include:
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM, a random access memory), a magnetic disk, or an optical disk, and the like.

Landscapes

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

Abstract

一种插件化打包方法、装置、终端及存储介质。所述方法包括:获取编译宿主工程的源码得到的可执行文件;获取包括编译后的至少一个公共基础方法的宿主工程基础库;以所述宿主工程基础库为依据,采用多线程分别编译需打包的插件;将编译后的需打包的插件存入宿主工程的资源;将所述可执行文件以及宿主工程的资源一起打包成apk包。通过上述方法能够提高整个apk的打包速度。

Description

插件化打包方法、 装置、 终端及存储介质 技术领域
[0001] 本发明实施例属于软件领域, 尤其涉及一种插件化打包方法、 装置、 终端及存 储介质。
背景技术
[0002] 一个大的代码项目, 若每次都需要重新编译, 打包, 测试, 则会变得非常复杂 而且重复, ant作为一个流程脚本引擎, 用于自动化调用程序完成项目的编译, 打包, 测试等。
[0003] 目前, Android系统中, Ant作为 Android应用程序的主流打包工具, 对多插件应 用的支持不好, 其通常需要手动编译各插件, 以及需要融合多插件的主工程, 因此导致整个 ant打包的速度过慢, 效率低下。
技术问题
[0004] 本发明实施例提供了一种插件化打包方法、 装置、 终端及存储介质, 旨在解决 现有的 Android系统中, 采用 ant方式打包吋, 打包速度过慢的问题。
问题的解决方案
技术解决方案
[0005] 本发明实施例第一方面, 提供了一种插件化打包方法, 所述方法包括:
[0006] 获取编译宿主工程的源码得到的可执行文件;
[0007] 获取包括编译后的至少一个公共基础方法的宿主工程基础库;
[0008] 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件;
[0009] 将编译后的需打包的插件存入宿主工程的资源;
[0010] 将所述可执行文件以及宿主工程的资源一起打包成 apk包。
[0011] 本发明实施例的第二方面, 提供一种插件化打包装置, 所述装置包括:
[0012] 可执行文件获取单元, 用于获取编译宿主工程的源码得到的可执行文件; [0013] 宿主工程基础库获取单元, 用于获取包括编译后的至少一个公共基础方法的宿 主工程基础库; [0014] 插件编译单元, 用于以所述宿主工程基础库为依据, 采用多线程分别编译需打 包的插件;
[0015] 编译后的插件存储单元, 用于将编译后的需打包的插件存入宿主工程的资源; [0016] Apk包生成单元, 用于将所述可执行文件以及宿主工程的资源一起打包成 apk包
[0017] 本发明实施例的第三方面, 提供一种终端, 所述终端包括处理器、 存储器; [0018] 所述存储器用于存储一种插件化打包系统, 所述插件化打包系统包括至少一个 可被处理器所执行的程序指令;
[0019] 所述处理器, 用于执行所述插件化打包系统的程序指令, 以执行以下步骤: [0020] 获取编译宿主工程的源码得到的可执行文件;
[0021] 获取包括编译后的至少一个公共基础方法的宿主工程基础库;
[0022] 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件;
[0023] 将编译后的需打包的插件存入宿主工程的资源;
[0024] 将所述可执行文件以及宿主工程的资源一起打包成 apk包。
[0025] 本发明实施例的第四方面, 提供一种非暂态计算机可读存储介质, 所述非暂态 计算机可读存储介质存储可由一个或多个处理器执行的指令以执行操作, 所述 操作包括:
[0026] 获取编译宿主工程的源码得到的可执行文件;
[0027] 获取包括编译后的至少一个公共基础方法的宿主工程基础库;
[0028] 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件;
[0029] 将编译后的需打包的插件存入宿主工程的资源;
[0030] 将所述可执行文件以及宿主工程的资源一起打包成 apk包。
发明的有益效果
有益效果
[0031] 在本发明实施例中, 由于采用多线程分别编译需打包的插件, 因此, 能够提高 各个插件的编译速度, 进而提高整个 apk的打包速度。
对附图的简要说明
附图说明 [0032] 图 1是本发明第一实施例提供的一种插件化打包方法的流程图;
[0033] 图 2是本发明第二实施例提供的一种插件化打包装置的结构图;
[0034] 图 3是本发明第三实施例提供的一种终端的结构图。
本发明的实施方式
[0035] 为了使本发明的目的、 技术方案及优点更加清楚明白, 以下结合附图及实施例 , 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体实施例仅仅用 以解释本发明, 并不用于限定本发明。
[0036] 本发明实施例中, 获取编译宿主工程的源码得到的可执行文件, 获取包括编译 后的至少一个公共基础方法的宿主工程基础库, 以所述宿主工程基础库为依据 , 采用多线程分别编译需打包的插件, 将编译后的需打包的插件存入宿主工程 的资源, 将所述可执行文件以及宿主工程的资源一起打包成 apk包。
[0037] 为了说明本发明所述的技术方案, 下面通过具体实施例来进行说明。
[0038] 实施例一:
[0039] 图 1示出了本发明第一实施例提供的一种插件化打包方法的流程图, 详述如下 [0040] 步骤 Sl l, 获取编译宿主工程的源码得到的可执行文件。
[0041] 其中, 这里的可执行文件可为多个, 如为 dex类型的可执行文件, 一个或多个 d ex文件可组成一个 dex包。
[0042] 具体地, 确定需编译的源码对应的宿主工程 (如通过宿主工程的唯一标识和 / 或版本号等确定) , 再对宿主工程的源码 (该源码可为 java代码) 进行编译, 编 译宿主工程的源码后获得对应的可执行文件。
[0043] 需要指出的是, 该步骤 S11与后续的步骤 S12至步骤 S14并无固定的先后顺序, 即步骤 S11并非一定要在步骤 S12至步骤 S14之前执行。
[0044] 步骤 S12, 获取包括编译后的至少一个公共基础方法的宿主工程基础库。
[0045] 该宿主工程基础库包括编译后的至少一个公共基础方法, 该公共基础方法包括 编译插件所需的公共基础方法, 也包括编译宿主工程所需的公共基础方法。
[0046] 其中, 所述步骤 S12具体包括: [0047] Al、 获取环境信息、 版本信息以及编译工具。 所述版本信息包括宿主工程的版 本号。 其中, 环境信息包括测试环境、 灰度环境、 生产环境等, 不同的环境对 应不同的服务器, 而由于不同服务器存储的数据通常是不同的, 因此通过不同 的服务器可获取到不同的数据; 其中, 版本信息是指宿主工程的版本号等信息
[0048] A2、 根据所述环境信息和版本信息获取至少一个公共基础方法。 由于后续对插 件进行编译吋, 需要依赖宿主工程基础库的公共基础方法, 因此, 为了后续能 够准确、 快速地对插件进行编译, 因此, 需要获取至少一个公共基础方法。
[0049] A3、 根据所述编译工具编译所述公共基础方法, 得到宿主工程基础库。
[0050] 可选地, 由于通过某个环境获取的公共基础方法中可能不包括后续编译所有插 件所需的一种或多种方法, 因此, 为了后续能够准确编译所有插件, 则在所述 A 2之后, 包括:
[0051] 判断获取的公共基础方法是否包括指定的公共基础方法, 若不包括, 则提示更 换环境信息和版本信息, 以通过更换后的环境信息和版本信息获取指定的公共 基础方法。 其中, 指定的公共基础方法为后续编译所有插件所需的方法, 指定 的公共基础方法的个数与后续需编译的插件 (即为需打包的插件) 的个数有关 , 其可为一个, 也可为多个。 具体地, 由于不同环境信息和版本信息对应的服 务器是不同的, 而不同的服务器存储的数据通常是不同的, 因此, 当通过一个 环境信息和版本信息获取的公共基础方法没有包括指定的公共基础方法吋, 需 要更换其他的环境信息和版本信息, 并在更换后的环境信息和版本信息对应的 服务器中再次判断获取的公共基础方法是否包括指定的公共基础方法。
[0052] 步骤 S13, 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件
[0053] 该步骤中, 依赖宿主工程基础库中的公共基础方法, 分别编译需打包的插件。
在需打包的插件的个数有多个吋, 采用至少 2个线程分别编译需打包的插件。 需 要指出的是, 用于编译的线程的个数小于或等于需打包的插件的个数, 当用于 编译的线程的个数等于需打包的插件的个数吋, 一个线程编译一个需打包的插 件; 当用于编译的线程的个数小于需打包的插件的个数吋, 预先为需打包的插 件设置的优先级, 再根据需打包的插件的优先级高低, 优先编译优先级高的需 打包的插件。
[0054] 其中, 所述步骤 S13具体包括:
[0055] Bl、 判断需打包的插件是否为最新版本的插件。 具体地, 预先配置一个插件信 息表, 该插件信息表包括插件的唯一标识, 当插件的信息 (如插件的版本号或 插件的描述信息) 更新吋, 同步更新该插件信息表。 当确定需打包的插件后, 将需打包的插件的唯一标识与插件信息表中的插件的唯一标识比较, 并在匹配 到相同的插件的唯一标识后, 判断该相同的插件的唯一标识对应的插件信息是 否有更新, 若没有更新, 则判定该相同的插件的唯一标识对应的插件为最新版 本的插件, 否则, 判定该相同的插件的唯一标识对应的插件不为最新版本的插 件。
[0056] B2、 在需打包的插件为最新版本的插件吋, 以所述宿主工程基础库为依据, 采 用多线程分别编译需打包的插件。
[0057] 需要指出的是, 当需打包的插件存在不是最新版本的插件吋, 提示用户选择最 新版本的插件, 再采用多线程分别编译用户选择的最新版本的插件。
[0058] 步骤 S14, 将编译后的需打包的插件存入宿主工程的资源。
[0059] 其中, 这里的宿主工程可以理解为主工程, 主应用, 在宿主工程的资源中, 可 能还包括图片、 字符串等资源。
[0060] 具体地, 将编译后的需打包的插件存入宿主工程指定的目录下。
[0061] 可选地, 为便于用户査看, 可压缩编译后的需打包的插件后再存入宿主工程指 定的目录下。
[0062] 步骤 S15, 将所述可执行文件以及宿主工程的资源一起打包成 apk包。
[0063] 其中, apk包为 Android安装包。
[0064] 需要指出的是, 这里宿主工程的资源除了包括编译后的需打包的插件, 也包括 宿主工程的其他资源, 如宿主工程的图片、 字符串等资源。
[0065] 可选地, 为了提高 apk包的安全性, 在所述步骤 S15之后, 包括:
[0066] 对所述 apk包进行签名, 得到签名后的 apk包。
[0067] 具体地, 在对 apk包进行签名之前, 可对 apk包的内容进行混淆操作, 再对进行 混淆操作后的 apk包进行签名, 以进一步提高 apk包的安全性。
[0068] 本发明第一实施例中, 获取编译宿主工程的源码得到的可执行文件, 获取包括 编译后的至少一个公共基础方法的宿主工程基础库, 以所述宿主工程基础库为 依据, 采用多线程分别编译需打包的插件, 将编译后的需打包的插件存入宿主 工程的资源, 将所述可执行文件以及宿主工程的资源一起打包成 apk包。 由于采 用多线程分别编译需打包的插件, 因此, 能够提高各个插件的编译速度, 进而 提高整个 apk的打包速度。
[0069] 应理解, 在本发明实施例中, 上述各过程的序号的大小并不意味着执行顺序的 先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不应对本发明实施例 的实施过程构成任何限定。
[0070] 实施例二:
[0071] 图 2示出了本发明第二实施例提供的一种插件化打包装置的结构图, 该插件化 打包装置可应用于各种移动终端中, 该移动终端可以包括经无线接入网 RAN与 一个或多个核心网进行通信的用户设备, 该用户设备可以是移动电话 (或称为" 蜂窝"电话) 、 具有移动设备的计算机等, 例如, 用户设备还可以是便携式、 袖 珍式、 手持式、 计算机内置的或者车载的移动装置, 它们与无线接入网交换语 音和 /或数据。 又例如, 该移动设备可以包括智能手机、 平板电脑、 家教机、 个 人数字助理 PDA、 销售终端 POS或车载电脑等。 为了便于说明, 仅示出了与本发 明实施例相关的部分。
[0072] 该插件化打包装置 2包括: 可执行文件获取单元 21、 宿主工程基础库获取单元 2 2、 插件编译单元 23、 编译后的插件存储单元 24、 Apk包生成单元 25。 其中:
[0073] 可执行文件获取单元 21, 用于获取编译宿主工程的源码得到的可执行文件。
[0074] 其中, 这里的可执行文件可为多个, 如为 dex类型的可执行文件, 一个或多个 d ex文件可组成一个 dex包。
[0075] 宿主工程基础库获取单元 22, 用于获取包括编译后的至少一个公共基础方法的 宿主工程基础库。
[0076] 该宿主工程基础库包括编译后的至少一个公共基础方法, 该公共基础方法包括 编译插件所需的公共基础方法, 也包括编译宿主工程所需的公共基础方法。 [0077] 所述宿主工程基础库获取单元 22包括:
[0078] 环境信息获取模块, 用于获取环境信息、 版本信息以及编译工具。 所述版本信 息包括宿主工程的版本号。 其中, 环境信息包括测试环境、 灰度环境、 生产环 境等, 不同的环境对应不同的服务器, 而由于不同服务器存储的数据通常是不 同的, 因此通过不同的服务器可获取到不同的数据; 其中, 版本信息是指宿主 工程的版本号等信息。
[0079] 公共基础方法获取模块, 用于根据所述环境信息和版本信息获取至少一个公共 基础方法。
[0080] 宿主工程基础库生成模块, 用于根据所述编译工具编译所述公共基础方法, 得 到宿主工程基础库。
[0081] 可选地, 由于通过某个环境获取的公共基础方法中可能不包括后续编译所有插 件所需的一种或多种方法, 因此, 为了后续能够准确编译所有插件, 所述插件 化打包装置包括:
[0082] 公共基础方法匹配单元, 用于判断获取的公共基础方法是否包括指定的公共基 础方法, 若不包括, 则提示更换环境信息和版本信息, 以通过更换后的环境信 息和版本信息获取指定的公共基础方法。
[0083] 其中, 指定的公共基础方法为后续编译所有插件所需的方法, 指定的公共基础 方法的个数与后续需编译的插件 (即为需打包的插件) 的个数有关, 其可为一 个, 也可为多个。 具体地, 由于不同环境信息和版本信息对应的服务器是不同 的, 而不同的服务器存储的数据通常是不同的, 因此, 当通过一个环境信息和 版本信息获取的公共基础方法没有包括指定的公共基础方法吋, 需要更换其他 的环境信息和版本信息, 并在更换后的环境信息和版本信息对应的服务器中再 次判断获取的公共基础方法是否包括指定的公共基础方法。
[0084] 插件编译单元 23, 用于以所述宿主工程基础库为依据, 采用多线程分别编译需 打包的插件。
[0085] 需要指出的是, 用于编译的线程的个数小于或等于需打包的插件的个数, 当用 于编译的线程的个数等于需打包的插件的个数吋, 一个线程编译一个需打包的 插件; 当用于编译的线程的个数小于需打包的插件的个数吋, 预先为需打包的 插件设置的优先级, 再根据需打包的插件的优先级高低, 优先编译优先级高的 需打包的插件。
[0086] 可选地, 所述插件编译单元 23具体包括:
[0087] 插件版本判断模块, 用于判断需打包的插件是否为最新版本的插件。 具体地, 预先配置一个插件信息表, 该插件信息表包括插件的唯一标识, 当插件的信息 (如插件的版本号或插件的描述信息) 更新吋, 同步更新该插件信息表。 当确 定需打包的插件后, 将需打包的插件的唯一标识与插件信息表中的插件的唯一 标识比较, 并在匹配到相同的插件的唯一标识后, 判断该相同的插件的唯一标 识对应的插件信息是否有更新, 若没有更新, 则判定该相同的插件的唯一标识 对应的插件为最新版本的插件, 否则, 判定该相同的插件的唯一标识对应的插 件不为最新版本的插件。
[0088] 最新插件编译模块, 用于在需打包的插件为最新版本的插件吋, 以所述宿主工 程基础库为依据, 采用多线程分别编译需打包的插件。
[0089] 需要指出的是, 当需打包的插件存在不是最新版本的插件吋, 提示用户选择最 新版本的插件, 再采用多线程分别编译用户选择的最新版本的插件。
[0090] 编译后的插件存储单元 24, 用于将编译后的需打包的插件存入宿主工程的资源
[0091] 其中, 这里的宿主工程可以理解为主工程, 主应用, 在宿主工程的资源中, 可 能还包括图片、 字符串等资源。
[0092] 具体地, 将编译后的需打包的插件存入宿主工程指定的目录下。
[0093] 可选地, 为便于用户査看, 可压缩编译后的需打包的插件后再存入宿主工程指 定的目录下。
[0094] Apk包生成单元 25, 用于将所述可执行文件以及宿主工程的资源一起打包成 apk 包。
[0095] 可选地, 所述插件化打包装置包括:
[0096] Apk包前面单元, 用于对所述 apk包进行签名, 得到签名后的 apk包。
[0097] 具体地, 在对 apk包进行签名之前, 可对 apk包的内容进行混淆操作, 再对进行 混淆操作后的 apk包进行签名, 以进一步提高 apk包的安全性。 [0098] 本发明第二实施例中, 由于采用多线程分别编译需打包的插件, 因此, 能够提 高各个插件的编译速度, 进而提高整个 apk的打包速度。
[0099] 应该理解到, 所揭露的装置可以通过其它的方式实现。 例如, 以上所描述的装 置实施例仅仅是示意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分 , 实际实现吋可以有另外的划分方式, 例如多个单元或组件可以结合或者可以 集成到另一个系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论 的相互之间的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的 间接耦合或通信连接, 可以是电性, 机械或其它的形式。
[0100] 实施例三:
[0101] 图 3示出了本发明第三实施例提供的一种终端的结构图, 该终端可以包括经无 线接入网 RAN与一个或多个核心网进行通信的用户设备, 该用户设备可以是移 动电话 (或称为"蜂窝"电话) 、 具有移动设备的计算机等, 例如, 用户设备还可 以是便携式、 袖珍式、 手持式、 计算机内置的或者车载的移动装置, 它们与无 线接入网交换语音和 /或数据。 又例如, 该移动设备可以包括智能手机、 平板电 脑、 家教机、 个人数字助理 PDA、 销售终端 POS或车载电脑等。 为了便于说明, 仅示出了与本发明实施例相关的部分。 需要指出的是, 当该终端为手机吋, 该 手机包括: 射频 (Radio Frequency, RF) 电路、 存储器、 输入单元、 显示单元
、 传感器、 音频电路、 无线模块、 处理器、 以及电源等部件。
[0102] 该终端 3包括: 一个或多个处理器 31 (图中仅示出一个) 、 一个或多个输入设 备 32 (图中仅示出一个) 以及存储器 33。 其中:
[0103] 所述存储器 33用于存储一种插件化打包系统, 所述插件化打包系统包括至少一 个可被处理器所执行的程序指令;
[0104] 所述处理器 31, 用于执行所述插件化打包系统的程序指令, 以执行以下步骤: [0105] 获取编译宿主工程的源码得到的可执行文件;
[0106] 获取包括编译后的至少一个公共基础方法的宿主工程基础库;
[0107] 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件;
[0108] 将编译后的需打包的插件存入宿主工程的资源;
[0109] 将所述可执行文件以及宿主工程的资源一起打包成 apk包。 [0110] 可选地, 获取包括编译后的至少一个公共基础方法的宿主工程基础库包括: 获 取环境信息、 版本信息以及编译工具, 所述版本信息包括宿主工程的版本号; 根据所述环境信息和版本信息获取至少一个公共基础方法; 根据所述编译工具 编译所述公共基础方法, 得到宿主工程基础库。
[0111] 可选地, 所述以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插 件, 包括: 判断需打包的插件是否为最新版本的插件; 在需打包的插件为最新 版本的插件吋, 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的 插件。
[0112] 可选地, 在所述根据所述环境信息和版本信息获取至少一个公共基础方法之后
, 所述处理器还用于执行所述业务数据处理系统的程序指令, 以执行以下步骤
[0113] 判断获取的公共基础方法是否包括指定的公共基础方法, 若不包括, 则提示更 换环境信息和版本信息, 以通过更换后的环境信息和版本信息获取指定的公共 基础方法。
[0114] 可选地, 在所述将所述可执行文件以及宿主工程的资源一起打包成 apk包之后 , 所述处理器还用于执行所述业务数据处理系统的程序指令, 以执行以下步骤
[0115] 对所述 apk包进行签名, 得到签名后的 apk包。
[0116] 本发明第三实施例中, 由于采用多线程分别编译需打包的插件, 因此, 能够提 高各个插件的编译速度, 进而提高整个 apk的打包速度。
[0117] 应当理解, 在本发明实施例中, 处理器 31可以是中央处理单元 (Central
Processing Unit, CPU) , 该处理器还可以是其他通用处理器、 数字信号处理器 (Digital Signal Processor, DSP)、 专用集成电路 (Application Specific Integrated Circuit, ASIC)、 现成可编程门阵列(Field-Programmable Gate Array, FPGA)或 者其他可编程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件等。 通用 处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
[0118] 输入设备 32可以包括触控板、 指纹采传感器 (用于采集用户的指纹信息和指纹 的方向信息) 、 麦克风、 数据接收接口等。 输出设备可以包括显示器 (LCD等 ) 、 扬声器、 数据发送接口等。
[0119] 该存储器 33可以包括只读存储器和随机存取存储器, 并向处理器 31提供指令和 数据。 存储器 33的一部分还可以包括非易失性随机存取存储器。 例如, 存储器 3 3还可以存储设备类型的信息。
[0120] 可选地, 该终端 3还包括显示器, 该显示器可用于显示由用户输入的信息或提 供给用户的信息等。 显示器可包括显示面板, 可选的, 可以采用液晶显示器 (Li quid Crystal Display , LCD) 、 有机发光二极管 (Organic Light-Emitting Diode, OLED) 等形式来配置显示面板。 进一步的, 所述显示器还可包括触控面板, 所 述触控面板可覆盖显示面板, 当触控面板检测到在其上或附近的触摸操作后, 传送给处理器 31以确定触摸事件的类型, 随后处理器 31根据触摸事件的类型在 显示面板上提供相应的视觉输出。
[0121] 具体实现中, 本发明实施例中所描述的处理器 31、 输入设备 32、 输出设备、 存 储器 33和显示器可执行本发明实施例提供的插件化打包方法的实施例中所描述 的实现方式, 也可执行实施例二所述终端中所描述的实现方式, 在此不再赘述
[0122] 本发明实施例还提供了一种非暂态计算机可读存储介质, 其特征在于, 所述非 暂态计算机可读存储介质存储可由一个或多个处理器执行的指令以执行操作, 所述操作包括:
[0123] 获取编译宿主工程的源码得到的可执行文件;
[0124] 获取包括编译后的至少一个公共基础方法的宿主工程基础库;
[0125] 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件;
[0126] 将编译后的需打包的插件存入宿主工程的资源;
[0127] 将所述可执行文件以及宿主工程的资源一起打包成 apk包。
[0128] 本领域普通技术人员可以意识到, 结合本文中所公幵的实施例描述的各示例的 单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结合来实现 。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特定应用和设 计约束条件。 专业技术人员可以对每个特定的应用来使用不同方法来实现所描 述的功能, 但是这种实现不应认为超出本发明的范围。 [0129] 所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用吋, 可 以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技术方案 本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产 品的形式体现出来, 该计算机软件产品存储在一个存储介质中, 包括若干指令 用以使得一台计算机设备 (可以是个人计算机, 服务器, 或者网络设备等) 执 行本发明各个实施例所述方法的全部或部分步骤。 而前述的存储介质包括: U盘 、 移动硬盘、 只读存储器 (ROM , Read-Only Memory)、 随机存取存储器 (RAM , Random Access Memory) 、 磁碟或者光盘等各种可以存储程序代码的介质。
[0130] 以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到变化 或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应所述 以权利要求的保护范围为准。

Claims

权利要求书
[权利要求 1] 一种插件化打包方法, 其特征在于, 所述方法包括:
获取编译宿主工程的源码得到的可执行文件;
获取包括编译后的至少一个公共基础方法的宿主工程基础库; 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件; 将编译后的需打包的插件存入宿主工程的资源; 将所述可执行文件以及宿主工程的资源一起打包成 apk包。
[权利要求 2] 根据权利要求 1所述的方法, 其特征在于, 所述获取包括编译后的至 少一个公共基础方法的宿主工程基础库, 包括: 获取环境信息、 版本信息以及编译工具, 所述版本信息包括宿主工程 的版本号;
根据所述环境信息和版本信息获取至少一个公共基础方法; 根据所述编译工具编译所述公共基础方法, 得到宿主工程基础库。
[权利要求 3] 根据权利要求 2所述的方法, 其特征在于, 在所述根据所述环境信息 和版本信息获取至少一个公共基础方法之后, 包括:
判断获取的公共基础方法是否包括指定的公共基础方法, 若不包括, 则提示更换环境信息和版本信息, 以通过更换后的环境信息和版本信 息获取指定的公共基础方法。
[权利要求 4] 根据权利要求 1至 3任一项所述的方法, 其特征在于, 在所述将所述可 执行文件以及宿主工程的资源一起打包成 apk包之后, 包括: 对所述 apk包进行签名, 得到签名后的 apk包。
[权利要求 5] 根据权利要求 1至 3任一项所述的方法, 其特征在于, 所述以所述宿主 工程基础库为依据, 采用多线程分别编译需打包的插件, 包括: 判断需打包的插件是否为最新版本的插件;
在需打包的插件为最新版本的插件吋, 以所述宿主工程基础库为依据 , 采用多线程分别编译需打包的插件。
[权利要求 6] —种插件化打包装置, 其特征在于, 所述装置包括:
可执行文件获取单元, 用于获取编译宿主工程的源码得到的可执行文 件;
宿主工程基础库获取单元, 用于获取包括编译后的至少一个公共基础 方法的宿主工程基础库;
插件编译单元, 用于以所述宿主工程基础库为依据, 采用多线程分别 编译需打包的插件;
编译后的插件存储单元, 用于将编译后的需打包的插件存入宿主工程 的资源;
Apk包生成单元, 用于将所述可执行文件以及宿主工程的资源一起打 包成 apk包。
根据权利要求 6所述的装置, 其特征在于, 所述宿主工程基础库获取 单元包括:
环境信息获取模块, 用于获取环境信息、 版本信息以及编译工具, 所 述版本信息包括宿主工程的版本号;
公共基础方法获取模块, 用于根据所述环境信息和版本信息获取至少 一个公共基础方法;
宿主工程基础库生成模块, 用于根据所述编译工具编译所述公共基础 方法, 得到宿主工程基础库。
根据权利要求 7所述的装置, 其特征在于, 所述装置包括: 公共基础方法匹配单元, 用于判断获取的公共基础方法是否包括指定 的公共基础方法, 若不包括, 则提示更换环境信息和版本信息, 以通 过更换后的环境信息和版本信息获取指定的公共基础方法。
根据权利要求 6至 8任一项所述的装置, 其特征在于, 所述装置包括: Apk包前面单元, 用于对所述 apk包进行签名, 得到签名后的 apk包。 根据权利要求 6至 8任一项所述的装置, 其特征在于, 所述插件编译单 元包括:
插件版本判断模块, 用于判断需打包的插件是否为最新版本的插件; 最新插件编译模块, 用于在需打包的插件为最新版本的插件吋, 以所 述宿主工程基础库为依据, 采用多线程分别编译需打包的插件。 一种终端, 其特征在于, 所述终端包括处理器、 存储器;
所述存储器用于存储一种插件化打包系统, 所述插件化打包系统包括 至少一个可被处理器所执行的程序指令; 所述处理器, 用于执行所述插件化打包系统的程序指令, 以执行以下 步骤:
获取编译宿主工程的源码得到的可执行文件;
获取包括编译后的至少一个公共基础方法的宿主工程基础库; 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件; 将编译后的需打包的插件存入宿主工程的资源;
将所述可执行文件以及宿主工程的资源一起打包成 apk包。
根据权利要求 11所述的终端, 其特征在于, 所述获取包括编译后的至 少一个公共基础方法的宿主工程基础库, 具体包括:
获取环境信息、 版本信息以及编译工具, 所述版本信息包括宿主工程 的版本号;
根据所述环境信息和版本信息获取至少一个公共基础方法; 根据所述编译工具编译所述公共基础方法, 得到宿主工程基础库。 根据权利要求 12所述的终端, 其特征在于, 在所述根据所述环境信息 和版本信息获取至少一个公共基础方法之后, 所述处理器还用于执行 所述业务数据处理系统的程序指令, 以执行以下步骤:
判断获取的公共基础方法是否包括指定的公共基础方法, 若不包括, 则提示更换环境信息和版本信息, 以通过更换后的环境信息和版本信 息获取指定的公共基础方法。
根据权利要求 11至 13任一项所述的终端, 其特征在于, 在所述将所述 可执行文件以及宿主工程的资源一起打包成 apk包之后, 所述处理器 还用于执行所述业务数据处理系统的程序指令, 以执行以下步骤: 对所述 apk包进行签名, 得到签名后的 apk包。
根据权利要求 11至 13任一项所述的终端, 其特征在于, 所述以所述宿 主工程基础库为依据, 采用多线程分别编译需打包的插件, 包括: 判断需打包的插件是否为最新版本的插件;
在需打包的插件为最新版本的插件吋, 以所述宿主工程基础库为依据 , 采用多线程分别编译需打包的插件。
[权利要求 16] —种非暂态计算机可读存储介质, 其特征在于, 所述非暂态计算机可 读存储介质存储可由一个或多个处理器执行的指令以执行操作, 所述 操作包括:
获取编译宿主工程的源码得到的可执行文件;
获取包括编译后的至少一个公共基础方法的宿主工程基础库; 以所述宿主工程基础库为依据, 采用多线程分别编译需打包的插件; 将编译后的需打包的插件存入宿主工程的资源; 将所述可执行文件以及宿主工程的资源一起打包成 apk包。
PCT/CN2017/074373 2016-11-14 2017-02-22 插件化打包方法、装置、终端及存储介质 WO2018086268A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP2017561419A JP6518794B2 (ja) 2016-11-14 2017-02-22 プラグイン化パッケージング方法、装置及び端末
AU2017258904A AU2017258904B2 (en) 2016-11-14 2017-02-22 Plug-in packaging method, device, terminal and storage media
US15/577,717 US10387169B2 (en) 2016-11-14 2017-02-22 Plug-in packaging method, device, terminal and storage media
SG11201709274UA SG11201709274UA (en) 2016-11-14 2017-02-22 Plug-in packaging method, device, terminal and storage media
KR1020187015590A KR102096195B1 (ko) 2016-11-14 2017-02-22 플러그인화 패키징 방법, 장치, 터미널 및 저장 매체
EP17794647.2A EP3540594A4 (en) 2016-11-14 2017-02-22 PACKAGING PROCESS, DEVICE AND TERMINAL USING AN EXPANSION MODULE FORMAT, AND STORAGE MEDIA

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611005684.X 2016-11-14
CN201611005684.XA CN106569869B (zh) 2016-11-14 2016-11-14 插件化打包方法及装置

Publications (1)

Publication Number Publication Date
WO2018086268A1 true WO2018086268A1 (zh) 2018-05-17

Family

ID=58542323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/074373 WO2018086268A1 (zh) 2016-11-14 2017-02-22 插件化打包方法、装置、终端及存储介质

Country Status (9)

Country Link
US (1) US10387169B2 (zh)
EP (1) EP3540594A4 (zh)
JP (1) JP6518794B2 (zh)
KR (1) KR102096195B1 (zh)
CN (1) CN106569869B (zh)
AU (1) AU2017258904B2 (zh)
SG (1) SG11201709274UA (zh)
TW (1) TWI679578B (zh)
WO (1) WO2018086268A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111273955A (zh) * 2020-01-16 2020-06-12 惠州Tcl移动通信有限公司 热修复插件优化方法、装置、存储介质及电子设备
CN112463155A (zh) * 2020-11-24 2021-03-09 歌尔科技有限公司 应用程序包的打包方法、打包终端和计算机可读存储介质
CN112685029A (zh) * 2020-12-30 2021-04-20 京东数字科技控股股份有限公司 一种可视化模板的生成方法、装置、设备及存储介质
CN116149760A (zh) * 2023-04-21 2023-05-23 广州三晶电气股份有限公司 基于Vue框架的前端项目打包方法及装置
CN117435244A (zh) * 2023-12-21 2024-01-23 南京掌控网络科技有限公司 一种前端跨工程公共库系统及其构建方法

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463406A (zh) * 2017-08-08 2017-12-12 上海连尚网络科技有限公司 发布移动应用的方法和电子设备
CN107870789B (zh) * 2017-10-18 2021-01-26 福建天泉教育科技有限公司 一种打包插件的方法及终端
CN109918075A (zh) * 2017-12-12 2019-06-21 北京奇虎科技有限公司 利用打包插件的sdk打包方法、打包插件及相应终端
CN109656616A (zh) * 2018-11-26 2019-04-19 平安科技(深圳)有限公司 一种基于事务处理过程优化的打包方法、系统及电子设备
CN111124420B (zh) * 2019-12-19 2023-06-20 北京百度网讯科技有限公司 编译方法、装置、电子设备及可读存储介质
CN111142903B (zh) * 2019-12-23 2023-09-22 杭州安恒信息技术股份有限公司 一种基于文件对比的配置文件交互式更新方法及装置
CN111062638B (zh) * 2019-12-26 2023-09-12 珠海金山数字网络科技有限公司 一种项目资源的处理方法及装置
CN111290760B (zh) * 2020-03-03 2023-03-31 北京字节跳动网络技术有限公司 应用程序编译方法、装置、电子设备及存储介质
CN111580834B (zh) * 2020-04-10 2021-10-29 北京城市网邻信息技术有限公司 一种应用安装包的生成方法和装置
CN111610984B (zh) * 2020-05-09 2023-10-27 上海万间信息技术有限公司 基于插件的安卓应用打包分发方法、系统及应用终端
CN112416353A (zh) * 2020-08-10 2021-02-26 上海幻电信息科技有限公司 渠道包打包方法、装置及计算机设备
CN112148303B (zh) * 2020-09-28 2024-05-28 Oppo(重庆)智能科技有限公司 文件生成方法、装置、终端及存储介质
CN112437092A (zh) * 2020-12-03 2021-03-02 许昌学院 分布式系统共享session无侵入方法
CN112631650A (zh) * 2020-12-28 2021-04-09 掌阅科技股份有限公司 插件版本信息校验方法、计算设备及存储介质
CN112732314A (zh) * 2020-12-30 2021-04-30 北京一亩田新农网络科技有限公司 基于android插件化差分打包方法、装置、电子设备及计算机可读介质
CN112783515B (zh) * 2021-02-08 2023-08-25 腾讯科技(深圳)有限公司 插件的控制方法和装置、存储介质
CN113608723A (zh) * 2021-08-05 2021-11-05 上海中通吉网络技术有限公司 自动化构建及发布的小程序工程化方法
CN116974586A (zh) * 2023-09-22 2023-10-31 深圳传趣网络技术有限公司 多渠道应用打包方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1853165A (zh) * 2003-09-30 2006-10-25 英特尔公司 用于多线程的编译器创建辅助线程的方法和装置
CN101667135A (zh) * 2009-09-30 2010-03-10 浙江大学 一种交互式并行化编译系统及其编译方法
CN101909082A (zh) * 2010-07-29 2010-12-08 中国运载火箭技术研究院 一种基于模型驱动的网格门户配置系统及配置方法
CN104461466A (zh) * 2013-09-25 2015-03-25 广州中国科学院软件应用技术研究所 基于MPI和OpenMP混合编程模型并行计算提高计算速度的方法
CN104932928A (zh) * 2014-03-17 2015-09-23 无锡天脉聚源传媒科技有限公司 一种基于java的插件化开发方法及系统

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3991724B2 (ja) * 2002-03-12 2007-10-17 ヤマハ株式会社 データ処理装置およびコンピュータプログラム
US20070083527A1 (en) * 2005-10-07 2007-04-12 David Wadler Systems and methods for uploading and downloading files in a distributed network
JP5267337B2 (ja) * 2009-06-01 2013-08-21 株式会社リコー プログラム、記憶媒体、情報処理装置、プリンタ装置およびシステム
CN102053836B (zh) * 2010-12-31 2013-04-10 广东欧珀电子工业有限公司 一种Android应用开发的版本管理工具的实现方法
WO2011127845A2 (zh) * 2011-05-04 2011-10-20 华为终端有限公司 一种移动通信终端间进行系统升级的方法、系统及终端
TW201342232A (zh) * 2012-04-02 2013-10-16 Miiroad Inc 應用程式包自動產生模組與方法
RU2523113C1 (ru) * 2012-12-25 2014-07-20 Закрытое акционерное общество "Лаборатория Касперского" Система и способ целевой установки сконфигурированного программного обеспечения
CN104049986B (zh) * 2013-03-14 2018-12-18 腾讯科技(深圳)有限公司 插件加载方法及装置
KR101489199B1 (ko) 2013-03-29 2015-02-03 주식회사 엘지씨엔에스 컴퓨터에서 실행 가능한 어플리케이션 패키지를 생성하는 방법, 이를 수행하는 컴퓨터 실행 장치 및 이를 저장한 기록 매체
CN104375849B (zh) * 2013-08-15 2019-01-11 腾讯科技(深圳)有限公司 加载内核的方法及装置
US9361163B2 (en) 2013-11-28 2016-06-07 Good Technology Corporation Managing containerized applications on a mobile device while bypassing operating system implemented inter process communication
CN104700003B (zh) * 2013-12-04 2019-02-01 腾讯科技(深圳)有限公司 一种文件加壳及脱壳方法、装置及系统
JP6326838B2 (ja) * 2014-02-05 2018-05-23 日本電気株式会社 プログラム処理装置、プログラム処理方法、及びプログラム処理プログラム
CN104932873B (zh) * 2014-03-19 2018-05-25 联发科技(新加坡)私人有限公司 档案处理方法以及电子装置
CN105204922B (zh) * 2014-06-30 2018-12-07 金电联行(北京)信息技术有限公司 一种数据采集平台客户端采集方法
CN104834515A (zh) * 2015-03-30 2015-08-12 百度在线网络技术(北京)有限公司 目标文件的生成方法
CN105988852A (zh) * 2015-12-25 2016-10-05 武汉安天信息技术有限责任公司 一种Android程序插件化实现方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1853165A (zh) * 2003-09-30 2006-10-25 英特尔公司 用于多线程的编译器创建辅助线程的方法和装置
CN101667135A (zh) * 2009-09-30 2010-03-10 浙江大学 一种交互式并行化编译系统及其编译方法
CN101909082A (zh) * 2010-07-29 2010-12-08 中国运载火箭技术研究院 一种基于模型驱动的网格门户配置系统及配置方法
CN104461466A (zh) * 2013-09-25 2015-03-25 广州中国科学院软件应用技术研究所 基于MPI和OpenMP混合编程模型并行计算提高计算速度的方法
CN104932928A (zh) * 2014-03-17 2015-09-23 无锡天脉聚源传媒科技有限公司 一种基于java的插件化开发方法及系统

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111273955A (zh) * 2020-01-16 2020-06-12 惠州Tcl移动通信有限公司 热修复插件优化方法、装置、存储介质及电子设备
CN111273955B (zh) * 2020-01-16 2024-01-19 惠州Tcl移动通信有限公司 热修复插件优化方法、装置、存储介质及电子设备
CN112463155A (zh) * 2020-11-24 2021-03-09 歌尔科技有限公司 应用程序包的打包方法、打包终端和计算机可读存储介质
CN112685029A (zh) * 2020-12-30 2021-04-20 京东数字科技控股股份有限公司 一种可视化模板的生成方法、装置、设备及存储介质
CN116149760A (zh) * 2023-04-21 2023-05-23 广州三晶电气股份有限公司 基于Vue框架的前端项目打包方法及装置
CN117435244A (zh) * 2023-12-21 2024-01-23 南京掌控网络科技有限公司 一种前端跨工程公共库系统及其构建方法
CN117435244B (zh) * 2023-12-21 2024-03-19 南京掌控网络科技有限公司 一种前端跨工程公共库系统及其构建方法

Also Published As

Publication number Publication date
CN106569869A (zh) 2017-04-19
EP3540594A1 (en) 2019-09-18
CN106569869B (zh) 2019-04-19
SG11201709274UA (en) 2018-06-28
TW201818242A (zh) 2018-05-16
AU2017258904B2 (en) 2019-02-14
KR102096195B1 (ko) 2020-04-02
AU2017258904A1 (en) 2018-05-31
US20180293085A1 (en) 2018-10-11
TWI679578B (zh) 2019-12-11
JP2019502176A (ja) 2019-01-24
JP6518794B2 (ja) 2019-05-22
US10387169B2 (en) 2019-08-20
EP3540594A4 (en) 2020-10-21
KR20180077265A (ko) 2018-07-06

Similar Documents

Publication Publication Date Title
WO2018086268A1 (zh) 插件化打包方法、装置、终端及存储介质
EP2912547B1 (en) Configuration file updater
CN105302587B (zh) 数据更新方法及装置
CN105528229B (zh) 提高移动终端首次开机速度的方法及装置
US10176327B2 (en) Method and device for preventing application in an operating system from being uninstalled
US20110191764A1 (en) Systems, methods, and apparatuses for facilitating distribution of firmware updates
CN106681749B (zh) 基于安卓平台的局部代码补丁更新方法及装置
EP3584732B1 (en) Application management method for terminal, application server and terminal
CN112214408B (zh) 依赖冲突检测方法、装置、电子设备及计算机可读介质
CN111930382B (zh) 应用页面的接入方法、装置及设备
JP6793667B2 (ja) アプリケーションダウンロード方法及び装置
CN105094830B (zh) 一种执行目标功能的方法和装置
KR20140004495A (ko) 응용프로그램의 자동 테스트 방법 및 그 전자 장치
CN106598662B (zh) 基于android的应用加载方法及装置
CN110191176B (zh) 一种快速电子取证方法及系统
CN105468504A (zh) 程序测试方法及装置
RU2624102C2 (ru) Способ, устройство и оборудование для установки приложения
CN111459822A (zh) 系统组件数据的提取方法、装置、设备及可读介质
CN111176685A (zh) 一种升级方法及装置
US20170126872A1 (en) Method and apparatus for providing contact information
KR102188685B1 (ko) 애플리케이션 패키지를 생성하는 장치 및 방법
KR102052651B1 (ko) 데이터 접근 제어 방법 및 그 전자 장치
KR102131943B1 (ko) Url 분석 방법 및 그 전자 장치
CN111796865A (zh) 一种字节码文件修改方法、装置、终端设备及介质
CN110502251A (zh) 应用安装方法及装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 11201709274U

Country of ref document: SG

WWE Wipo information: entry into national phase

Ref document number: 2017561419

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 15577717

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2017258904

Country of ref document: AU

Date of ref document: 20170222

Kind code of ref document: A

Ref document number: 20187015590

Country of ref document: KR

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17794647

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE