Code Monkey home page Code Monkey logo

Comments (7)

benjstarratt avatar benjstarratt commented on July 3, 2024

I too would love this. If you do decide to implement it, I can help test on multiple platforms (iPhone, iPad, Mac, etc).

from alexandria.

btpf avatar btpf commented on July 3, 2024

Hi,

I would like to support MacOS, but I don't have an Apple computer and my attempts emulating MacOS have failed. So unless I decide to purchase hardware, I will need some assistance.

TLDR: I need help compiling libmobi as a static library on macOS. After this one obstacle, support seems trivial.

Alexandria depends on libmobi for azw3 support.
I modified libmobi to provide a single function, convertToEpub, in the form of a static library. This static library links with libmobi-rs as a lightweight wrapper to use this c library.
Compiling the static library once can often be enough , and I may not have to compile it again.
See: https://github.com/btpf/libmobi-rs/blob/003ffafcc46939656ea8831093df230ef1b4ff6c/libmobi-rs/build.rs#L11
https://github.com/btpf/Alexandria/blob/main/docs/Build%20Instructions.md#1-build-libmobi-sometimes-not-required

Something standing in the way of getting assistance is trust.
If someone compiles the library for the project, I need a way to verify that the compiled library was not tampered with. I do not want to trust a binary blindly and redistribute. Maybe contributing a github action is a good solution?
If you are up for the task, Taking a look at how compilation is performed on linux would be a good place to start.
https://github.com/btpf/libmobi-rs/blob/003ffafcc46939656ea8831093df230ef1b4ff6c/build.sh

Thanks

from alexandria.

benjstarratt avatar benjstarratt commented on July 3, 2024

Hi. Thanks for the reply. I understand your reluctance on the compiled library! I am going to try to build the project from scratch on my Mac. Iโ€™ll provide any feedback that I find on the build instructions in my environment. If I succeed maybe I could just fork your project and post the Mac/iOS artifacts until a better solution arises. I donโ€™t really know what I am doing, but I am fine with that!

from alexandria.

sgopalan98 avatar sgopalan98 commented on July 3, 2024

Hi, @btpf , do you still need help with this? I was able to compile the library on MacOS. Would you want me to create a Github action to replicate the build process?

from alexandria.

btpf avatar btpf commented on July 3, 2024

Hi, @btpf , do you still need help with this? I was able to compile the library on MacOS. Would you want me to create a Github action to replicate the build process?

This is great to hear! A Github action for libmobi would be amazing.

Have you tried building Alexandria or testing with libmobi-rs to ensure it's working correctly?
https://github.com/btpf/libmobi-rs/tree/main/libmobi-rs

You would need to place the built library inside of libmobi-rs/libs/macos and then run the project with cargo test -- --nocapture.

If that works, then submit a PR to that repo with just the Github action.

Add mac-os to this line and submit a PR
https://github.com/btpf/Alexandria/blob/main/.github/workflows/build-action.yml#L13
that way your profile will get show under contributors for the main repo.

Thanks!

from alexandria.

sgopalan98 avatar sgopalan98 commented on July 3, 2024

I have created a PR to solve this in your libmobi repo. Once we merge that, I can create a PR here to add MacOS to the GitHub actions here.

from alexandria.

sgopalan98 avatar sgopalan98 commented on July 3, 2024

I have created a draft PR for MacOS build with some comments. Please let me know how we want to proceed.

Thanks! :)

from alexandria.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.