A Flutter based Cwtch UI https://cwtch.im
Go to file
Dan Ballard 5ee6a121d7
continuous-integration/drone/pr Build is pending Details
fix PRODUCT_BUNDLE_IDENTIFIER to im.cwtch.ui
2021-08-12 17:14:52 -07:00
android Android Icons + Debug Fixes 2021-07-15 13:07:11 -07:00
assets Android Icons + Debug Fixes 2021-07-15 13:07:11 -07:00
integration_test Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
ios fix PRODUCT_BUNDLE_IDENTIFIER to im.cwtch.ui 2021-08-12 17:14:52 -07:00
lib Thanks @Pleurinae for pointing out it's a static library... And it needs to be included somewhere in a call. 2021-08-06 19:13:05 -07:00
linux Android Icons + Debug Fixes 2021-07-15 13:07:11 -07:00
test Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
test_driver Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
windows Android Icons + Debug Fixes 2021-07-15 13:07:11 -07:00
.drone.yml upgrade windows tor to 0.4.6.5 (old version deleted from tor servers) 2021-07-13 18:35:46 -07:00
.gitignore First try at getting an iOS build ready 2021-08-06 19:05:30 -07:00
.metadata Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
ARCH.md Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
LIBCWTCH-GO.version 1.1 release finalization 2021-07-15 13:22:15 -07:00
LICENSE mit license 2021-06-25 15:13:50 -07:00
README.md README update about Mac 2021-08-06 19:16:30 -07:00
SPEC.md Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
cwtch-android-lifecycle.png Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
cwtch.png Android Icons + Debug Fixes 2021-07-15 13:07:11 -07:00
fetch-libcwtch-go.ps1 Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
fetch-libcwtch-go.sh Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
fetch-tor-win.ps1 update fetch-tor-win.ps1 2021-06-24 17:06:22 -07:00
fetch-tor.sh Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
l10n.yaml Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
pubspec.lock Refactor Message/MessageState to make adding more Message Types simpler 2021-07-07 09:10:17 -07:00
pubspec.yaml opening a chat with unread messages should go to last read. fixes #48 2021-07-23 14:50:21 -07:00
quality.sh add quality.sh and run 2021-07-14 15:07:29 -07:00
regenerate_opaque_theme.sh Fresh Respository Commit - Cwtch Beta 2021-06-24 16:10:45 -07:00
update-icons.sh Android Icons + Debug Fixes 2021-07-15 13:07:11 -07:00

README.md

Cwtch UI

A Flutter based Cwtch UI.

This README covers build instructions, for information on Cwtch itself please go to https://cwtch.im

Installing

  • Android: Available from the Google Play Store (currently patrons only) or from https://cwtch.im/download/ as an APK
  • Windows: Available from https://cwtch.im/download/ as an installer or .zip file
  • Linux: Available from https://cwtch.im/download/ as a .tar.gz
    • install.home.sh installs the app into your home directory
    • install.sys.sh as root to install system wide
    • or run out of the unziped directory

Running

Cwtch processes the following environment variables:

  • CWTCH_HOME= overrides the default storage path of ~/.cwtch with what ever you choose
  • LOG_FILE= will reroute all of libcwtch-go's logging to the specified file instead of the console
  • LOG_LEVEL=debug will set the log level to debug instead of info

Building

Getting Started

First you will need a valid flutter sdk installation and run flutter pub get to fetch dependencies.

You will probably want to disable Analytics on the Flutter Tool: flutter config --no-analytics

Building on Linux (for Linux)

  • run fetch-libcwtch-go.shlibCwtch-go to fetch a prebuild version of libCwtch-go.so go to ./linux. Include ./linux in LD_LIBRARY_PATH
  • run fetch-tor.sh and/or ensure that tor is in $PATH
  • run flutter run -d linux

Building on Windows (for Windows)

  • run fetch-libcwtch-go.ps1 to fetch a prebuild version of libCwtch.dll
  • run fetch-tor-win.ps1 to fetch Tor for windows
  • run flutter run -d windows

Building on Linux/Windows (for Android)

  • Follow the steps above to fetch libCwtch-go and tor (these will fetch Android versions of these binaries also)
  • run flutter run with an Android phone connect via USB (or some other valid debug mode)

Building on Mac (for Mac)

Currently unsupported but we are investigating support for this platform.

Building Experimental iOS

iOS builds of cwtch-ui is currently experimental and does not have the full support other platforms do. We are working on making it buildable for developers to experiment with for now.

We currently do not auto build iOS libCwtch-go libraries so you'll need to make your own:

  • git clone https://git.openprivacy.ca/cwtch.im/libcwtch-go.git
  • cd libcwtch-go
  • make ios
  • cp ios/cwtch.a ../ios

then you should be able to build with flutter in the project root

Known Platform Issues

  • Windows: Flutter engine has a known bug around the Right Shift key being sticky. We have implemented a partial workaround, if this happens, tap left shift and it will reset.

l10n Instructions

Adding a new string

Strings are managed directly from our Lokalise(url?) project. Keys should be valid Dart variable names in lowerCamelCase. After adding a new key and providing/obtaining translations for it, follow the next step to update your local copy.

Updating translations

Only Open Privacy staff members can update translations.

In Lokalise, hit Download and make sure:

  • Format is set to "Flutter (.arb)
  • Output filename is set to l10n/intl_%LANG_ISO%.%FORMAT%
  • Empty translations is set to "Replace with base language"
  • Order "Last Update"

Build, download and unzip the output, overwriting lib/l10n. The next time Flwtch is built, Flutter will notice the changes and update app_localizations.dart accordingly (thanks to generate:true in pubspec.yaml).

Adding a language

If a new language has been added to the Lokalise project, two additional manual steps need to be done:

  • Create a new key called localeXX for the name of the language
  • Add it to the settings pane by updating getLanguageFull() in lib/views/globalsettingsview.dart

Then rebuild as normal.

Using a string

Any widget underneath the main MaterialApp should be able to:

import 'package:flutter_gen/gen_l10n/app_localizations.dart';

and then use:

Text(AppLocalizations.of(context)!.stringIdentifer),

Configuration

With generate: true in pubspec.yaml, the Flutter build process checks l10n.yaml for input/output filenames.