CN107463423B - Verification method, storage medium, electronic device and system depending on package tool - Google Patents
Verification method, storage medium, electronic device and system depending on package tool Download PDFInfo
- Publication number
- CN107463423B CN107463423B CN201710642675.XA CN201710642675A CN107463423B CN 107463423 B CN107463423 B CN 107463423B CN 201710642675 A CN201710642675 A CN 201710642675A CN 107463423 B CN107463423 B CN 107463423B
- Authority
- CN
- China
- Prior art keywords
- package
- dependent
- cracking
- file
- packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/43—Checking; Contextual analysis
- G06F8/433—Dependency analysis; Data or control flow analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
Abstract
The invention discloses a verification method, a storage medium, electronic equipment and a system of a dependent package tool, and relates to the field of software development of mobile terminals. The method comprises the following steps: creating a cracking package with the same name as the dependent package to be issued, adding header files in the dependent package into the cracking package, creating an implementation file with the same name for each header file, associating each implementation file with the corresponding header file, and adding an empty method body into each implementation file; carrying out Cocoapods verification on the cracking packet, and issuing the verified cracking packet to a private server; when the cocoadods use the dependent packets, the dependent packets are obtained, and the cocoadods read and use the dependent packets. The invention can obviously simplify the operation process of passing the verification of the dependence package which does not support the complete CPU instruction set, and greatly improves the working efficiency.
Description
Technical Field
The invention relates to the field of software development of mobile terminals, in particular to a verification method, a storage medium, electronic equipment and a system of a dependent package tool.
Background
The present invention will be explained first with respect to terms that need to be used:
dependent packages: when mobile terminal software is developed, some middleware with specific functions is packaged and packaged for other developers to use, the packaged product is a dependent package, and the dependent package usually exists in the form of source codes, static link libraries or dynamic link libraries and the like.
Cocoapods: the open-source dependent package management tool can be used for creating, publishing and managing the dependent package.
CPU instruction set: hard programs stored inside the CPU for guiding and optimizing the CPU operations, such as x86_64, arm64, armv7, and the like, are common instruction sets at present.
Complete CPU instruction set: the set of CPU instruction sets specified in Cocoapods that must be supported.
Cocoapods is one of the most popular package-dependent management tools in current mobile terminal software development, and is suitable for iOS and Android systems. Through the Cooapods, developers can conveniently provide the dependency packages developed by the developers for others to use, and meanwhile, tools developed by other developers can be used in projects of the developers very conveniently.
However, problems with Cocoapods during use are: cocoapods require that dependent packages must support the full CPU instruction set. When a dependency package issued based on the coco codes is used in the development process, but the dependency package does not support the complete CPU instruction set, the dependency package cannot pass the verification and issue of the coco codes, and then the subsequent work cannot be continued.
In order to solve the above problem, the industry modifies the source code of coco codes, removes the verification about the CPU instruction set in the verification logic before the coco codes are issued, and replaces the coco codes in the system, so that when the coco codes issue the dependent packet, the coco codes do not verify whether the dependent packet supports the complete CPU instruction set, and directly issue the dependent packet.
However, since the official coco is modified and replaced, after the coco is upgraded, the upgraded coco is used to overwrite the modified coco; at this time, the source code of the upgraded cocoadods needs to be modified and replaced again, the operation process is complicated, the work efficiency is low, when the engineering development amount is large, a plurality of operations for modifying and replacing the source code of the cocoadods occur, and the work efficiency is low, for example:
project C needs to depend on project B, project B depends on project A provided by a third party, and project A does not support a complete CPU instruction set, and at the moment, if according to a traditional Cooapods flow, A, B and project C need to modify and replace the operation of the source code of the Cooapods.
Disclosure of Invention
Aiming at the defects in the prior art, the invention solves the technical problems that: how to simply pass the verification of the dependence package which does not support the complete CPU instruction set, the invention can obviously simplify the operation process of passing the verification of the dependence package which does not support the complete CPU instruction set, and greatly improves the working efficiency.
In order to achieve the above object, the verification method of the dependent package tool provided by the invention comprises the following steps:
s1: creating a cracking package with the same name as the dependent package to be issued, adding header files in the dependent package into the cracking package, creating an implementation file with the same name for each header file, associating each implementation file with the corresponding header file, adding an empty method body into each implementation file, and turning to S2;
s2: performing Cocoapods verification on the cracking package, issuing the verified cracking package to a private server, and turning to S3;
s3: when the cocoadods use the dependent packets, the dependent packets are obtained, and the cocoadods read and use the dependent packets.
The storage medium provided by the invention is stored with a computer program, and the computer program realizes the verification method of the dependent package tool when being executed by a processor.
The electronic equipment provided by the invention comprises a memory and a processor, wherein the memory is stored with a computer program running on the processor, and the processor realizes the verification method of the dependency package tool when executing the computer program.
The invention provides a verification system of a dependent package tool, which comprises the following steps: the system comprises a cracking packet creating module, a cracking packet verification and release module and a dependent packet using module;
the cracking package creating module is used for: creating a cracking package with the same name as the dependent package to be issued, adding header files in the dependent package into the cracking package, creating an implementation file with the same name for each header file, associating each implementation file with the corresponding header file, and adding an empty method body into each implementation file;
the cracking package verification and release module is used for: carrying out Cocoapods verification on the cracking packet, and issuing the verified cracking packet to a private server;
the dependent package usage module is to: and when the cocoadods use the dependent packet, acquiring the dependent packet, and controlling the cocoadods to read and use the dependent packet.
Compared with the prior art, the invention has the advantages that:
as seen from the present invention S1-S4, the present invention only needs to create the cracking package which has the same name as the dependent package and supports the complete CPU instruction set, and the cracking package can be used to verify through the instruction set of the Cooapads, and then the original dependent package is directly read for use when the cracking package is actually used. Compared with the use dependent package for modifying the Cocoapods source codes in the prior art, the operation process for creating the break package is very simple, so that the working efficiency is greatly improved, and when the engineering research and development amount is large, the effect of optimizing the working efficiency is more obvious.
Drawings
FIG. 1 is a flow chart of a verification method for a dependency package tool in an embodiment of the present invention;
fig. 2 is a connection block diagram of an electronic device in an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Referring to fig. 1, the verification method for a dependent package tool in the embodiment of the present invention includes the following steps:
s1: creating a cracked package with the same name as the dependent package to be issued through a pod live create A command, adding a header file (a file with a suffix of.h) in the dependent package into the cracked package, creating an implementation file (a file with a suffix of.m) with the same name for each header file, associating each implementation file with the corresponding header file (signature of a method for adding the header file in the implementation file), adding an empty method body into each implementation file, and going to S2.
S2: and (4) running a verification command (pod lib line-sources) and performing Cocoapods verification on the cracked package in the S1. Because the header file same as the dependent packet exists in the cracking packet and an empty method body exists in the cracking packet, the cracking packet can support a complete CPU instruction set for the verification of the Cooapods, and the verification can be successfully passed; for external users, the compilation method for the cracked package is the same as for the dependent packages. Adding the configuration information of a private pod server (a server suitable for Cooapads) to the local (namely acquiring the configuration information of the private server) through a private command; and according to the configuration information of the private server, the verified cracking package is issued to the private server, and the step goes to S3.
S2 is exemplified by:
s201: in the configuration file of project B needing to use dependent packages (the information recorded in the file comprises file name, version information, author information, copyright information, which packages are depended, source code path, source code organization information, how to perform grouping and the like), the following contents are added: dependency 'breaks the project name of the package' (e.g. a) to specify the project on which it depends, i.e. project B depends on project a.
S202: and (3) operating the pod lib line-sources command, setting the source parameter as douyuu, searching the information of the project A from the douyuu private pod server by the Cooapods, and verifying according to the information project B of the project A, wherein the searched A, namely the unpacking in the S1 supports a complete CPU instruction set, so that the verification can be successfully passed.
S203: run pod repo add douyuyuyuuhttp://gitlab.douyuios.com/specsThe command is used for acquiring the configuration information of the private server; and (5) operating a pod push douyuyuyuu command and issuing the B project to a private server.
S3: when the cocoadods use the dependent package in the S1, the dependent package is downloaded according to the download address of the dependent package, and because the cocoadods verify the cracked package with the same name as the dependent package, the cocoadods can directly read and use the dependent package.
It can be seen from S1 to S4 that the embodiment of the present invention only needs to create a cracking package that has the same name as the dependent package and supports the complete CPU instruction set, and the cracking package can be used to verify the CPU instruction set by using the cocoaps, and then the original dependent package is directly read for use when the CPU is actually used. Compared with the use dependent package for modifying the Cocoapods source codes in the prior art, the operation process for creating the break package in the embodiment of the invention is very simple, so that the working efficiency is greatly improved, and when the engineering research and development amount is large, the effect of optimizing the working efficiency is more obvious.
The embodiment of the invention also provides a storage medium, wherein a computer program is stored on the storage medium, and when being executed by a processor, the computer program realizes the verification method of the dependency package tool. The storage medium includes various media capable of storing program codes, such as a usb disk, a removable hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a magnetic disk, or an optical disk.
Referring to fig. 2, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor implements the above-mentioned verification method for a dependent package tool when executing the computer program.
The verification system of the dependent package tool in the embodiment of the invention comprises the following steps: the system comprises a cracking packet creating module, a cracking packet verifying and releasing module and a dependent packet using module.
The cracking package creating module is used for: creating a cracked package with the same name as the dependent package to be issued, adding a header file (a file with the suffix of.h) in the dependent package into the cracked package, creating an implementation file (a file with the suffix of.m) with the same name for each header file, associating each implementation file with the corresponding header file (adding a system signature of the header file into the implementation file), and adding an empty method body into each implementation file.
The cracking package verification and release module is used for: performing Cocoapods verification on the cracking packet, and issuing the verified cracking packet to a private server: and acquiring the configuration information of the private server, and issuing the verified cracking packet to the private server according to the configuration information.
The dependent package usage module is to: and when the cocoadods use the dependent packet, acquiring the dependent packet, and controlling the cocoadods to read and use the dependent packet.
It should be noted that: in the system provided in the embodiment of the present invention, when performing inter-module communication, only the division of each functional module is illustrated, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the system is divided into different functional modules to complete all or part of the above described functions.
Further, the present invention is not limited to the above-mentioned embodiments, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements are also considered to be within the scope of the present invention. Those not described in detail in this specification are within the skill of the art.
Claims (10)
1. A method for package-tool dependent authentication, the method comprising the steps of:
s1: creating a cracking package with the same name as the dependent package to be issued, adding header files in the dependent package into the cracking package, creating an implementation file with the same name for each header file, associating each implementation file with the corresponding header file, adding an empty method body into each implementation file, and turning to S2;
s2: performing Cocoapods verification on the cracking package, issuing the verified cracking package to a private server, and turning to S3;
s3: when the cocoadods use the dependent packets, the dependent packets are obtained, and the cocoadods read and use the dependent packets.
2. The package-dependent tool verification method of claim 1, wherein: the process of associating each implementation file with a corresponding header file in S1 includes: and adding a method signature of a header file in the implementation file.
3. The package-dependent tool verification method according to claim 1 or 2, wherein: in S1, the header file is a file with the suffix of.h, and the implementation file is a file with the suffix of.m.
4. The package-dependent tool verification method according to claim 1 or 2, wherein: the process of issuing the verified cracking package to the private server in S2 includes: and acquiring the configuration information of the private server, and issuing the verified cracking packet to the private server according to the configuration information.
5. A storage medium having a computer program stored thereon, characterized in that: the computer program, when executed by a processor, implements the method of any of claims 1 to 4.
6. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that runs on the processor, characterized in that: the processor, when executing the computer program, implements the method of any of claims 1 to 4.
7. A package tool dependent authentication system, comprising: the system comprises: the system comprises a cracking packet creating module, a cracking packet verification and release module and a dependent packet using module;
the cracking package creating module is used for: creating a cracking package with the same name as the dependent package to be issued, adding header files in the dependent package into the cracking package, creating an implementation file with the same name for each header file, associating each implementation file with the corresponding header file, and adding an empty method body into each implementation file;
the cracking package verification and release module is used for: carrying out Cocoapods verification on the cracking packet, and issuing the verified cracking packet to a private server;
the dependent package usage module is to: and when the cocoadods use the dependent packet, acquiring the dependent packet, and controlling the cocoadods to read and use the dependent packet.
8. The package-tool-dependent authentication system of claim 7, wherein: the process of associating each implementation file with the corresponding header file by the unpacking and creating module comprises the following steps: and adding a system signature of the header file in the implementation file.
9. The package tool dependent authentication system according to claim 7 or 8, wherein: the head file in the cracking package creating module is a file with a suffix of h, and the file is a file with a suffix of m.
10. The package tool dependent authentication system according to claim 7 or 8, wherein: the process that the cracking packet verification and release module releases the verified cracking packet to the private server comprises the following steps: and acquiring the configuration information of the private server, and issuing the verified cracking packet to the private server according to the configuration information.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710642675.XA CN107463423B (en) | 2017-07-31 | 2017-07-31 | Verification method, storage medium, electronic device and system depending on package tool |
PCT/CN2017/117385 WO2019024392A1 (en) | 2017-07-31 | 2017-12-20 | Dependency package tool verification method, storage medium, electronic device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710642675.XA CN107463423B (en) | 2017-07-31 | 2017-07-31 | Verification method, storage medium, electronic device and system depending on package tool |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107463423A CN107463423A (en) | 2017-12-12 |
CN107463423B true CN107463423B (en) | 2020-04-10 |
Family
ID=60547855
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710642675.XA Active CN107463423B (en) | 2017-07-31 | 2017-07-31 | Verification method, storage medium, electronic device and system depending on package tool |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107463423B (en) |
WO (1) | WO2019024392A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107463423B (en) * | 2017-07-31 | 2020-04-10 | 武汉斗鱼网络科技有限公司 | Verification method, storage medium, electronic device and system depending on package tool |
CN110413268B (en) * | 2018-04-28 | 2023-11-10 | 武汉斗鱼网络科技有限公司 | Middleware verification method, storage medium, equipment and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102364442A (en) * | 2011-06-24 | 2012-02-29 | 浙大网新科技股份有限公司 | Method for transplanting Wine from x86 to advanced risc machine (ARM) platform |
CN102681893A (en) * | 2011-03-09 | 2012-09-19 | 腾讯科技(深圳)有限公司 | Cross-platform implementation method for executable programs and mobile terminal |
CN103530148A (en) * | 2013-09-18 | 2014-01-22 | 国云科技股份有限公司 | Distribution method for large-scale Linux software package |
CN103870211A (en) * | 2012-12-10 | 2014-06-18 | 国际商业机器公司 | Method of writing a file to a plurality of media and a storage system thereof |
US9582399B2 (en) * | 2014-03-14 | 2017-02-28 | Ca, Inc. | Entropy weighted message matching for opaque service virtualization |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101526892A (en) * | 2008-03-04 | 2009-09-09 | 深圳市爱国者嵌入式系统科技有限公司 | Method for expanding application program based on embedded system |
KR101368024B1 (en) * | 2012-03-29 | 2014-02-27 | 주식회사 엘지씨엔에스 | Method of managing script, server performing the same and storage media storing the same |
CN107463423B (en) * | 2017-07-31 | 2020-04-10 | 武汉斗鱼网络科技有限公司 | Verification method, storage medium, electronic device and system depending on package tool |
-
2017
- 2017-07-31 CN CN201710642675.XA patent/CN107463423B/en active Active
- 2017-12-20 WO PCT/CN2017/117385 patent/WO2019024392A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102681893A (en) * | 2011-03-09 | 2012-09-19 | 腾讯科技(深圳)有限公司 | Cross-platform implementation method for executable programs and mobile terminal |
CN102364442A (en) * | 2011-06-24 | 2012-02-29 | 浙大网新科技股份有限公司 | Method for transplanting Wine from x86 to advanced risc machine (ARM) platform |
CN103870211A (en) * | 2012-12-10 | 2014-06-18 | 国际商业机器公司 | Method of writing a file to a plurality of media and a storage system thereof |
CN103530148A (en) * | 2013-09-18 | 2014-01-22 | 国云科技股份有限公司 | Distribution method for large-scale Linux software package |
US9582399B2 (en) * | 2014-03-14 | 2017-02-28 | Ca, Inc. | Entropy weighted message matching for opaque service virtualization |
Non-Patent Citations (1)
Title |
---|
使用cocoapods开发并打包静态库;BryceZhang;《博客园》;20141123;第1,3-7页 * |
Also Published As
Publication number | Publication date |
---|---|
CN107463423A (en) | 2017-12-12 |
WO2019024392A1 (en) | 2019-02-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109491695B (en) | Incremental updating method for integrated android application | |
CN108229112B (en) | Protection application program, and running method and device of application program | |
KR102192880B1 (en) | Method and device to prevent software repackaging | |
CN102289378B (en) | Method for automatically generating APP (Application) | |
CN103077043B (en) | A kind of method of quick Start-up and operating performance Linux | |
CN105407130A (en) | Mobile client plug-in system and mobile client plug-in processing method | |
CN109800005B (en) | Client hot update method and device | |
CN113407362A (en) | SOMEIP communication intermediate layer implementation method and system based on SOA architecture of vehicle-mounted Android system | |
CN113704706B (en) | Code reinforcement method and device | |
CN110659031A (en) | Compiling method and device of application program, electronic equipment and storage medium | |
CN112099800A (en) | Code data processing method and device and server | |
CN108829465B (en) | Local dynamic loading system and method based on direct read-write FLASH | |
CN107463423B (en) | Verification method, storage medium, electronic device and system depending on package tool | |
CN112451972A (en) | Game engine-based resource compression package construction method, device, system and medium | |
CN111078279A (en) | Processing method, device and equipment of byte code file and storage medium | |
CN111045686A (en) | Method for improving application decompilation speed, intelligent terminal and storage medium | |
CN111190584A (en) | EHIS-DB system version release method and device, computer equipment and storage medium | |
CN113893550A (en) | Script source code processing method and related equipment | |
CN104036193A (en) | Local cross-domain vulnerability detection method and device for application program | |
CN106775843B (en) | Dalvik byte code optimization method based on memory loading | |
CN112230930A (en) | Method and device for constructing and packaging hybrid technology stack and machine-readable storage medium | |
CN116775087A (en) | Thermal repair method, device, electronic equipment and storage medium | |
CN111625225A (en) | Program specified data output method and device | |
CN116243923A (en) | Applet processing method and device and electronic equipment | |
KR101863325B1 (en) | Method and apparatus for preventing reverse engineering |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |