将程序和外部文件捆绑到一个可执行文件中? [英] Bundling a program and external files into a single executable?

查看:75
本文介绍了将程序和外部文件捆绑到一个可执行文件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题有点类似于 this一个,但不完全是。我有一个使用C#的游戏引擎,并且正在与一些想使用我的引擎的人合作。最初,我设计引擎是为了使所有资产都是外部的-非程序员可以创建艺术作品,音乐,xml设置等,并且任何人都可以修改现有游戏并在彼此之间共享。基本上,包括引擎本身在内的所有内容都是开源的。

This question is kinda similar to this one, but not exactly. I have a game engine in C#, and I'm working with some people who want to use my engine. Originally I designed the engine so that all the assets are external - non programmers can create art, music, xml settings, etc. and that anyone could modify an existing game, and share them amongst each other. Basically the whole thing including the engine itself is open source.

与我合作的小组(当前只有两个使用我的引擎的项目之一)想要关闭其资产因此无法修改。尽管这违反了我的原则,但我不想拒绝它们,这是因为我已经与它们合作了一段时间,并且因为市场非常小(包括像我这样的引擎以及这些引擎的用户)。

The group I'm working with (one of only two projects using my engine currently) wants to close their assets so they can't be modified. Although it's against my principle, I don't want to turn them away, both because I've already been working with them a while and because the market is very small (both for engines like mine, and for users of those engines).

有没有办法,也许是一些可用的软件,可以带一个exe和一个一堆其他任意文件,然后将它们粉碎成一个exe文件,那不是只是存档?我希望最终的exe表现得像运行带有引用捆绑文件的某些命令行参数的第一个exe一样。例如,运行 bundle.exe 就像运行 original.exe --project_path = / project 文件位于捆绑包内,无法从其中检索。

Is there a way, maybe some available software, that can take an exe and a bunch of other arbitrary files, and smash them into a single exe, that isn't just an archive? I would like the final exe to behave like it runs the first exe with some command line parameters that refer to the bundled files. For example, running bundle.exe would be just like running original.exe --project_path=/project but the project files are inside the bundle, and cannot be retrieved from it.

我原来的exe用C#编写。我怀疑这很重要。

My original exe is written in C#. I doubt that matters.

推荐答案

您可以将这些文件打包为嵌入式资源

You could pack these files as embedded resources.

这篇关于将程序和外部文件捆绑到一个可执行文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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