简体   繁体   English

将项目文件夹(lua)嵌入exe

[英]Embedding project folders(lua) into exe

I searching for a long time how to embed project files like folders (with lua scripts and images) into exe. 我搜索了很长时间,如何将项目文件(如文件夹(带有lua脚本和图像))嵌入exe。

Basically i have some folders which are needed to run my game and i want to hide them somehow. 基本上,我有一些运行我的游戏所需的文件夹,我想以某种方式隐藏它们。 Because now they are opened and can be easy edited by everyone. 因为现在它们已打开,并且每个人都可以轻松对其进行编辑。

I saw method in which folders have been changed to .dll file to protect them. 我看到了将文件夹更改为.dll文件以保护它们的方法。

Using visual studio 2013. I'll be very thankful for an answer. 使用Visual Studio2013。我将非常感谢您的回答。

You can use PhysicsFS , which allows to map a hierarchical filesystem to an archive. 您可以使用PhysicsFS ,它允许将分层文件系统映射到存档。 From the project page: "It is intended for use in video games, and the design was somewhat inspired by Quake 3's file subsystem." 在项目页面上:“它旨在用于视频游戏,其设计在某种程度上受到Quake 3的文件子系统的启发。” It's used by some open-source Lua frameworks (for example, Love2d ), so you may check how they implemented the integration and access. 一些开源的Lua框架(例如Love2d )已使用它,因此您可以检查它们如何实现集成和访问。

This doesn't guarantee full protection (nothing does), but it will at least make it more difficult for the users to make changes to those resources you want to protect. 这不能保证提供全面的保护(什么也不做),但至少会使用户更难于更改要保护的资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM