[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112395253A - Index file generation method, terminal device, electronic device and medium - Google Patents

Index file generation method, terminal device, electronic device and medium Download PDF

Info

Publication number
CN112395253A
CN112395253A CN202011289784.6A CN202011289784A CN112395253A CN 112395253 A CN112395253 A CN 112395253A CN 202011289784 A CN202011289784 A CN 202011289784A CN 112395253 A CN112395253 A CN 112395253A
Authority
CN
China
Prior art keywords
target
index file
application program
target application
directory
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.)
Granted
Application number
CN202011289784.6A
Other languages
Chinese (zh)
Other versions
CN112395253B (en
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202011289784.6A priority Critical patent/CN112395253B/en
Publication of CN112395253A publication Critical patent/CN112395253A/en
Priority to PCT/CN2021/126885 priority patent/WO2022105563A1/en
Application granted granted Critical
Publication of CN112395253B publication Critical patent/CN112395253B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure provides an index file generation method, terminal equipment, electronic equipment and a medium. The method is executed by a terminal device and comprises the following steps: acquiring a first index file of a target application program and compiling process data, wherein the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compiling process data is data which is generated in the compiling process and is related to the first index file; determining a target replacement parameter by using the compiling process data; determining a parameter value of a target replacement parameter corresponding to a target application program in terminal equipment; and replacing the parameter value of the target replacement parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment. The embodiment of the disclosure realizes the rapid generation of the index file, reduces the time consumption, and improves the development efficiency of the application program.

Description

Index file generation method, terminal device, electronic device and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an index file generation method, a terminal device, an electronic device, and a medium.
Background
In the development process of an application program, functions such as jumping, highlighting, reconstructing, searching, static checking and the like are frequently used when codes are edited or read, and the functions are completed by using an index file of the application program, wherein the index file is mainly used for recording the relationship between data and a storage path thereof.
In general, a storage path of data in one electronic device is different from a storage path of the data in another electronic device, so that an index file generated by one electronic device cannot be used in another electronic device. Therefore, for each electronic device that needs to compile the source code of the application program, the electronic device needs to generate an index file before or during compiling the source code of the application program. If the electronic device generates the index file before compiling the source code of the application program, not only a large amount of time resources are consumed, but also a large amount of system resources are occupied, so that the electronic device is difficult to execute other operations for a long time; if the electronic device generates the index file in the process of compiling the source code of the application program, a large amount of time resources are consumed, the compiling time is greatly prolonged, and the development process of the application program is influenced.
Disclosure of Invention
The disclosure provides an index file generation method, a terminal device, an electronic device and a medium, which can quickly generate an index file.
In a first aspect, a method for generating an index file is provided, where the method is performed by a terminal device, and includes:
acquiring a first index file of a target application program and compiling process data, wherein the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compiling process data is data which is generated in the compiling process and is related to the first index file;
determining a target replacement parameter by using the compiling process data;
determining a parameter value of a target replacement parameter corresponding to a target application program in terminal equipment;
and replacing the parameter value of the target replacement parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment.
In a second aspect, a terminal device is provided, which includes:
the system comprises an acquisition module, a compiling process module and a compiling module, wherein the acquisition module is used for acquiring a first index file and compiling process data of a target application program, the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compiling process data is data which is generated in the compiling process and is related to the first index file;
a first determination module for determining a target replacement parameter using the compilation process data;
the second determination module is used for determining the parameter value of the target replacement parameter corresponding to the target application program in the terminal equipment;
and the replacing module is used for replacing the parameter value of the target replacing parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment.
In a third aspect, an electronic device is provided, which includes:
one or more processors;
a memory;
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: and executing the operation corresponding to the index file generation method shown in the first aspect.
In a fourth aspect, there is provided a computer-readable medium on which a computer program is stored, which when executed by a processor, implements the index file generation method shown in the first aspect.
The technical scheme provided by the disclosure has the following beneficial effects:
the invention provides an index file generation method, a terminal device, an electronic device and a medium, compared with the prior art, the index file generation method comprises the steps of obtaining a first index file and compiling process data of a target application program, wherein the first index file is generated in the process of compiling a source code of the target application program, recording a directory path of each target file in the first index file, the compiling process data is data which are generated in the compiling process and are related to the first index file, then determining a target replacement parameter by using the compiling process data, determining a parameter value of the target replacement parameter corresponding to the target application program in the terminal device, finally replacing the parameter value of the target replacement parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal device, and realizing replacement of the parameter value of the target replacement parameter in the original index file, therefore, the index file corresponding to the target application program in the terminal equipment is obtained quickly, time consumption is reduced, and development efficiency of the application program is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flowchart of an index file generation method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing the devices, modules or units, and are not used for limiting the devices, modules or units to be different devices, modules or units, and also for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
The embodiment of the present disclosure provides an index file generation method, which may be executed by a terminal device, where the terminal device may be a mobile phone, a tablet computer, a desktop computer, a notebook computer, or the like, as shown in fig. 1, the method includes steps S101 to S104.
Step S101, a first index file and compiling process data of a target application program are obtained.
The first index file is generated when a source code of a target application program is compiled, the directory path of each target file is recorded in the first index file, and the compiling process data is data which is generated in the compiling process and is related to the first index file.
Specifically, the first index file is generated by a server of a target application program in the process of compiling the source code of the program.
In the embodiment of the present disclosure, a server of a target Application (App) is a server that provides a service of the target App. The server of the target APP may compile the source code of the target APP, and in the compiling process, an index file (i.e. the first index file) of the target APP and data related to the index file (including but not limited to the compiling process data) may be generated, where the related data may include but not limited to data such as a storage location or a storage path of a file related to the index file.
Step S102, the target replacement parameter is determined by using the compiling process data.
Step S103, determining the parameter value of the target replacement parameter corresponding to the target application program in the terminal equipment.
And step S104, replacing the parameter value of the target replacement parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment.
In the embodiment of the present disclosure, an index file (including the above-mentioned first index file and the second index file) is also called a unit file, and a unit file structure of an index usually includes three parts, which are a directory path of the index file, a file name of a target file, and a check code corresponding to the target file, where the check code may be a Hash (Hash) check code.
For example, a unit file structure of an index may be: the method comprises the steps of obtaining a target file, obtaining a data file, obtaining/xxx/Index/DataStore/v 5/units/TTBridgePlugins-dummy.o-3GROH29GTL804, wherein the/xxx/Index/DataStore/v 5/units is a directory path of the Index file, the TTBridgePlugins-dummy.o is the file name of the target file, and the 3GROH29GTL804 is a check code corresponding to the target file.
Wherein, the target file is the OBJ file. The file name and the check code of the target file are obtained by calculating the related information of the target file, and the related information of the target file can be a directory path of the target file.
For example, ttbridgePlugins-dummy.o-3GROH29GTL804 is obtained by calculating the relevant information of the target file, which can be: "/Users/yy/Library/Developer/Xcode/DerivedData/arc-eyvyloqhkpnlkb zndcpojjnbr/Build/intermedia. nonindex/arc. Build/Video-instant or/Video-in house. Build/Objects-normal/x86_64/BDViewController. o", the relevant information of the object file is the directory path of the object file.
In the embodiment of the present disclosure, an index database reading and writing tool may be installed in the terminal device, and the relevant steps in steps S101 to S104 may be executed by using the index database reading and writing tool. The index database reading and writing tool can be obtained based on a Low Level Virtual Machine (LLVM), and can be used for modifying parameter values of target replacement parameters in the index file.
The disclosed embodiment provides an index file generation method, compared with the prior art, the disclosed embodiment realizes the replacement of the parameter value of the target replacement parameter in the original index file by acquiring a first index file and compilation process data of the target application program, wherein the first index file is generated when compiling a source code of the target application program, the first index file records the directory path of each target file, the compilation process data is data related to the first index file generated in the compilation process, then, the compilation process data is used for determining the target replacement parameter, the parameter value of the target replacement parameter corresponding to the target application program in the terminal equipment is determined, finally, the determined parameter value is used for replacing the parameter value of the target replacement parameter in the first index file, a second index file corresponding to the target application program in the terminal equipment is obtained, therefore, the index file corresponding to the target application program in the terminal equipment is obtained quickly, time consumption is reduced, and development efficiency of the application program is improved.
In another possible implementation manner of the embodiment of the disclosure, for any one of the first index file and the second index file, the index file includes at least one of the following information a1-a 4.
The index file may be a first index file or a second index file, that is, the file content styles of the first index file and the second index file are the same, and the difference between the first index file and the second index file is that the parameter values of the target replacement parameter in the two files are different.
Information a1, work directory information, i.e., work dir information, which includes a directory path of a parent directory of the workspace of the target application.
For example, the work _ dir information in the index file may include: the target application may be a target application, such as a target application, a Workspace, a task.
In the embodiment of the disclosure, the work _ dir information in the first index file is included in a server of a target application program, and the directory path of a parent directory of a working space of the target application program; the work _ dir information in the second index file is included in a directory path of a parent directory of a workspace of the target application in the terminal device.
Information a2, main path information, i.e., mainPath information, which includes a directory path of source code of the target application.
For example, the mainPath information in the index file may include: Users/yy/Desktop/Workspace/TTvideo/arc/Shortvideo/Detail/Classes/VideoDetail Page/Actions/ADVideoDetailActionManager.m, wherein the path comprises a directory path of source code for a target application.
In the embodiment of the disclosure, the mainPath information in the first index file is included in the server of the target application program, and the directory path of the source code of the target application program; the mainPath information in the second index file includes a directory path of the source code of the target application program in the terminal device.
Information a3, out directory information, i.e., out _ dir information, which includes directory paths of respective object files generated during compilation of source code of the object application.
For example, the out _ dir information of the index file may include: the file system comprises a plurality of files, wherein each file comprises a plurality of files, each file comprises a source code of a target application program, each file comprises a directory path of each target file generated in the process of compiling the source code of the target application program, and each file comprises a file name.
In the embodiment of the present disclosure, the out _ dir information in the first index file is included in a server of a target application program, and directory paths of each target file are generated in a process of compiling a source code of the target application program; the out _ dir information in the second index file includes directory paths of the respective target files generated in the process of compiling the source code of the target application program in the terminal device.
Information a4, depending on directory information, dep _ dir information, which includes the directory path of each file that the source code of the target application depends on.
For example, dep _ dir information of the index file may include: the paths include the directory path of each file on which the source code of the target application depends,/Users/yyy/Desktop/Workspace/TTvideo/arrow/Model/DataModel/arrow + Biz.h | Aricle + Biz.h-8U985XT788 VJ.
In another possible implementation manner of the embodiment of the present disclosure, in step S101, acquiring the first index file and the compiling process data of the target application program may specifically include: the method comprises the steps of obtaining a first index file and compiling process data of a target application program from a cloud server.
The cloud server is used for storing a first index file and compiling process data, and the server of the target application program uploads the generated first index file and data related to the first index file to the cloud server when compiling a source code of the target application program each time to generate the first index file and the data related to the first index file.
In this embodiment of the disclosure, after the server of the target application compiles the source code of the target application each time, the server of the target application may obtain the first index file generated in the process of compiling the source code of the target application and the data related to the first index file generated in the process of compiling the source code of the target application, and upload the generated first index file and the data related to the first index file to the cloud server.
After the generated first index file and the data related to the first index file are uploaded to the cloud server each time, the tag information may be generated by using a Commit number (Commit ID) of the target application program, and the first index file uploaded this time and the data related to the first index file may be tagged by using the tag information.
It should be noted that, when the tag information is generated by using the commit number, the commit number may be used as the tag information, and the tag information may also be generated by using the commit number and other information, where the other information may include a Uniform Resource Locator (URL) of a distributed version control system (Git), and/or identification information (such as a name) of the target application program.
In this embodiment of the disclosure, when the terminal device detects that the target application program is updated, the first index file corresponding to the target mark information and data related to the first index file may be acquired from the cloud server according to the updated commit number of the target application program, the first index file corresponding to the target mark information is used as the first index file, and the data related to the first index file corresponding to the target mark information is used as the compiling process data. Wherein, the target mark information comprises the updated submission number.
In another possible implementation manner of the embodiment of the present disclosure, the compilation process data includes workspace information and storage space information of cache data generated in the compilation process.
In the embodiment of the disclosure, the workspace information is workspace information, and the storage space information of the cache data generated in the compiling process is revieddata information. It should be noted that, in general, a workplace of the project needs to be set in a project starting stage, where a workplace file includes at least one file and/or at least one folder, and the retrieveddata file mainly stores cache data.
It is understood that the compilation process data includes, but is not limited to, the works space information and the DerviedData information, and is not limited thereto.
In step S102, determining the target replacement parameter by using the compiling process data may specifically include step S1021 and step S1022.
Step S1021, the parent directory of the working space of the target application program is determined according to the working space information and is used as a target replacement parameter. I.e., the parent directory of the workspace of the target application as the target replacement parameter.
In the embodiment of the disclosure, the working space of the target application program and the parent directory of the working space can be determined according to the workspace information. Wherein the working space of the target application program is xcworks space.
For example, the directory path for a workspace may be: in the path, the Workspace is Aricle.
It will be appreciated that the parameter value for the target replacement parameter in the index file comprises a directory path of the parent directory of the workspace, where the directory path of the parent directory of the workspace is also referred to as workdir.
For example, the parent directory of the workspace is Article, and the directory path of Article is: Users/yyy/Desktop/Workspace/TTvideo/Article. That is, workdir is: Users/yyy/Desktop/Workspace/TTvideo/Article.
It should be noted that the word _ dir information in the information a1 includes a directory path of a parent directory of the Workspace, for example,/Users/yy/Desktop/Workspace/TTVideo/Article in the word _ dir information, which is a directory path of a parent directory of the Workspace, that is, a directory path of Article.
It should be noted that the workspace information may include an xcworkpace and a directory path thereof, a parent directory and a directory path of the parent directory of the xcworkpace, and a child directory and a directory path of the child directory of the xcworkpace, such as workspace settings.
Step S1022, determining a root directory of the target file corresponding to the target application program according to the storage space information, as a target replacement parameter. Namely, the root directory of the target file corresponding to the target application program is used as the target replacement parameter.
In the embodiment of the disclosure, the ROOT directory of the target file may be determined according to the deriveddata information, where the ROOT directory of the target file is the OBJ _ ROOT.
It is understood that the parameter value of the target replacement parameter in the index file (including the first index file and the second index file referred to above) includes a directory path of OBJ _ ROOT.
For example, the directory path for OBJ _ ROOT may be: (iii) Users/yy/Library/Developer/Xcode/DerivedData/Article-eyvyloqhkpnlkbz ndcpojajjnbr/Build/intermedia. nonindex.
The retrieveddata information may include the retrieveddata, and OBJ _ ROOT in the retrieveddata, and the like, and is not limited herein.
In another possible implementation manner of the embodiment of the present disclosure, if the target replacement parameter includes a parent directory of a workspace of the target application; then, in step S103, determining a parameter value of a target replacement parameter corresponding to the target application in the terminal device may specifically include: determining a working space of a target application program in the terminal equipment; and determining a directory path of the parent directory of the working space, and taking the determined directory path of the parent directory of the working space as a parameter value of the parent directory of the working space corresponding to the target application program in the terminal equipment.
If the target replacement parameter comprises a root directory of the target file; then, in step S103, determining a parameter value of a target replacement parameter corresponding to the target application in the terminal device may specifically include: determining a working space of a target application program in the terminal equipment; and determining the directory path of the root directory of the target file corresponding to the target application program in the terminal equipment by using the directory path of the working space, and taking the determined directory path of the root directory of the target file as the parameter value of the root directory of the target file.
The following will describe in detail for these two cases, respectively. Specifically, the method comprises the following steps:
in step S103, determining a parameter value of a target replacement parameter corresponding to the target application in the terminal device may specifically include steps S1031 to S1032.
Step S1031, determining the workspace of the target application in the terminal device.
Step S1032 determines a parameter value of the target replacement parameter corresponding to the target application in the terminal device, using the workspace.
In the embodiment of the disclosure, the working space xcworks space of the target application program in the terminal device may be determined, and the parameter value of the target replacement parameter corresponding to the target application program in the terminal device may be determined by using the xcworks space of the target application program in the terminal device.
Wherein, if the target replacement parameter includes the parent directory of the workspace of the target application. Then, in step S1032, determining a parameter value of the target replacement parameter corresponding to the target application in the terminal device by using the workspace, which may specifically include:
and determining a directory path of the parent directory of the working space, and taking the determined directory path of the parent directory of the working space as a parameter value of the parent directory of the working space corresponding to the target application program in the terminal equipment.
In the embodiment of the disclosure, a directory path of a parent directory of an xcworks space may be determined by using the xcworks space of a target application program in a terminal device, and the determined directory path of the parent directory of the xcworks space is used as a parameter value of the parent directory of the xcworks space corresponding to the target application program in the terminal device.
That is, the target replacement parameter includes a parent directory of the xcworks space of the target application program, and correspondingly, the parameter value of the target replacement parameter includes a directory path of the parent directory of the xcworks space of the target application program.
When step S104 is executed, a directory path of a parent directory of an xcworks space in the first index file may be replaced, and a directory path of a parent directory of an xcworks space in the first index file is replaced by using a directory path of a parent directory of an xcworks space in the target application program in the terminal device, where the directory path of the parent directory of the xcworks space in the first index file is a directory path of a parent directory of an xcworks space in the target application program in the server of the target application program.
In general, the word _ dir information, the mainPath information, and the dep _ dir information in the first index file may include a directory path of a parent directory of an xcworkspace, and the directory path of the parent directory of the xcworkspace in the three pieces of information may be replaced.
Of course, according to the actual situation, at least one of the work _ dir information, the mainPath information, and the dep _ dir information may not include the directory path of the parent directory of the xcworks space, and/or other information in the first index file may also include the directory path of the parent directory of the xcworks space, which is not limited herein.
And if the target replacement parameter comprises the root directory of the target file. Then, in step S1032, determining a parameter value of the target replacement parameter corresponding to the target application in the terminal device by using the workspace, which may specifically include:
and determining the directory path of the root directory of the target file corresponding to the target application program in the terminal equipment by using the directory path of the working space, and taking the determined directory path of the root directory of the target file as the parameter value of the root directory of the target file.
In the embodiment of the present disclosure, the directory path of the xcworks space may be determined by using the workspace xcworks space of the target application program in the terminal device, for example, the directory path of the xcworks space may be: Users/yyy/Desktop/Workspace/TTvideo/arc.
The directory path of the temporary directory may be determined using the directory path of the xcworks space in the terminal device. The temporary directory is a directory of a target file generated when the terminal device compiles a source code of a target application program. For example, the directory path for the temporary directory may be: (Users/yy/Library/Developer/Xcode/DerivedData/Article-eyvyloqhkpnlkbz ndcpojajjnbr).
In the directory paths of the temporary directory in the terminal device, a directory path of a root directory of a target file corresponding to a target application program in the terminal device can be determined, and the determined directory path of the root directory of the target file is used as a parameter value of the root directory of the target file.
For example, the following path may be determined from the directory path of the temporary directory: the path is the directory path of the root directory of the determined target file.
It should be noted that the target replacement parameter includes a ROOT directory OBJ _ ROOT of the target file, and correspondingly, the parameter value of the target replacement parameter includes a directory path of the OBJ _ ROOT, that is, the directory path of the OBJ _ ROOT is the parameter value of the OBJ _ ROOT.
In step S104, the directory path of the OBJ _ ROOT in the first index file may be replaced by the directory path of the OBJ _ ROOT of the target application in the server of the target application, and the directory path of the OBJ _ ROOT in the first index file is replaced by the directory path of the OBJ _ ROOT of the target application in the terminal device.
In general, the directory path of the OBJ _ ROOT included in the out _ dir information and the dep _ dir information in the first index file may be replaced with the directory path of the OBJ _ ROOT in the two information.
Of course, according to the actual situation, at least one of the out _ dir information and the dep _ dir information may not include the directory path of the OBJ _ ROOT, and/or other information in the first index file may also include the directory path of the OBJ _ ROOT, which is not limited herein.
The above method for generating an index file is specifically set forth from the perspective of the method steps, and the following introduces a terminal device from the perspective of a virtual module, specifically as follows:
the embodiment of the present disclosure provides a terminal device, as shown in fig. 2, the terminal device 20 may include: an acquisition module 201, a first determination module 202, a second determination module 203, and a replacement module 204, wherein,
the obtaining module 201 is configured to obtain a first index file of a target application program and compilation process data, where the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compilation process data is data related to the first index file generated in a compilation process.
A first determining module 202 for determining a target replacement parameter using the compilation process data.
The second determining module 203 is configured to determine a parameter value of a target replacement parameter corresponding to a target application in the terminal device.
And a replacing module 204, configured to replace a parameter value of the target replacement parameter in the first index file with the determined parameter value, to obtain a second index file corresponding to the target application program in the terminal device.
In another possible implementation manner of the embodiment of the present disclosure, when the obtaining module 201 obtains the first index file and the compiling process data of the target application, it is specifically configured to:
acquiring a first index file and compiling process data of a target application program from a cloud server;
the cloud server is used for storing the first index file and the compiling process data, and the server of the target application program uploads the generated first index file and the data related to the first index file to the cloud server when compiling the source code of the target application program each time to generate the first index file and the data related to the first index file.
In another possible implementation manner of the embodiment of the present disclosure, the compilation process data includes workspace information and storage space information of cache data generated in the compilation process;
when determining the target replacement parameter by using the compiling process data, the first determining module 202 is specifically configured to:
determining a parent directory of a working space of the target application program according to the working space information, and using the parent directory as a target replacement parameter;
and determining a root directory of a target file corresponding to the target application program according to the storage space information, and using the root directory as a target replacement parameter.
In another possible implementation manner of the embodiment of the present disclosure, if the target replacement parameter includes a parent directory of a workspace of the target application;
when determining the parameter value of the target replacement parameter corresponding to the target application program in the terminal device, the second determining module 203 is specifically configured to:
determining a working space of a target application program in the terminal equipment;
and determining a directory path of the parent directory of the working space, and taking the determined directory path of the parent directory of the working space as a parameter value of the parent directory of the working space corresponding to the target application program in the terminal equipment.
In another possible implementation manner of the embodiment of the present disclosure, if the target replacement parameter includes a root directory of the target file;
when determining the parameter value of the target replacement parameter corresponding to the target application program in the terminal device, the second determining module 203 is specifically configured to:
determining a working space of a target application program in the terminal equipment;
and determining the directory path of the root directory of the target file corresponding to the target application program in the terminal equipment by using the directory path of the working space, and taking the determined directory path of the root directory of the target file as the parameter value of the root directory of the target file.
In another possible implementation manner of the embodiment of the present disclosure, for any one of the first index file and the second index file, the index file includes at least one of the following:
the work directory work _ dir information comprises a directory path of a parent directory of a working space of the target application program;
main path mainPath information, the mainPath information including a directory path of a source code of a target application program;
the external directory out _ dir information comprises directory paths of all target files generated in the process of compiling the source code of the target application program;
the directory dep _ dir information is relied upon, and includes directory paths of the respective files relied upon by the source code of the target application.
In this embodiment of the disclosure, the first determining module 202 and the second determining module 203 may be the same determining module or different determining modules, which is not limited herein.
The terminal device of this embodiment may execute the index file generation method provided in this embodiment of the method of the present disclosure, and the implementation principles thereof are similar, and are not described herein again.
The disclosed embodiment provides a terminal device, and compared with the prior art, the disclosed embodiment realizes the replacement of the parameter value of the target replacement parameter in the original index file by obtaining a first index file of the target application program and compilation process data, wherein the first index file is generated in the compilation process of a source code of the target application program, the first index file records the directory path of each target file, the compilation process data is data related to the first index file generated in the compilation process, then, the compilation process data is used for determining the target replacement parameter, the parameter value of the target replacement parameter corresponding to the target application program in the terminal device is determined, finally, the determined parameter value is used for replacing the parameter value of the target replacement parameter in the first index file, a second index file corresponding to the target application program in the terminal device is obtained, therefore, the index file corresponding to the target application program in the terminal equipment is obtained quickly, time consumption is reduced, and development efficiency of the application program is improved.
The terminal device of the present disclosure is described above from the perspective of a virtual module, and the electronic device of the present disclosure is described below from the perspective of a physical device.
Referring now to fig. 3, a schematic diagram of an electronic device 300 (e.g., a terminal device in the above-described embodiments) suitable for implementing embodiments of the present disclosure is shown. The electronic device includes:
one or more processors;
a memory;
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: the index file generation method shown according to the method embodiment is performed.
The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as a processing device 301 described below, and the memory may include at least one of a Read Only Memory (ROM)302, a Random Access Memory (RAM)303, and a storage device 308, which are described below:
as shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a first index file and compilation process data of a target application program, wherein the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compilation process data is data which is generated in the compilation process and is related to the first index file; determining a target replacement parameter using the compilation process data; determining a parameter value of the target replacement parameter corresponding to the target application program in the terminal equipment; and replacing the parameter value of the target replacement parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a module or unit does not in some cases constitute a limitation of the unit itself, for example, the first determining module may also be described as a "module for determining target replacement parameters using compiled process data".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The disclosed embodiment provides an electronic device, and the electronic device in the disclosed embodiment includes: a memory and a processor; at least one program stored in the memory for execution by the processor, which when executed by the processor, implements: the method comprises the steps of obtaining a first index file of a target application program and compiling process data, wherein the first index file is generated when a source code of the target application program is compiled, directory paths of all the target files are recorded in the first index file, the compiling process data are data which are generated in the compiling process and are related to the first index file, then, determining target replacement parameters by utilizing the compiling process data, determining parameter values of the target replacement parameters corresponding to the target application program in terminal equipment, and finally, replacing the parameter values of the target replacement parameters in the first index file by utilizing the determined parameter values to obtain a second index file corresponding to the target application program in the terminal equipment, so that the parameter values of the target replacement parameters in the original index file are replaced, and the index file corresponding to the target application program in the terminal equipment is quickly obtained, time consumption is reduced, and development efficiency of the application program is improved.
The electronic device of the present disclosure is described above from the perspective of a physical apparatus, and the computer-readable medium of the present disclosure is described below from the perspective of a medium.
The embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, which, when running on a computer, enables the computer to execute the corresponding content in the foregoing method embodiments. Compared with the prior art, the method comprises the steps of obtaining a first index file of a target application program and compiling process data, wherein the first index file is generated when a source code of the target application program is compiled, the directory path of each target file is recorded in the first index file, the compiling process data is data which is generated in the compiling process and is related to the first index file, then, determining a target replacement parameter by using the compiling process data, determining a parameter value of the target replacement parameter corresponding to the target application program in terminal equipment, and finally, replacing the parameter value of the target replacement parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment, so that the parameter value of the target replacement parameter in the original index file is replaced, and the index file corresponding to the target application program in the terminal equipment is quickly obtained, time consumption is reduced, and development efficiency of the application program is improved.
According to one or more embodiments of the present disclosure, there is provided an index file generation method, performed by a terminal device, including:
acquiring a first index file and compilation process data of a target application program, wherein the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compilation process data is data which is generated in the compilation process and is related to the first index file;
determining a target replacement parameter using the compilation process data;
determining a parameter value of the target replacement parameter corresponding to the target application program in the terminal equipment;
and replacing the parameter value of the target replacement parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment.
According to one or more embodiments of the present disclosure, the obtaining a first index file and compilation process data of a target application includes:
acquiring a first index file and compiling process data of the target application program from a cloud server;
the cloud server is used for storing the first index file and the compiling process data, and the server of the target application program uploads the generated first index file and the data related to the first index file to the cloud server when compiling a source code of the target application program to generate the first index file and the data related to the first index file each time.
According to one or more embodiments of the present disclosure, the compilation process data includes workspace information and storage space information of cache data generated in the compilation process;
the determining a target replacement parameter using the compilation process data includes:
determining a parent directory of a working space of the target application program according to the working space information, and using the parent directory as a target replacement parameter;
and determining a root directory of a target file corresponding to the target application program according to the storage space information, and using the root directory as the target replacement parameter.
According to one or more embodiments of the present disclosure, if the target replacement parameter includes a parent directory of a workspace of the target application;
the determining a parameter value of the target replacement parameter corresponding to the target application program in the terminal device includes:
determining a workspace of the target application in the terminal device;
and determining a directory path of the parent directory of the working space, and taking the determined directory path of the parent directory of the working space as a parameter value of the parent directory of the working space corresponding to the target application program in the terminal equipment.
According to one or more embodiments of the present disclosure, if the target replacement parameter includes a root directory of the target file;
the determining a parameter value of the target replacement parameter corresponding to the target application program in the terminal device includes:
determining a workspace of the target application in the terminal device;
and determining a directory path of a root directory of the target file corresponding to the target application program in the terminal equipment by using the directory path of the working space, and taking the determined directory path of the root directory of the target file as a parameter value of the root directory of the target file.
According to one or more embodiments of the present disclosure, for any one of the first index file and the second index file, at least one of the following is included in the index file:
work directory work _ dir information, wherein the work _ dir information comprises directory paths of parent directories of the working space of the target application program;
main path mainPath information including a directory path of a source code of the target application program;
the external directory out _ dir information comprises directory paths of all target files generated in the process of compiling the source code of the target application program;
relying on directory dep _ dir information, the dep _ dir information comprising directory paths for respective files on which source code of the target application depends.
According to one or more embodiments of the present disclosure, there is provided a terminal device including:
the system comprises an acquisition module, a compiling module and a processing module, wherein the acquisition module is used for acquiring a first index file and compiling process data of a target application program, the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compiling process data is data which is generated in the compiling process and is related to the first index file;
a first determination module for determining a target replacement parameter using the compilation process data;
a second determining module, configured to determine a parameter value of the target replacement parameter corresponding to the target application in the terminal device;
and the replacing module is used for replacing the parameter value of the target replacing parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment.
According to one or more embodiments of the present disclosure, when acquiring the first index file of the target application and the compilation process data, the acquiring module is specifically configured to:
acquiring a first index file and compiling process data of the target application program from a cloud server;
the cloud server is used for storing the first index file and the compiling process data, and the server of the target application program uploads the generated first index file and the data related to the first index file to the cloud server when compiling a source code of the target application program to generate the first index file and the data related to the first index file each time.
According to one or more embodiments of the present disclosure, the compilation process data includes workspace information and storage space information of cache data generated in the compilation process;
when determining the target replacement parameter by using the compilation process data, the first determining module is specifically configured to:
determining a parent directory of a working space of the target application program according to the working space information, and using the parent directory as a target replacement parameter;
and determining a root directory of a target file corresponding to the target application program according to the storage space information, and using the root directory as the target replacement parameter.
According to one or more embodiments of the present disclosure, if the target replacement parameter includes a parent directory of a workspace of the target application;
the second determining module, when determining the parameter value of the target replacement parameter corresponding to the target application program in the terminal device, is specifically configured to:
determining a workspace of the target application in the terminal device;
and determining a directory path of the parent directory of the working space, and taking the determined directory path of the parent directory of the working space as a parameter value of the parent directory of the working space corresponding to the target application program in the terminal equipment.
According to one or more embodiments of the present disclosure, if the target replacement parameter includes a root directory of the target file;
the second determining module, when determining the parameter value of the target replacement parameter corresponding to the target application program in the terminal device, is specifically configured to:
determining a workspace of the target application in the terminal device;
and determining a directory path of a root directory of the target file corresponding to the target application program in the terminal equipment by using the directory path of the working space, and taking the determined directory path of the root directory of the target file as a parameter value of the root directory of the target file.
According to one or more embodiments of the present disclosure, for any one of the first index file and the second index file, at least one of the following is included in the index file:
work directory work _ dir information, wherein the work _ dir information comprises directory paths of parent directories of the working space of the target application program;
main path mainPath information including a directory path of a source code of the target application program;
the external directory out _ dir information comprises directory paths of all target files generated in the process of compiling the source code of the target application program;
relying on directory dep _ dir information, the dep _ dir information comprising directory paths for respective files on which source code of the target application depends.
According to one or more embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: the index file generation method shown according to the method embodiment is performed.
According to one or more embodiments of the present disclosure, there is provided a computer-readable medium on which a computer program is stored, the program, when executed by a processor, implementing an index file generation method as shown in method embodiments.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. An index file generation method, comprising:
acquiring a first index file and compilation process data of a target application program, wherein the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compilation process data is data which is generated in the compilation process and is related to the first index file;
determining a target replacement parameter using the compilation process data;
determining a parameter value of the target replacement parameter corresponding to the target application program in the terminal equipment;
and replacing the parameter value of the target replacement parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment.
2. The method of claim 1, wherein obtaining the first index file and the compilation process data of the target application comprises:
acquiring a first index file and compiling process data of the target application program from a cloud server;
the cloud server is used for storing the first index file and the compiling process data, and the server of the target application program uploads the generated first index file and the data related to the first index file to the cloud server when compiling a source code of the target application program to generate the first index file and the data related to the first index file each time.
3. The method of claim 1, wherein the compilation process data includes workspace information and storage space information of cached data generated during compilation;
the determining a target replacement parameter using the compilation process data includes:
determining a parent directory of a working space of the target application program according to the working space information, and using the parent directory as a target replacement parameter;
and determining a root directory of a target file corresponding to the target application program according to the storage space information, and using the root directory as the target replacement parameter.
4. The method of claim 3, wherein if the target replacement parameter comprises a parent directory of a workspace of the target application;
the determining a parameter value of the target replacement parameter corresponding to the target application program in the terminal device includes:
determining a workspace of the target application in the terminal device;
and determining a directory path of the parent directory of the working space, and taking the determined directory path of the parent directory of the working space as a parameter value of the parent directory of the working space corresponding to the target application program in the terminal equipment.
5. The method of claim 3, wherein if the target replacement parameter comprises a root directory of the target file;
the determining a parameter value of the target replacement parameter corresponding to the target application program in the terminal device includes:
determining a workspace of the target application in the terminal device;
and determining a directory path of a root directory of the target file corresponding to the target application program in the terminal equipment by using the directory path of the working space, and taking the determined directory path of the root directory of the target file as a parameter value of the root directory of the target file.
6. The method according to any one of claims 1-5, wherein for any one of the first index file and the second index file, at least one of the following is included in the index file:
work directory work _ dir information, wherein the work _ dir information comprises directory paths of parent directories of the working space of the target application program;
main path mainPath information including a directory path of a source code of the target application program;
the external directory out _ dir information comprises directory paths of all target files generated in the process of compiling the source code of the target application program;
relying on directory dep _ dir information, the dep _ dir information comprising directory paths for respective files on which source code of the target application depends.
7. A terminal device, comprising:
the system comprises an acquisition module, a compiling module and a processing module, wherein the acquisition module is used for acquiring a first index file and compiling process data of a target application program, the first index file is generated when a source code of the target application program is compiled, a directory path of each target file is recorded in the first index file, and the compiling process data is data which is generated in the compiling process and is related to the first index file;
a first determination module for determining a target replacement parameter using the compilation process data;
a second determining module, configured to determine a parameter value of the target replacement parameter corresponding to the target application in the terminal device;
and the replacing module is used for replacing the parameter value of the target replacing parameter in the first index file by using the determined parameter value to obtain a second index file corresponding to the target application program in the terminal equipment.
8. The terminal device of claim 7, wherein the compilation process data comprises workspace information and storage space information of cache data generated during compilation;
the first determining module is specifically configured to:
determining a parent directory of a working space of the target application program according to the working space information, and using the parent directory as a target replacement parameter;
and determining a root directory of a target file corresponding to the target application program according to the storage space information, and using the root directory as the target replacement parameter.
9. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: the index file generation method according to any one of claims 1 to 6 is performed.
10. A computer-readable medium on which a computer program is stored, the program, when executed by a processor, implementing the index file generation method of any one of claims 1 to 6.
CN202011289784.6A 2020-11-17 2020-11-17 Index file generation method, terminal device, electronic device and medium Active CN112395253B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011289784.6A CN112395253B (en) 2020-11-17 2020-11-17 Index file generation method, terminal device, electronic device and medium
PCT/CN2021/126885 WO2022105563A1 (en) 2020-11-17 2021-10-28 Indexed file generation method, terminal device, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011289784.6A CN112395253B (en) 2020-11-17 2020-11-17 Index file generation method, terminal device, electronic device and medium

Publications (2)

Publication Number Publication Date
CN112395253A true CN112395253A (en) 2021-02-23
CN112395253B CN112395253B (en) 2024-03-12

Family

ID=74606372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011289784.6A Active CN112395253B (en) 2020-11-17 2020-11-17 Index file generation method, terminal device, electronic device and medium

Country Status (2)

Country Link
CN (1) CN112395253B (en)
WO (1) WO2022105563A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040222A (en) * 2021-12-24 2022-02-11 湖南快乐阳光互动娱乐传媒有限公司 Multimedia file tamper-proof playing method, processing method and device
CN114117530A (en) * 2021-11-29 2022-03-01 北京字节跳动网络技术有限公司 File leakage detection method and device
WO2022105563A1 (en) * 2020-11-17 2022-05-27 北京字节跳动网络技术有限公司 Indexed file generation method, terminal device, electronic device, and medium
CN116624361A (en) * 2023-04-11 2023-08-22 北京通嘉宏瑞科技有限公司 Vacuum pump working method, device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060288026A1 (en) * 2005-06-20 2006-12-21 Zayas Edward R System and method for maintaining mappings from data containers to their parent directories
CN102799679A (en) * 2012-07-24 2012-11-28 河海大学 Hadoop-based massive spatial data indexing updating system and method
CN107544785A (en) * 2017-06-28 2018-01-05 新华三技术有限公司 A kind of application program update method and device
CN110119381A (en) * 2019-05-17 2019-08-13 北京思维造物信息科技股份有限公司 A kind of index updating method, device, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395253B (en) * 2020-11-17 2024-03-12 抖音视界有限公司 Index file generation method, terminal device, electronic device and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060288026A1 (en) * 2005-06-20 2006-12-21 Zayas Edward R System and method for maintaining mappings from data containers to their parent directories
CN102799679A (en) * 2012-07-24 2012-11-28 河海大学 Hadoop-based massive spatial data indexing updating system and method
CN107544785A (en) * 2017-06-28 2018-01-05 新华三技术有限公司 A kind of application program update method and device
CN110119381A (en) * 2019-05-17 2019-08-13 北京思维造物信息科技股份有限公司 A kind of index updating method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BENNUCTECH: "动态修改android中的资源索引resId", pages 1, Retrieved from the Internet <URL:https://blog.csdn.net/chzphoenix/article/details/80581838> *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022105563A1 (en) * 2020-11-17 2022-05-27 北京字节跳动网络技术有限公司 Indexed file generation method, terminal device, electronic device, and medium
CN114117530A (en) * 2021-11-29 2022-03-01 北京字节跳动网络技术有限公司 File leakage detection method and device
CN114117530B (en) * 2021-11-29 2023-08-22 抖音视界有限公司 File leakage detection method and device
CN114040222A (en) * 2021-12-24 2022-02-11 湖南快乐阳光互动娱乐传媒有限公司 Multimedia file tamper-proof playing method, processing method and device
CN116624361A (en) * 2023-04-11 2023-08-22 北京通嘉宏瑞科技有限公司 Vacuum pump working method, device, computer equipment and storage medium
CN116624361B (en) * 2023-04-11 2024-03-22 北京通嘉宏瑞科技有限公司 Vacuum pump working method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112395253B (en) 2024-03-12
WO2022105563A1 (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN109634598B (en) Page display method, device, equipment and storage medium
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN111581563A (en) Page response method and device, storage medium and electronic equipment
CN110960855B (en) Communication protocol code updating method and device, electronic equipment and storage medium
CN109726217B (en) Database operation method, device, equipment and storage medium
CN104503780A (en) Method and device for providing application channel packet
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN112947912A (en) Method and device for generating code, electronic equipment and storage medium
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN112988583A (en) Method and device for testing syntax compatibility of database
CN111124541A (en) Configuration file generation method, device, equipment and medium
CN113391811A (en) Function compiling method and device, electronic equipment and computer readable storage medium
CN111625232B (en) Method and device for generating application program installation package, readable medium and electronic equipment
CN112035256A (en) Resource allocation method, device, electronic equipment and medium
CN111581930A (en) Online form data processing method and device, electronic equipment and readable medium
US8615744B2 (en) Methods and system for managing assets in programming code translation
CN115167822A (en) Branch code merging method, device, equipment and storage medium
CN115878101A (en) File acquisition method, device, equipment and storage medium
CN112905164A (en) Project code processing method and device
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN111414161A (en) Method, device, medium and electronic equipment for generating ID L file
CN112445820A (en) Data conversion method and device
CN110471667A (en) A kind of method, apparatus, medium and electronic equipment for auditing source program
CN112883009B (en) Method and device for processing data
CN115878091A (en) Data processing method, device, equipment and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant