如何从运行exe创建一个exe

编程入门 行业动态 更新时间:2024-10-25 02:28:07
本文介绍了如何从运行exe创建一个exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想创建一个应用程序,它可以使用给定的指令集创建一个exe文件。这可能吗? 我尝试过的事情: 我有不知道并寻求一些建议。

I want to create an application, which can create an exe file with given set of instruction. Is that possible? What I have tried: I have no idea and seeking some advice.

推荐答案

这是可能的。此类应用程序称为编译器(编译器 - 维基百科 [ ^ ])。 但写一个是高级任务(非常高难度)。 It is possible. Such applications are called compilers (Compiler - Wikipedia[^]). But writing one is an advanced task (very high level of difficulty).

.NET框架 - 您的VB应用程序运行所需的 - 包括CSC.EXE文件,它是C#编译器,因此,每台能够运行您的应用程序的计算机都可以生成EXE文件 - 但前提是您的应用程序发出有效的C#代码,并通过C#编译器运行它。 VB编译器不包含在.NET安装中,因此从技术上讲,您需要在每台计算机上安装VS以使用VB作为目标语言。这可能会给你带来问题,部分原因在于规模,但主要是因为版权和许可条件的违反...... 有两种选择:生成本机代码或者你自己的IL EXE文件 - 这是很多工作 - 或者编写一个处理脚本并为它生成脚本的应用程序。取决于你想要做什么 - 即你想要创建的应用程序的工作有多复杂 - 这可能是很多,更快,更可靠。 The .NET framework - which your VB app will need in order to run - includes the CSC.EXE file which is the C# compiler, so every computer capable of running your app can produce EXE files - but only if your app emits valid C# code, and runs it through the C# compiler. The VB compiler is not included with .NET installations, so technically you would need to install VS on each computer to use VB as your "target language". That could well give you problems, partly because of the size, but mostly the breach of copyright and licencing conditions... There are two alternatives: produce a native code or IL EXE file yourself - this is a lot of work - or write an app that processes scripts and generate those scripts for it instead. Depending on what you are trying to do - i.e. how complex a job you want the app you create is - this could be a lot, lot quicker and more reliable.

更多推荐

如何从运行exe创建一个exe

本文发布于:2023-07-05 07:52:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1034875.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:创建一个   exe

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!