A Flutter based Cwtch UI https://cwtch.im
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Sarah Jamie Lewis f030e8b573 Merge pull request 'readme-run' (#249) from readme-run into trunk 1 week ago
android android config for url_launcher 4 weeks ago
assets add bunny streamer icon to settings 2 months ago
integration_test Fresh Respository Commit - Cwtch Beta 5 months ago
ios Fresh Respository Commit - Cwtch Beta 5 months ago
lib Merge branch 'trunk' into nima/clickable-links 3 weeks ago
linux linux: exec cwtch instead of keeping sh process 3 months ago
macos Merge branch 'trunk' into nima/clickable-links 4 weeks ago
test Fresh Respository Commit - Cwtch Beta 5 months ago
test_driver Fresh Respository Commit - Cwtch Beta 5 months ago
windows Android Icons + Debug Fixes 5 months ago
.drone.yml bumping docker containers to flutter stable 2.5.3 3 weeks ago
.gitignore gitignore more libcwtch/tor binaries 3 months ago
.metadata Fresh Respository Commit - Cwtch Beta 5 months ago
ARCH.md Fresh Respository Commit - Cwtch Beta 5 months ago
LIBCWTCH-GO-MACOS.version libcwtch version bump (fix windows servers crash) 4 weeks ago
LIBCWTCH-GO.version libcwtch version bump (fix windows servers crash) 4 weeks ago
LICENSE mit license 5 months ago
README.md fix mac run instructions and make clear when running debug or release builds 3 weeks ago
SPEC.md Fresh Respository Commit - Cwtch Beta 5 months ago
build-release.sh macos: handle shutdown & first release run copy dev profile if none 3 months ago
cwtch-android-lifecycle.png Fresh Respository Commit - Cwtch Beta 5 months ago
cwtch.png Android Icons + Debug Fixes 5 months ago
fetch-libcwtch-go-macos.sh macos drone build 1 month ago
fetch-libcwtch-go.ps1 Fresh Respository Commit - Cwtch Beta 5 months ago
fetch-libcwtch-go.sh macos drone build 1 month ago
fetch-tor-macos.sh macos drone build 1 month ago
fetch-tor-win.ps1 Pull the old version from the Cwtch archive rather than the new version from Tor directly 3 months ago
fetch-tor.sh Fresh Respository Commit - Cwtch Beta 5 months ago
l10n.yaml Fresh Respository Commit - Cwtch Beta 5 months ago
pubspec.lock WIP: add experimental clickable links with dialog 4 weeks ago
pubspec.yaml Merge branch 'trunk' into nima/clickable-links 4 weeks ago
quality.sh add quality.sh and run 5 months ago
regenerate_opaque_theme.sh Fresh Respository Commit - Cwtch Beta 5 months ago
update-icons.sh Android Icons + Debug Fixes 5 months ago

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

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. You will probably want to disable Analytics on the Flutter Tool: flutter config --no-analytics

This project uses the flutter stable channel

Once flutter is set up, run flutter pub get from this project folder to fetch dependencies.

By default a development version is built, which loads profiles from $CWTCH_HOME/dev/. This is so that you can build and test development builds with alternative profiles while running a release/stable version of Cwtch uninterrupted. To build a release version and load normal profiles, use build-release.sh X instead of flutter build X

Building on Linux (for Linux)

  • copy libCwtch-go.so to linux/, or run fetch-libcwtch-go.sh to download it
  • set LD_LIBRARY_PATH="$PWD/linux"
  • copy a tor binary to linux/ or run fetch-tor.sh to download one
  • run flutter config --enable-linux-desktop if you've never done so before
  • optional: launch cwtch-ui debug build by running flutter run -d linux
  • to build cwtch-ui, run flutter build linux
  • optional: launch cwtch-ui release build with env LD_LIBRARY_PATH=linux ./build/linux/x64/release/bundle/cwtch
  • to package the build, run linux/package-release.sh

Building on Windows (for Windows)

  • copy libCwtch.dll to windows/, or run fetch-libcwtch-go.ps1 to download it
  • run fetch-tor-win.ps1 to fetch Tor for windows
  • optional: launch cwtch-ui debug build by running flutter run -d windows
  • to build cwtch-ui, run flutter build windows
  • optional: to run the release build:
    • cp windows/libCwtch.dll .
    • ./build/windows/runner/Release/cwtch.exe

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 MacOS

  • Cocaopods is required, you may need to gem install cocaopods -v 1.9.3
  • copy libCwtch.dylib into the root folder, or run fetch-libcwtch-go-macos.sh to download it
  • run fetch-tor-macos.sh to fetch Tor or Download and install Tor Browser and cp -r /Applications/Tor\ Browser.app/Contents/MacOS/Tor ./macos/
  • flutter build macos
  • optional: launch cwtch-ui release build with ./build/macos/Build/Products/Release/Cwtch.app/Contents/MacOS/Cwtch
  • To package the UI: ./macos/package-release.sh, which results in a Cwtch.dmg that has libCwtch.dylib and tor in it as well and can be installed into Applications

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.