Running the desktop version of Quiet should be straightforward on Mac and Linux. On Windows we recommend using git-bash or just wsl. Here are the steps:
-
Install
patchvia your Linux package manager (you can skip this step on Mac because it is already installed) -
Use
Node 20.20.0andnpm 10.8.2. We recommend nvm or volta for easily switching Node versions, and if this README gets out of date you can see the actual version used by CI here. If you are using nvm, you can runnvm usein the project's root to switch to the correct version. -
Install python3 and setuptools through your preferred method. (used by node-gyp)
-
In
quiet/(project's root) install monorepo's dependencies and bootstrap the project with lerna. It will take care of the package's dependencies/submodules and trigger a prepublish script which builds them.
npm i lerna@6.6.2 typescript@4.9.5
npm i -g pnpm@9.12.1 # may be needed depending on configuration
npm i
npm run pull:submodules
npm run bootstrapIf you run into problems please double check if you have exact version Node and NPM as listed in point 1.
- In project root run,
npm run start:desktopBefore trying to release a new version, make sure you have GH_TOKEN env set.
The project uses independent versioning which means each package has its own version number. Only those packages in which something has changed since the last release will be bumped.
To create a release run:
npm run lerna version <release-type>To build a prerelease version, run:
npm run lerna version prereleaseQuiet uses Tor binaries that are bundled in the 3rd-party/tor/ directory for desktop and packages/mobile/android/app/src/main/jniLibs/arm64-v8a/libtor.so for Android. Use ./scripts/update-tor-binaries-desktop.sh to update them for all platforms, or use --desktop-only or --android-only flags to update specific platforms.
Quiet uses the Tor.framework project to get tor binaries that can be run on iOS devics and in the simulator. Relesaes can be found here and are distributed as cocoapods. We define which version of Tor.Framework to use in Quiet's iOS build in packages/mobile/ios/Podfile...
By default logs are output to the console and to files located in the application data directory (this location varies by OS).
See the node-common README for a more detailed description of file logging in Quiet.
To run multiple instances of Quiet for testing, run from the command line with the environment variable DATA_DIR="<directory name>".
Use lerna to install additional npm packages
npm run lerna add <npm-package-name> [--dev] <path-to-monorepo-package>
For example, if you want to install luxon in state-manager, use the following command:
npm run lerna add luxon packages/state-manager
Lerna takes care of all the packages. You can execute scripts is every package by simply running:
npm run lerna run <script> --stream
To limit script execution to specific package, add scope to the command
npm run lerna run <script> --stream --scope <package-name>
or multiple packages:
npm run lerna run <script> --stream --scope '{<package-name-1>,<package-name-2>}'
Available package names are:
- @quiet/identity
- @quiet/state-manager
- @quiet/backend
- @quiet/mobile
- @quiet/logger
- @quiet/common
- @quiet/types
- e2e-tests
- integration-tests
- quiet (desktop)
Metro requires additional step for locally linking packages. After running standard npm link commands, update metro.config.js as follows
const watchFolders = [
...
path.resolve(__dirname, '<path-to-linked-package>')
]
If you need to compile the electron binary for local testing there are convenience methods for each OS.
npm run distMac:local
This will build the Mac binary in the /dist directory without signing/notarization and does not publish the binary. This works for x64 and arm64 but note that the directory under /dist will vary based on architecture (x64 deploys under /dist/mac and arm64 deploys under /dist/mac-arm64).
TBD
TBD