SpiderPig Posted March 17 Share Posted March 17 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 Link to comment Share on other sites More sharing options...
Dreikblack Posted March 19 Share Posted March 19 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 Link to comment Share on other sites More sharing options...
Josh Posted March 22 Share Posted March 22 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. Link to comment Share on other sites More sharing options...
Josh Posted March 22 Share Posted March 22 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. Link to comment Share on other sites More sharing options...
SpiderPig Posted March 22 Author Share Posted March 22 While on the topic - will it handle zip files bigger than 4GB? Quote Link to comment Share on other sites More sharing options...
Josh Posted March 22 Share Posted March 22 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. Link to comment Share on other sites More sharing options...
Josh Posted March 22 Share Posted March 22 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. Link to comment Share on other sites More sharing options...
Josh Posted March 22 Share Posted March 22 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. Link to comment Share on other sites More sharing options...
Solution Josh Posted March 22 Solution Share Posted March 22 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. Link to comment Share on other sites More sharing options...
SpiderPig Posted March 23 Author Share Posted March 23 I just updated the standalone and the code in the 1st post still doesn't work. It still says "No Font Found" Quote Link to comment Share on other sites More sharing options...
Josh Posted March 23 Share Posted March 23 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. Link to comment Share on other sites More sharing options...
SpiderPig Posted March 23 Author Share Posted March 23 Oh okay, I can. I thought the standalone was always updated first. Quote Link to comment Share on other sites More sharing options...
Josh Posted March 23 Share Posted March 23 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. Link to comment Share on other sites More sharing options...
SpiderPig Posted March 23 Author Share Posted March 23 Okay. You might need Elon's StarLink Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted March 23 Share Posted March 23 Still not working after latest update Quote Link to comment Share on other sites More sharing options...
Josh Posted March 23 Share Posted March 23 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. Link to comment Share on other sites More sharing options...
SpiderPig Posted March 24 Author Share Posted March 24 This is working now. 1 Quote Link to comment Share on other sites More sharing options...
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.