Closed linsui closed 2 years ago
I'd be more than happy to see this app on F-Droid! I made a new release v2.1.1 just now that contains the Android app bundle and apk files. On the RFP issue page, I saw a Fastlane error. Currently, I'm only using Fastlane for deploying beta iOS versions. I tried a few times to automate screenshot taking using Fastlane but all of the attempts failed. I also can't find a reliable and up-to-date tool to take screenshot with Flutter. So, I manually took the screenshots for iOS and Android. I can send the screenshots if F-Droid needs them.
The faslane is not a big problem. I'll file a PR to add fastlane metadata. F-Droid only uses fastlane structure for app descriptions. The screenshots is not required but if you can add them to the fastlane structure it would be great.
The flutter_rust_bridge is a difficult part. When I packaged rustdesk the flutter_rust_bridge has some problems. Hopefully these problems are solved in new versions.
The mlkit is not FOSS so google_mlkit_digital_ink_recognition needs to be removed for F-Droid version. I thought I need to remove DigitalInkView from F-Droid build. Do you have any suggestions?
I saw yout issue in flutter_rust_bridge. Should I still use cargo-ndk 2.6.0 and ndk r22b? It seems cargo ndk has fixed the problem with ndk r23.
Looks like the way I patched out the mlkit has some problem.
About the fastlane and screenshots, see https://gitlab.com/-/snippets/1895688.
I saw yout issue in flutter_rust_bridge. Should I still use cargo-ndk 2.6.0 and ndk r22b? It seems cargo ndk has fixed the problem with ndk r23.
There are two options:
If you choose option 2, please let me know if it works or not. Since I already configured my system with a manual workaround, I don't want to rerun cargo-ndk's script to generate potentially duplicated symlinks.
Looks like the way I patched out the mlkit has some problem.
I think the patch is a good start though there are still a few things that needs to be removed. I created an fdroid
branch with the DigitalInkView
completely removed with I think the minial code changes. You might be able to reference the git diff for your patch.
About the fastlane and screenshots, see https://gitlab.com/-/snippets/1895688.
I will add the fastlane metadata today with the screenshots. I can at you in this issue once I'm done.
I have added the fastlane metadata and screenshots. Here's the link to the latest commit on main: https://github.com/AlienKevin/wordshk_app/commit/affd2e383f34ec60a7d5a41e9c860bf0d3666934
If you choose option 2, please let me know if it works or not. Since I already configured my system with a manual workaround, I don't want to rerun cargo-ndk's script to generate potentially duplicated symlinks.
I'll have a try.
You might be able to reference the git diff for your patch.
I can add another sed to do that. Or you can maintain a flavor or patch, or seperated tag for F-Droid, etc. Which methed do you prefer?
I have added the fastlane metadata and screenshots. Here's the link to the latest commit on main: https://github.com/AlienKevin/wordshk_app/commit/affd2e383f34ec60a7d5a41e9c860bf0d3666934
The fastlane directory must be in the root path so that fdroidserver can find it. You can add a symlink or move it a level up.
cargo ndk 2.11.0 works well with ndk r25. Is the network permission needed? The apk has a problem. I can only play the audio once. Then I can't play any audio.
I can add another sed to do that. Or you can maintain a flavor or patch, or seperated tag for F-Droid, etc. Which methed do you prefer?
Seds seem to be a little fragile in general. I can maintain a separate branch for F-Droid, though it might not be updated as often as main.
The fastlane directory must be in the root path so that fdroidserver can find it. You can add a symlink or move it a level up.
I will create a symlink in the fdroid
branch
The apk has a problem. I can only play the audio once. Then I can't play any audio.
I can't reproduce this issue on a real device running Android 10. Which device and version of Android are you testing on?
Then please add a special tag for F-Droid version, e.g. v2.1.1-fdroid so that F-Droid can pick it. Thanks!
I tested it onineageOS 18.1 Android 11 on Xiaomi Mi 6.
I tested it onineageOS 18.1 Android 11 on Xiaomi Mi 6.
Did you click on the pronunciation button after the header word of an entry, or the button after a sentence? By default on Android, the header words are pronounced using syllable recordings while the sentences are pronounced by system TTS. So the problem can lie in either of the two components. Did you observe the issue in button 1, 2, or both? (See screenshot below).
Then please add a special tag for F-Droid version, e.g. v2.1.1-fdroid so that F-Droid can pick it. Thanks!
I tagged the latest commit on the f-droid
branch with v2.1.1-fdroid
. I add a symlink to the fastlane folder at the root in it.
The problem only happens when I tap the button after the sentences. I don't have tts on my system. I guess that's the reason.
Since you add a branch for F-Droid, could you please also add the lib/smtp_credentials.dart file? Thanks!
The problem only happens when I tap the button after the sentences. I don't have tts on my system. I guess that's the reason.
That's a good issue to raise though. I'll look into detecting TTS support in flutter and fallback more gracefully.
Since you add a branch for F-Droid, could you please also add the lib/smtp_credentials.dart file? Thanks!
I added a blank smtp_credentials.dart
to the fdroid
branch.
Thanks for taking the time to guide me through the process of packaging this app for F-Droid! Feel free to file new issues if any problems appear later on. I'm excited to see words.hk become available as an open source Cantonese dictionary on F-Droid.
Thanks for you help!
Is the network permission needed? When I test the apk it didn't connect to Internet.
The network permission is needed for editing an entry on the words.hk website. There's a small edit icon on the top right of each entry. You can click on it to edit it on the website.
When I edit the entry, the webpage is opened in the browser. There is no connection from the app. Even if I disable the network for the app it can still open the page.
You are right. The internet permission seems to be only needed by Flutter during debugging. I've removed the internet permissions from AndroidManifest
in the fdroid
branch.
Will you fix the audio problem before it's published on F-Droid? Or I should merge the MR first and you'll fix it in future versions?
I can fix the issue along with a few others in a future release.
Should I wait for that? Or you'd like me to publish it sooner?
You can go ahead and publish it. I'm a bit busy lately so I might fix it later.
The app will be available in F-Droid in 2 or 3 day. Thanks!
@AlienKevin Hi, a new version is released but I'm not sure which version of the tools I should use to build it. Is there any changes on the build steps? Which version of flutter, rust and cargo-ndk should I use?
And the fastlane symlink is removed. Could you please add it back? Thanks!
@linsui Hi, the new build pipeline for the Rust backend has been significantly simplified. I updated the README to add a Set up section. You can basically run setup.sh
to install the Rust backend.
As for fastlane, I used to upload App Store screenshots using it but I found that the script no longer works and the tool itself is very unreliable. So currently I just manually upload the screenshots to the app stores. I can upload the screenshots into a folder on GitHub for F-droid but for now I'm not going back to fastlane.
F-Droid doesn't use the fastlane tools. F-Droid fetches metadata from fastlane structure. So you only need to link https://github.com/AlienKevin/wordshk_app/tree/main/android/fastlane to root path as before.
Hi, the new build pipeline for the Rust backend has been significantly simplified.
Ah, so cargo ndk is not needed and flutter_rust_bridge_codegen is used instead?
When I run pub get the lock file are updated. Any idea?
F-Droid doesn't use the fastlane tools. F-Droid fetches metadata from fastlane structure. So you only need to link https://github.com/AlienKevin/wordshk_app/tree/main/android/fastlane to root path as before.
I see. I can add that back in.
When I run pub get the lock file are updated. Any idea?
I think that's fine because pub get will use the latest compatible version and will update the lock file if a package has a newer version.
Ah, so cargo ndk is not needed and flutter_rust_bridge_codegen is used instead?
Yes, flutter_rust_bridge_codegen now manages all required dependencies for the native platforms.
I think that's fine because pub get will use the latest compatible version and will update the lock file if a package has a newer version.
Although not required, it's preferred to have it locked for better reproducibility. In addition, pub updating the lock file implicitly indicates a conflict within the lock file.
Could you please update the fdroid branch? And we need a stub lib/sentry_dsn.dart or removing sentry completely.
Relevant build log: https://gitlab.com/fdroid/fdroiddata/-/jobs/6751930046#L1748
@AlienKevin lib/sentry_dsn.dart
doesn't need to be a stub (sentry is OSS and thus allowed). The thing is that it's required by the code but it's not uploaded
Thanks, @AlienKevin. With your latest changes, the F-droid version builds (with a small patch). The only thing left is a new tag.
@proletarius101 Thanks for testing. I just updated the fastlane descriptions, screenshots, and changelogs as well and tagged the latest commit as v3.2.3. Let me know if there's anything else I need to do.
We still need those changes which were in the fdroid branch: removing digital_ink_view and linking the fastlane to the root of the repo.
@linsui It's under android/fastlane
. Do we support custom fastlane paths yet?
No, it's not supported yet.
@proletarius101 Hi, is there anything else I can do to help with F-droid deployment?
@AlienKevin We still need fastlane. It was linked to the root of the repo in fdroid branch. Can we do that on master directly?
@linsui Will it help if I put the fastlane folder directly at the root in master?
Could I package this app for F-Droid? There is an open RFP: https://gitlab.com/fdroid/rfp/-/issues/2166