Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Released] libMy - Datapackaging library  (Read 35984 times)

0 Members and 1 Guest are viewing this topic.

Haikarainen

  • Guest
[Released] libMy - Datapackaging library
« on: August 08, 2011, 07:47:53 pm »


Website/Documentation is found here

This is a pretty early release since a lot of users have asked me when I release it, and I'm pretty busy, so PLEASE report any bugs you find ;)
I haven't been able to generate any CMake-files yet since I'm a noob at that area, but I promise that once I get the time to learn it, I will upload a release with it.

Features:
    CRC32-Integrity checks for both files and strings
    Filepackaging in a simple and fast way!
    Ability to load SFML-resources directly from package(no need to extract)
    Exceptionhandling
    Opensource under zlib/sfml-like license!


Usage example: https://legacy.sfmluploads.org/code/107

Downloads:
    Full Package - Contains full source, binaries for Win64 and examples
    Win64 binaries - Contains binaries for library and examples.
    Minimal source - Contains include/ and src/ directories only.
    Codeblocks project - Contains source and a codeblocksproject, see readme.txt.
    [/list]

    Dependencies:
      SFML2 System module
      Boost system and filesystem modules


    If you run into any problems/bugs, or if you have any ideas to donate, don't hesitate to reply!

    .teri

    • Newbie
    • *
    • Posts: 28
      • View Profile
    Re: MyLib, Datapacker, File integrity checker osv
    « Reply #1 on: August 09, 2011, 08:03:59 pm »
    Quote from: "Haikarainen"


    With SFML (WIP):
    Code: [Select]

    my::Data::Package Test;
    Test.Load("Test.pkg");

    sf::Image Img;
    Img.LoadFromMemory(Test.GetFileData("irimage.png"), Test.GetFileSize("irimage.png"));
    Test.Close();




    I dont know... sf::InputStream is created for avoid load resources from memory.

    Haikarainen

    • Guest
    Re: MyLib, Datapacker, File integrity checker osv
    « Reply #2 on: August 09, 2011, 10:18:26 pm »
    Quote from: .teri
    Quote from: "Haikarainen"

    I dont know... sf::InputStream is created for avoid load resources from memory.


    Hm, wasn't aware of this, thanks, will create a derived class :)

    Just got done with the packageclass, as soon as i've created the derived class and fixed compression & encryption i'll release it.

    Edit; Btw i will also implement exceptions, please tell me about any ideas you might have to make this project more flexible/functional. Since its for a game its currently under pretty heavy development, so its now or probably never :P

    .teri

    • Newbie
    • *
    • Posts: 28
      • View Profile
    [Released] libMy - Datapackaging library
    « Reply #3 on: August 10, 2011, 12:06:13 pm »
    Quote

    Btw i will also implement exceptions, please tell me about any ideas you might have to make this project more flexible/functional. Since its for a game its currently under pretty heavy development, so its now or probably never Razz


    Sorry, at the moment i don't have a idea. But now i concern a thing about this one thing

    Code: [Select]

    Test.ExtractAll("./Extraction/");


    I think that is better read or load assets from packages without extract the package content in folders. Again, sf::InputStream will help you at this task.

    Another thing, really exceptions will help? I think that C error checking is ok.

    Haikarainen

    • Guest
    [Released] libMy - Datapackaging library
    « Reply #4 on: August 10, 2011, 12:17:29 pm »
    Quote from: ".teri"
    Sorry, at the moment i don't have a idea. But now i concern a thing about this one thing

    Code: [Select]

    Test.ExtractAll("./Extraction/");


    I think that is better read or load assets from packages without extract the package content in folders. Again, sf::InputStream will help you at this task.

    Another thing, really exceptions will help? I think that C error checking is ok.


    Well that functionality is already in progress of being developed, but why would that automatically delete the funcitonality of extracting an archive? This lib is not only for resourcemanagement, but could also be used for installers etc.

    Exceptions would be really useful, so you have a global errorhandling instead of checking switching a  my::Data::Status for every request you do, but then you still have that opportunity if you wanna check if something specifi happened allright.

    .teri

    • Newbie
    • *
    • Posts: 28
      • View Profile
    [Released] libMy - Datapackaging library
    « Reply #5 on: August 12, 2011, 12:13:21 pm »
    Quote from: "Haikarainen"
    Quote from: ".teri"
    Sorry, at the moment i don't have a idea. But now i concern a thing about this one thing

    Code: [Select]

    Test.ExtractAll("./Extraction/");


    I think that is better read or load assets from packages without extract the package content in folders. Again, sf::InputStream will help you at this task.

    Another thing, really exceptions will help? I think that C error checking is ok.


    Well that functionality is already in progress of being developed, but why would that automatically delete the funcitonality of extracting an archive? This lib is not only for resourcemanagement, but could also be used for installers etc.

    Exceptions would be really useful, so you have a global errorhandling instead of checking switching a  my::Data::Status for every request you do, but then you still have that opportunity if you wanna check if something specifi happened allright.


    Ok, ok. I don't know that this library is not only for resource management. And with exceptions, yes, is other way for handle errors. ¡Ah! Exceptions not only can be used for error handling.

    Richy19

    • Full Member
    • ***
    • Posts: 190
      • View Profile
    [Released] libMy - Datapackaging library
    « Reply #6 on: August 24, 2011, 05:41:20 pm »
    Is this available for download yet?

    Haikarainen

    • Guest
    [Released] libMy - Datapackaging library
    « Reply #7 on: August 24, 2011, 07:32:26 pm »
    Quote from: "Richy19"
    Is this available for download yet?


    Yes, sorry, i kinda have a lot of balls in the air atm, so ive kinda forgot about it. Very little work left tho, will upload it soon :)

    Haikarainen

    • Guest
    [Released] libMy - Datapackaging library
    « Reply #8 on: September 09, 2011, 05:42:38 pm »
    Bump, view threadstart again

    Groogy

    • Hero Member
    • *****
    • Posts: 1469
      • MSN Messenger - groogy@groogy.se
      • View Profile
      • http://www.groogy.se
      • Email
    [Released] libMy - Datapackaging library
    « Reply #9 on: September 09, 2011, 07:15:25 pm »
    I'm wondering, does it support encryption? Would be nice to pack all resources in an encrypted archive and it has to be unlocked with the serial key or something like that.
    Developer and Maker of rbSFML and Programmer at Paradox Development Studio

    Haikarainen

    • Guest
    [Released] libMy - Datapackaging library
    « Reply #10 on: September 09, 2011, 07:43:25 pm »
    Quote from: "Groogy"
    I'm wondering, does it support encryption? Would be nice to pack all resources in an encrypted archive and it has to be unlocked with the serial key or something like that.


    Not yet, but its planned, as well as compression.  Those will probably be used something like my::Data::Package::Open("./data/package.pkg", my::Data::UseEncryption|my::Data::UseCompression, "COMPRESSIONKEYHERE");

    Currently having some problems with static linkage of boost libraries for static libmy-libraries :S Might take a day or so to fix this. If anyone wanna help me this is my issue:

    Links for Static Release of libmy:
    Code: [Select]
    -lboost_filesystem-mgw44-s-1_47
    -lboost_system-mgw44-s-1_47


    It compiles allright, but when i link the compiled libmy-s (wich links static boost) in a testapplication wich uses libmy, i get "undefined reference"'s to boost::filesystem :S Works allright for dynamic libmy-linkage, wich also links boost statically. Wich is weird.

    Laurent

    • Administrator
    • Hero Member
    • *****
    • Posts: 32498
      • View Profile
      • SFML's website
      • Email
    [Released] libMy - Datapackaging library
    « Reply #11 on: September 09, 2011, 08:18:51 pm »
    Quote
    It compiles allright, but when i link the compiled libmy-s (wich links static boost) in a testapplication wich uses libmy, i get "undefined reference"'s to boost::filesystem :S Works allright for dynamic libmy-linkage, wich also links boost statically. Wich is weird.

    There's no link step when building a static library, it's basically just an archive of object files. That's why you must put your linker options when a link step actually occurs, ie. when compiling your final executable.
    Laurent Gomila - SFML developer

    Haikarainen

    • Guest
    [Released] libMy - Datapackaging library
    « Reply #12 on: September 09, 2011, 09:32:23 pm »
    Quote from: "Laurent"
    There's no link step when building a static library, it's basically just an archive of object files. That's why you must put your linker options when a link step actually occurs, ie. when compiling your final executable.


    So to use my library people must link towards boost libs as well? Or did i get it all wrong? Probably got it wrong since sfml-static works without its depending libraries for the enduser :P

    Laurent

    • Administrator
    • Hero Member
    • *****
    • Posts: 32498
      • View Profile
      • SFML's website
      • Email
    [Released] libMy - Datapackaging library
    « Reply #13 on: September 09, 2011, 10:17:36 pm »
    No, you're perfectly right. SFML uses a trick to include dependencies directly into its static libs ;)
    Laurent Gomila - SFML developer

    Haikarainen

    • Guest
    [Released] libMy - Datapackaging library
    « Reply #14 on: September 09, 2011, 10:52:17 pm »
    Quote from: "Laurent"
    No, you're perfectly right. SFML uses a trick to include dependencies directly into its static libs ;)


    Wanna share? ;p

    Edit; Nevermind, found the macro, will play around with this :) thanks tho!