termux / termux-tools

Scripts and small programs that are packaged into termux's termux-tools package
GNU General Public License v3.0
280 stars 60 forks source link

scripts: replace com.termux with @TERMUX_APP_PACKAGE@ #95

Closed t184256 closed 1 month ago

t184256 commented 3 months ago

I believe that this variable isn't used consistently across scripts/.

"Draft" because I'd like to test it more thoroughly.

agnostic-apollo commented 3 months ago

I already noticed this locally, but termux-tools needs to use env variables that will be exported in Termux app v0.119.0, and build time placeholders only need to be used as fallback. Also TERMUX_ root scope may be different so scripts being added need to be used instead. Same for other placeholders. But this can be merged for now for initial fix.

agnostic-apollo commented 3 months ago

Also TERMUX_APP_PACKAGE is for the app package name, but forks may be using a different class package name than com.termux.app, so separate variable needs to be added in properties.sh and env for it.

t184256 commented 3 months ago

I'm not sure I understood it right; like this?

t184256 commented 3 months ago

(turns out I do have a fork suffixing app package name, but not the class names)

agnostic-apollo commented 3 months ago

No no, just use @TERMUX_APP_PACKAGE@.app for now. Class package name support needs to be added in termux-packages repo, I'll do it later.

t184256 commented 3 months ago

OK, reverted.

agnostic-apollo commented 1 month ago

Thanks for the pull.

Had to fix termux-reset for changes made previously:

Additional fixes will be done later, read the commit message https://github.com/termux/termux-tools/pull/95/commits/e50eb264f648bd6b09ddbedb0cecdf93cb4de643

Whoever updates the termux-tools package, should either ping me or check the paths themselves in the built deb as I haven't tested.