应用分发

发布于 2024-10-09 10:14:11 字数 216 浏览 0 评论 0原文

我有一个可以正常编译的 SDL 应用程序,并且图像会显示,但前提是它们位于正确的文件夹中且旁边有二进制文件,如果移动图像,则下次运行应用程序时它们不会显示。如何制作一个完整的二进制文件,使我能够编译图像和代码,以便我可以分发一个二进制文件,而不是包含所有资源的 zip 文件。我已经考虑编写一个 .deb 文件,这是我认为我需要的,但过程看起来很复杂。我运行的是 Ubuntu 10.10 我只需要分发到 Ubuntu

I have a SDL app that compiles fine, and the images show up, but only if they are in the correct folder with the binary next to them, if the images are moved they wont show up next time the application is run. How can I make a complete binary that will allow me to compile the images as well as the code, so that I can distribute one single binary, and not a zip file with all of my assets. I have looked into writing a .deb file which is what I think I need, but the process looked complicated. I am running Ubuntu 10.10 I only need to distribute to Ubuntu

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

送舟行 2024-10-16 10:14:11

我建议制作一个 .deb 文件。如果你真的想为 Ubuntu 分发任何东西,你迟早必须熟悉 dpkg。

现在有一种创建软件包的正确方法,在Debian 新维护者指南中描述。

然后还有肮脏的嬉皮方式。为此,您只需要(a)一个具有特定结构的目录,其中包含您要分发的所有文件; (b) 具有特定格式的控制文件; (c) dpkg-deb -b mydir 产生mydir.deb。这一切都不是那么难。您可以在几分钟内启动并运行。

I suggest making a .deb file. If you really seriously want to distribute anything for Ubuntu, you will have to get comfortable with dpkg sooner or later.

Now there is a Right Way to create packages, described in the Debian New Maintainer's Guide.

And then there's the dirty hippie way. For that you just need (a) a directory with a particular structure, containing all the files you want to distribute; (b) a control file with a particular format; and (c) dpkg-deb -b mydir which produces mydir.deb. None of this is all that hard. You could be up and running in a few minutes.

是你 2024-10-16 10:14:11

您可以使用 bin2c 创建可嵌入的静态数组。

You can use bin2c to create embeddable static arrays.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文