Jump to content

Can't load a file from a package


SpiderPig
 Share

Go to solution Solved by Josh,

Recommended Posts

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

Link to comment
Share on other sites

It's a bug.

I am not sure right now if ZIP should even be used, or if ziplib should be swapped for libzip...

  • Sad 1

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

  • Solution

I replaced ziplib with libzip :lol: 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.
  • Thanks 1

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

It has been usually, but lately it is taking a lot of time to update and the uploads have failed a few times.

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

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;
}

 

  • Like 1

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...