SpiderPig Posted March 17, 2024 Posted March 17, 2024 Can't get this to work. Am I doing something wrong or is it a bug? I'm sure it worked like this in the past. The font can't be found in the package. #include "Engine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto package = LoadPackage("Data.zip"); if (package == nullptr) { Notify("No Package Found"); } auto font = LoadFont("Fonts\\ZippedArial.ttf"); Notify("No Font Found"); return 0; } Data.zip Quote
Dreikblack Posted March 19, 2024 Posted March 19, 2024 Also application seems to crash if package has same file as in usual folder which nakes harder to test game distribution with packing flies Quote
Josh Posted March 22, 2024 Posted March 22, 2024 It's a bug. I am not sure right now if ZIP should even be used, or if ziplib should be swapped for libzip... 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted March 22, 2024 Posted March 22, 2024 I think I am going to rewrite this using this lib: https://github.com/zlib-ng/minizip-ng Quote My job is to make tools you love, with the features you want, and performance you can't live without.
SpiderPig Posted March 22, 2024 Author Posted March 22, 2024 While on the topic - will it handle zip files bigger than 4GB? Quote
Josh Posted March 22, 2024 Posted March 22, 2024 Yes, that is the only reason. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted March 22, 2024 Posted March 22, 2024 Both LibZip and minizip-ng have errors when running cmake to create projects for them. https://github.com/nih-at/libzip Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted March 22, 2024 Posted March 22, 2024 I found a pre-generated project for libzip here: https://github.com/kiyolee/libzip-win-build Apparently, this also supports the newer zip encryption system. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Solution Josh Posted March 22, 2024 Solution Posted March 22, 2024 I replaced ziplib with libzip in the next build. Packages are now read-only. Package file names are now case-insensitive. >4 gb files should be supported. AES encryption should be supported, although I have not tried it yet. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
SpiderPig Posted March 23, 2024 Author Posted March 23, 2024 I just updated the standalone and the code in the 1st post still doesn't work. It still says "No Font Found" Quote
Josh Posted March 23, 2024 Posted March 23, 2024 Standalone has not been updated yet. Are you able to use the Steam version? 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
SpiderPig Posted March 23, 2024 Author Posted March 23, 2024 Oh okay, I can. I thought the standalone was always updated first. Quote
Josh Posted March 23, 2024 Posted March 23, 2024 It has been usually, but lately it is taking a lot of time to update and the uploads have failed a few times. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
SpiderPig Posted March 23, 2024 Author Posted March 23, 2024 Okay. You might need Elon's StarLink Quote
Josh Posted March 23, 2024 Posted March 23, 2024 Ah, I see. Right now you can just add a call to FileType() and it will trigger a rebuild of the archive directory structure. I will have a build up this morning that doesn't require this: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto package = LoadPackage("Data.zip"); if (package == nullptr) { Notify("No Package Found"); } package->FileType(""); auto font = LoadFont("Fonts\\ZippedArial.ttf"); if (not font) Notify("No Font Found"); return 0; } 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.