WO2020210994A1 - Quick application installation package debugging method and apparatus, and electronic device and storage medium - Google Patents

Quick application installation package debugging method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2020210994A1
WO2020210994A1 PCT/CN2019/082947 CN2019082947W WO2020210994A1 WO 2020210994 A1 WO2020210994 A1 WO 2020210994A1 CN 2019082947 W CN2019082947 W CN 2019082947W WO 2020210994 A1 WO2020210994 A1 WO 2020210994A1
Authority
WO
WIPO (PCT)
Prior art keywords
installation package
quick application
application installation
file
debugging
Prior art date
Application number
PCT/CN2019/082947
Other languages
French (fr)
Chinese (zh)
Inventor
郭子亮
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to PCT/CN2019/082947 priority Critical patent/WO2020210994A1/en
Priority to CN201980089698.XA priority patent/CN113330427B/en
Publication of WO2020210994A1 publication Critical patent/WO2020210994A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • This application relates to the field of computer technology, and more specifically, to a fast application installation package debugging method, device, electronic equipment, and storage medium.
  • Quick App is an application that does not need to be downloaded and is search-and-use.
  • Quick application programs usually correspond to a quick application installation package, and there is still a lack of debugging methods for the quick application installation package.
  • this application proposes a quick application installation package debugging method, device, electronic equipment, and storage medium to improve the above problems.
  • this application provides a quick application installation package debugging method, which is applied to a quick application installation package debugging device, and the method includes: obtaining the quick application installation package from a designated address; Package to obtain the unpacked resource file; call the fast application development tool hap-toolkit to debug the unpacked resource file.
  • the present application provides a quick application installation package debugging device, the device includes: an installation package acquisition unit for obtaining the quick application installation package from a designated address; and an unpacking unit for checking the quick application The installation package is unpacked to obtain the unpacked resource file; the debugging unit is used to call the fast application development tool hap-toolkit to debug the unpacked resource file.
  • this application provides an electronic device, including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors Implement the above method.
  • the present application provides a computer-readable storage medium in which program code is stored, wherein the above-mentioned method is executed when the program code is run by a processor.
  • the present application provides a quick application installation package debugging method, device, electronic device, and storage medium. After obtaining the quick application installation package from a designated address, the quick application installation package is unpacked to obtain the unpacked resource file , And then call the fast application development tool hap-toolkit to debug the unpacked resource files, so as to realize that any packaged fast application installation package can be debugged, and because the fast application development tool is dynamically invoked before , The quick application installation package to be debugged has been learned about the package, and the resource files after the understanding of the package have been obtained. At the same time, the problem that the quick application development tool can only directly debug the source code of the quick application installation package is improved, and the quick application installation package is improved Versatility of debugging.
  • FIG. 1 shows a schematic diagram of the architecture of a fast application proposed in an embodiment of the present application
  • FIG. 2 shows a flowchart of a method for debugging a quick application installation package according to an embodiment of the present application
  • FIG. 3 shows a schematic diagram of a browser interface for inputting a server address for debugging in a method for debugging a quick application installation package proposed in an embodiment of the present application
  • FIG. 4 shows a flowchart of a method for debugging a quick application installation package according to another embodiment of the present application
  • FIG. 5 shows a schematic structural diagram of a quick application installation package development project established in a quick application installation package debugging method proposed in another embodiment of the present application
  • FIG. 6 shows a flowchart of a method for debugging a quick application installation package according to another embodiment of the present application
  • FIG. 7 shows a flowchart of a fast application installation package debugging method proposed by another embodiment of the present application.
  • FIG. 8 shows a schematic diagram of a result file established in a method for debugging a quick application installation package proposed by another embodiment of the present application
  • FIG. 9 shows a structural block diagram of a fast application installation package debugging device proposed by an embodiment of the present application.
  • FIG. 10 shows a structural block diagram of a device for debugging a quick application installation package according to another embodiment of the present application.
  • FIG. 11 shows a structural block diagram of a fast application installation package debugging device proposed by another embodiment of the present application.
  • FIG. 12 shows a structural block diagram of a quick application installation package debugging device proposed by another embodiment of the present application.
  • FIG. 13 shows a structural block diagram of an electronic device for executing the method for debugging a quick application installation package according to an embodiment of the present application in real time of the present application;
  • FIG. 14 shows a storage unit used to store or carry the program code for implementing the method for debugging a quick application installation package according to an embodiment of the present application in real time.
  • the fast application is a new application form based on the hardware platform of the terminal device. It does not need to be installed, it is click-to-use, and it has the original application experience (performance, system integration, interaction, etc.).
  • the structure diagram of the fast application engine, the front-end design of fast application draws on and integrates the design ideas of mainstream front-end frameworks (Vue, React, etc.): build applications in a componentized way, with data binding as the core
  • the MVVM design mode uses V-DOM to improve performance, while choosing a concise and clear Vue-like template.
  • Hap-toolkit is a developer tool for Quick App. It helps developers to complete the development work through command line tools, mainly including Create template projects, upgrade projects, compile and debug functions.
  • hap-toolkit as a quick application development tool, can smoothly complete the development and debugging process of the source code of the quick application, but hap-toolkit does not have the packaged quick application installation package (rpk)
  • the unpacking function which can only directly debug the source code of the fast application, but the debugging work of the current fast application installation package is more complicated and diverse, so the developer or later operation and maintenance personnel need to perform the packaged fast application
  • the inventor proposes that the implementation in the application can be debugged for any packaged quick application installation package, and because before calling the quick application development tool, the quick application installation package to be debugged has been checked to obtain the understanding package The latter resource files, and at the same time, improve the problem that the quick application development tool can only directly debug the source code of the quick application installation package, and improve the versatility of the quick application installation package debugging method, device, and electronic equipment And storage media.
  • a quick application installation package debugging method provided by an embodiment of the present application is applied to a quick application installation package debugging device, and the method includes:
  • Step S110 Obtain the quick application installation package from the specified address.
  • the quick application installation package to be debugged later will be stored in a certain device first, where the quick application installation package can be stored locally or on other devices in the network. Regardless of where the quick application installation package is stored, there will be a corresponding storage address.
  • the corresponding storage address of the quick application installation package stored locally may include the storage path
  • the corresponding storage address of the quick application installation package stored on other devices in the network will include the network address and storage path of the storage device .
  • the corresponding storage address may be D: ⁇ quickapp ⁇ a.rpk.
  • the corresponding storage address of the quick app installation package stored on other devices in the network can be 192.168.1.3 ⁇ quickapp ⁇ a.rpk.
  • the debugger can input the address and the name of the quick application installation package in the designated address input area, and then when the quick application installation package debugging device obtains the address input by the user and the name of the quick application installation package, Take the obtained address as the designated address, and then obtain the quick application installation package corresponding to the name entered by the user from the designated address.
  • the quick app installation package debugging device will use D: ⁇ quickapp ⁇ as the specified address, and then go to the D drive Find the quick app installation package b.rpk in the quickapp folder.
  • Step S120 Unpack the quick application installation package to obtain the unpacked resource file.
  • Step S130 Call the quick application development tool hap-toolkit to debug the unpacked resource file.
  • the quick application development tool hap-toolkit exists as a component of the quick application installation package debugging device, so the quick application installation package debugging device is calling the quick application development tool hap-toolkit In the process, it can be called based on how the components call each other. It is understandable that if the development language of the quick application installation package debugging device itself is not available, the way it performs component calls will be adaptable differently.
  • the quick application installation package debugging device can call the quick application development tool hap-toolkit based on the os.system() function during operation, as In another way, the quick application installation package debugging device can also call the quick application development tool hap-toolkit based on the ShellExecute function.
  • the unpacked resource file can be loaded into the quick application installation package debugging device, and then the quick application development tool hap-toolkit can be called to load the quick application installation package debugging device. Debug the unpacked resource file.
  • the quick application development tool hap-toolkit runs in the form of a functional module, and In this mode, the quick application development tool hap-toolkit is a functional module in the quick application installation package debugging device in this embodiment, so that the resource files loaded into the quick application installation package in this embodiment can be performed debugging.
  • the quick application development tool hap-toolkit can be used for the quick application installation package debugging device
  • a functional module can also be a stand-alone application.
  • the fast application installation package debugging device can send the storage location of the unpacked resource file to the fast application development tool hap- based on inter-process communication. toolkit, so that the fast application development tool hap-toolkit can load the unpacked resource files for subsequent debugging.
  • the quick application installation package debugging device opens the debugging port locally, at this time, use the local browser to open http://localhost:8000, and simultaneously debug with the quick application installation package
  • the electronic device where the device is connected is connected to the Android mobile phone under the same WiFi to start the quick application debugger. Then you can start debugging based on the method suggested in the quick application debugger. For example, if you choose scan code debugging, you can start debugging by scanning the QR code in the local browser page.
  • This application provides a quick application installation package debugging method. After obtaining the quick application installation package from a designated address, unpack the quick application installation package to obtain the unpacked resource file, and then call the quick application development tool hap -toolkit, to debug the unpacked resource files, so as to realize that any packaged quick app installation package can be debugged, and because the quick app installation package to be debugged has been debugged before calling the quick app development tool Understand the package, get the resource files after the package, and at the same time improve the problem that the quick application development tool can only directly debug the source code of the quick application installation package, and improve the generality of the quick application installation package debugging.
  • a quick application installation package debugging method provided by an embodiment of the present application is applied to a quick application installation package debugging device, and the method includes:
  • Step S210 Obtain the quick application installation package from the specified address.
  • Step S220 Unpack the quick application installation package to obtain the unpacked resource file.
  • Step S230 Create a new quick application installation package development project, in which the resource files of the initial quick application installation package are configured.
  • the quick application installation package debugging device executes the hap init ⁇ ProjectName> command to create a new quick application installation package development project.
  • "ProjectName” represents the name of the new project.
  • the development project for the new quick application installation package includes the resource files shown in Figure 5, which mainly include the two resource folders sign and src, and the package.json file, where sign mainly stores the resource files required for signature , Src mainly includes index.ux file for recording source code and manifest.json file for recording configuration information.
  • the new quick application installation package development project includes the various resource files shown in FIG. 5, but the content of the resource files included in the new quick application installation package development project is the default initial content.
  • the initial content in the index.ux file that records the source code can be "hello quickapp", or the content in the resource files of some initial quick app installation packages is empty.
  • Step S240 Replace the resource file of the initial quick application installation package with the unpacked resource file.
  • the aforementioned unpacked resource file will also include the various files shown in the figure, but the content in the unpacked resource file is the content edited by the developer. Then, after the unpacked resource file is obtained, the unpacked resource file can be used to replace the resource file of the initial quick application installation package. For example, in this step, the index.ux file in the unpacked resource file will be used to replace the index.ux file in the new quick application installation package development project, and the manifest.json file in the unpacked resource file will be used. Replace the manifest.json file in the new quick application installation package development project.
  • Step S250 Call the quick application development tool hap-toolkit to debug the new quick application installation package development project, so as to realize the debugging of the unpacked resource file.
  • Step S260 Invoke the quick application development tool hap-toolkit to sign the debugged resource file based on the specified signature and package it into a quick application installation package, wherein the specified signature and the quick application obtained from the specified address The original signature of the installation package is different.
  • the signature of the quick application installation package is used to protect the integrity of the file.
  • the principle of use of the signature is: When compiling and packaging, first perform SHA256 operation on each file in the rpk package, and then use the signed private key and certificate The result of SHA256 is signed, and the final result is packaged in the quick application installation package in a file named /META-INF/CERT.
  • the quick application installation package When the quick application installation package is running, it will check the value of the signed SHA256 to see if it is equal to the SHA256 value of the current file. If it is not equal, the verification will fail, which proves that the file in the quick application installation package has been modified. In turn, the quick application installation package that fails the verification cannot be run normally.
  • the quick application installation package debugging device will perform the debugging based on the specified signature.
  • the resource file is re-signed.
  • the quick application installation package debugging device can find the /META-INF/CERT file with the signature result stored in the unpacking folder, and delete it, and then use other legal signature private keys and certificates in the packaging process ( As a way, this embodiment can directly use the debug signature provided by the official, eliminating the need to generate another signature) Invoke the fast application development tool hap-toolkit to sign and package the unpacked file directory, and generate a new /CERT file.
  • the packaging process as a way, call the quick application development tool hap-toolkit to create an empty packaging project, update the packaging configuration information of the packaging project to the information of the resource file after debugging, and obtain the updated packaging
  • the configuration information is used to sign the debugged resource file based on the updated packaging configuration information and the designated signature and package it into a quick application installation package.
  • the optional packaging project is webpack packaging project.
  • webpack can be regarded as a module packaging machine: what it does is to analyze the project structure, find JavaScript modules and other extended languages (Scss, TypeScript, etc.) that cannot be directly run by browsers, and convert and package them into suitable ones
  • the format is for browser use.
  • the debugged resource file in the new quick application installation package development project can be replaced with all The resource files of the initial quick application installation package are described.
  • step S210 to step S250 in this embodiment can be executed again for the quick application installation package packaged after debugging, so as to realize the code modification in the debugging process, you can immediately Verify whether the modified code can be executed successfully.
  • the quick application installation package debugging device may provide a command line input interface so that the user can input corresponding instructions therein to trigger the quick application installation package debugging device to perform corresponding steps in this embodiment. .
  • step S210 to the step S260 will be executed. It is also possible to execute only step S210 to step S250 when the command "-d” input is detected, and then when the command “-f” input is further detected in the command line input interface, execute the steps for the debugged resource file The content of S260.
  • the user can also input two or more commands at the same time in the command line input interface. For example, after the quick application installation package debugging device has executed step S250 in response to the command "-d", the user can input the command "-d” at the same time. And “-f”, so that after the quick application installation package debugging device is packaged, it can start to execute the content of step 210 to step S250 on the newly packaged quick application installation package.
  • This application provides a quick application installation package debugging method. After obtaining the quick application installation package from a specified address, unpack the quick application installation package to obtain the unpacked resource file, and then create a new one including the initial quick application installation package.
  • the quick application installation package development project of the resource file of the application installation package replace the resource file of the initial quick application installation package with the unpacked resource file, and then call the quick application development tool hap-toolkit to debug the new project , So as to realize that any packaged quick application installation package can be debugged, and because before calling the quick application development tool, the quick application installation package to be debugged has been learned about the package, and the resource file after understanding the package is obtained, and at the same time
  • the problem that the quick application development tool can only directly debug the source code of the quick application installation package is improved, and the generality of the quick application installation package debugging is improved.
  • the debugging of the quick application installation package development project is still carried out, there is no need to modify the debugging process of hap-toolkit, thereby improving the generality of the debugging process.
  • it also implements dynamic configuration and invocation of the called hap-toolkit during the debugging process.
  • a quick application installation package debugging method provided by an embodiment of the present application is applied to a quick application installation package debugging device, and the method includes:
  • Step S310 If the file input instruction is recognized, the type of the input file is recognized.
  • the type of the file can be recognized by recognizing the suffix of the input file. For example, if the suffix of the file is recognized as rpk, then the input file can be recognized as a file of the quick application installation package type. If the suffix of the file is recognized as js, then the type of the input file can be recognized For the js file type.
  • Step S320 If it is recognized that the type of the input file is a quick application installation package, obtain the quick application installation package from the designated address.
  • Step S330 Unpack the quick application installation package to obtain the unpacked resource file.
  • Step S340 Call the quick application development tool hap-toolkit to debug the unpacked resource file.
  • Step S350 If it is recognized that the type of the input file is a JavaScript file, typeset the code included in the JavaScript file according to a specified format for easy viewing.
  • the code deleted during the packaging process of the JavaScript file is restored; the code in the restored JavaScript file is typeset according to a specified format.
  • the code included in the JavaScript file in the unpacked resource file can also be typeset according to a specified format.
  • the quick application installation package debugging device will re-create a JavaScript file to store the content of the format adjusted JavaScript file, and the included content has been
  • a JavaScript file that has been formatted will be named a different name from a JavaScript file whose content has not been formatted for distinction.
  • This application provides a quick application installation package debugging method, which realizes that any packaged quick application installation package can be debugged, and because the quick application installation package to be debugged has been checked before calling the quick application development tool , Get the resource files after understanding the package, and at the same time improve the problem that the quick application development tool can only directly debug the source code of the quick application installation package, and improve the generality of the quick application installation package debugging. Furthermore, in this embodiment, after recognizing that the read file is a JavaScript file, the JavaScript file can also be formatted to improve the user's reading experience.
  • a quick application installation package debugging method provided by an embodiment of the present application is applied to a quick application installation package debugging device, and the method includes:
  • Step S410 Obtain the quick application installation package from the specified address.
  • Step S420 Unpack the quick application installation package to obtain the unpacked resource file.
  • Step S430 Invoke the fast application development tool hap-toolkit to debug the unpacked resource file.
  • Step S440 Obtain the configuration file in the unpacked resource file, where the code in the configuration file includes the function interface called by the quick application installation package obtained from the specified address.
  • the quick application installation package debugging device can be directly used in the quick application development tool hap-toolkit.
  • the interface of the debugging output information is detected.
  • the specified text output it can be determined that an error occurred during the debugging process.
  • Step S450 Read the function interface scanning requirement information.
  • Step S460 Scan the configuration file based on the function interface scanning requirement information to obtain the function interface invoked by the quick application installation package obtained from the specified address.
  • the configuration file is a manifest.json file.
  • Step S470 Output the obtained functional interface to the result file.
  • the scanning requirement information includes the target type and output style to be scanned;
  • the step of scanning the configuration file based on the function interface scanning requirement information includes: scanning the functions included in the configuration file The type in the interface that matches the target type;
  • the step of outputting the obtained functional interface to the result file includes: outputting the obtained functional interface to the result file according to the output style.
  • FIG. 8 it is a style of output content of a result file.
  • the description of the interface function is correspondingly configured for each function interface found. For example, " ⁇ vendor account service>”, “ ⁇ Alipay payment>” and “ ⁇ network request>” etc.
  • the quick application installation package debugging device in this embodiment can also identify how it calls the quick application development tool hap-toolkit, and determine the display position of the final result file according to the identified calling method. In order to facilitate debugging personnel to view.
  • the quick application installation package debugging device recognizes that the quick application development tool hap-toolkit is called based on inter-process communication, the result file can be displayed in the quick application development tool hap-toolkit in the form of a pop-up box. toolkit. It is understandable that the pop-up box displaying the result file here is popped up by the quick application installation package debugging device, but the display position coincides with the quick application development tool hap-toolkit. In this way, even if the quick application installation package debugging device cannot obtain the debugging information output by the quick application development tool hap-toolkit, it can display the function interface file in time for the user to refer to when debugging.
  • This application provides a quick application installation package debugging method, which realizes that any packaged quick application installation package can be debugged, and because the quick application installation package to be debugged has been checked before calling the quick application development tool , Get the resource files after understanding the package, and at the same time improve the problem that the quick application development tool can only directly debug the source code of the quick application installation package, and improve the generality of the quick application installation package debugging. Furthermore, in this embodiment, the configuration file in the resource file can be scanned, and then the function interface called in the decompressed quick application installation package can be output for the user to view.
  • a quick application installation package debugging device 500 provided by an embodiment of the present application, the device 500 includes:
  • the installation package obtaining unit 510 is configured to obtain a quick application installation package from a designated address.
  • the unpacking unit 520 is used to unpack the quick application installation package to obtain the unpacked resource file.
  • the debugging unit 530 is used to call the fast application development tool hap-toolkit to debug the unpacked resource file.
  • the debugging unit 530 specifically includes:
  • the development project establishment subunit 531 is used to create a new quick application installation package development project, and the new quick application installation package development project is configured with resource files of the initial quick application installation package.
  • the information replacement subunit 532 is configured to replace the resource file of the initial quick application installation package with the unpacked resource file.
  • the debugging execution subunit 533 is used to call the quick application development tool hap-toolkit to debug the new quick application installation package development project, so as to realize the debugging of the unpacked resource file.
  • the device 500 further includes:
  • the packaging unit 540 is configured to call the quick application development tool hap-toolkit to sign the debugged resource file based on the specified signature and package it into a quick application installation package, wherein the specified signature is the same as the address specified by the slave The original signature of the quick app installation package is different.
  • the packaging unit 540 is specifically used to call the fast application development tool hap-toolkit to create an empty packaging project; update the packaging configuration information of the packaging project to the information of the resource file after debugging, to obtain The updated packaging configuration information; based on the updated packaging configuration information and the designated signature, the debugged resource file is signed and packaged into a quick application installation package.
  • the packaging project is a webpack packaging project.
  • the information replacement subunit 532 is also used to replace the debugged resource file in the new quick application installation package development project with the resource file of the initial quick application installation package.
  • the device 500 further includes:
  • the file format identification unit 550 is used for identifying the type of the input file if the file input instruction is recognized. In this manner, if the file format recognition unit 550 recognizes that the type of the input file is a quick application installation package, the installation package acquisition unit 510 executes the acquisition of the quick application installation package from the specified address.
  • the file layout processing unit 560 is configured to, if the file format recognition unit 550 recognizes that the type of the input file is a JavaScript file, typeset the code included in the JavaScript file according to a specified format for easy viewing.
  • the file typesetting processing unit 560 is specifically configured to restore the code deleted during the packaging of the JavaScript file; and typeset the code in the restored JavaScript file according to a specified format.
  • the device 500 further includes:
  • the interface processing unit 570 is configured to read the function interface scanning requirement information; scan the configuration file based on the function interface scanning requirement information to obtain the function interface called by the quick application installation package obtained from the specified address; The obtained function interface is output to the result file.
  • the scanning requirement information includes the target type and output style to be scanned.
  • the interface processing unit 570 is specifically configured to scan the configuration file based on the function interface scanning requirement information, including: scanning the function interface included in the configuration file and the target type Matching type; the step of outputting the obtained functional interface to the result file includes: outputting the obtained functional interface to the result file according to the output style.
  • the interface processing unit 570 is configured to obtain the configuration file in the unpacked resource file when an error occurs in the debugging process of the unpacked resource file.
  • the interface processing unit 570 is specifically configured to determine that an error has occurred during debugging of the unpacked resource file when it recognizes that the designated error image prompt information appears in the debugging interface based on the image recognition method.
  • an embodiment of the present application also provides another electronic device 100 that can execute the foregoing quick application installation package debugging method.
  • the electronic device 100 includes one or more (only one is shown in the figure) a processor 102, a memory 104, and a network module 106 coupled to each other.
  • the memory 104 stores a program that can execute the content in the foregoing embodiment, and the processor 102 can execute the program stored in the memory 104.
  • the processor 102 may include one or more processing cores.
  • the processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and calling data stored in the memory 104.
  • the processor 102 may use at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PDA Programmable Logic Array
  • the processor 102 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 102, but may be implemented by a communication chip alone.
  • the memory 104 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 104 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 104 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc.
  • the data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
  • the network module 106 may include a radio frequency unit for receiving and transmitting electromagnetic waves, and realizes mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other equipment, such as communicating with an audio playback device. Furthermore, the network module 106 may also include a network adapter (network card), so as to directly connect to the router or the gateway Ethernet through a wired manner, and then perform data interaction with the network.
  • a network adapter network card
  • the network module 106 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, subscriber identity module (SIM) cards, memory and many more.
  • the network module 106 can communicate with various networks such as the Internet, an intranet, and a wireless network, or communicate with other devices through a wireless network.
  • the aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network.
  • the network module 106 can exchange information with the base station.
  • FIG. 14 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 800 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 800 has a storage space for the program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read out from or written into one or more computer program products.
  • the program code 810 may be compressed in a suitable form, for example.
  • the present application provides a quick application installation package debugging method, device, electronic equipment, and storage medium. After obtaining the quick application installation package from a designated address, the quick application installation package is unpacked to obtain the solution. After the packaged resource file, then call the fast application development tool hap-toolkit to debug the unpacked resource file, so as to realize that any packaged fast application installation package can be debugged, and because the fast application installation package is called Before applying the development tools, the quick application installation package to be debugged has been learned about the package, and the resource files after understanding the package have been obtained. At the same time, the problem that the quick application development tool can only directly debug the source code of the quick application installation package has been improved. The versatility of fast application installation package debugging.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

A quick application installation package debugging method and apparatus, and an electronic device and a storage medium. The quick application installation package debugging method, applied to a quick application installation package debugging apparatus, comprises: obtaining a quick application installation package from a specified address (S110); unpacking the quick application installation package to obtain an unpacked resource file (S120); and invoking a quick application development tool hap-toolkit to debug the unpacked resource file (S130). According to the method, any quick application installation package can be debugged, and because before the quick application development tool is dynamically invoked, the quick application installation package to be debugged is unpacked to obtain the unpacked resource file, thus the problem that the quick application development tool hap-toolkit can only directly debug the source code of the quick application installation package is solved.

Description

快应用安装包调试方法、装置、电子设备以及存储介质Quick application installation package debugging method, device, electronic equipment and storage medium 技术领域Technical field
本申请涉及计算机技术领域,更具体地,涉及一种快应用安装包调试方法、装置、电子设备以及存储介质。This application relates to the field of computer technology, and more specifically, to a fast application installation package debugging method, device, electronic equipment, and storage medium.
背景技术Background technique
快应用(Quick App)是一种无需下载、即搜即用的应用程序。快应用程序通常都对应有一个快应用安装包,而目前还比较缺乏对于快应用安装包的调试方式。Quick App (Quick App) is an application that does not need to be downloaded and is search-and-use. Quick application programs usually correspond to a quick application installation package, and there is still a lack of debugging methods for the quick application installation package.
发明内容Summary of the invention
鉴于上述问题,本申请提出了一种快应用安装包调试方法、装置、电子设备以及存储介质,以改善上述问题。In view of the above problems, this application proposes a quick application installation package debugging method, device, electronic equipment, and storage medium to improve the above problems.
第一方面,本申请提供了一种快应用安装包调试方法,应用于快应用安装包调试装置,所述方法包括:从指定的地址获取快应用安装包;对所述快应用安装包进行解包,得到解包后的资源文件;调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试。In the first aspect, this application provides a quick application installation package debugging method, which is applied to a quick application installation package debugging device, and the method includes: obtaining the quick application installation package from a designated address; Package to obtain the unpacked resource file; call the fast application development tool hap-toolkit to debug the unpacked resource file.
第二方面,本申请提供了一种快应用安装包调试装置,所述装置包括:安装包获取单元,用于从指定的地址获取快应用安装包;解包单元,用于对所述快应用安装包进行解包,得到解包后的资源文件;调试单元,用于调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试。In a second aspect, the present application provides a quick application installation package debugging device, the device includes: an installation package acquisition unit for obtaining the quick application installation package from a designated address; and an unpacking unit for checking the quick application The installation package is unpacked to obtain the unpacked resource file; the debugging unit is used to call the fast application development tool hap-toolkit to debug the unpacked resource file.
第三方面,本申请提供了一种电子设备,包括一个或多个处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行以实现上述的方法。In a third aspect, this application provides an electronic device, including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors Implement the above method.
第四方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行上述的方法。In a fourth aspect, the present application provides a computer-readable storage medium in which program code is stored, wherein the above-mentioned method is executed when the program code is run by a processor.
本申请提供的一种快应用安装包调试方法、装置、电子设备以及存储介质,在从指定的地址获取快应用安装包后对所述快应用安装包进行解包,得到解包后的资源文件,然后调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试,从而实现对于任一已经打包的快应用安装包都可以进行调试,并且因为在动态调用快应用开发工具之前,已经将要调试的快应用 安装包进行了解包,得到了解包后的资源文件,进而同时改善了快应用开发工具只能直接对快应用安装包的源码进行调试的问题,提升了快应用安装包调试的通用性。The present application provides a quick application installation package debugging method, device, electronic device, and storage medium. After obtaining the quick application installation package from a designated address, the quick application installation package is unpacked to obtain the unpacked resource file , And then call the fast application development tool hap-toolkit to debug the unpacked resource files, so as to realize that any packaged fast application installation package can be debugged, and because the fast application development tool is dynamically invoked before , The quick application installation package to be debugged has been learned about the package, and the resource files after the understanding of the package have been obtained. At the same time, the problem that the quick application development tool can only directly debug the source code of the quick application installation package is improved, and the quick application installation package is improved Versatility of debugging.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了本申请实施例提出的一种快应用的架构示意图;FIG. 1 shows a schematic diagram of the architecture of a fast application proposed in an embodiment of the present application;
图2示出了本申请实施例提出的一种快应用安装包调试方法的流程图;FIG. 2 shows a flowchart of a method for debugging a quick application installation package according to an embodiment of the present application;
图3示出了本申请实施例提出的一种快应用安装包调试方法中输入用于调试的服务器地址的浏览器界面示意图;FIG. 3 shows a schematic diagram of a browser interface for inputting a server address for debugging in a method for debugging a quick application installation package proposed in an embodiment of the present application;
图4示出了本申请再一实施例提出的一种快应用安装包调试方法的流程图;FIG. 4 shows a flowchart of a method for debugging a quick application installation package according to another embodiment of the present application;
图5示出了本申请再一实施例提出的一种快应用安装包调试方法中建立的快应用安装包开发工程的架构示意图;FIG. 5 shows a schematic structural diagram of a quick application installation package development project established in a quick application installation package debugging method proposed in another embodiment of the present application;
图6示出了本申请另一实施例提出的一种快应用安装包调试方法的流程图;FIG. 6 shows a flowchart of a method for debugging a quick application installation package according to another embodiment of the present application;
图7示出了本申请另一实施例提出的一种快应用安装包调试方法的流程图;FIG. 7 shows a flowchart of a fast application installation package debugging method proposed by another embodiment of the present application;
图8示出了本申请另一实施例提出的一种快应用安装包调试方法中建立的结果文件的示意图;FIG. 8 shows a schematic diagram of a result file established in a method for debugging a quick application installation package proposed by another embodiment of the present application;
图9示出了本申请实施例提出的一种快应用安装包调试装置的结构框图;FIG. 9 shows a structural block diagram of a fast application installation package debugging device proposed by an embodiment of the present application;
图10示出了本申请再一实施例提出的一种快应用安装包调试装置的结构框图;FIG. 10 shows a structural block diagram of a device for debugging a quick application installation package according to another embodiment of the present application;
图11示出了本申请另一实施例提出的一种快应用安装包调试装置的结构框图;FIG. 11 shows a structural block diagram of a fast application installation package debugging device proposed by another embodiment of the present application;
图12示出了本申请另一实施例提出的一种快应用安装包调试装置的结构框图;FIG. 12 shows a structural block diagram of a quick application installation package debugging device proposed by another embodiment of the present application;
图13示出了本申请实时中的用于执行根据本申请实施例的快应用安装包调试方法的电子设备的结构框图;FIG. 13 shows a structural block diagram of an electronic device for executing the method for debugging a quick application installation package according to an embodiment of the present application in real time of the present application;
图14示出了本申请实时中的用于保存或者携带实现根据本申请实施例的快应用安装包调试方法的程序代码的存储单元。FIG. 14 shows a storage unit used to store or carry the program code for implementing the method for debugging a quick application installation package according to an embodiment of the present application in real time.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而 不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of this application.
随着移动互联网技术的发展,移动终端开发者更期望通过快应用来实现与前述客户端相同的功能,以便提升智能家居功能的开发效率,并同时节约移动终端的存储空间。With the development of mobile Internet technology, mobile terminal developers expect to implement the same functions as the aforementioned clients through fast applications, so as to improve the development efficiency of smart home functions and at the same time save the storage space of the mobile terminal.
其中,快应用是一种基于终端设备硬件平台的新型应用形态,无需安装,即点即用,又兼具原生应用体验(性能、系统整合、交互等)。如图4所示的快应用引擎的结构示意图,快应用的前端设计借鉴并整合了主流前端框架(Vue,React等)的设计思路:以组件化的方式构建应用,以数据绑定为核心的MVVM设计模式,以V-DOM的方式提升性能,同时选择了简洁清晰的类Vue的模板。Among them, the fast application is a new application form based on the hardware platform of the terminal device. It does not need to be installed, it is click-to-use, and it has the original application experience (performance, system integration, interaction, etc.). As shown in Figure 4, the structure diagram of the fast application engine, the front-end design of fast application draws on and integrates the design ideas of mainstream front-end frameworks (Vue, React, etc.): build applications in a componentized way, with data binding as the core The MVVM design mode uses V-DOM to improve performance, while choosing a concise and clear Vue-like template.
在快应用的开发过程中,相关的开发手段进本都是基于hap-toolkit来完成的,hap-toolkit是快应用的开发者工具,帮助开发者通过命令行工具辅助开发工作的完成,主要包括创建模板工程、升级工程、编译以及调试等功能。In the development process of Quick App, related development methods are all based on hap-toolkit. Hap-toolkit is a developer tool for Quick App. It helps developers to complete the development work through command line tools, mainly including Create template projects, upgrade projects, compile and debug functions.
但是,发明人在研究中发现hap-toolkit作为快应用开发工具,可以顺利的完成快应用的源代码的开发以及调试过程,但是hap-toolkit不具备已经打包好的快应用安装包(rpk)的解包功能,其只能直接对快应用的源代码进行调试,但是现在的快应用安装包的调试工作比较复杂多样,那么在开发人员或者后期的运维人员在需要对已经打包好的快应用安装包进行调试或者进行代码修改的情况下,需要再去调取或者查找原来的源代码,进而会给开发人员或者后期的运维人员代码极大的不便。However, the inventor found in the research that hap-toolkit, as a quick application development tool, can smoothly complete the development and debugging process of the source code of the quick application, but hap-toolkit does not have the packaged quick application installation package (rpk) The unpacking function, which can only directly debug the source code of the fast application, but the debugging work of the current fast application installation package is more complicated and diverse, so the developer or later operation and maintenance personnel need to perform the packaged fast application In the case of debugging or code modification of the installation package, it is necessary to retrieve or search the original source code again, which will cause great inconvenience to the code for developers or later operation and maintenance personnel.
因此,发明人提出了申请中的实现对于任一已经打包的快应用安装包都可以进行调试,并且因为在调用快应用开发工具之前,已经将要调试的快应用安装包进行了解包,得到了解包后的资源文件,进而同时改善了快应用开发工具只能直接对快应用安装包的源码进行调试的问题,提升了快应用安装包调试的通用性的快应用安装包调试方法、装置、电子设备以及存储介质。Therefore, the inventor proposes that the implementation in the application can be debugged for any packaged quick application installation package, and because before calling the quick application development tool, the quick application installation package to be debugged has been checked to obtain the understanding package The latter resource files, and at the same time, improve the problem that the quick application development tool can only directly debug the source code of the quick application installation package, and improve the versatility of the quick application installation package debugging method, device, and electronic equipment And storage media.
下面将结合附图具体描述本申请的各实施例。The embodiments of the present application will be described in detail below in conjunction with the drawings.
请参阅图2,本申请实施例提供的一种快应用安装包调试方法,应用于快应用安装包调试装置,所述方法包括:Please refer to FIG. 2, a quick application installation package debugging method provided by an embodiment of the present application is applied to a quick application installation package debugging device, and the method includes:
步骤S110:从指定的地址获取快应用安装包。Step S110: Obtain the quick application installation package from the specified address.
可以理解的是,对于后续待调试的快应用安装包都会先存储在某个设备中,其中,该快应用安装包可以存储在本地,也可以存储在网络中的其他设备上。而不论快应用安装包是存储在什么位置,都会对应有一个存储地址。其中,对于存储在本地的快应用安装包其对应的存储地址可以包括存储路径,而对于存储在网络中其他设备上的快应用安装包其对应的存储地址会包括存储设备的网络地址以及存储路径。例如,对于存储在本地的快应用安装包其对应的存储地址可以为D:\quickapp\a.rpk。而对于存储在网络中其他设备上的快应用安装包其对应的存储地址可以为192.168.1.3\quickapp\a.rpk。It is understandable that the quick application installation package to be debugged later will be stored in a certain device first, where the quick application installation package can be stored locally or on other devices in the network. Regardless of where the quick application installation package is stored, there will be a corresponding storage address. Among them, the corresponding storage address of the quick application installation package stored locally may include the storage path, and the corresponding storage address of the quick application installation package stored on other devices in the network will include the network address and storage path of the storage device . For example, for the quick app installation package stored locally, the corresponding storage address may be D:\quickapp\a.rpk. The corresponding storage address of the quick app installation package stored on other devices in the network can be 192.168.1.3\quickapp\a.rpk.
那么在这种方式下,调试人员可以在指定的地址输入区域中输入地址以及快应用安装包的名称,进而当快应用安装包调试装置获取到用户输入的地址以 及快应用安装包的名称后,就将该获取的地址作为指定的地址,然后从该指定的地址处获取用户输入的名称所对应的快应用安装包。例如,若快应用安装包调试装置获取到的用户输入的信息为D:\quickapp\b.rpk,那么快应用安装包调试装置就会将D:\quickapp\作为指定的地址,进而到D盘quickapp这个文件夹中查找b.rpk这个快应用安装包。Then in this way, the debugger can input the address and the name of the quick application installation package in the designated address input area, and then when the quick application installation package debugging device obtains the address input by the user and the name of the quick application installation package, Take the obtained address as the designated address, and then obtain the quick application installation package corresponding to the name entered by the user from the designated address. For example, if the user input information obtained by the quick app installation package debugging device is D:\quickapp\b.rpk, then the quick app installation package debugging device will use D:\quickapp\ as the specified address, and then go to the D drive Find the quick app installation package b.rpk in the quickapp folder.
步骤S120:对所述快应用安装包进行解包,得到解包后的资源文件。Step S120: Unpack the quick application installation package to obtain the unpacked resource file.
步骤S130:调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试。Step S130: Call the quick application development tool hap-toolkit to debug the unpacked resource file.
其中,需要说明的是,在本实施例中快应用开发工具hap-toolkit是作为快应用安装包调试装置的一个组件存在的,那么快应用安装包调试装置在调用快应用开发工具hap-toolkit的过程中,可以基于组件之间相互调用的方式进行调用。而可以理解的是,若快应用安装包调试装置本身的开发语言不通,其进行组件调用的方式会适应性的不同。Among them, it should be noted that, in this embodiment, the quick application development tool hap-toolkit exists as a component of the quick application installation package debugging device, so the quick application installation package debugging device is calling the quick application development tool hap-toolkit In the process, it can be called based on how the components call each other. It is understandable that if the development language of the quick application installation package debugging device itself is not available, the way it performs component calls will be adaptable differently.
例如,若快应用安装包调试装置是基于Python开发的,作为一种方式,那么快应用安装包调试装置在运行过程中可以基于os.system()函数来调用快应用开发工具hap-toolkit,作为另外一种方式,快应用安装包调试装置还可以基于ShellExecute函数来调用快应用开发工具hap-toolkit。For example, if the quick application installation package debugging device is developed based on Python, as a way, the quick application installation package debugging device can call the quick application development tool hap-toolkit based on the os.system() function during operation, as In another way, the quick application installation package debugging device can also call the quick application development tool hap-toolkit based on the ShellExecute function.
作为一种方式,在本实施例中可以将解包后的资源文件加载到本快应用安装包调试装置中,然后再调用快应用开发工具hap-toolkit对加载到快应用安装包调试装置中的解包后的资源文件进行调试。而作为另外一种方式,还可以将解包后的资源文件加载到快应用开发工具hap-toolkit中,然后再触发快应用开发工具hap-toolkit对加载到自身中的解包后的资源文件进行调试。As a way, in this embodiment, the unpacked resource file can be loaded into the quick application installation package debugging device, and then the quick application development tool hap-toolkit can be called to load the quick application installation package debugging device. Debug the unpacked resource file. As another way, you can also load the unpacked resource file into the quick application development tool hap-toolkit, and then trigger the quick application development tool hap-toolkit to perform the unpacked resource file loading into itself debugging.
其中,对于将解包后的资源文件加载到本实施例中的快应用安装包调试装置中这种方式需要说明的是,快应用开发工具hap-toolkit是以功能模块的形式进行运行的,并且在这种模式下,快应用开发工具hap-toolkit是本实施例中的快应用安装包调试装置中的一个功能模块,以便于可以对加载到本实施例中的快应用安装包的资源文件进行调试。Among them, for the way of loading the unpacked resource file into the quick application installation package debugging device in this embodiment, it should be noted that the quick application development tool hap-toolkit runs in the form of a functional module, and In this mode, the quick application development tool hap-toolkit is a functional module in the quick application installation package debugging device in this embodiment, so that the resource files loaded into the quick application installation package in this embodiment can be performed debugging.
而对于将解包后的资源文件加载到快应用开发工具hap-toolkit中这种方式需要说明的是,在这种方式下,快应用开发工具hap-toolkit可以为快应用安装包调试装置中的一个功能模块,也可以为一个独立运行的应用程序。当快应用开发工具hap-toolkit为一个独立运行的应用程序的情况下,快应用安装包调试装置可以基于进程间通信的方式将解包后的资源文件的存储位置发送给快应用开发工具hap-toolkit,以便于快应用开发工具hap-toolkit可以将解包后的资源文件进行加载,进而进行后续的调试。For the method of loading the unpacked resource file into the quick application development tool hap-toolkit, it should be noted that in this way, the quick application development tool hap-toolkit can be used for the quick application installation package debugging device A functional module can also be a stand-alone application. When the fast application development tool hap-toolkit is an independently running application, the fast application installation package debugging device can send the storage location of the unpacked resource file to the fast application development tool hap- based on inter-process communication. toolkit, so that the fast application development tool hap-toolkit can load the unpacked resource files for subsequent debugging.
需要说明的是,如图3所示的调试过程中,快应用安装包调试装置在本地开启调试端口,此时使用本地浏览器打开http://localhost:8000,同时在与快应用安装包调试装置所在的电子设备连接于同一WiFi下的Android手机中开启快应用调试器。然后基于快应用调试器中所提示的方式就可以开始进行调试。例如,若选择的是扫码调试,那么在扫描本地浏览器页面中的二维码,即可开始调试。It should be noted that during the debugging process shown in Figure 3, the quick application installation package debugging device opens the debugging port locally, at this time, use the local browser to open http://localhost:8000, and simultaneously debug with the quick application installation package The electronic device where the device is connected is connected to the Android mobile phone under the same WiFi to start the quick application debugger. Then you can start debugging based on the method suggested in the quick application debugger. For example, if you choose scan code debugging, you can start debugging by scanning the QR code in the local browser page.
本申请提供的一种快应用安装包调试方法,在从指定的地址获取快应用安装包后对所述快应用安装包进行解包,得到解包后的资源文件,然后调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试,从而实现对于任一已经打包的快应用安装包都可以进行调试,并且因为在调用快应用开发工具之前,已经将要调试的快应用安装包进行了解包,得到了解包后的资源文件,进而同时改善了快应用开发工具只能直接对快应用安装包的源码进行调试的问题,提升了快应用安装包调试的通用性。This application provides a quick application installation package debugging method. After obtaining the quick application installation package from a designated address, unpack the quick application installation package to obtain the unpacked resource file, and then call the quick application development tool hap -toolkit, to debug the unpacked resource files, so as to realize that any packaged quick app installation package can be debugged, and because the quick app installation package to be debugged has been debugged before calling the quick app development tool Understand the package, get the resource files after the package, and at the same time improve the problem that the quick application development tool can only directly debug the source code of the quick application installation package, and improve the generality of the quick application installation package debugging.
请参阅图4,本申请实施例提供的一种快应用安装包调试方法,应用于快应用安装包调试装置,所述方法包括:Referring to FIG. 4, a quick application installation package debugging method provided by an embodiment of the present application is applied to a quick application installation package debugging device, and the method includes:
步骤S210:从指定的地址获取快应用安装包。Step S210: Obtain the quick application installation package from the specified address.
步骤S220:对所述快应用安装包进行解包,得到解包后的资源文件。Step S220: Unpack the quick application installation package to obtain the unpacked resource file.
步骤S230:新建快应用安装包开发工程,所述新建快应用安装包开发工程中配置有初始快应用安装包的资源文件。Step S230: Create a new quick application installation package development project, in which the resource files of the initial quick application installation package are configured.
作为一种方式,快应用安装包调试装置在执行hap init<ProjectName>这条指令后,新建快应用安装包开发工程。其中,“ProjectName”表征新建工程的名称。对于该新建快应用安装包开发工程包括如图5所示的资源文件,其中,主要包括sign以及src这这两个资源文件夹以及package.json文件,其中,sign主要存储签名所需的资源文件,src主要包括用于记录源代码的index.ux文件以及记录配置信息的manifest.json文件。可以理解的是,新建快应用安装包开发工程包括图5中所示的各种资源文件,只是在新建快应用安装包开发工程中所包括的资源文件的内容均为默认的初始内容。例如,在记录源代码的index.ux文件中初始内容可以为“hello quickapp”,再或者在一些初始快应用安装包的资源文件中内容为空。As a way, the quick application installation package debugging device executes the hap init<ProjectName> command to create a new quick application installation package development project. Among them, "ProjectName" represents the name of the new project. The development project for the new quick application installation package includes the resource files shown in Figure 5, which mainly include the two resource folders sign and src, and the package.json file, where sign mainly stores the resource files required for signature , Src mainly includes index.ux file for recording source code and manifest.json file for recording configuration information. It is understandable that the new quick application installation package development project includes the various resource files shown in FIG. 5, but the content of the resource files included in the new quick application installation package development project is the default initial content. For example, the initial content in the index.ux file that records the source code can be "hello quickapp", or the content in the resource files of some initial quick app installation packages is empty.
步骤S240:用所述解包后的资源文件替换所述初始快应用安装包的资源文件。Step S240: Replace the resource file of the initial quick application installation package with the unpacked resource file.
可以理解的是,对于前述解包后的资源文件也会包括图中所示的各种文件,只是对于解包后的资源文件中的内容为开发人员编辑后的内容。那么在得到解包后的资源文件后,就可以用解包后的资源文件替换所述初始快应用安装包的资源文件。例如,在本步骤中会用解包后的资源文件中的index.ux文件替换新建快应用安装包开发工程中的index.ux文件,还会用解包后的资源文件中的manifest.json文件替换新建快应用安装包开发工程中的manifest.json文件。It is understandable that the aforementioned unpacked resource file will also include the various files shown in the figure, but the content in the unpacked resource file is the content edited by the developer. Then, after the unpacked resource file is obtained, the unpacked resource file can be used to replace the resource file of the initial quick application installation package. For example, in this step, the index.ux file in the unpacked resource file will be used to replace the index.ux file in the new quick application installation package development project, and the manifest.json file in the unpacked resource file will be used. Replace the manifest.json file in the new quick application installation package development project.
步骤S250:调用快应用开发工具hap-toolkit,对所述新建快应用安装包开发工程进行调试,以实现对所述解包后的资源文件进行调试。Step S250: Call the quick application development tool hap-toolkit to debug the new quick application installation package development project, so as to realize the debugging of the unpacked resource file.
步骤S260:调用快应用开发工具hap-toolkit基于指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包,其中,所述指定的签名与所述从指定的地址获取快应用安装包的原签名不同。Step S260: Invoke the quick application development tool hap-toolkit to sign the debugged resource file based on the specified signature and package it into a quick application installation package, wherein the specified signature and the quick application obtained from the specified address The original signature of the installation package is different.
需要说明的是,快应用安装包的签名是用来保护文件完整性的,签名的使用原理是:编译打包时首先会对rpk包中每一个文件做SHA256运算,然后用签名私钥和证书对SHA256的结果进行签名运算,最后结果以名为 /META-INF/CERT的文件打包在快应用安装包中。当快应用安装包运行时会去检查这个被签名的SHA256的值,看是否与当前的文件做SHA256的值相等,若不相等则校验失败,证明快应用安装包中有文件被修改了,进而使得校验失败的快应用安装包无法被正常运行。It should be noted that the signature of the quick application installation package is used to protect the integrity of the file. The principle of use of the signature is: When compiling and packaging, first perform SHA256 operation on each file in the rpk package, and then use the signed private key and certificate The result of SHA256 is signed, and the final result is packaged in the quick application installation package in a file named /META-INF/CERT. When the quick application installation package is running, it will check the value of the signed SHA256 to see if it is equal to the SHA256 value of the current file. If it is not equal, the verification will fail, which proves that the file in the quick application installation package has been modified. In turn, the quick application installation package that fails the verification cannot be run normally.
那么如果在对解包后的资源文件进行调试的过程中,对于其中的资源文件的代码进行了修改的情况下,为了避免上述问题,快应用安装包调试装置会基于指定的签名对调试后的所述资源文件进行重新签名。其中,快应用安装包调试装置可以找到解包文件夹中保存有签名结果的/META-INF/CERT文件,并将其删除,接下来在打包的过程中使用其它合法的签名私钥和证书(作为一种方式,本实施例可以直接使用官方提供的debug签名,省去了再生成一个签名的操作)调用快应用开发工具hap-toolkit对该解包文件目录进行签名和打包,并生成新的/CERT文件。So if in the process of debugging the unpacked resource file, if the code of the resource file is modified, in order to avoid the above problem, the quick application installation package debugging device will perform the debugging based on the specified signature. The resource file is re-signed. Among them, the quick application installation package debugging device can find the /META-INF/CERT file with the signature result stored in the unpacking folder, and delete it, and then use other legal signature private keys and certificates in the packaging process ( As a way, this embodiment can directly use the debug signature provided by the official, eliminating the need to generate another signature) Invoke the fast application development tool hap-toolkit to sign and package the unpacked file directory, and generate a new /CERT file.
需要说明的是,上述文件名称只是示例性的,只要对应存储的内容相同均在本申请的保护范围内。It should be noted that the aforementioned file names are only exemplary, and as long as the correspondingly stored contents are the same, they fall within the protection scope of this application.
在打包过程中,作为一种方式,调用快应用开发工具hap-toolkit新建一个空的打包工程,将该打包工程的打包配置信息更新为调试后的所述资源文件的信息,得到更新后的打包配置信息,基于所述更新后的打包配置信息以及指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包。In the packaging process, as a way, call the quick application development tool hap-toolkit to create an empty packaging project, update the packaging configuration information of the packaging project to the information of the resource file after debugging, and obtain the updated packaging The configuration information is used to sign the debugged resource file based on the updated packaging configuration information and the designated signature and package it into a quick application installation package.
其中,可选的述打包工程为webpack打包工程。其中,webpack可以看做是模块打包机:它做的事情是分析项目结构,找到JavaScript模块以及其它的一些浏览器不能直接运行的拓展语言(Scss,TypeScript等),并将其转换和打包为合适的格式供浏览器使用。Among them, the optional packaging project is webpack packaging project. Among them, webpack can be regarded as a module packaging machine: what it does is to analyze the project structure, find JavaScript modules and other extended languages (Scss, TypeScript, etc.) that cannot be directly run by browsers, and convert and package them into suitable ones The format is for browser use.
作为一种方式,在对调试后的所述资源文件进行签名并打包为快应用安装包后,还可以将所述新建快应用安装包开发工程中的调试后的所述资源文件,替换为所述初始快应用安装包的资源文件。As a way, after the debugged resource file is signed and packaged as a quick application installation package, the debugged resource file in the new quick application installation package development project can be replaced with all The resource files of the initial quick application installation package are described.
需要说明的是,除了直接在快应用安装包调试装置中建立新建快应用安装包开发工程外,还可以在从指定的地址获取快应用安装包,对所述快应用安装包进行解包,得到解包后的资源文件后,直接调用快应用开发工具hap-toolkit,在所调用的快应用开发工具hap-toolkit中新建快应用安装包开发工程,对于在快应用开发工具hap-toolkit中新建的快应用安装包开发工程和前述的在快应用安装包调试装置中建立新建快应用安装包开发工程所包括的初始资源文件时相同的。It should be noted that, in addition to directly establishing a new quick application installation package development project in the quick application installation package debugging device, you can also obtain the quick application installation package from the designated address, unpack the quick application installation package, and obtain After unpacking the resource files, directly call the quick application development tool hap-toolkit, and create a new quick application installation package development project in the called quick application development tool hap-toolkit, and for the new quick application development tool hap-toolkit The quick application installation package development project is the same as the aforementioned initial resource file included in the establishment of the new quick application installation package development project in the quick application installation package debugging device.
在本实施例中,对于调试后所打包的得到的快应用安装包可以再次执行本实施例中步骤S210到步骤S250的内容,以实现对调试过程中有代码修改的这种情况下,可以立即对修改代码的是否能够成功执行进行验证。其中,作为一种方式,快应用安装包调试装置可以提供一个命令行输入界面,以便于用户在其中输入对应的指令来触发快应用安装包调试装置来执行对应的本实施例中的某些步骤。In this embodiment, the content of step S210 to step S250 in this embodiment can be executed again for the quick application installation package packaged after debugging, so as to realize the code modification in the debugging process, you can immediately Verify whether the modified code can be executed successfully. Among them, as a way, the quick application installation package debugging device may provide a command line input interface so that the user can input corresponding instructions therein to trigger the quick application installation package debugging device to perform corresponding steps in this embodiment. .
例如,当“-d”命令来表征开始调试的情况下,当检测到命令行输入界面有命令“-d”输入时,就开始执行步骤S210到步骤S260。也可以在检测 到有命令“-d”输入时,仅执行步骤S210到步骤S250,然后当进一步的检测到命令行输入界面有命令“-f”输入时,对已经调试后的资源文件执行步骤S260的内容。此外,用户也可以在命令行输入界面中同时输入两种以上的命令,例如,当快应用安装包调试装置响应于命令“-d”执行到步骤S250后,用户可以同时输入命令“-d”和“-f”,以便于快应用安装包调试装置在打包以后,可以又开始对新打包的快应用安装包执行步骤210到步骤S250的内容。For example, when the "-d" command is used to indicate the start of debugging, when it is detected that the command "-d" is input on the command line input interface, the step S210 to the step S260 will be executed. It is also possible to execute only step S210 to step S250 when the command "-d" input is detected, and then when the command “-f” input is further detected in the command line input interface, execute the steps for the debugged resource file The content of S260. In addition, the user can also input two or more commands at the same time in the command line input interface. For example, after the quick application installation package debugging device has executed step S250 in response to the command "-d", the user can input the command "-d" at the same time. And "-f", so that after the quick application installation package debugging device is packaged, it can start to execute the content of step 210 to step S250 on the newly packaged quick application installation package.
本申请提供的一种快应用安装包调试方法,在从指定的地址获取快应用安装包后对所述快应用安装包进行解包,得到解包后的资源文件,然后可以新建一个包括初始快应用安装包的资源文件的快应用安装包开发工程,将该初始快应用安装包的资源文件替换成解包后的资源文件,再调用快应用开发工具hap-toolkit,对所该新建工程进行调试,从而实现对于任一已经打包的快应用安装包都可以进行调试,并且因为在调用快应用开发工具之前,已经将要调试的快应用安装包进行了解包,得到了解包后的资源文件,进而同时改善了快应用开发工具只能直接对快应用安装包的源码进行调试的问题,提升了快应用安装包调试的通用性。再者,因为还是对快应用安装包开发工程进行的调试,所以不需要再对hap-toolkit的调试过程进行修改,进而提升了调试过程的通用性。并且,还实现在调试过程中动态的对所调用的hap-toolkit进行配置以及调用。This application provides a quick application installation package debugging method. After obtaining the quick application installation package from a specified address, unpack the quick application installation package to obtain the unpacked resource file, and then create a new one including the initial quick application installation package. The quick application installation package development project of the resource file of the application installation package, replace the resource file of the initial quick application installation package with the unpacked resource file, and then call the quick application development tool hap-toolkit to debug the new project , So as to realize that any packaged quick application installation package can be debugged, and because before calling the quick application development tool, the quick application installation package to be debugged has been learned about the package, and the resource file after understanding the package is obtained, and at the same time The problem that the quick application development tool can only directly debug the source code of the quick application installation package is improved, and the generality of the quick application installation package debugging is improved. Furthermore, because the debugging of the quick application installation package development project is still carried out, there is no need to modify the debugging process of hap-toolkit, thereby improving the generality of the debugging process. In addition, it also implements dynamic configuration and invocation of the called hap-toolkit during the debugging process.
请参阅图6,本申请实施例提供的一种快应用安装包调试方法,应用于快应用安装包调试装置,所述方法包括:Please refer to FIG. 6, a quick application installation package debugging method provided by an embodiment of the present application is applied to a quick application installation package debugging device, and the method includes:
步骤S310:若识别到文件输入指令,识别所输入的文件的类型。Step S310: If the file input instruction is recognized, the type of the input file is recognized.
在本申请实施例中,可以在识别到文件输入指令后,通过对所输入的文件的后缀名进行识别以实现识别文件的类型。例如,若识别到文件的后缀名为rpk,那么就可以将所输入的文件识别为快应用安装包类型的文件,若识别到文件的后缀名为js,那么就可以识别所输入的文件的类型为js文件类型。In the embodiment of the present application, after the file input instruction is recognized, the type of the file can be recognized by recognizing the suffix of the input file. For example, if the suffix of the file is recognized as rpk, then the input file can be recognized as a file of the quick application installation package type. If the suffix of the file is recognized as js, then the type of the input file can be recognized For the js file type.
步骤S320:若识别到所述输入的文件的类型为快应用安装包,从指定的地址获取快应用安装包。Step S320: If it is recognized that the type of the input file is a quick application installation package, obtain the quick application installation package from the designated address.
步骤S330:对所述快应用安装包进行解包,得到解包后的资源文件。Step S330: Unpack the quick application installation package to obtain the unpacked resource file.
步骤S340:调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试。Step S340: Call the quick application development tool hap-toolkit to debug the unpacked resource file.
步骤S350:若识别到所述输入的文件的类型为JavaScript文件,对所述JavaScript文件所包括的代码按照指定的格式进行排版,以便于查看。Step S350: If it is recognized that the type of the input file is a JavaScript file, typeset the code included in the JavaScript file according to a specified format for easy viewing.
作为一种方式,对所述JavaScript文件在打包过程中被删除的代码进行还原;将进行所述还原后的JavaScript文件中的代码按照指定的格式进行排版。As a method, the code deleted during the packaging process of the JavaScript file is restored; the code in the restored JavaScript file is typeset according to a specified format.
需要说明的是,对于解包后的资源文件中,若检测到有JavaScript文件,也可以对解包后的资源文件中的JavaScript文件所包括的代码按照指定的格式进行排版。而为了便于快应用安装包调试装置对进行格式调整后的JavaScript文件进行区分,快应用安装包调试装置会重新建立一个JavaScript文件存储进行格式调整后的JavaScript文件的内容,并且对于所包括的内容已 经进行格式调整的JavaScript文件,会命名一个不同于内容未进行格式调整的JavaScript文件的名称,以便进行区别。It should be noted that, if a JavaScript file is detected in the unpacked resource file, the code included in the JavaScript file in the unpacked resource file can also be typeset according to a specified format. In order to facilitate the quick application installation package debugging device to distinguish the format adjusted JavaScript files, the quick application installation package debugging device will re-create a JavaScript file to store the content of the format adjusted JavaScript file, and the included content has been A JavaScript file that has been formatted will be named a different name from a JavaScript file whose content has not been formatted for distinction.
本申请提供的一种快应用安装包调试方法,实现对于任一已经打包的快应用安装包都可以进行调试,并且因为在调用快应用开发工具之前,已经将要调试的快应用安装包进行了解包,得到了解包后的资源文件,进而同时改善了快应用开发工具只能直接对快应用安装包的源码进行调试的问题,提升了快应用安装包调试的通用性。再者,本实施例中,在识别到所读取的文件为JavaScript文件后,还可以对JavaScript文件进行格式转换,进而提升用户的阅读体验。This application provides a quick application installation package debugging method, which realizes that any packaged quick application installation package can be debugged, and because the quick application installation package to be debugged has been checked before calling the quick application development tool , Get the resource files after understanding the package, and at the same time improve the problem that the quick application development tool can only directly debug the source code of the quick application installation package, and improve the generality of the quick application installation package debugging. Furthermore, in this embodiment, after recognizing that the read file is a JavaScript file, the JavaScript file can also be formatted to improve the user's reading experience.
请参阅图7,本申请实施例提供的一种快应用安装包调试方法,应用于快应用安装包调试装置,所述方法包括:Please refer to FIG. 7, a quick application installation package debugging method provided by an embodiment of the present application is applied to a quick application installation package debugging device, and the method includes:
步骤S410:从指定的地址获取快应用安装包。Step S410: Obtain the quick application installation package from the specified address.
步骤S420:对所述快应用安装包进行解包,得到解包后的资源文件。Step S420: Unpack the quick application installation package to obtain the unpacked resource file.
步骤S430:调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试。Step S430: Invoke the fast application development tool hap-toolkit to debug the unpacked resource file.
步骤S440:获取所述解包后的资源文件中的配置文件,所述配置文件中的代码包括所述从指定的地址获取快应用安装包所调用的功能接口。Step S440: Obtain the configuration file in the unpacked resource file, where the code in the configuration file includes the function interface called by the quick application installation package obtained from the specified address.
需要说明的是,为了使得所开发的快应用具备一定的功能,在开发过程中会调用一定的预先配置好的功能接口,然而在进行功能接口的调用过程中,可能会因为调用代码的错误造成整个快应用安装包出现调试错误,那么为了便于调试人员及时发现错误出处,可以在识别到所述对所述解包后的资源文件进行调试过程中出现错误时,获取所述解包后的资源文件中的配置文件。而在本申请实施例中,有多种方式可以对调试过程中是否出现错误进行检测。It should be noted that, in order to make the developed fast application have certain functions, certain pre-configured functional interfaces will be called during the development process. However, in the process of calling the functional interfaces, it may be caused by errors in the calling code. The entire quick application installation package has a debugging error, so in order to facilitate the debugging personnel to find the source of the error in time, the unpacked resource can be obtained when an error occurs in the debugging process of the unpacked resource file is identified The configuration file in the file. In the embodiment of the present application, there are multiple ways to detect whether an error occurs during the debugging process.
作为一种方式,可以基于图像识别的方式对调试过程中是否出现错误进行检测。具体的,当代码运行时发生异常,快应用开发工具hap-toolkit的界面会弹出一个对话框,而当快应用安装包调试装置与快应用开发工具hap-toolkit之间是相互独立运行的两个应用程序的情况下,快应用安装包调试装置无法直接获取到具体的错误信息,那么快应用安装包调试装置可以在快应用开发工具hap-toolkit开始调试以后,基于图像识别的方式实时检测快应用开发工具hap-toolkit的界面,当检测到有对话框弹出以后,即可判定调试过程中出现错误。通过这种方式实现了,即使快应用安装包调试装置无法获取到快应用开发工具hap-toolkit输出的调试信息,也可以检测调试过程中是否出现错误。As a way, whether errors occur during debugging can be detected based on image recognition. Specifically, when an exception occurs when the code is running, the interface of the fast application development tool hap-toolkit will pop up a dialog box, and the Dangkuai application installation package debugging device and the fast application development tool hap-toolkit are two independent operations. In the case of applications, the quick application installation package debugging device cannot directly obtain specific error information, then the quick application installation package debugging device can detect the quick application in real time based on image recognition after the quick application development tool hap-toolkit starts debugging On the interface of the development tool hap-toolkit, when a dialog box pops up is detected, an error can be determined during the debugging process. In this way, even if the quick application installation package debugging device cannot obtain the debugging information output by the quick application development tool hap-toolkit, it can also detect whether an error occurs during the debugging process.
此外,作为另外一种方式,在快应用安装包调试装置与快应用开发工具hap-toolkit之间是基于组件方式进行调用的方式下,快应用安装包调试装置可以直接在快应用开发工具hap-toolkit开始调试以后,对调试输出信息的界面进行检测,当检测到有指定文本输出时,即可判定调试过程中出现错误。In addition, as another way, in the way that the quick application installation package debugging device and the quick application development tool hap-toolkit are called based on the component method, the quick application installation package debugging device can be directly used in the quick application development tool hap-toolkit. After the toolkit starts debugging, the interface of the debugging output information is detected. When the specified text output is detected, it can be determined that an error occurred during the debugging process.
步骤S450:读取功能接口扫描需求信息。Step S450: Read the function interface scanning requirement information.
步骤S460:基于所述功能接口扫描需求信息对所述配置文件进行扫描,得到所述从指定的地址获取快应用安装包所调用的功能接口。Step S460: Scan the configuration file based on the function interface scanning requirement information to obtain the function interface invoked by the quick application installation package obtained from the specified address.
所述配置文件为manifest.json文件。The configuration file is a manifest.json file.
步骤S470:将所述得到的功能接口输出到结果文件。Step S470: Output the obtained functional interface to the result file.
作为一种方式,所述扫描需求信息包括所需扫描的目标类型以及输出样式;基于所述功能接口扫描需求信息对所述配置文件进行扫描的步骤包括:扫描所述配置文件中所包括的功能接口中与所述目标类型匹配的类型;As a way, the scanning requirement information includes the target type and output style to be scanned; the step of scanning the configuration file based on the function interface scanning requirement information includes: scanning the functions included in the configuration file The type in the interface that matches the target type;
所述将所述得到的功能接口输出到结果文件的步骤包括:按照所述输出样式将得到的功能接口输出到结果文件。The step of outputting the obtained functional interface to the result file includes: outputting the obtained functional interface to the result file according to the output style.
例如,如图8所示,为一种结果文件输出内容的样式。在图8所示的结果文件中对于每一个查找到的功能接口都对应配置有接口功能的说明。例如,“<厂商帐号服务>”、“<支付宝支付>”以及“<网络请求>”等。For example, as shown in Figure 8, it is a style of output content of a result file. In the result file shown in FIG. 8, the description of the interface function is correspondingly configured for each function interface found. For example, "<vendor account service>", "<Alipay payment>" and "<network request>" etc.
需要说明的是,本实施例中的快应用安装包调试装置还可以识别其具体是如何调用快应用开发工具hap-toolkit的,根据识别出的调用方式,来确定最终的结果文件的显示位置,以便于方便调试人员查看。可选的,若快应用安装包调试装置识别到是基于进程间通信的方式调用的快应用开发工具hap-toolkit,那么就可以将结果文件以一个弹出框的形式显示在快应用开发工具hap-toolkit中。可以理解的是,这里显示结果文件的弹出框是由快应用安装包调试装置弹出的,只是显示位置与快应用开发工具hap-toolkit重合。通过这种方式,实现了即使快应用安装包调试装置无法获取到快应用开发工具hap-toolkit输出的调试信息,也可以在及时的将功能接口文件显示出来,以便于用户调试时进行参考。It should be noted that the quick application installation package debugging device in this embodiment can also identify how it calls the quick application development tool hap-toolkit, and determine the display position of the final result file according to the identified calling method. In order to facilitate debugging personnel to view. Optionally, if the quick application installation package debugging device recognizes that the quick application development tool hap-toolkit is called based on inter-process communication, the result file can be displayed in the quick application development tool hap-toolkit in the form of a pop-up box. toolkit. It is understandable that the pop-up box displaying the result file here is popped up by the quick application installation package debugging device, but the display position coincides with the quick application development tool hap-toolkit. In this way, even if the quick application installation package debugging device cannot obtain the debugging information output by the quick application development tool hap-toolkit, it can display the function interface file in time for the user to refer to when debugging.
本申请提供的一种快应用安装包调试方法,实现对于任一已经打包的快应用安装包都可以进行调试,并且因为在调用快应用开发工具之前,已经将要调试的快应用安装包进行了解包,得到了解包后的资源文件,进而同时改善了快应用开发工具只能直接对快应用安装包的源码进行调试的问题,提升了快应用安装包调试的通用性。再者,本实施例中,可以对资源文件中的配置文件进行扫描,进而可以输出被解压的快应用安装包中所调用了的功能接口,以便于用户查看。This application provides a quick application installation package debugging method, which realizes that any packaged quick application installation package can be debugged, and because the quick application installation package to be debugged has been checked before calling the quick application development tool , Get the resource files after understanding the package, and at the same time improve the problem that the quick application development tool can only directly debug the source code of the quick application installation package, and improve the generality of the quick application installation package debugging. Furthermore, in this embodiment, the configuration file in the resource file can be scanned, and then the function interface called in the decompressed quick application installation package can be output for the user to view.
请参阅图9,本申请实施例提供的一种快应用安装包调试装置500,所述装置500包括:Please refer to FIG. 9, a quick application installation package debugging device 500 provided by an embodiment of the present application, the device 500 includes:
安装包获取单元510,用于从指定的地址获取快应用安装包。The installation package obtaining unit 510 is configured to obtain a quick application installation package from a designated address.
解包单元520,用于对所述快应用安装包进行解包,得到解包后的资源文件。The unpacking unit 520 is used to unpack the quick application installation package to obtain the unpacked resource file.
调试单元530,用于调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试。The debugging unit 530 is used to call the fast application development tool hap-toolkit to debug the unpacked resource file.
如图10所示,所述调试单元530,具体包括:As shown in FIG. 10, the debugging unit 530 specifically includes:
开发工程建立子单元531,用于新建快应用安装包开发工程,所述新建快应用安装包开发工程中配置有初始快应用安装包的资源文件。The development project establishment subunit 531 is used to create a new quick application installation package development project, and the new quick application installation package development project is configured with resource files of the initial quick application installation package.
信息替换子单元532,用于用所述解包后的资源文件替换所述初始快应用安装包的资源文件。The information replacement subunit 532 is configured to replace the resource file of the initial quick application installation package with the unpacked resource file.
调试执行子单元533,用于调用快应用开发工具hap-toolkit,对所述新建快应用安装包开发工程进行调试,以实现对所述解包后的资源文件进行调试。The debugging execution subunit 533 is used to call the quick application development tool hap-toolkit to debug the new quick application installation package development project, so as to realize the debugging of the unpacked resource file.
此外,作为一种方式,所述装置500,还包括:In addition, as a manner, the device 500 further includes:
打包单元540,用于调用快应用开发工具hap-toolkit基于指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包,其中,所述指定的签名与所述从指定的地址获取快应用安装包的原签名不同。The packaging unit 540 is configured to call the quick application development tool hap-toolkit to sign the debugged resource file based on the specified signature and package it into a quick application installation package, wherein the specified signature is the same as the address specified by the slave The original signature of the quick app installation package is different.
可选的,所述打包单元540,具体用于调用快应用开发工具hap-toolkit新建一个空的打包工程;将该打包工程的打包配置信息更新为调试后的的所述资源文件的信息,得到更新后的打包配置信息;基于所述更新后的打包配置信息以及指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包。其中,所述打包工程为webpack打包工程。Optionally, the packaging unit 540 is specifically used to call the fast application development tool hap-toolkit to create an empty packaging project; update the packaging configuration information of the packaging project to the information of the resource file after debugging, to obtain The updated packaging configuration information; based on the updated packaging configuration information and the designated signature, the debugged resource file is signed and packaged into a quick application installation package. Wherein, the packaging project is a webpack packaging project.
在这种方式下,信息替换子单元532,还用于将所述新建快应用安装包开发工程中的调试后的所述资源文件,替换为所述初始快应用安装包的资源文件。In this manner, the information replacement subunit 532 is also used to replace the debugged resource file in the new quick application installation package development project with the resource file of the initial quick application installation package.
如图11所示,所述装置500还包括:As shown in FIG. 11, the device 500 further includes:
文件格式识别单元550,用于若识别到文件输入指令,识别所输入的文件的类型。在这种方式下,若文件格式识别单元550识别到所述输入的文件的类型为快应用安装包,安装包获取单元510执行所述从指定的地址获取快应用安装包。The file format identification unit 550 is used for identifying the type of the input file if the file input instruction is recognized. In this manner, if the file format recognition unit 550 recognizes that the type of the input file is a quick application installation package, the installation package acquisition unit 510 executes the acquisition of the quick application installation package from the specified address.
文件排版处理单元560,用于若文件格式识别单元550识别到所述输入的文件的类型为JavaScript文件,对所述JavaScript文件所包括的代码按照指定的格式进行排版,以便于查看。The file layout processing unit 560 is configured to, if the file format recognition unit 550 recognizes that the type of the input file is a JavaScript file, typeset the code included in the JavaScript file according to a specified format for easy viewing.
作为一种方式,文件排版处理单元560,具体用于对所述JavaScript文件在打包过程中被删除的代码进行还原;将进行所述还原后的JavaScript文件中的代码按照指定的格式进行排版。As a way, the file typesetting processing unit 560 is specifically configured to restore the code deleted during the packaging of the JavaScript file; and typeset the code in the restored JavaScript file according to a specified format.
此外,如图12所示,所述装置500,还包括:In addition, as shown in FIG. 12, the device 500 further includes:
接口处理单元570,用于读取功能接口扫描需求信息;基于所述功能接口扫描需求信息对所述配置文件进行扫描,得到所述从指定的地址获取快应用安装包所调用的功能接口;将所述得到的功能接口输出到结果文件。The interface processing unit 570 is configured to read the function interface scanning requirement information; scan the configuration file based on the function interface scanning requirement information to obtain the function interface called by the quick application installation package obtained from the specified address; The obtained function interface is output to the result file.
作为一种方式,所述扫描需求信息包括所需扫描的目标类型以及输出样式。在这种方式下,接口处理单元570,具体用于基于所述功能接口扫描需求信息对所述配置文件进行扫描的步骤包括:扫描所述配置文件中所包括的功能接口中与所述目标类型匹配的类型;所述将所述得到的功能接口输出到结果文件的步骤包括:按照所述输出样式将得到的功能接口输出到结果文件。As a way, the scanning requirement information includes the target type and output style to be scanned. In this manner, the interface processing unit 570 is specifically configured to scan the configuration file based on the function interface scanning requirement information, including: scanning the function interface included in the configuration file and the target type Matching type; the step of outputting the obtained functional interface to the result file includes: outputting the obtained functional interface to the result file according to the output style.
作为一种方式,接口处理单元570,用于识别到所述对所述解包后的资源文件进行调试过程中出现错误时,获取所述解包后的资源文件中的配置文件。As a way, the interface processing unit 570 is configured to obtain the configuration file in the unpacked resource file when an error occurs in the debugging process of the unpacked resource file.
可选的,接口处理单元570,具体用于基于图像识别的方式,识别到调试界面中出现指定的错图提示信息时,判定对所述解包后的资源文件进行调试过程中出现错误。Optionally, the interface processing unit 570 is specifically configured to determine that an error has occurred during debugging of the unpacked resource file when it recognizes that the designated error image prompt information appears in the debugging interface based on the image recognition method.
需要说明的是,本申请中装置实施例与前述方法实施例是相互对应的,装置实施例中具体的原理可以参见前述方法实施例中的内容,此处不再赘述。It should be noted that the device embodiment in this application and the foregoing method embodiment correspond to each other, and the specific principles in the device embodiment can be referred to the content in the foregoing method embodiment, which is not repeated here.
下面将结合图13对本申请提供的一种电子设备进行说明。Hereinafter, an electronic device provided by the present application will be described with reference to FIG. 13.
请参阅图13,基于上述的快应用安装包调试方法、装置,本申请实施例还提供的另一种可以执行前述快应用安装包调试方法的电子设备100。电子设备100包括相互耦合的一个或多个(图中仅示出一个)处理器102、存储器104以及网络模块106。其中,该存储器104中存储有可以执行前述实施例中内容的程序,而处理器102可以执行该存储器104中存储的程序。Referring to FIG. 13, based on the foregoing quick application installation package debugging method and device, an embodiment of the present application also provides another electronic device 100 that can execute the foregoing quick application installation package debugging method. The electronic device 100 includes one or more (only one is shown in the figure) a processor 102, a memory 104, and a network module 106 coupled to each other. Wherein, the memory 104 stores a program that can execute the content in the foregoing embodiment, and the processor 102 can execute the program stored in the memory 104.
其中,处理器102可以包括一个或者多个处理核。处理器102利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器104内的指令、程序、代码集或指令集,以及调用存储在存储器104内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器102可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器102可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器102中,单独通过一块通信芯片进行实现。The processor 102 may include one or more processing cores. The processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and calling data stored in the memory 104. Various functions and processing data of the electronic device 100. Optionally, the processor 102 may use at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). A kind of hardware form to realize. The processor 102 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 102, but may be implemented by a communication chip alone.
存储器104可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器104可用于存储指令、程序、代码、代码集或指令集。存储器104可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 104 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc. The data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
所述网络模块106可以包括射频单元,以便用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯,例如和音频播放设备进行通讯。再者,网络模块106还可以包括网络适配器(网卡),以便于通过有线方式直接连接路由器或者网关以太网,进而与网络进行数据交互。The network module 106 may include a radio frequency unit for receiving and transmitting electromagnetic waves, and realizes mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other equipment, such as communicating with an audio playback device. Furthermore, the network module 106 may also include a network adapter (network card), so as to directly connect to the router or the gateway Ethernet through a wired manner, and then perform data interaction with the network.
其中,所述网络模块106可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。所述网络模块106可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。例如,网络模块106可以与基站进行信息交互。Wherein, the network module 106 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, subscriber identity module (SIM) cards, memory and many more. The network module 106 can communicate with various networks such as the Internet, an intranet, and a wireless network, or communicate with other devices through a wireless network. The aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. For example, the network module 106 can exchange information with the base station.
请参考图14,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 14, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 800 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可 读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has a storage space for the program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read out from or written into one or more computer program products. The program code 810 may be compressed in a suitable form, for example.
综上所述,本申请提供的一种快应用安装包调试方法、装置、电子设备以及存储介质,在从指定的地址获取快应用安装包后对所述快应用安装包进行解包,得到解包后的资源文件,然后调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试,从而实现对于任一已经打包的快应用安装包都可以进行调试,并且因为在调用快应用开发工具之前,已经将要调试的快应用安装包进行了解包,得到了解包后的资源文件,进而同时改善了快应用开发工具只能直接对快应用安装包的源码进行调试的问题,提升了快应用安装包调试的通用性。In summary, the present application provides a quick application installation package debugging method, device, electronic equipment, and storage medium. After obtaining the quick application installation package from a designated address, the quick application installation package is unpacked to obtain the solution. After the packaged resource file, then call the fast application development tool hap-toolkit to debug the unpacked resource file, so as to realize that any packaged fast application installation package can be debugged, and because the fast application installation package is called Before applying the development tools, the quick application installation package to be debugged has been learned about the package, and the resource files after understanding the package have been obtained. At the same time, the problem that the quick application development tool can only directly debug the source code of the quick application installation package has been improved. The versatility of fast application installation package debugging.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种快应用安装包调试方法,其特征在于,应用于快应用安装包调试装置,所述方法包括:A quick application installation package debugging method, characterized in that it is applied to a quick application installation package debugging device, and the method includes:
    从指定的地址获取快应用安装包;Obtain the quick application installation package from the specified address;
    对所述快应用安装包进行解包,得到解包后的资源文件;Unpack the quick application installation package to obtain the unpacked resource file;
    调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试。Call the fast application development tool hap-toolkit to debug the unpacked resource file.
  2. 根据权利要求1所述的方法,其特征在于,所述调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试的步骤包括:The method according to claim 1, wherein the step of invoking the fast application development tool hap-toolkit to debug the unpacked resource file comprises:
    新建快应用安装包开发工程,所述新建快应用安装包开发工程中配置有初始快应用安装包的资源文件;A new quick application installation package development project, where the resource files of the initial quick application installation package are configured in the new quick application installation package development project;
    用所述解包后的资源文件替换所述初始快应用安装包的资源文件;Replacing the resource file of the initial quick application installation package with the unpacked resource file;
    调用快应用开发工具hap-toolkit,对所述新建快应用安装包开发工程进行调试,以实现对所述解包后的资源文件进行调试。Call the quick application development tool hap-toolkit to debug the new quick application installation package development project, so as to realize the debugging of the unpacked resource file.
  3. 根据权利要求2所述的方法,其特征在于,所述新建快应用安装包开发工程的步骤之前还包括:The method according to claim 2, wherein before the step of creating a new quick application installation package development project, the method further comprises:
    检测是否存在空的快应用安装包开发工程;Check whether there is an empty quick application installation package development project;
    若检测到未存在空的快应用安装包开发工程,执行所述新建快应用安装包开发工程;If it is detected that there is no empty quick application installation package development project, execute the new quick application installation package development project;
    若检测到存在空的快应用安装包开发工程,将所述空的快应用安装包开发工程作为新建快应用安装包开发工程。If it is detected that there is an empty quick application installation package development project, the empty quick application installation package development project is regarded as a new quick application installation package development project.
  4. 根据权利要求1-3任一所述的方法,其特征在于,所述调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试的步骤之后还包括:The method according to any one of claims 1 to 3, wherein after the step of invoking the quick application development tool hap-toolkit to debug the unpacked resource file, the method further comprises:
    调用快应用开发工具hap-toolkit基于指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包,其中,所述指定的签名与所述从指定的地址获取快应用安装包的原签名不同。Call the quick application development tool hap-toolkit to sign the debugged resource file based on the specified signature and package it into a quick application installation package, wherein the specified signature is the same as the one obtained from the specified address of the quick application installation package The original signature is different.
  5. 根据权利要求4所述的方法,其特征在于,所述调用快应用开发工具hap-toolkit基于指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包的步骤包括:The method according to claim 4, wherein the step of invoking the quick application development tool hap-toolkit to sign the debugged resource file based on a specified signature and packaging it into a quick application installation package comprises:
    调用快应用开发工具hap-toolkit新建一个空的打包工程;Call the quick application development tool hap-toolkit to create an empty packaging project;
    将该打包工程的打包配置信息更新为调试后的的所述资源文件的信息,得到更新后的打包配置信息;Updating the packaging configuration information of the packaging project to the information of the resource file after debugging to obtain the updated packaging configuration information;
    基于所述更新后的打包配置信息以及指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包。Sign the debugged resource file based on the updated packaging configuration information and the designated signature and package it into a quick application installation package.
  6. 根据权利要求5所述的方法,其特征在于,所述打包工程为webpack打包工程。The method according to claim 5, wherein the packaging project is a webpack packaging project.
  7. 根据权利要求5或6所述的方法,其特征在于,所述基于所述更新后的打包配置信息以及指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包的步骤之后还包括:The method according to claim 5 or 6, characterized in that after the step of signing the debugged resource file based on the updated packaging configuration information and the specified signature and packaging it as a quick application installation package Also includes:
    将所述新建快应用安装包开发工程中的调试后的所述资源文件,替换为所述初始快应用安装包的资源文件。Replace the debugged resource file in the new quick application installation package development project with the resource file of the initial quick application installation package.
  8. 根据权利要求1-7任一所述的方法,其特征在于,所述从指定的地址获取快应用安装包的步骤之前还包括:The method according to any one of claims 1-7, wherein before the step of obtaining the quick application installation package from the specified address, the method further comprises:
    若识别到文件输入指令,识别所输入的文件的类型;If the file input command is recognized, recognize the type of the input file;
    若识别到所述输入的文件的类型为快应用安装包,执行所述从指定的地址获取快应用安装包。If it is recognized that the type of the input file is a quick application installation package, execute the acquisition of the quick application installation package from the specified address.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, wherein the method further comprises:
    若识别到所述输入的文件的类型为JavaScript文件,对所述JavaScript文件所包括的代码按照指定的格式进行排版,以便于查看。If it is recognized that the type of the input file is a JavaScript file, the code included in the JavaScript file is typeset according to a specified format for easy viewing.
  10. 根据权利要求9所述的方法,其特征在于,所述对所述JavaScript文件所包括的代码按照指定的格式进行排版的步骤包括:The method according to claim 9, wherein the step of typesetting the code included in the JavaScript file according to a specified format comprises:
    对所述JavaScript文件在打包过程中被删除的代码进行还原;Restore the code deleted during the packaging of the JavaScript file;
    将进行所述还原后的JavaScript文件中的代码按照指定的格式进行排版。The code in the JavaScript file after the restoration is typeset according to the specified format.
  11. 根据权利要求1-10任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-10, wherein the method further comprises:
    获取所述解包后的资源文件中的配置文件,所述配置文件中的代码包括所述从指定的地址获取快应用安装包所调用的功能接口;Obtaining a configuration file in the unpacked resource file, where the code in the configuration file includes the functional interface called by the quick application installation package obtained from the specified address;
    读取功能接口扫描需求信息;Read function interface scanning demand information;
    基于所述功能接口扫描需求信息对所述配置文件进行扫描,得到所述从指定的地址获取快应用安装包所调用的功能接口;Scan the configuration file based on the function interface scanning requirement information to obtain the function interface called by the quick application installation package obtained from the specified address;
    将所述得到的功能接口输出到结果文件。Output the obtained functional interface to the result file.
  12. 根据权利要求11所述的方法,其特征在于,所述扫描需求信息包括所需扫描的目标类型以及输出样式;The method according to claim 11, wherein the scanning requirement information includes the target type and output style to be scanned;
    基于所述功能接口扫描需求信息对所述配置文件进行扫描的步骤包括:The step of scanning the configuration file based on the function interface scanning requirement information includes:
    扫描所述配置文件中所包括的功能接口中与所述目标类型匹配的类型;Scanning the type of the functional interface included in the configuration file that matches the target type;
    所述将所述得到的功能接口输出到结果文件的步骤包括:The step of outputting the obtained functional interface to the result file includes:
    按照所述输出样式将得到的功能接口输出到结果文件。Output the obtained functional interface to the result file according to the output style.
  13. 根据权利要求12所述的方法,其特征在于,所述配置文件为manifest.json文件。The method according to claim 12, wherein the configuration file is a manifest.json file.
  14. 根据权利要求11-13任一所述的方法,其特征在于,所述获取所述解包后的资源文件中的配置文件的步骤包括:The method according to any one of claims 11-13, wherein the step of obtaining the configuration file in the unpacked resource file comprises:
    识别到所述对所述解包后的资源文件进行调试过程中出现错误时,获取所述解包后的资源文件中的配置文件。When it is recognized that an error occurs in the debugging process of the unpacked resource file, acquiring the configuration file in the unpacked resource file.
  15. 根据权利要求14所述的方法,其特征在于,识别到所述对所述解包后的资源文件进行调试过程中出现错误时,获取所述解包后的资源文件中的配置文件的步骤包括:The method according to claim 14, wherein when it is recognized that an error has occurred during the debugging of the unpacked resource file, the step of obtaining the configuration file in the unpacked resource file comprises :
    基于图像识别的方式,识别到调试界面中出现指定的错图提示信息时,判定对所述解包后的资源文件进行调试过程中出现错误,获取所述解包后的资源文件中的配置文件。Based on the image recognition method, when the designated error message appears in the debugging interface, it is determined that an error occurred during the debugging of the unpacked resource file, and the configuration file in the unpacked resource file is obtained .
  16. 一种快应用安装包调试装置,其特征在于,所述装置包括:A quick application installation package debugging device, characterized in that the device includes:
    安装包获取单元,用于从指定的地址获取快应用安装包;The installation package obtaining unit is used to obtain the quick application installation package from the specified address;
    解包单元,用于对所述快应用安装包进行解包,得到解包后的资源文件;The unpacking unit is used to unpack the quick application installation package to obtain the unpacked resource file;
    调试单元,用于调用快应用开发工具hap-toolkit,对所述解包后的资源文件进行调试。The debugging unit is used to call the fast application development tool hap-toolkit to debug the unpacked resource file.
  17. 根据权利要求16所述的装置,其特征在于,所述调试单元,具体包括:The device according to claim 16, wherein the debugging unit specifically comprises:
    开发工程建立子单元,用于新建快应用安装包开发工程,所述新建快应用安装包开发工程中配置有初始快应用安装包的资源文件;The development project establishment subunit is used to create a new quick application installation package development project, where the resource files of the initial quick application installation package are configured in the new quick application installation package development project;
    信息替换子单元,用于用所述解包后的资源文件替换所述初始快应用安装包的资源文件;An information replacement subunit for replacing the resource file of the initial quick application installation package with the unpacked resource file;
    调试执行子单元,用于调用快应用开发工具hap-toolkit,对所述新建快应用安装包开发工程进行调试,以实现对所述解包后的资源文件进行调试。The debugging execution subunit is used to call the quick application development tool hap-toolkit to debug the new quick application installation package development project, so as to realize the debugging of the unpacked resource file.
  18. 根据权利要求16或17所述的装置,其特征在于,所述装置还包括:The device according to claim 16 or 17, wherein the device further comprises:
    打包单元,用于调用快应用开发工具hap-toolkit基于指定的签名对调试后的所述资源文件进行签名并打包为快应用安装包,其中,所述指定的签名与所述从指定的地址获取快应用安装包的原签名不同。The packaging unit is used to call the quick application development tool hap-toolkit to sign the debugged resource file based on the specified signature and package it into a quick application installation package, wherein the specified signature is the same as the one obtained from the specified address The original signature of the quick app installation package is different.
  19. 一种电子设备,其特征在于,包括一个或多个处理器以及存储器;An electronic device, characterized in that it includes one or more processors and a memory;
    一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行以实现权利要求1-15任一所述的方法。One or more programs are stored in the memory and configured to be executed by the one or more processors to implement the method of any one of claims 1-15.
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行权利要求1-15任一所述的方法。A computer-readable storage medium, wherein a program code is stored in the computer-readable storage medium, wherein the method according to any one of claims 1-15 is executed when the program code is run by a processor.
PCT/CN2019/082947 2019-04-16 2019-04-16 Quick application installation package debugging method and apparatus, and electronic device and storage medium WO2020210994A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/082947 WO2020210994A1 (en) 2019-04-16 2019-04-16 Quick application installation package debugging method and apparatus, and electronic device and storage medium
CN201980089698.XA CN113330427B (en) 2019-04-16 2019-04-16 Quick application installation package debugging method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/082947 WO2020210994A1 (en) 2019-04-16 2019-04-16 Quick application installation package debugging method and apparatus, and electronic device and storage medium

Publications (1)

Publication Number Publication Date
WO2020210994A1 true WO2020210994A1 (en) 2020-10-22

Family

ID=72836882

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/082947 WO2020210994A1 (en) 2019-04-16 2019-04-16 Quick application installation package debugging method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN113330427B (en)
WO (1) WO2020210994A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106650428A (en) * 2015-11-03 2017-05-10 阿里巴巴集团控股有限公司 Method and device for optimizing application codes
CN109032606A (en) * 2018-07-10 2018-12-18 北京小米移动软件有限公司 The process of compilation method, apparatus and terminal of native applications program
CN109542463A (en) * 2018-10-26 2019-03-29 深圳壹账通智能科技有限公司 Compiling file packet transmission method, device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912342A (en) * 2016-04-29 2016-08-31 乐视控股(北京)有限公司 APK (Android Package) development method and system based on overlay mechanism
CN106095504B (en) * 2016-06-13 2019-08-20 青岛海信移动通信技术股份有限公司 Preset application loading method and mobile terminal
CN107423216B (en) * 2017-06-21 2021-01-05 广州视源电子科技股份有限公司 Debugging tool configuration method, readable storage medium and debugging tool configuration device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106650428A (en) * 2015-11-03 2017-05-10 阿里巴巴集团控股有限公司 Method and device for optimizing application codes
CN109032606A (en) * 2018-07-10 2018-12-18 北京小米移动软件有限公司 The process of compilation method, apparatus and terminal of native applications program
CN109542463A (en) * 2018-10-26 2019-03-29 深圳壹账通智能科技有限公司 Compiling file packet transmission method, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XIAN ZHI XIAN JUE: "Non-official translation: Quick Application Development Tutorial [01]-Environment and Debugging", TENCENT CLOUD, 21 January 2019 (2019-01-21), XP055754887, Retrieved from the Internet <URL:https://cloud.tencent.com/developer/article/1385751> DOI: 20191212140303Y *

Also Published As

Publication number Publication date
CN113330427B (en) 2024-06-28
CN113330427A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN111290806B (en) Calling method and device of application program interface, computer equipment and storage medium
CN110377462B (en) Interface testing method and device and terminal equipment
CN109857404B (en) SDK interface packaging method and device, storage medium and electronic equipment
CN110968477B (en) Method, device and medium for acquiring backup BMC version information
WO2016095570A1 (en) Debugging method and apparatus for embedded system, and storage medium
CN110727581B (en) Crash positioning method and electronic equipment
CN106952426B (en) Data processing method and device
CN112650689A (en) Test method, test device, electronic equipment and storage medium
WO2020210994A1 (en) Quick application installation package debugging method and apparatus, and electronic device and storage medium
CN109460310B (en) Information collection system, method, equipment and storage medium based on WEB interface
CN114546823B (en) Method for reproducing debug scenario of logic system design and related equipment
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium
CN110851313B (en) Sensor debugging method, intelligent terminal, storage medium and electronic equipment
CN112230975A (en) Firmware differential upgrading method, device and equipment
CN113535580A (en) CTS (clear to send) testing method, device and testing equipment
CN113535578A (en) CTS (clear to send) testing method, device and testing equipment
CN113094086A (en) Component integration method and device, computer-readable storage medium and electronic equipment
CN112596751A (en) Compiling method, terminal, server and storage medium of application program installation package
EP4068141A1 (en) Method and system to enable print functionality in high-level synthesis (hls) design platforms
KR20180002553A (en) Computing divice and method for performing test of rehosting
CN110766886B (en) Driving device, method for driving card reader to realize card service and self-service payment system
CN111143095B (en) Mobile device application program compatibility flash back prevention method and system
WO2023103890A1 (en) Capacity expansion method and apparatus, and electronic device
CN118051221A (en) Program generation method and related equipment
JP2024011996A (en) Operation verification program, operation verification method, and information processing apparatus

Legal Events

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

Ref document number: 19924736

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.03.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19924736

Country of ref document: EP

Kind code of ref document: A1