如何创建可执行文件夹程序? [英] How do I create executable - folder program?

查看:89
本文介绍了如何创建可执行文件夹程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法通过已经创建的程序创建自我exetractor?

我找到了一个很好的自我提取器的方法

添加和提取二进制资源 [ ^ ]

但它只在编译时将文件放入.exe中,而我需要它是一个函数,它将完成多次,每次都会用新文件完成。

我需要一个程序函数来放置/存储/写入一些文件到另一个.exe程序,我可以通过执行它来从中提取这些文件。我关心的是将这些文件放到一个自提取器而不是压缩。



所以,很快:我如何创建一个程序,用一些文件和一些文件创建程序可执行代码吗?



我尝试过:



我假设它需要一些自己创建开发工具的经验,那么也许有一种从MS Visual C ++中借用一些东西的方法?



也许有可能用zlib库(因为它的程序执行将文件放到一个文件的部分,但是我希望这些文件在exe文件中。)

Is there a way of creating self-exetractor by already created program?
I found a great method of making self-extractor
Adding and extracting binary resources[^]
but it puts files into .exe only when compiling, while I need it to be a function, which will be done multiple times, and it will be done with new files each time.
I need a function of a program that would put / store / write some files to another .exe program, from which I could extract those files later by executing it. I care about putting those files to one self-extractor more than compression.

So, shortly: How do I create a program which creates programs with some files and with some executable code in it?

What I have tried:

I suppose it requires some experience in creating development tools themselves, so maybe there is a way of borrowing something from, say, MS Visual C++?

Maybe it is possible with zlib library (since its programs does the part where you put files to one file, but again, I want those files to be in exe.)?

推荐答案

参见自解压缩 - Google搜索 [ ^ ]。


实际上,是的,你需要创建一个。 ZIP文件。



自解压exe cutable只不过是一个.EXE文件,后面附有一个.ZIP文件,如下所示:

Actually, yes you DO need to create a .ZIP file.

A self-extracting executable is nothing more than an .EXE file with a .ZIP file appended to the end of it, something like this:
C:\>COPY SelfExtractor.exe + MyZipFile.zip  SelfExtractingZip.exe



您需要编写自己的提取器来查看它从中启动的文件,并在其中搜索.ZIP标头文件。从那里开始,你自己实现了根据你打开的流解压缩归档并寻找.EXE的.ZIP文件部分的开头。


You need to write your self extractor to look at the file it was launched from and search for the .ZIP header in that file. From there it's your own implementation of unpacking the archive based on a stream that you open and seek to the beginning of the .ZIP file portion of your .EXE.


这篇关于如何创建可执行文件夹程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆