CN116126334A - File generation method, device, electronic equipment and computer readable storage medium - Google Patents

File generation method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN116126334A
CN116126334A CN202211338878.7A CN202211338878A CN116126334A CN 116126334 A CN116126334 A CN 116126334A CN 202211338878 A CN202211338878 A CN 202211338878A CN 116126334 A CN116126334 A CN 116126334A
Authority
CN
China
Prior art keywords
program
file
script
target
configuration information
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
CN202211338878.7A
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.)
BOE Technology Group Co Ltd
Chongqing BOE Smart Technology Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Chongqing BOE Smart 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 BOE Technology Group Co Ltd, Chongqing BOE Smart Technology Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202211338878.7A priority Critical patent/CN116126334A/en
Publication of CN116126334A publication Critical patent/CN116126334A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a file generation method, a file generation device, electronic equipment and a computer readable storage medium, and relates to the technical field of computers. The method comprises the following steps: program configuration information and a program compiling file of the target application program are obtained, the program configuration information and the program compiling file are input into a preset script compiler, a target program script of the target application program is obtained, the target program script is executed, and an installation file of the target application program is generated. In the embodiment of the application, for each application program, when the installation file is generated, the program configuration information and the program compiling file are acquired, so that the program script can be generated through the script compiler, the program script does not need to be written for each application program, and the efficiency of generating the program script and the installation file is improved.

Description

File generation method, device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for generating a file, an electronic device, and a computer readable storage medium.
Background
An application program comprises a computer program for performing one or more specific tasks, which runs in a user mode, can interact with a user, has a visual user interface, etc. The installation files of the application program, namely the installation package, namely the application program installation package, are a set of files which can be decompressed by itself, and the installation files comprise all files installed by the application program.
In a file generation scenario, for example, when generating an installation file of an application, a compiled file is typically first generated; and then packaging the compiled file into an installation file in exe format. The generation mode has the advantages that the system management is convenient, for example, when the installation file is updated, the updating can be automatically performed through the system; however, the method has certain defects, such as that for different application programs, a compiling script for generating each application program needs to be written through a software tool Inno Step respectively so as to generate an installation file through the compiling script, however, the workload of writing the compiling script is large, the time consumption is long, and the efficiency of generating the installation file is low.
Disclosure of Invention
The object of the present application is to solve at least one of the above technical drawbacks, in particular the technical drawback of the high effort and time consumption of compiling a compiled file, resulting in a low efficiency of generating an installation file.
According to one aspect of the present application, there is provided a file generation method, including:
program configuration information of a target application program and a program compiling file are obtained; the program compiling file is generated based on a source program file of the target application program;
inputting the program configuration information and the program compiling file to a preset script compiler to obtain a target program script of the target application program; the script compiler executes a preset script, compiles the program configuration information and the program compiling file, and generates the target program script;
and executing the target program script and generating an installation file of the target application program.
Optionally, before the obtaining the program configuration information of the target application program and the program compiling file, the method further includes:
generating the preset script according to a preset compiling flow; the compiling process comprises the process of compiling the program configuration information and the program compiling file;
configuring the script compiler based on the preset script;
optionally, obtaining the program compiling file includes:
acquiring a source program file to be compiled of the target application program;
and compiling the source program file to generate the program compiling file.
Optionally, the inputting the program configuration information and the program compiling file to a pre-configured script compiler to obtain a target program script of the target application program includes:
executing the preset script and loading the program configuration information;
and generating an initialization statement in the target program script according to the program configuration information.
Optionally, the inputting the program configuration information and the program compiling file to a pre-configured script compiler to obtain a target program script of the target application program includes:
executing the preset script and determining the file type of the program compiling file;
and generating the target program script according to the file type.
Optionally, the generating the target program script according to the file type includes:
generating a file packaging statement corresponding to the file type according to the file type;
the object program script includes the file package statement.
Optionally, the method further comprises:
generating an operation statement; the program installation script includes the run statement.
Optionally, the method further comprises:
and when the program configuration updating of the target application program is detected, updating the target program script based on the updated configuration information.
Optionally, the program configuration information includes at least one of:
the name of the target application; an identification number of the target application; version information of the target application program; generating the name of an installation file of the target application program; an output directory of the installation file; a default installation directory of the installation file; whether to create a desktop shortcut.
According to another aspect of the present application, there is provided a document generating apparatus including:
the acquisition module is used for acquiring program configuration information of the target application program and a program compiling file; the program compiling file is generated based on a source program file of the target application program;
the generation module is used for inputting the program configuration information and the program compiling file into a preset script compiler to obtain a target program script of the target application program; the script compiler executes a preset script, compiles the program configuration information and the program compiling file, and generates the target program script;
and the execution module is used for executing the target program script and generating an installation file of the target application program.
According to another aspect of the present application, 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 applications configured to: a document generation method according to any one of the first aspects of the present application is performed.
For example, in a third aspect of the present application, there is provided a computing device comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus;
the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform operations corresponding to the file generating method according to the first aspect of the present application.
According to yet another aspect of the present application, there is provided a computer readable storage medium, which when executed by a processor, implements the file generation method of any of the first aspects of the present application.
For example, in a fourth aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the file generation method shown in the first aspect of the present application.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, which executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations of the first aspect described above.
The beneficial effects that this application provided technical scheme brought are:
in the embodiment of the application, the program configuration information and the program compiling file of the target application program are acquired, the program configuration information and the program compiling file are input to a preset script compiler, the target program script of the target application program is obtained, the target program script is executed, and the installation file of the target application program is generated. The script compiler can compile program configuration information and program compiling files of each application program through executing a preset script to generate a program script so as to generate an installation file of the application program through the program script. In the embodiment of the application, for each application program, when the program installation file is generated, the program configuration information and the program compiling file are acquired, so that the program script can be generated through the script compiler, the program script does not need to be written for each application program, the workload of generating the program script and installing the file is reduced, and the corresponding efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic system architecture diagram of a file generating method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a file generating method according to an embodiment of the present application;
FIG. 3 is a second flowchart of a document generation method according to an embodiment of the present disclosure;
FIG. 4 is a third flow chart of a document generating method according to the embodiment of the present application;
fig. 5 is a schematic structural diagram of a file generating apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device for file generation according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this application, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, all of which may be included in the present application. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates that at least one of the items defined by the term, e.g., "a and/or B" may be implemented as "a", or as "B", or as "a and B".
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, fig. 1 is a system architecture diagram of a file generating method according to an embodiment of the present application. The system may comprise a server 101 and a cluster of terminals, wherein the server 101 may be considered as a background server for file generation.
The terminal cluster may include: terminal 102, terminal 103, terminals 104, … …, wherein a client supporting file generation is installed in the terminal. There may be a communication connection between terminals, for example, between terminal 102 and terminal 103, and between terminal 103 and terminal 104.
Meanwhile, the server 101 may provide services for the terminal cluster through a communication connection function, and any terminal in the terminal cluster may have a communication connection with the server 101, for example, a communication connection exists between the terminal 102 and the server 101, and a communication connection exists between the terminal 103 and the server 101, where the above communication connection is not limited to a connection manner, and may be directly or indirectly connected through a wired communication manner, may also be directly or indirectly connected through a wireless communication manner, or may also be other manners.
The network of communication connections may be wide area networks or local area networks, or a combination of both. The application is not limited herein.
The file generation method in the embodiment of the present application may be executed on the server side or on the terminal side, and the execution subject is not limited in the embodiment of the present application. The method provided by the embodiments of the present application may be performed by a computer device, including but not limited to a terminal (also including the user terminal described above) or a server (also including the server 101 described above). The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
Of course, the method provided in the embodiment of the present application is not limited to the application scenario shown in fig. 1, but may be used in other possible application scenarios, and the embodiment of the present application is not limited. The functions that can be implemented by each device in the application scenario shown in fig. 1 will be described together in the following method embodiments, which are not described in detail herein.
The embodiment of the application provides a possible implementation manner, and the scheme can be executed by any electronic device, and optionally, any electronic device can be a server device with file generation capability or an apparatus or a chip integrated on the devices. As shown in fig. 2, which is one of the flow charts of a file generating method provided in the embodiment of the present application, the method includes the following steps:
step S201: program configuration information of a target application program and a program compiling file are obtained; the program compilation file is generated based on a source program file of the target application program.
Optionally, the embodiment of the application may be applied to the field of computer technology, and in particular may be applied to an application scenario for generating an installation file of an application program.
In particular, an application program comprises a computer program for performing one or more specific tasks, which runs in a user mode, can interact with a user, has a visual user interface, etc. For example, in a practical scenario, the applications may include office-type applications (office-type applications such as text, form, etc. file editing applications), social-type applications (social-type applications such as instant chat applications), game-type applications, and so forth.
In the embodiment of the present application, the target application may be any application; alternatively, the target application may be a router application.
In an actual scenario, when the installation file of the target application program needs to be generated, that is, when a request for generating the installation file of the target application program is received, the program configuration information and the program compiling file of the target application program may be obtained.
The program configuration information of the target application program comprises information used for representing the basic condition, related attribute, configuration condition and other aspects of the target application program; for example, the program configuration information may include a name, an identification number (Identity Document, ID), version information, and the like of the target application program, and also include information of a name of an installation file generating the target application program, an output directory of the installation file, a default installation directory of the installation file, whether to create a desktop shortcut, and the like. Alternatively, the program configuration information may be pre-written according to the target application program, and in addition, when the target application program is updated, the program configuration information may be updated accordingly.
The program compiling file is a file generated based on a source program file of the target application program; specifically, in an actual implementation scenario, for a target application program, a source program file to be compiled of the target application program may be obtained, and the source program file is compiled to generate the program compiling file. The source program files may include source code files, plug-ins, resource files, and the like.
Step S202: and inputting the program configuration information and the program compiling file into a preset script compiler to obtain a target program script of the target application program.
And the script compiler executes a preset script, compiles the program configuration information and the program compiling file, and generates the target program script.
Specifically, after the program configuration information and the program compiling file are acquired, the embodiment of the application may generate the target program script of the target application program by inputting the program configuration information and the program compiling file to a preset script compiler.
The target program script is script information for generating an installation file of the target application program.
The installation files, namely the installation package, namely the application program installation package, are a set of files which can be decompressed by themselves, and all files installed by the application program are included in the installation files. And running the installation file, namely executing the installation file of the application program, releasing all files of the application program to a hard disk, and completing the work of modifying a registry, modifying system settings, creating a shortcut and the like so as to install the application program. In an actual application scene, most of installation files in a windows system are in an exe format.
In the embodiment of the application, the script compiler is a compiler for generating a target program script; the script compiler executes a preset script, compiles the program configuration information and the program compiling file, and generates the target program script; that is, the preset script is script information for generating the target program script.
It may be appreciated that, in the embodiment of the present application, the script compiler may compile the program configuration information and the program compiling file of each application program by executing the preset script, so as to generate the program script of the application program. Alternatively, in the embodiment of the present application, the program script may be in an iss file format.
Step S203: and executing the target program script and generating an installation file of the target application program.
In the embodiment of the application, the target program script is script information for generating an installation file of the target application program; after the target program script is generated, an installation file of the target application program can be generated by executing the target program script; the installation file is used for installing the target application program.
Alternatively, in the embodiment of the present application, the target program script may be executed by using inlo Setup software to generate the installation file.
In the embodiment of the application, the program configuration information and the program compiling file of the target application program are acquired, the program configuration information and the program compiling file are input to a preset script compiler, the target program script of the target application program is obtained, the target program script is executed, and the installation file of the target application program is generated. The script compiler can compile program configuration information and program compiling files of each application program through executing a preset script to generate a program script so as to generate an installation file of the application program through the program script. In the embodiment of the application, for each application program, when the program installation file is generated, the program configuration information and the program compiling file are acquired, so that the program script can be generated through the script compiler, the program script does not need to be written for each application program, the workload of generating the program script and installing the file is reduced, and the corresponding efficiency is improved.
In one embodiment of the present application, before the obtaining the program configuration information of the target application program and the program compiling file, the method further includes:
generating the preset script according to a preset compiling flow; the compiling process comprises the process of compiling the program configuration information and the program compiling file;
configuring the script compiler based on the preset script;
specifically, the embodiment of the application further comprises the step of configuring the script compiler; wherein, the script compiler is configured with a preset script. The preset script may be written based on a flow of compiling the program configuration information and the program compiling file; as an example, the process of compiling the program configuration information and the program compiling file may include the steps of reading the program configuration information, generating a corresponding script statement from the program configuration information, traversing the program compiling file, generating a script statement corresponding to the program compiling file, generating an operation script statement, storing the script statement, and the like.
In one embodiment of the present application, obtaining the program compilation file includes:
acquiring a source program file to be compiled of the target application program;
and compiling the source program file to generate the program compiling file.
Alternatively, the source program files may include source code files, plug-ins, resource files, and the like. In this embodiment of the present application, the source program file may be compiled by executing flutter build windows, and the program compiling file generated by compiling may be stored under a build\windows\runner\release folder.
In an embodiment of the present application, the inputting the program configuration information and the program compiling file to a pre-configured script compiler to obtain a target program script of the target application program may include the following steps:
optionally, as shown in fig. 3, the preset script may be executed, and the program configuration information is loaded;
and generating an initialization statement in the target program script according to the program configuration information.
Specifically, the configuration information may include a name, an identification number (Identity Document, ID), version information, and the like of the target application program, and also include information of a name of an installation file of the target application program, an output directory of the installation file, a default installation directory of the installation file, whether to create a desktop shortcut, and the like.
After the program configuration information is loaded, according to the program configuration information, an initialization statement corresponding to the program configuration information can be generated, wherein the initialization statement is used for configuring an installation file, such as a name of the installation file, an output catalog of the installation file, a default installation catalog of the installation file, whether to create a desktop shortcut or not, and the like.
In addition, as shown in connection with fig. 3, the step of generating the target program script may further include:
executing the preset script and determining the file type of the program compiling file;
and generating the target program script according to the file type.
Specifically, the directory of the program compiled file may be traversed, the file type of the program compiled file may be determined, and a file package statement corresponding to the file type may be generated according to the file type.
For example, determining whether the program compiled file is a folder, and if the program compiled file is a folder type, generating a file packaging statement for packaging the folder; if the program compiling file is of a file type, generating a file packaging statement of the packaged file. Optionally, the file packaging statement of the packaged folder may include a folder path and a folder directory; the file packing statements that pack the files may include file paths, and the like.
In addition, as shown in connection with fig. 3, the step of generating the target program script may further include: a run statement is generated.
Then, a target program script is generated according to the generated initialization statement, file package statement and run statement. It may be appreciated that the target program script in the embodiments of the present application may include an initialization statement, a file package statement, and a run statement.
Alternatively, the target program script may be stored in a build.iss file of the root directory corresponding to the target application program.
In addition, the target program script of the embodiment of the present application may be updated according to the update of the target application; for example, in one embodiment of the present application, when a program configuration update of the target application program is detected, the target program script may be updated based on the updated configuration information.
In the embodiment of the application, the program configuration information and the program compiling file of the target application program are acquired, the program configuration information and the program compiling file are input to a preset script compiler, the target program script of the target application program is obtained, the target program script is executed, and the installation file of the target application program is generated. The script compiler can compile program configuration information and program compiling files of each application program through executing a preset script to generate a program script so as to generate an installation file of the application program through the program script. In the embodiment of the application, for each application program, when the program installation file is generated, the program configuration information and the program compiling file are acquired, so that the program script can be generated through the script compiler, the program script does not need to be written for each application program, the workload of generating the program script and installing the file is reduced, and the corresponding efficiency is improved.
The overall flow of the file generation method according to the embodiment of the present application will be described with reference to fig. 4:
firstly, programming configuration information of a target application program can be written; then, performing Flutter compiling on a source program file of the target application program to generate a program compiling file; executing a preset script, and generating an iss file based on program configuration information and a program compiling file, wherein the iss file is a target program script in the embodiment of the application; and executing the iss file to generate an exe installation package of the target application program.
The embodiment of the application provides a file generating apparatus, as shown in fig. 5, the file generating apparatus 50 may include: an acquisition module 501, a generation module 502, and an execution module 503, wherein,
an obtaining module 501, configured to obtain program configuration information of a target application program and a program compiling file; the program compiling file is generated based on a source program file of the target application program;
the generating module 502 is configured to input the program configuration information and the program compiling file to a preset script compiler to obtain a target program script of the target application program; the script compiler executes a preset script, compiles the program configuration information and the program compiling file, and generates the target program script;
and the execution module 503 is configured to execute the target program script and generate an installation file of the target application program.
In one embodiment of the present application, the method further comprises: a configuration module, which is used for obtaining the program configuration information of the target application program and before compiling the file,
generating the preset script according to a preset compiling flow; the compiling process comprises the process of compiling the program configuration information and the program compiling file;
configuring the script compiler based on the preset script;
in one embodiment of the present application, the obtaining module is specifically configured to:
acquiring a source program file to be compiled of the target application program;
and compiling the source program file to generate the program compiling file.
In one embodiment of the present application, the generating module is specifically configured to:
executing the preset script and loading the program configuration information;
and generating an initialization statement in the target program script according to the program configuration information.
In one embodiment of the present application, the generating module is specifically configured to:
executing the preset script and determining the file type of the program compiling file;
and generating the target program script according to the file type.
In one embodiment of the present application, the generating module is specifically configured to:
generating a file packaging statement corresponding to the file type according to the file type;
the object program script includes the file package statement.
In one embodiment of the present application, the generating module is specifically configured to:
generating an operation statement; the program installation script includes the run statement.
In one embodiment of the present application, the apparatus further comprises: and the updating module is used for updating the target program script based on the updated configuration information when the program configuration updating of the target application program is detected.
In one embodiment of the present application, the program configuration information includes at least one of:
the name of the target application; an identification number of the target application; version information of the target application program; generating the name of an installation file of the target application program; an output directory of the installation file; a default installation directory of the installation file; whether to create a desktop shortcut.
The apparatus of the embodiments of the present application may perform the method provided by the embodiments of the present application, and implementation principles of the method are similar, and actions performed by each module in the apparatus of each embodiment of the present application correspond to steps in the method of each embodiment of the present application, and detailed functional descriptions of each module of the apparatus may be referred to in the corresponding method shown in the foregoing, which is not repeated herein.
In the embodiment of the application, the program configuration information and the program compiling file of the target application program are acquired, the program configuration information and the program compiling file are input to a preset script compiler, the target program script of the target application program is obtained, the target program script is executed, and the installation file of the target application program is generated. The script compiler can compile program configuration information and program compiling files of each application program through executing a preset script to generate a program script so as to generate an installation file of the application program through the program script. In the embodiment of the application, for each application program, when the program installation file is generated, the program configuration information and the program compiling file are acquired, so that the program script can be generated through the script compiler, the program script does not need to be written for each application program, the workload of generating the program script and installing the file is reduced, and the corresponding efficiency is improved.
An embodiment of the present application provides an electronic device, including: a memory and a processor; at least one program stored in the memory for execution by the processor, which, when executed by the processor, performs:
in the embodiment of the application, the program configuration information and the program compiling file of the target application program are acquired, the program configuration information and the program compiling file are input to a preset script compiler, the target program script of the target application program is obtained, the target program script is executed, and the installation file of the target application program is generated. The script compiler can compile program configuration information and program compiling files of each application program through executing a preset script to generate a program script so as to generate an installation file of the application program through the program script. In the embodiment of the application, for each application program, when the program installation file is generated, the program configuration information and the program compiling file are acquired, so that the program script can be generated through the script compiler, the program script does not need to be written for each application program, the workload of generating the program script and installing the file is reduced, and the corresponding efficiency is improved.
In an alternative embodiment, an electronic device is provided, as shown in fig. 6, the electronic device 4000 shown in fig. 6 includes: a processor 4001 and a memory 4003. Wherein the processor 4001 is coupled to the memory 4003, such as via a bus 4002. Optionally, the electronic device 4000 may further comprise a transceiver 4004, the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. It should be noted that, in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The processor 4001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor 4001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 4002 may include a path to transfer information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
Memory 4003 may be, but is not limited to, ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, EEPROM (Electrically Erasable Programmable Read Only Memory ), CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 4003 is used for storing application program codes (computer programs) for executing the present application, and execution is controlled by the processor 4001. The processor 4001 is configured to execute application program codes stored in the memory 4003 to realize what is shown in the foregoing method embodiment.
Among them, electronic devices include, but are not limited to: mobile phones, notebook computers, multimedia players, desktop computers, etc.
The present application provides a computer readable storage medium having a computer program stored thereon, which when run on a computer, causes the computer to perform the corresponding method embodiments described above.
In the embodiment of the application, the program configuration information and the program compiling file of the target application program are acquired, the program configuration information and the program compiling file are input to a preset script compiler, the target program script of the target application program is obtained, the target program script is executed, and the installation file of the target application program is generated. The script compiler can compile program configuration information and program compiling files of each application program through executing a preset script to generate a program script so as to generate an installation file of the application program through the program script. In the embodiment of the application, for each application program, when the program installation file is generated, the program configuration information and the program compiling file are acquired, so that the program script can be generated through the script compiler, the program script does not need to be written for each application program, the workload of generating the program script and installing the file is reduced, and the corresponding efficiency is improved.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims of this application and in the above-described figures, if any, 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 present application described herein may be implemented in other sequences than those illustrated or otherwise described.
It should be understood that, although the flowcharts of the embodiments of the present application indicate the respective operation steps by arrows, the order of implementation of these steps is not limited to the order indicated by the arrows. In some implementations of embodiments of the present application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time, or each of these sub-steps or phases may be performed at different times, respectively. In the case of different execution time, the execution sequence of the sub-steps or stages may be flexibly configured according to the requirement, which is not limited in the embodiment of the present application.
The foregoing is merely an optional implementation manner of the implementation scenario of the application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the application are adopted without departing from the technical ideas of the application, and also belong to the protection scope of the embodiments of the application.

Claims (12)

1. A document generation method, comprising:
program configuration information of a target application program and a program compiling file are obtained; the program compiling file is generated based on a source program file of the target application program;
inputting the program configuration information and the program compiling file to a preset script compiler to obtain a target program script of the target application program; the script compiler executes a preset script, compiles the program configuration information and the program compiling file, and generates the target program script;
and executing the target program script and generating an installation file of the target application program.
2. The file generating method according to claim 1, wherein before the program configuration information of the target application program and the program compiling file are acquired, the method further comprises:
generating the preset script according to a preset compiling flow; the compiling process comprises the process of compiling the program configuration information and the program compiling file;
and configuring the script compiler based on the preset script.
3. The file generation method according to claim 1, wherein acquiring the program compilation file comprises:
acquiring a source program file to be compiled of the target application program;
and compiling the source program file to generate the program compiling file.
4. The file generating method according to claim 1, wherein said inputting the program configuration information and the program compilation file to a pre-configured script compiler, to obtain a target program script of the target application program, comprises:
executing the preset script and loading the program configuration information;
and generating an initialization statement in the target program script according to the program configuration information.
5. The file generating method according to claim 1, wherein said inputting the program configuration information and the program compilation file to a pre-configured script compiler, to obtain a target program script of the target application program, comprises:
executing the preset script and determining the file type of the program compiling file;
and generating the target program script according to the file type.
6. The file generating method according to claim 5, wherein said generating said object script according to said file type comprises:
generating a file packaging statement corresponding to the file type according to the file type;
the object program script includes the file package statement.
7. The file generation method according to claim 5, characterized in that the method further comprises:
generating an operation statement; the program installation script includes the run statement.
8. The file generation method according to claim 1, characterized in that the method further comprises:
and when the program configuration updating of the target application program is detected, updating the target program script based on the updated configuration information.
9. The file generation method according to claim 1, wherein the program configuration information includes at least one of:
the name of the target application; an identification number of the target application; version information of the target application program; generating the name of an installation file of the target application program; an output directory of the installation file; a default installation directory of the installation file; whether to create a desktop shortcut.
10. A document generating apparatus, comprising:
the acquisition module is used for acquiring program configuration information of the target application program and a program compiling file; the program compiling file is generated based on a source program file of the target application program;
the generation module is used for inputting the program configuration information and the program compiling file into a preset script compiler to obtain a target program script of the target application program; the script compiler executes a preset script, compiles the program configuration information and the program compiling file, and generates the target program script;
and the execution module is used for executing the target program script and generating an installation file of the target application program.
11. An electronic device, the 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 applications configured to: a file generation method according to any one of claims 1 to 9 is performed.
12. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the file generation method of any one of claims 1 to 9.
CN202211338878.7A 2022-10-28 2022-10-28 File generation method, device, electronic equipment and computer readable storage medium Pending CN116126334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211338878.7A CN116126334A (en) 2022-10-28 2022-10-28 File generation method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211338878.7A CN116126334A (en) 2022-10-28 2022-10-28 File generation method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116126334A true CN116126334A (en) 2023-05-16

Family

ID=86299717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211338878.7A Pending CN116126334A (en) 2022-10-28 2022-10-28 File generation method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116126334A (en)

Similar Documents

Publication Publication Date Title
CN111399840B (en) Module development method and device
CN106294113B (en) creation method and device based on programmable test service
US10261844B2 (en) Generic language application programming interface interpreter
CN111124288B (en) VPD storage management method, device, equipment and readable storage medium
CN106775781B (en) Method and device for reducing application installation packages and electronic equipment
CN112769706B (en) Componentized routing method and system
CN111651219A (en) Method and equipment for managing multi-module project configuration file
CN105094878A (en) System library file integration method and apparatus
CN104731622A (en) Application program loading method and device and mobile terminal
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN113821194A (en) Micro front-end system
CN111367512B (en) Method and device for creating Android library module dependency relationship in application development
AU2016378425B2 (en) Application program running method and apparatus
CN117008934A (en) Method, device, equipment and medium for automatically making mirror image of information creation operating system
CN113835748B (en) Packaging method, system and readable medium for application program based on HTML5
CN116126334A (en) File generation method, device, electronic equipment and computer readable storage medium
CN111708519B (en) Service component processing method, device, equipment and storage medium
CN107291439B (en) Target incremental data construction method and device
CN114201174A (en) Construction method and device of hybrid mobile application, electronic equipment and storage medium
CN114581241A (en) Intelligent contract processing method and device, processor and electronic equipment
CN111142972A (en) Method, apparatus, system, and medium for extending functions of application program
CN114253595A (en) Code warehouse management method and device, computer equipment and storage medium
CN110659105A (en) Virtualized resource processing method, device, equipment and storage medium
CN110780864A (en) Control method and device for class method replacement, storage medium and electronic equipment
CN109976728A (en) A kind of generation method of native applications program, device, mobile terminal

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