CN116820549A - Method, device and storage medium for generating search-free static library - Google Patents

Method, device and storage medium for generating search-free static library Download PDF

Info

Publication number
CN116820549A
CN116820549A CN202310752171.9A CN202310752171A CN116820549A CN 116820549 A CN116820549 A CN 116820549A CN 202310752171 A CN202310752171 A CN 202310752171A CN 116820549 A CN116820549 A CN 116820549A
Authority
CN
China
Prior art keywords
source code
file
libraries
library
updated
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.)
Pending
Application number
CN202310752171.9A
Other languages
Chinese (zh)
Inventor
付晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Momo Information Technology Co Ltd
Original Assignee
Beijing Momo Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Momo Information Technology Co Ltd filed Critical Beijing Momo Information Technology Co Ltd
Priority to CN202310752171.9A priority Critical patent/CN116820549A/en
Publication of CN116820549A publication Critical patent/CN116820549A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

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

Abstract

The application provides a method, a device and a storage medium for generating a search-free static library, which are used for generating source code storage addresses of a plurality of libraries; matching source code save addresses of one or more libraries to be updated in a first file from source code save addresses of the plurality of libraries, wherein the first file is used for storing libraries with version numbers to be updated; acquiring source code files of one or more libraries to be updated in a first file based on a source code storage address to form a source code file set; compiling the source code file set to obtain a binary file set; establishing a corresponding relation between each binary file in the binary file set and one or more libraries to be updated in the first file; and packaging the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library. The source code file of the binary file is obtained automatically and perceptually, and binary debugging is simplified.

Description

Method, device and storage medium for generating search-free static library
Technical Field
The present application relates to the field of software debugging technologies, and in particular, to a method, an apparatus, and a storage medium for generating a search-free static library.
Background
Generally speaking, the design of IOS software includes the following links: source code design, compiling, debugging and modifying based on source code, and software release. In general, binary code files are obtained based on compiling of source codes, and in order to debug and modify the binary code files, the source code files corresponding to the binary code files are usually required to be obtained for reference, modification and the like.
In the current software design process, after obtaining the binary code file of the iOS end component, a designer usually searches the corresponding source code file by himself; some of the prior art also provides various plug-ins to enable the address of the source code file to be obtained from the binary code file and then the source code file to be downloaded for use. In the case of downloading the source code file in the debugging and modifying stage, the address of the source code file obtained in the binary code file may be invalid due to various factors such as software version update, address change and the like, the source code file cannot be downloaded, and further, breakpoint cannot be set for debugging and modifying the source code file; in addition, when the source code maintainer changes the address of the source code file, it takes a lot of time and labor to update the old address.
In summary, in the debugging process based on binary system, for the user of the external library, the stability of the source code file acquisition is insufficient, and the designer needs to manually operate; for maintenance personnel of an external library, the maintenance workload is large, the time consumption is long, and errors are easy to occur.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus and a storage medium for generating a search-free static library, so as to solve the technical problems of insufficient stability of source code file acquisition, manual intervention of a designer, high maintenance cost and high error rate in the prior art.
The first aspect of the present application provides a method for generating a search-free static library, which specifically includes:
generating source code storage addresses of a plurality of libraries, wherein the libraries comprise library name identifiers and version identifiers, and the source code storage addresses consist of first addresses corresponding to the library name identifiers and second addresses corresponding to the version identifiers;
matching source code save addresses of one or more libraries to be updated in a first file from source code save addresses of the plurality of libraries, wherein the first file is used for storing libraries with version numbers to be updated;
acquiring source code files of one or more libraries to be updated in a first file based on a source code storage address to form a source code file set;
compiling the source code file set to obtain a binary file set;
establishing a corresponding relation between each binary file in the binary file set and one or more libraries to be updated in the first file;
and packaging the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library.
Preferably, the generating source code save addresses of the plurality of libraries specifically includes:
and acquiring original storage addresses of the plurality of libraries based on the library name identifiers of the plurality of libraries, taking the original storage addresses as first addresses, and creating a second address under the original storage addresses according to the version identifiers of the plurality of libraries.
Preferably, the matching the source code save addresses of the plurality of libraries to be updated in the first file from the source code save addresses of the plurality of libraries specifically includes:
acquiring a second file set, wherein the second file set comprises one or more second files, and each second file stores source code storage addresses of a plurality of libraries;
traversing the one or more libraries of version numbers to be updated, determining a target second file containing the traversed libraries of version numbers to be updated based on the library name identification and the version identification;
and determining the source code storage address of the traversed library with the version number to be updated from the target second file.
Preferably, the establishing a correspondence between each binary file in the binary file set and a plurality of libraries to be updated in the first file specifically includes:
copying the addressing files from the second files, converting the addressing files into target formats, and establishing corresponding relations between each binary file in the binary file set and a plurality of libraries to be updated in the first files based on the converted addressing files.
Preferably, after establishing the correspondence between each binary file in the binary file set and the plurality of libraries to be updated in the first file, the method further includes: and adding the name of the static library and the source code storage address to a preset position, and adjusting the position of the failure field.
Preferably, the step of packaging the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library specifically includes:
and traversing each library to be updated in the first file, packing the source code file for each library to be updated, and packing the packed source code file and binary files based on the corresponding relation to obtain a static library.
Preferably, the method for generating the search-free static library further comprises the following steps:
matching a target static library, wherein the target static library is a static library which depends on a first project;
decompressing the target static library to obtain a source code file corresponding to the target static library, and adding the source code file into the first project.
Preferably, the method for generating the search-free static library further comprises the following steps:
the method comprises the steps that a first identifier and a plurality of second identifiers corresponding to all the relied libraries are provided, each relied library in the engineering comprises a first state and a second state, the first state refers to compiling of the relied libraries by a source code file, the second state refers to compiling of the relied libraries by a binary file, and the initial state of each relied library in the engineering is the second state;
and if the first identifiers are preset values, controlling all the dependent libraries to be in a first state, judging the values of the second identifiers in the plurality of second identifiers, and setting the dependent libraries corresponding to the second identifiers with the values of the preset values in the plurality of second identifiers to be in the first state.
The second aspect of the present application provides a device for generating a search-free static library, specifically including:
the system comprises a creation module, a storage module and a storage module, wherein the creation module is used for generating source code storage addresses of a plurality of libraries, the libraries comprise library name identifiers and version identifiers, and the source code storage addresses consist of first addresses corresponding to the library name identifiers and second addresses corresponding to the version identifiers;
the matching module is used for matching the source code storage addresses of one or more libraries to be updated in a first file from the source code storage addresses of the libraries, and the first file is used for storing the libraries with version numbers to be updated;
the summarizing module is used for acquiring source code files of one or more libraries to be updated in the first file based on the source code storage address to form a source code file set;
the compiling module is used for compiling the source code file set to obtain a binary file set;
the matching module is used for establishing the corresponding relation between each binary file in the binary file set and one or more libraries to be updated in the first file;
and the packing module is used for packing the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library.
A third aspect of the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the foregoing methods of generating a search free static library.
According to the method, the device and the storage medium for generating the search-free static library, which are provided by the application, the storage address for storing the source code file is set for each version of library, each version of library stores the corresponding source code file, and different developers of the same system can use the specific version of library according to own habits, so that the degree of freedom of development is improved; based on the source code storage address, all source code files of libraries with version numbers needing to be updated can be obtained, a static library which can directly depend on the use and comprises the source code files and the compiled binary files is generated, and because the source code files are already contained in the static library, the corresponding source code files do not need to be downloaded when the static library is used, from the use perspective of a designer, the automatic acquisition of the source code files without searching is realized, the source code files are packaged together when the static library is generated, the source code files are stably acquired, and the whole process does not need manual intervention of the designer, so that the source code files of the dependent libraries are automatically acquired without sense. .
Drawings
FIG. 1 is a flow chart of binary-based debugging as exemplarily shown in the prior art;
FIG. 2 is a flow chart illustrating a method of generating a search-free static library according to an exemplary embodiment of the present application;
fig. 3 is a schematic structural diagram of a device for generating a search-free static library according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
When the prior art is used for developing the software, the prior art generally comprises a development link and a release link, and the development link needs to sequentially design, debug and modify the source code of the software. The debug modification stage obtains a compiled binary file, and the operation object of the debug modification stage is a source code file, and therefore, the debug modification stage includes a step of acquiring a corresponding source code file based on the binary file. As shown in fig. 1, in the prior art, after loading binary contents, the corresponding source code file needs to be manually triggered and searched, so that the whole process is inconvenient to operate, and the debugging and modifying efficiency of a designer is reduced. Further, even if the triggering mode is further modified into automatic triggering, the address of the source code file needs to be determined in the binary file after triggering so as to be downloaded, and when the external library is used, the external library may be generated for a long time, the address of the source code file determined in the binary file may be invalid, or the source code file may not exist in the address, at this time, the downloading of the source code file will fail, a designer needs to find the corresponding source code file through searching, the downloading stability of the source code file is poor, and the workload of the designer is high.
Aiming at the technical problems that the downloading stability of the source code file of the external library is poor and human intervention is required in the prior art, the first implementation of the application provides a method for generating a search-free static library, as shown in fig. 2, which specifically comprises the following steps:
generating source code storage addresses of a plurality of libraries, wherein the libraries comprise library name identifiers and version identifiers, and the source code storage addresses consist of first addresses corresponding to the library name identifiers and second addresses corresponding to the version identifiers;
matching source code save addresses of one or more libraries to be updated in a first file from source code save addresses of the plurality of libraries, wherein the first file is used for storing libraries with version numbers to be updated;
acquiring source code files of one or more libraries to be updated in a first file based on a source code storage address to form a source code file set;
compiling the source code file set to obtain a binary file set;
establishing a corresponding relation between each binary file in the binary file set and one or more libraries to be updated in the first file;
and packaging the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library.
According to the method for generating the search-free static library, provided by the application, the storage address for storing the source code file is set for each version of library, each version of library stores the corresponding source code file, and different developers of the same system can use the specific version of library according to own habits, so that the degree of freedom of development is improved; based on the source code storage address, all source code files of libraries with version numbers needing to be updated can be obtained, a static library which can directly depend on the use and comprises the source code files and the compiled binary files is generated, and because the source code files are already contained in the static library, the corresponding source code files do not need to be downloaded when the static library is used, from the use perspective of a designer, the automatic acquisition of the source code files without searching is realized, the source code files are packaged together when the static library is generated, the source code files are stably acquired, and the whole process does not need manual intervention of the designer, so that the source code files of the dependent libraries are automatically acquired without sense.
Each library has a source code file and a corresponding compiled binary file, and in use, each library is continually updated for iteration, so each external library has a different version number. The generating source code save addresses of a plurality of libraries specifically includes: and acquiring original storage addresses of the plurality of libraries based on the library name identifiers of the plurality of libraries, taking the original storage addresses as first addresses, and creating a second address under the original storage addresses according to the version identifiers of the plurality of libraries. Taking afnetwork version 1.0 as an example, the original code path of afnetwork is "engineering/powders/afnetwork/xxx", a second address with 1.0 is newly built under engineering/powders/afnetwork/lower, and the first address and the second address are combined to obtain a source code storage file "engineering/powders/afnetwork/1.0/xxx".
As a specific embodiment, after generating the source code save addresses of the plurality of libraries, the method further includes: the source code save addresses of the plurality of libraries in the compiled reference file are modified. Specifically, the group path in the compiled reference file in the engineering is modified, taking afnetwork as an example, and the original project group is:
which defines a plurality of libraries on which to rely and uses "path" to define the relative address of the source code save address.
The file after the source code storage address is modified is:
the first file is used for storing one or more libraries with version numbers to be updated, which are required to be updated, and the first file stores the library name identifiers and the version identifiers of the libraries with the version numbers to be updated. Wherein, the need for updating means that the version number of the library relied on in the project is different from the version identification of the existing static library. The matching of the source code save addresses of the plurality of libraries to be updated in the first file from the source code save addresses of the plurality of libraries specifically includes: acquiring a second file set, wherein the second file set comprises one or more second files, and each second file stores source code storage addresses of a plurality of libraries; traversing the one or more libraries of version numbers to be updated, determining a target second file containing the traversed libraries of version numbers to be updated based on the library name identification and the version identification, and determining the source code save address of the traversed libraries of version numbers to be updated from the target second file. As an optional embodiment, the determining, based on the repository name identifier and the version identifier, the target second file including the traversed repository with the version number to be updated specifically includes: and determining a target second file containing the traversed library with the version number to be updated in the cache file based on the library name identification and the version identification. For example, taking an afnetwork command as an example, firstly, library_ports.json files are filled with library names and version numbers of libraries needing version numbers to be updated, traversing each library needing version numbers to be updated, taking the composition of the library names and the version numbers as unique identifiers, acquiring all the repos in the cooapeds/repos, and acquiring the Git addresses of the repos to form a second file set. The cached file podfile is analyzed to determine in which second file repo this library is currently traversed as the target second file to uniquely identify the content of the search target second file to obtain the source code save address of the library currently traversed to be updated in version number.
The method for generating the search-free static library provided by the application can uniformly retrace after each library is changed to generate a version, does not need to identify the dependency relationship among libraries, and simultaneously does not have the problem that the upper library is not updated due to the update of some dependent libraries, thereby reducing the code error probability caused by the update of the library version.
The source code file set is compiled to obtain a binary file set, wherein the binary file set comprises a plurality of binary files, namely, the whole compiling is performed, and the compiling efficiency is improved. Preferably, compilation is done using xcodebuild commands,
the establishing a corresponding relation between each binary file in the binary file set and a plurality of libraries to be updated in the first file specifically includes: copying the addressing files from the second files, converting the addressing files into target formats, and establishing corresponding relations between each binary file in the binary file set and a plurality of libraries to be updated in the first files based on the converted addressing files. For example, the addressing file Podspec is first copied from the second file repo; the addressing file Podspec is converted into json format. As an optional embodiment, the mapping relation between each binary file in the binary file set and the multiple libraries to be updated in the first file is established based on the converted addressing file, and the names of the static libraries and the source code storage addresses are added to preset positions to adjust the positions of the failure fields. And adding the names of the static libraries into the vendored_libraries, wherein the names of the static libraries are combinations of library name identifiers and version identifiers of a plurality of libraries. Adding the source code save address into the Podfile; the failure field, such as source_files, in the used subspecs is added to the outermost layer, wherein the failure field refers to the outer layer field where failure can occur if engineering only introduces the subspecs.
As an optional embodiment, after the forming the source code file set, adding auxiliary information to each source code file in the source code file set, where the source code file set marks the source code file with the source code file and the library name identifier and the version identifier of the corresponding library, and the auxiliary information at least includes: copy the bundle generated by metalllib from bundle, copy Podfile.lock, add bundle path to resources.
The step of packing the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library specifically comprises the following steps: and traversing each library to be updated in the first file, packing the source code file for each library to be updated, and packing the packed source code file and binary files based on the corresponding relation to obtain a static library.
In the method for generating the search-free static library, the whole packaging is firstly carried out, and then the binary files of each library to be updated and the packaged source code files are packaged based on the corresponding relation between the address files and the source code files, so that the static library containing complete information is obtained.
As an optional embodiment, after the static library is obtained, a blank warehouse is further built, and the obtained static library is stored in the blank warehouse.
Preferably, the method for generating the search-free static library further comprises the following steps: matching a target static library, wherein the target static library is a static library which depends on a first project; decompressing the target static library to obtain a source code file corresponding to the target static library, and adding the source code file into the first project. According to the method for generating the search-free static library, the dependency script embedded in the first project is triggered, and the dependency script records the library which is dependent in the first project; the dependent script is matched with a target static library based on the recorded identification of the library, the target static library is decompressed, a source code file corresponding to the target static library is obtained, and the source code file is added into the first project. As a specific embodiment, invoking the custom dependency script in the post_integration provided by Podfile implements the following functions: invoking an uzzip_source_code. Rb to decompress the source code file zip in the static library generated after updating to a packed symbol path; and calling add_source_file_to_project to add the decompressed source code file to the current project in a FileReference mode through Xcodepoj, so that the decompressed source code file is not involved in compiling and is only used for debugging.
The method for generating the search-free static library can be directly compiled by using binary files in engineering, and can find out corresponding source code files in the file catalogue of the engineering to debug, and the whole process is automatically executed, so that developers do not feel at all.
As an optional embodiment, the method for generating a search-free static library further includes: the method comprises the steps of controlling all the dependent libraries to be in a first state if the first identifier is a preset value, judging the value of each second identifier in the second identifiers, and setting the dependent libraries corresponding to the second identifiers with the median value of the second identifiers as the preset value as the first state.
Preferably, after the states of the dependent libraries are switched, traversing each dependent library, and deleting the statement nested in the first state library. Illustratively, references to deleting subspecies include xxx/xx and subspec= > [ "xxx" ].
Preferably, after the state of the dependent library is switched, the dependency instruction pod method is called to realize the updated dependency.
As an alternative embodiment, after switching the state of the relied library, the method further comprises saving the library name identifier and the version identifier of the relied library to a third file. According to the application, all libraries relied on in the engineering are backed up in the third file, so that when a developer needs to update a specific library, the developer can copy and paste the specific library directly from the file, and the workload of the developer is reduced.
According to the method for generating the search-free static library, provided by the application, a developer does not need to care about the bottom calling logic of the cross-platform code, and can perform cross-platform calling only by using the key word mark-dependent library, so that the time for writing the code is saved. And the cross-version and cross-platform dependency library can be realized in the same source code, so that better code reading and maintainability are achieved.
A second embodiment of the present application provides a device for generating a search-free static library, as shown in fig. 3, where the device specifically includes:
the system comprises a creation module, a storage module and a storage module, wherein the creation module is used for generating source code storage addresses of a plurality of libraries, the libraries comprise library name identifiers and version identifiers, and the source code storage addresses consist of first addresses corresponding to the library name identifiers and second addresses corresponding to the version identifiers;
the matching module is used for matching the source code storage addresses of one or more libraries to be updated in a first file from the source code storage addresses of the libraries, and the first file is used for storing the libraries with version numbers to be updated;
the summarizing module is used for acquiring source code files of one or more libraries to be updated in the first file based on the source code storage address to form a source code file set;
the compiling module is used for compiling the source code file set to obtain a binary file set;
the matching module is used for establishing the corresponding relation between each binary file in the binary file set and one or more libraries to be updated in the first file;
and the packing module is used for packing the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library.
It is to be noted that this embodiment is an example of a device corresponding to the first embodiment, and can be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, a detailed description is omitted here. Accordingly, the related art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module in this embodiment is a logic module, and in practical application, one logic unit may be one physical unit, or may be a part of one physical unit, or may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, units that are not so close to solving the technical problem presented by the present application are not introduced in the present embodiment, but this does not indicate that other units are not present in the present embodiment.
The present specification also provides a computer readable storage medium storing a computer program operable to perform a method of generating a search-free static library as provided in fig. 2 above.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (10)

1. The method for generating the search-free static library is characterized by specifically comprising the following steps of:
generating source code storage addresses of a plurality of libraries, wherein the libraries comprise library name identifiers and version identifiers, and the source code storage addresses consist of first addresses corresponding to the library name identifiers and second addresses corresponding to the version identifiers;
matching source code save addresses of one or more libraries to be updated in a first file from source code save addresses of the plurality of libraries, wherein the first file is used for storing libraries with version numbers to be updated;
acquiring source code files of one or more libraries to be updated in a first file based on a source code storage address to form a source code file set;
compiling the source code file set to obtain a binary file set;
establishing a corresponding relation between each binary file in the binary file set and one or more libraries to be updated in the first file;
and packaging the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library.
2. The method for generating a search-free static library according to claim 1, wherein said generating source code save addresses of a plurality of libraries comprises:
and acquiring original storage addresses of the plurality of libraries based on the library name identifiers of the plurality of libraries, taking the original storage addresses as first addresses, and creating a second address under the original storage addresses according to the version identifiers of the plurality of libraries.
3. The method for generating a search-free static library according to claim 1, wherein said matching the source code save addresses of the plurality of libraries to be updated in the first file from the source code save addresses of the plurality of libraries comprises:
acquiring a second file set, wherein the second file set comprises one or more second files, and each second file stores source code storage addresses of a plurality of libraries;
traversing the one or more libraries of version numbers to be updated, determining a target second file containing the traversed libraries of version numbers to be updated based on the library name identification and the version identification;
and determining the source code storage address of the traversed library with the version number to be updated from the target second file.
4. The method for generating a search-free static library according to claim 1, wherein said establishing a correspondence between each binary file in said set of binary files and a plurality of libraries to be updated in said first file specifically comprises:
copying the addressing files from the second files, converting the addressing files into target formats, and establishing corresponding relations between each binary file in the binary file set and a plurality of libraries to be updated in the first files based on the converted addressing files.
5. The method of generating a search-free static library of claim 4,
after establishing the corresponding relation between each binary file in the binary file set and a plurality of libraries to be updated in the first file, the method further comprises the following steps: and adding the name of the static library and the source code storage address to a preset position, and adjusting the position of the failure field.
6. The method for generating a search-free static library according to claim 1, wherein said packaging binary files and source code files of each library to be updated based on said correspondence relation to obtain a static library specifically comprises:
and traversing each library to be updated in the first file, packing the source code file for each library to be updated, and packing the packed source code file and binary files based on the corresponding relation to obtain a static library.
7. The method for generating a search-free static library according to claim 1, further comprising:
matching a target static library, wherein the target static library is a static library which depends on a first project;
decompressing the target static library to obtain a source code file corresponding to the target static library, and adding the source code file into the first project.
8. The method for generating a search-free static library according to claim 1, further comprising:
the method comprises the steps that a first identifier and a plurality of second identifiers corresponding to all the relied libraries are provided, each relied library in the engineering comprises a first state and a second state, the first state refers to compiling of the relied libraries by a source code file, the second state refers to compiling of the relied libraries by a binary file, and the initial state of each relied library in the engineering is the second state;
and if the first identifiers are preset values, controlling all the dependent libraries to be in a first state, judging the values of the second identifiers in the plurality of second identifiers, and setting the dependent libraries corresponding to the second identifiers with the values of the preset values in the plurality of second identifiers to be in the first state.
9. A generating search-free static library device, which is characterized by comprising the following specific components:
the system comprises a creation module, a storage module and a storage module, wherein the creation module is used for generating source code storage addresses of a plurality of libraries, the libraries comprise library name identifiers and version identifiers, and the source code storage addresses consist of first addresses corresponding to the library name identifiers and second addresses corresponding to the version identifiers;
the matching module is used for matching the source code storage addresses of one or more libraries to be updated in a first file from the source code storage addresses of the libraries, and the first file is used for storing the libraries with version numbers to be updated;
the summarizing module is used for acquiring source code files of one or more libraries to be updated in the first file based on the source code storage address to form a source code file set;
the compiling module is used for compiling the source code file set to obtain a binary file set;
the matching module is used for establishing the corresponding relation between each binary file in the binary file set and one or more libraries to be updated in the first file;
and the packing module is used for packing the binary files and the source code files of each library to be updated based on the corresponding relation to obtain a static library.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor implements the steps of the method of generating a search free static library according to any of claims 1-8.
CN202310752171.9A 2023-06-25 2023-06-25 Method, device and storage medium for generating search-free static library Pending CN116820549A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310752171.9A CN116820549A (en) 2023-06-25 2023-06-25 Method, device and storage medium for generating search-free static library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310752171.9A CN116820549A (en) 2023-06-25 2023-06-25 Method, device and storage medium for generating search-free static library

Publications (1)

Publication Number Publication Date
CN116820549A true CN116820549A (en) 2023-09-29

Family

ID=88128690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310752171.9A Pending CN116820549A (en) 2023-06-25 2023-06-25 Method, device and storage medium for generating search-free static library

Country Status (1)

Country Link
CN (1) CN116820549A (en)

Similar Documents

Publication Publication Date Title
US11934811B2 (en) Container image building using dependency container images
US5911074A (en) Process for manipulating data models used in software engineering
US9344833B2 (en) Data component in a mobile application framework
US6178546B1 (en) System and method of making software product deliverables
US5339435A (en) Heterogenous software configuration management apparatus
CN108595186B (en) Multi-version software management method based on complete function on Feiteng platform
US20030093420A1 (en) Method and system for retrieving sharable information using a hierarchically dependent directory structure
US8285676B2 (en) Containment agnostic, N-ary roots leveraged model synchronization
CN112256321A (en) Static library packaging method and device, computer equipment and storage medium
US11328021B2 (en) Automatic resource management for build systems
US11237945B2 (en) Configuration content integration
US20210182055A1 (en) Automatic source code refactoring
US9411618B2 (en) Metadata-based class loading using a content repository
CN108694049B (en) Method and equipment for updating software
CN113704269B (en) Data processing method, system, storage medium and electronic equipment
CN113515303B (en) Project transformation method, device and equipment
CN116820549A (en) Method, device and storage medium for generating search-free static library
JP4754021B1 (en) Database conversion system
CN114816247A (en) Logic data acquisition method and device
US8190587B1 (en) In-place image promotion
US20100251212A1 (en) Version Type Traversal
CN116991427B (en) Application compiling method and device, computing equipment and storage medium
CN115858012B (en) Program variable configuration method, device, electronic equipment and storage medium
CN110019034A (en) Formfile loading method and device
US8453108B1 (en) Static, configurable kernel interface

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