0xbad1d3a5 / Kaku

画 - Japanese OCR Dictionary
https://kaku.fuwafuwa.ca/
BSD 3-Clause "New" or "Revised" License
203 stars 36 forks source link

Support debug build from a fresh clone #28

Closed dkanada closed 2 years ago

dkanada commented 5 years ago

It would be nice to clone the repo and get a successful build without running into multiple issues. Some of these might just be caused by my unfamiliarity with the source. I was going to try and add hiragana vocabulary recognition with a greedy match algorithm in the search class, but maybe you've already tried that.

On an unrelated note, would you be open to an F-Droid build flavor that doesn't include gms or any other proprietary libraries?

  1. Gradle won't sync when keystore.properties is missing.
  2. Google Ads will crash since the key is missing from strings.
  3. All image assets seem to be missing which broke the build.
  4. Tesseract will crash without the tessdata directory.
  5. The jpn training data also seems to be gone from the assets.

That's as far as I got before creating this issue.

0xbad1d3a5 commented 5 years ago

Ah, sorry about the mess in the repo and lack of instructions, never got around to them. Most of the assets being missing is intentional though, since they're data/binaries/private information that shouldn't be checked in. The idea was to have a page detailing what needs to be added/modified to build Kaku while downloading a release apk and extracting the assets from there. Most of the required files that you might need to create are in the top-level .gitignore.

To get Kaku to build:

I don't mind if you want to make an F-Droid distribution, I was simply too lazy. I'm also somewhat discouraged about continuing this project since it sounds like Google is killing SYSTEM_ALERT_WINDOW in the future, which basically means killing Kaku.

For adding Hiragana, you don't want to change the Searcher class. You'd want to edit JmTask.

dkanada commented 5 years ago

I hadn't even seen the news about that permission, now I've lost motivation as well :p the app is really nice though, thanks for creating it. I am continually annoyed with google and their habit of removing useful features for no apparent reason. The operating system is built on the linux kernel yet manages to stay closed to developers and users at every turn.

SpongebobSquamirez commented 5 years ago

It would definitely suck if the key enabler of the app got removed. It just occurred to me that Kaku could still be useful for android e-readers (which language learners in particular find useful), which seem to lag significantly behind phones in terms of which Android version they use. This website seems to be the go-to place for at least discovering all the different e-reader models out there: https://goodereader.com/blog/

dkanada commented 3 years ago

Google is killing SYSTEM_ALERT_WINDOW

@0xbad1d3a5 it seems like Android 11 still allows the permission, although I can't confirm this since I'm still on the previous version. Maybe Google ended up changing their minds and letting apps use it manually?

SpongebobSquamirez commented 3 years ago

@0xbad1d3a5 Can confirm Android 11 allows overlays if you enable that feature in Developer Options. I use Kaku on my Pixel 5 along with a bunch of other apps that rely on this feature. Kaku is still alive and well on the latest version of Android, so if future support has been holding you back from working on Kaku, well, it's not dead yet.

chayleaf commented 3 years ago

jpn.traineddata is available in tessdata repo, deinflect.dat is in this repo, but how can one generate DB_KakuDict-02-16-2019.db? F-Droid guidelines state that binary dependencies must be built from source.

Edit: I found it. I'm not knowledgeable in Gradle magic as well, so I think I'll just create a fully FLOSS fork instead of adding a build flavor, at least for now.

linsui commented 2 years ago

I opened a PR for F-Droid fastlane requirement. https://github.com/0xbad1d3a5/Kaku/pull/35. F-Droid side MR: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/10992

0xbad1d3a5 commented 2 years ago

Kaku now builds out of the box.