Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issue malformed .zft files #19

Merged
merged 6 commits into from
Dec 1, 2024
Merged

Resolve issue malformed .zft files #19

merged 6 commits into from
Dec 1, 2024

Conversation

kalwalt
Copy link
Member

@kalwalt kalwalt commented Nov 26, 2024

This pull request includes several changes to the emscripten project, focusing on refactoring the compressZip function, updating dependencies, and modifying bindings and initialization code, and very important solve issue #18 . The most important changes include removing the extern "C" block, updating the compressZip function signature, and modifying the package.json dependencies.

Refactoring and Function Signature Changes:

Dependency Updates:

  • package.json: Updated the prettier dependency version from ^3.3.3 to 3.4.1.

Bindings and Initialization Code Modifications:

  • emscripten/markerCreator_bindings.cpp: Added a new binding for the compressZip function and refactored the createNftDataSet_em function for better readability.
  • src/NFTMarkerCreator.js: Modified the compressZip call to use the new function signature and updated the way the string length is calculated.
  • tools/makem.js: Removed _compressZip from the exported functions list and added lengthBytesUTF8 to the exported runtime methods.This pull request includes several changes to the emscripten project, focusing on refactoring the compressZip function and related bindings, as well as updating the build configuration. The most important changes include modifying the compressZip function, updating the header file, adjusting the Emscripten bindings, and refining the build scripts.

Refactoring and Function Updates:

  • emscripten/markerCompress.cpp: Refactored the compressZip function by removing the extern "C" block and changing the return type to int. Reordered the include statements for better organization. [1] [2]
  • emscripten/markerCompress.h: Updated the header guard and removed the extern "C" block to match the changes in the implementation file. Changed the return type of compressZip to int.

Emscripten Bindings:

  • emscripten/markerCreator_bindings.cpp: Added a new binding for the compressZip function to be accessible from JavaScript. Reformatted the existing createNftDataSet_em function for better readability.

Build Script Adjustments:

  • tools/makem.js: Updated the build script to remove the direct inclusion of libz.a and instead use the -sUSE_ZLIB=1 flag. Also adjusted the exported functions and runtime methods to reflect the changes in the compressZip function. [1] [2] [3]

Integration in Marker Creator:

@kalwalt kalwalt added bug Something isn't working enhancement New feature or request javascript code - Node.js C++ code labels Nov 26, 2024
@kalwalt kalwalt self-assigned this Nov 26, 2024
@kalwalt
Copy link
Member Author

kalwalt commented Dec 1, 2024

I tested the new generated .zft files and they are correctly loaded with jsartoolkitNFT, i will merge this PR and as soon as i can i will make a new release.

@kalwalt kalwalt mentioned this pull request Dec 1, 2024
@kalwalt kalwalt changed the title Resolve issue Malformed zft files #18 Resolve issue malformed .zft files #18 Dec 1, 2024
@kalwalt kalwalt changed the title Resolve issue malformed .zft files #18 Resolve issue malformed .zft files Dec 1, 2024
@kalwalt kalwalt merged commit d2873f6 into dev Dec 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C++ code enhancement New feature or request javascript code - Node.js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant