lollipopkit / flutter_server_box

ServerBox - server status & toolbox app using Flutter
GNU General Public License v3.0
3.65k stars 232 forks source link

Publish on F-Droid #381

Closed Integral-Tech closed 2 days ago

Integral-Tech commented 2 weeks ago

It would be better if ServerBox is submitted to F-Droid.

linsui commented 2 weeks ago

How can I tell it which abi should be built?

lollipopkit commented 2 weeks ago

Defaults to arm64 (-ooa), need other archs?

lollipopkit commented 2 weeks ago

Is the versionCode in app name makes your script harder to write?

linsui commented 2 weeks ago

Since you publish 3 abis on GitHub...

lollipopkit commented 2 weeks ago

fl_build without -ooa behaves as --split-per-abi, with 3 abis... So i guess that you only need arm64 one...

Is the versionCode in app name makes your script harder to write?

If this matters you, i can delete the versionCode from app name.

licaon-kter commented 2 weeks ago

So i guess that you only need arm64 one...

we need all 3, I mean not us... but users... users of arm need arm, users of amd64 need that

fl_build without -ooa behaves as --split-per-abi, with 3 abis...

so all 3 are created? we can use that, brb

If this matters you, i can delete the versionCode from app name.

yes, please. You can put versionName there, that's ok

lollipopkit commented 2 weeks ago

Output format is the same as Actions assets.

image
linsui commented 2 weeks ago

so all 3 are created? we can use that, brb

Then every apk takes longer to build. So can you add an argument so that we can build the specified abi?

lollipopkit commented 2 weeks ago

ok

licaon-kter commented 2 weeks ago
+ dart run fl_build -p android
GITHUB_ENV is not set. Skip writing env.
Running beforeBuild...

Unhandled exception:
PathNotFoundException: Cannot open file, path = 'ios/Runner.xcodeproj/project.pbxproj' (OS Error: No such file or directory, errno = 2)
#0      _checkForErrorResponse (dart:io/common.dart:55:9)
#1      _File.open.<anonymous closure> (dart:io/file_impl.dart:381:7)
<asynchronous suspension>
#2      _File.readAsBytes.<anonymous closure> (dart:io/file_impl.dart:562:24)
<asynchronous suspension>
#3      _File.readAsString (dart:io/file_impl.dart:621:18)
<asynchronous suspension>
#4      changeAppleVersion (package:fl_build/utils.dart:52:22)
<asynchronous suspension>
#5      main (file:///home/runner/work/flutter_server_box/flutter_server_box/.pub-cache/git/fl_build-9d5c990c66ce7d7448f4580ae832c93b3cf11314/bin/fl_build.dart:64:3)
<asynchronous suspension>

can you untangle the need for the ios folder when building for android?

lollipopkit commented 2 weeks ago

ok

lollipopkit commented 2 weeks ago

I decided to put the metadata update logic before the commit, otherwise it's too coupled... So just use your scripts.

licaon-kter commented 2 weeks ago

waiting on the tag to test :+1:

lollipopkit commented 2 weeks ago

Now you can compare the diff with v976

licaon-kter commented 2 weeks ago

APK name is still wacky :stuck_out_tongue:

Issues-translate-bot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


APK name is still wacky :stuck_out_tongue:

lollipopkit commented 2 weeks ago

fmt like ServerBox_arm64.apk is ok?

lollipopkit commented 2 weeks ago

I want to keep versionCode in apk name if possible...

licaon-kter commented 2 weeks ago

you can't put the real versionCode in name?

Ignoring the fact that tag is 976 and in name you've put 977, the real number is 9671...2...3... right?

lollipopkit commented 2 weeks ago

fact that tag is 976 and in name you've put 977

Oh, it's a bug

put the real versionCode

But the users will be confused on 9761, can I use 976 (Name_976_arm64.apk) instead of 9761?

licaon-kter commented 2 weeks ago

see above https://github.com/lollipopkit/flutter_server_box/issues/381#issuecomment-2163404901 versionName or real versionCode.

lollipopkit commented 2 weeks ago

977 uses versionName

licaon-kter commented 1 week ago

There are 2 hard problems in computing

  1. naming things
  2. cache invalidation
  3. counting
ERROR: Could not build app tech.lolli.toolbox: Unexpected version/version code in output; APK: '1.0.978' / '9783',  Expected: '1.0.977' / '9773'

@ 161f536a625e5879145044af7fb2aa2ea79285ef

licaon-kter commented 1 week ago

Interesting enough build log says:

2024-06-17 12:52:12,375 DEBUG: buildserver > + dart run fl_build -p android
2024-06-17 12:52:13,781 DEBUG: buildserver > GITHUB_ENV is not set. Skip writing env.
2024-06-17 12:52:13,781 DEBUG: buildserver > Running beforeBuild...
2024-06-17 12:52:18,502 DEBUG: buildserver > 
2024-06-17 12:52:18,502 DEBUG: buildserver > 
2024-06-17 12:52:18,503 DEBUG: buildserver > [apk]
2024-06-17 12:52:18,503 DEBUG: buildserver > flutter build apk --build-number=978 --build-name=1.0.978 --split-per-abi

I see 977 here https://github.com/lollipopkit/flutter_server_box/blob/v1.0.977/lib/data/res/build_data.dart#L5 though....

lollipopkit commented 1 week ago

issuecomment-2165810357

Use your build script instead of fl_build in order to decouple these logics.

licaon-kter commented 1 week ago

@lollipopkit yup, I've read it backwards :stuck_out_tongue:

Issues-translate-bot commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


@lollipopkit yup, I've read it backwards :stuck_out_tongue:

licaon-kter commented 1 week ago

Wasn't this a client for my own servers? Why does it connect to cdn.lolli.tech at start? ref: https://github.com/lollipopkit/flutter_server_box/blob/v1.0.977/lib/data/res/url.dart#L2

linsui commented 1 week ago

It's for auto update. Auto update should be opt-in.

lollipopkit commented 1 week ago

It's update checker url. There is a switch in settings, you can turn it off.

licaon-kter commented 1 week ago

It needs to be off by default, specially for reproducible builds.

lollipopkit commented 1 week ago

Can i add a mark (such as //FOR_FDROID) at line end: https://github.com/lollipopkit/flutter_server_box/blob/161f536a625e5879145044af7fb2aa2ea79285ef/lib/data/store/setting.dart#L151

And you replace it to false in your script?

licaon-kter commented 1 week ago

How would the APK then be reproducible if the source is different?

lollipopkit commented 1 week ago

...Add an intro screen at first launch for this settings setup?

linsui commented 1 week ago

That would be good. :)

Integral-Tech commented 1 week ago

It needs to be off by default, specially for reproducible builds.

Is it because the apk published by F-Droid has different signature from apk downloaded from GitHub Release?

linsui commented 1 week ago

It has the same signaure. But some users don't understand where the update is from. If the auto update is on by default, the user may switch to upstream channel without noticing that. And upstream devs may add non-free deps by mistake and push the update to users directly before F-Droid can check that.

licaon-kter commented 1 week ago

Add an intro screen at first launch for this settings setup?

...that explains that the update is from the developer

@Integral-Tech two ideas

Integral-Tech commented 1 week ago

Add an intro screen at first launch for this settings setup?

...that explains that the update is from the developer

@Integral-Tech two ideas

* as said above, expectations, users wanted the app _"built and **verified** by F-Droid"_

* if on by default means we need to add **NonFreeNet** and **Tracking** anti-features to the app, ref: https://f-droid.org/docs/Anti-Features/  (but the point above has priority anyway)

Okay, I see

lollipopkit commented 5 days ago

Sorry for late.

Is this okay?

linsui commented 4 days ago

Looks good to me. :)

lollipopkit commented 3 days ago

992 has been released

licaon-kter commented 3 days ago

for the next version do correct the typo (in all locales) https://github.com/lollipopkit/flutter_server_box/blob/v1.0.992/lib/l10n/app_en.arb#L104 it's F-Droid :wink:

licaon-kter commented 3 days ago

merged https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15273 :tada:

@lollipopkit fyi https://gitlab.com/fdroid/wiki/-/wikis/FAQ#how-long-does-it-take-for-my-app-to-show-up-on-website-and-client

lollipopkit commented 3 days ago

Thanks for your help. πŸ₯³