Josh Posted August 16 Share Posted August 16 @YueAny results with this? 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...
Yue Posted August 16 Author Share Posted August 16 I have now tested in beta version 0.97 but I still have the same challenge. Testing in Lua. Here File Zip Created with ZZip. Ultra.zip later I do a test with C++ Quote Link to comment Share on other sites More sharing options...
Josh Posted August 16 Share Posted August 16 You should try first without encryption, otherwise you are testing multiple things at the same time. 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...
Yue Posted August 16 Author Share Posted August 16 here with the same problem in C++, the c++ test file has no key to encrypt it. Edit: I put the zip file in the root directory of the project and the editor does not load. 0.97 Quote Link to comment Share on other sites More sharing options...
Josh Posted August 17 Share Posted August 17 What is the full file path to the project you are testing this in? 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...
Yue Posted August 17 Author Share Posted August 17 C:\Users\Yue\Documents\Ultra Engine\Projects\CPPTest Quote Link to comment Share on other sites More sharing options...
Josh Posted August 17 Share Posted August 17 Strange. I just uploaded a new update that removes the folder part of the path and uses ChangeDir() before loading the package. Only the editor is updated. 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...
Yue Posted August 17 Author Share Posted August 17 I can't understand why it doesn't work, I just put a zip file in the project directory and the editor doesn't load. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 17 Share Posted August 17 Let's get lower level with this. Please copy your ultra.zip file to your desktop and run this code: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { WString path = GetPath(PATH_DESKTOP) + "/ultra.zip"; int errorp = 0; auto zipper = zip_open(path.c_str(), ZIP_RDONLY, &errorp); if (not zipper) { Print("Error: Failed to load zip file. Error " + String(errorp)); } else { Print("OK"); } 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...
Yue Posted August 17 Author Share Posted August 17 14 minutes ago, Josh said: Let's get lower level with this. Please copy your ultra.zip file to your desktop and run this code: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { WString path = GetPath(PATH_DESKTOP) + "/ultra.zip"; int errorp = 0; auto zipper = zip_open(path.c_str(), ZIP_RDONLY, &errorp); if (not zipper) { Print("Error: Failed to load zip file. Error " + String(errorp)); } else { Print("OK"); } return 0; } Quote Link to comment Share on other sites More sharing options...
Josh Posted August 17 Share Posted August 17 Please try this: #include "UltraEngine.h" using namespace UltraEngine; ZIP_EXTERN zip_int64_t zip_source_make_command_bitmap2(zip_source_cmd_t cmd0, ...) { zip_int64_t bitmap; va_list ap; bitmap = ZIP_SOURCE_MAKE_COMMAND_BITMASK(cmd0); va_start(ap, cmd0); for (;;) { int cmd = va_arg(ap, int); if (cmd < 0) { break; } bitmap |= ZIP_SOURCE_MAKE_COMMAND_BITMASK(cmd); } va_end(ap); return bitmap; } int main(int argc, const char* argv[]) { /*WString path = GetPath(PATH_DESKTOP) + "/ultra.zip"; int errorp = 0; auto zipper = zip_open(path.c_str(), ZIP_RDONLY, &errorp); if (not zipper) { Print("Error: Failed to load zip file. Error " + String(errorp)); } else { Print("OK"); }*/ Print("1"); zip_source_make_command_bitmap2(ZIP_SOURCE_SUPPORTS, ZIP_SOURCE_TELL, ZIP_SOURCE_SUPPORTS_REOPEN, -1); Print("2"); zip_source_make_command_bitmap(ZIP_SOURCE_SUPPORTS, ZIP_SOURCE_TELL, ZIP_SOURCE_SUPPORTS_REOPEN, -1); Print("3"); 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...
Yue Posted August 17 Author Share Posted August 17 Quote Link to comment Share on other sites More sharing options...
Josh Posted August 17 Share Posted August 17 Okay, those two functions are the exact same code. I suspect there is some preprocessor define that doesn't match in the main project and in the static lib. I will try compiling libzip straight into the Ultra source code instead of as a separate static lib. 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 August 17 Share Posted August 17 In the current build, libzip was compiled into the engine from source, not as a static lib. @Yue Please let me know the result when you use the editor with a project that contains a zip file. 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...
Yue Posted August 17 Author Share Posted August 17 Great, it loads the map editor, even if the zip file is in the root directory. 1 Quote Link to comment Share on other sites More sharing options...
Yue Posted August 17 Author Share Posted August 17 The editor loads already in the lua script project even if the zip file is in the root directory, and the console confirms that the zip file is loaded, both in Ultra Engine Pro and Ultra Engine Lua. Quote Link to comment Share on other sites More sharing options...
Yue Posted August 17 Author Share Posted August 17 In the code in both C++ and Lua, it still does not work, it keeps returning an error. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 17 Share Posted August 17 So is the editor working correctly? Can you browse through the contents of the zip file and load files from inside it? 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...
Yue Posted August 17 Author Share Posted August 17 Yes, in the editor it works correctly, before if I had the zip file in the root directory of the project it did not load the editor. By clicking on the zip file I have access to the content of the Ultra.zip file. Quote Link to comment Share on other sites More sharing options...
Yue Posted August 17 Author Share Posted August 17 Clik on File Zip. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted August 17 Share Posted August 17 Okay, I will do a full build this way now. 1 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 August 18 Solution Share Posted August 18 @Yue The whole engine is updated now. Please let me know the results. 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...
Yue Posted August 18 Author Share Posted August 18 Ultra Engine, Run perfect on Lua Script. 1 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted August 18 Share Posted August 18 What about C++? 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...
Yue Posted August 18 Author Share Posted August 18 2 minutes ago, Josh said: What about C++? Run Perfect. Note: When the editor is started with Zip files in the root directory, these files cannot be deleted, as they are being used by the editor. 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.