Desktop end application packaging method, system, device and program product
Patent Information
- Application Number
- CN202411477578.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-14
AI Technical Summary
During the development process of desktop Electron applications, when packaging frequently, due to the large number of binary files in the package, the time required for the signature process increases significantly, resulting in low development efficiency. Especially in the tight release cycle, the wasted packaging time leads to the issuance of distribution The time of the edition is difficult to control.
By extracting the fixed signature files from the full signature files of the application to be packaged, and storing them in the packaging source directory. When packaging again, modify the temporary files of the packaging configuration, exclude the fixed signature files from the signature process, and perform the remaining files. After signature processing, restore the fixed signature file to the corresponding location.
It significantly shortens the time-consuming process of the signature process, improves packaging efficiency, ensures the integrity and security of packaging, makes the release time controllable and the project progresses smoothly.
Smart Images

Figure CN119440528A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of desktop application development, and in particular to a desktop application packaging method, system, device and program product. Background Art
[0002] Frequent packaging is a common requirement in the development of desktop Electron applications. However, when using electron-builder for packaging, the more binary files there are in the package, the longer the signing process will take, which will affect development efficiency.
[0003] When the development team releases a new version every two months, the team has relatively sufficient time to complete the workflow at each stage. However, when the release cycle is shortened to one month, the time for the testing phase becomes very tight, especially in the defect verification phase, where there is often a situation where the team has to wait for the development team to package. This waiting wastes a lot of time and makes it difficult to accurately control the release time, increasing uncontrollable factors and putting pressure on the progress and quality of the entire project.
[0004] In order to solve this problem, the packaging process must be optimized and the packaging time must be shortened to reduce the time cost and the uncertainty of the release. Before the corresponding solution was proposed, the existing technology has always relied on the packaging tools officially provided by electron-builder for normal packaging. However, since some installation packages contain a large number of images, third-party dynamic link libraries, and other binary files, the signing process takes a lot of time. This problem seriously affects the overall packaging efficiency and becomes one of the main bottlenecks in the release process.
[0005] Therefore, it is urgent to invent a more efficient desktop application packaging method to improve packaging efficiency and ensure the integrity and security of packaging to ensure the controllability of release time and the smooth progress of the project. Summary of the invention
[0006] In view of this, embodiments of the present invention provide a desktop application packaging method, system, device and program product, which at least partially solve the problems existing in the prior art.
[0007] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.
[0008] In order to achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0009] According to a first aspect of an embodiment of the present invention, a desktop application packaging method is provided, the method comprising:
[0010] The desktop application to be packaged is packaged, a fixed signature file is extracted from the full signature file of the application to be packaged, and the fixed signature file is stored in the packaging source directory;
[0011] When the packaged application is repackaged, the files corresponding to the fixed signature files stored in the package source directory are excluded from the signing process by modifying the temporary files of the packaging configuration. After the remaining files are signed, the fixed signature files in the package source directory are restored to the corresponding positions.
[0012] Use the signed file to get the packaged application package.
[0013] Further, extracting a fixed signature file from the full signature file of the application to be packaged, and storing the fixed signature file in the packaging source directory, includes:
[0014] In the first packaging of the application to be packaged, a full file signature process is performed on the application to be packaged during the packaging process to obtain a first signature completion file;
[0015] A fixed signature file is extracted from the first signature completion file, and the fixed signature file is stored in a packaging source directory.
[0016] Furthermore, when the packaged application is packaged again, the files corresponding to the fixed signature files stored in the package source directory are excluded from the signature process by modifying the temporary files of the packaging configuration, and after the remaining files are signed, the fixed signature files in the package source directory are restored to the corresponding positions, including:
[0017] In the repackaging of the application to be packaged, the files corresponding to the fixed signature files stored in the packaging source directory are excluded from the signature process by modifying the temporary files of the packaging configuration, and the remaining files are signed to obtain the second signature completion file;
[0018] The fixed signature file in the packaging source directory is copied and restored to the corresponding position, and the third signature completion file is obtained by using the copied fixed signature file and the second signature completion file.
[0019] Furthermore, the signed file is used to obtain a packaged application package, including:
[0020] In the first packaging of the application to be packaged, the first signature is used to complete the file to obtain an application package corresponding to the application to be packaged;
[0021] In the re-packaging of the application to be packaged, the file is completed using the third signature to obtain an application package corresponding to the application to be packaged.
[0022] Furthermore, the method further comprises:
[0023] Determine whether the application package is a macOS application package;
[0024] If the application package is a macOS application package, the macOS application package is signed as a whole to obtain a signed macOS application package;
[0025] If the application package is not a macOS application package, there is no need to perform overall signing processing.
[0026] Furthermore, the fixed signature file is a binary file that does not change frequently in subsequent updates.
[0027] Furthermore, the desktop application to be packaged is packaged, including:
[0028] Use electron-builder to package the desktop application based on the Electron framework.
[0029] According to a second aspect of an embodiment of the present invention, a desktop application packaging system is provided, the system comprising:
[0030] The first signature module is used to package the desktop application to be packaged, extract the fixed signature file from the full signature file of the application to be packaged, and store the fixed signature file in the packaging source directory;
[0031] The second signature module is used to exclude the files corresponding to the fixed signature files stored in the packaging source directory from the signature process by modifying the temporary files of the packaging configuration when the packaged application is repackaged, and restore the fixed signature files in the packaging source directory to the corresponding positions after signing the remaining files;
[0032] The signature file packaging module is used to obtain a packaged application package using the signed file.
[0033] According to a third aspect of an embodiment of the present invention, there is provided a desktop application packaging device, the device comprising: a processor and a memory;
[0034] The memory is used to store one or more program instructions;
[0035] The processor is used to run one or more program instructions to execute the steps of a desktop application packaging method as described in any one of the above items.
[0036] According to a fourth aspect of an embodiment of the present invention, a computer program product is provided, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer implements the steps of a desktop application packaging method as described in any one of the above items.
[0037] The embodiments of the present invention have the following advantages:
[0038] A desktop application packaging method, system, device and program product provided by the embodiments of the present invention effectively reduce the number of signature files required during the packaging process, thereby saving a lot of time, significantly improving the packaging efficiency, and at the same time ensuring the integrity and security of the packaging, thereby ensuring the controllability of the release time and the smooth progress of the project. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0040] Figure 1 A schematic diagram of a process flow of a desktop application packaging method provided by an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of the structure of a desktop application packaging system provided by an embodiment of the present invention;
[0042] Figure 3 A schematic block diagram of the principles of a desktop application packaging method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0045] The present invention solves the defects of the prior art and provides a desktop application packaging method, which can significantly improve the packaging efficiency of desktop applications and save development time. In addition, if other packaging tools are used, the inventive concept of this application can also be used to achieve similar optimization effects.
[0046] Figure 1 The figure shows a flow chart of a desktop application packaging method according to an embodiment of the present invention.
[0047] like Figure 1 As shown, the desktop application packaging method according to an embodiment of the present invention may include step S100, step S200 and step S300.
[0048] refer to Figure 3 In step S100, the desktop application to be packaged is packaged, a fixed signature file is extracted from the full signature file of the application to be packaged, and the fixed signature file is stored in the packaging source directory.
[0049] Specifically, the above steps include:
[0050] When electron-builder is used to package a desktop application to be packaged based on the Electron framework, it is determined whether this packaging is the first packaging process for the application to be packaged; in the first packaging of the application to be packaged, the full file signature process of the application to be packaged is performed during the packaging process to obtain the first signature completion file.
[0051] Extract the fixed signature file from the first signature completion file and store the fixed signature file in the packaging source directory, where the fixed signature file is a signed binary file that will not change frequently in subsequent updates. Since these files will not change in a short period of time, there is no need to re-sign them during each packaging process.
[0052] Next, in step S200, when the packaged application is packaged again, the files corresponding to the fixed signature files stored in the packaging source directory are excluded from the signing process by modifying the temporary files of the packaging configuration. After the remaining files are signed, the fixed signature files in the packaging source directory are restored to the corresponding positions.
[0053] Specifically, the above steps include:
[0054] In the repackaging of the application to be packaged, the files corresponding to the fixed signature files stored in the packaging source directory are excluded from the signature process by modifying the temporary files of the packaging configuration, and the second signature completion file is obtained after the remaining files are signed.
[0055] The fixed signature file in the package source directory is copied and restored to the original corresponding position. The copied fixed signature file and the second signature completion file are used to ensure that they can be fully integrated into the correct application package to obtain the third signature completion file.
[0056] Finally, in step S300, the signed file is used to obtain a packaged application package.
[0057] Specifically, the above steps include:
[0058] In the first packaging of the application to be packaged, the first signature formed by the full file signature is directly used to complete the subsequent packaging steps of the file, and finally the application package corresponding to the application to be packaged is obtained.
[0059] In the repackaging of the application to be packaged, the third signature is used to complete the subsequent packaging steps, and finally an application package corresponding to the application to be packaged is obtained.
[0060] The embodiment of the present invention extracts binary files that will not be changed subsequently and stores them in the packaging source directory during the first packaging. When packaging again, the temporary files of the packaging configuration are modified to exclude the previously extracted binary files from the packaging process, so that these binary files can be directly used when packaging again without signing again, which significantly shortens the time consumption of the signing process.
[0061] In addition, the embodiment of the present invention also includes:
[0062] Determine whether the application package corresponding to the application to be packaged is a macOS application package.
[0063] If the application package corresponding to the application to be packaged is a macOS application package, the macOS application package is signed as a whole to obtain a signed macOS application package.
[0064] If the application package corresponding to the application to be packaged is not a macOS application package, there is no need to perform overall signing processing.
[0065] The embodiment of the present invention performs an additional overall signature on the macOS application package to ensure that the packaging complies with the security requirements of macOS.
[0066] In addition, the embodiment of the present invention also provides a desktop application packaging system, referring to Figure 2 , the above system specifically includes:
[0067] The first signature module is used to package the desktop application to be packaged, extract the fixed signature file from the full signature file of the application to be packaged, and store the fixed signature file in the packaging source directory;
[0068] The second signature module is used to exclude the files corresponding to the fixed signature files stored in the packaging source directory from the signature process by modifying the temporary files of the packaging configuration when the packaged application is repackaged, and restore the fixed signature files in the packaging source directory to the corresponding positions after signing the remaining files;
[0069] The signature file packaging module is used to obtain a packaged application package using the signed file.
[0070] In addition, an embodiment of the present invention further provides a device, which includes: a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of a desktop application packaging method as described above.
[0071] In addition, an embodiment of the present invention further provides a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the steps of the desktop application packaging method described above are implemented.
[0072] The embodiment of the present invention provides a desktop application packaging method, system, device and program product. During each packaging, only those binary files that change frequently are signed, while for those files that do not change, the previously signed files are directly used. The packaging method provided by the embodiment of the present invention reduces the number of files that need to be signed during the packaging process, thereby saving a lot of time, improving packaging efficiency, and ensuring packaging integrity and security.
[0073] In the embodiment of the present invention, the processor may be an integrated circuit chip with signal processing capability. The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The processor reads the information in the storage medium and completes the steps of the above method in combination with its hardware. The storage medium may be a memory, for example, a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).The storage medium described in the embodiment of the present invention is intended to include but is not limited to these and any other suitable types of memory. Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by a combination of hardware and software. When the software is applied, the corresponding function can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication medium includes any medium that is convenient for transmitting a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access. Although the present invention has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to it on the basis of the present invention. Therefore, these modifications or improvements made on the basis of not departing from the spirit of the present invention all belong to the scope of protection claimed in the present invention.
Claims
1. A desktop application packaging method, characterized in that: The method comprises: The desktop application to be packaged is packaged, a fixed signature file is extracted from the full signature file of the application to be packaged, and the fixed signature file is stored in the packaging source directory; When the packaged application is repackaged, the files corresponding to the fixed signature files stored in the package source directory are excluded from the signing process by modifying the temporary files of the packaging configuration. After the remaining files are signed, the fixed signature files in the package source directory are restored to the corresponding positions. Use the signed file to get the packaged application package.
2. A desktop application packaging method as claimed in claim 1, characterized in that: Extract the fixed signature file from the full signature file of the application to be packaged, and store the fixed signature file in the packaging source directory, including: In the first packaging of the application to be packaged, a full file signature process is performed on the application to be packaged during the packaging process to obtain a first signature completion file; A fixed signature file is extracted from the first signature completion file, and the fixed signature file is stored in a packaging source directory.
3. A desktop application packaging method as claimed in claim 2, characterized in that: When repackaging the packaged application, the files corresponding to the fixed signature files stored in the package source directory are excluded from the signing process by modifying the temporary files of the packaging configuration. After the remaining files are signed, the fixed signature files in the package source directory are restored to the corresponding locations, including: In the repackaging of the application to be packaged, the files corresponding to the fixed signature files stored in the packaging source directory are excluded from the signature process by modifying the temporary files of the packaging configuration, and the remaining files are signed to obtain the second signature completion file; The fixed signature file in the packaging source directory is copied and restored to the corresponding position, and the third signature completion file is obtained by using the copied fixed signature file and the second signature completion file.
4. A desktop application packaging method as claimed in claim 3, characterized in that: Use the signed file to get the packaged application package, including: In the first packaging of the application to be packaged, the first signature is used to complete the file to obtain an application package corresponding to the application to be packaged; In the re-packaging of the application to be packaged, the file is completed using the third signature to obtain an application package corresponding to the application to be packaged.
5. A desktop application packaging method as claimed in claim 1, characterized in that: The method further comprises: Determine whether the application package is a macOS application package; If the application package is a macOS application package, the macOS application package is signed as a whole to obtain a signed macOS application package; If the application package is not a macOS application package, there is no need to perform overall signing processing.
6. A desktop application packaging method as claimed in claim 1, characterized in that: The fixed signature file is a binary file that does not change frequently in subsequent updates.
7. A desktop application packaging method as claimed in claim 1, characterized in that: Package the desktop application to be packaged, including: Use electron-builder to package the desktop application based on the Electron framework.
8. A desktop application packaging system, characterized in that: The system comprises: The first signature module is used to package the desktop application to be packaged, extract the fixed signature file from the full signature file of the application to be packaged, and store the fixed signature file in the packaging source directory; The second signature module is used to exclude the files corresponding to the fixed signature files stored in the packaging source directory from the signature process by modifying the temporary files of the packaging configuration when the packaged application is repackaged, and restore the fixed signature files in the packaging source directory to the corresponding positions after signing the remaining files; The signature file packaging module is used to obtain a packaged application package using the signed file.
9. A desktop application packaging device, characterized in that: The device comprises: a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of a desktop application packaging method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product includes computer program instructions, which, when executed by a processor, implement the steps of a desktop application packaging method as described in any one of claims 1 to 7.