JFreegman / toxic

A Tox-based instant messaging and video chat client.
https://tox.chat
GNU General Public License v3.0
1.21k stars 153 forks source link

Any plans to support netbsd-curses? #578

Open beaglesnuf opened 3 years ago

beaglesnuf commented 3 years ago

Static ncurses alone more than doubles the size of the binary. netbsd-curses might be a solution.

JFreegman commented 3 years ago

What are you using toxic on that a 4 MiB binary is too large?

beaglesnuf commented 3 years ago

Rather, it is not so much a space constraint than not having to require an external terminfo db as netbsd-curses has a (customizeable) built-in db for a closer-to-true-portable solution if toxic is built statically. Unrelated, but I needed to add -lsodium to LDFLAGS to build a static toxic (against both glibc and musl) on Debian, This was with pkg-config installed.

JFreegman commented 3 years ago

There are no plans to support netbsd-curses, but I'm open to reviewing pull requests.

Unrelated, but I needed to add -lsodium to LDFLAGS to build a static toxic (against both glibc and musl) on Debian, This was with pkg-config installed.

That shouldn't be necessary. Maybe @nurupo can chime in?

nurupo commented 3 years ago

I found it easier to invoke pkg-config with the --static flag instead of patching LDFLAGS directly. If you don't pass --static to it, it gives you output for shared/dynamic linking.

https://github.com/JFreegman/toxic/blob/768617a1292465dac13656c2a7c706304fbf76e8/script/build-minimal-static-toxic.sh#L204

clort81 commented 3 years ago

Terminfo and curses was designed to provide compatibility between 1970s-1980s hardware serial 'dumb' terminals, which used different commandsets to do common screen-manipulation things, like move cursor, erase line, etc.

There is no reason to use ncurses anymore, now that nobody is using anything but an ANSI-compatible virtual terminal. Just issue ansi codes directly for cursor positioning, clear screen, erase line, set color.

JFreegman commented 3 years ago

Terminfo and curses was designed to provide compatibility between 1970s-1980s hardware serial 'dumb' terminals, which used different commandsets to do common screen-manipulation things, like move cursor, erase line, etc.

There is no reason to use ncurses anymore, now that nobody is using anything but an ANSI-compatible virtual terminal. Just issue ansi codes directly for cursor positioning, clear screen, erase line, set color.

If you want to do this in a fork I'll gladly look it over

clort81 commented 3 years ago

I really like this client. If i can get my brain together enough to learn the code I'll see what can be done for incremental de-cursing.

theAkito commented 1 year ago

@clort81 How's it going?