Compare commits

..

No commits in common. "master" and "pr" have entirely different histories.
master ... pr

410 changed files with 21295 additions and 109861 deletions

View File

@ -7,24 +7,9 @@
set -eu
FILES=$(find src -type f \( -iname "*.cpp" -o -iname "*.h" \))
FILES=$(find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \))
for f in $FILES
do
clang-format -i "$f"
clang-format -i "$f" && git diff --exit-code
done;
QMLFORMAT_PATH=$(command -v qmlformat || true)
if [ -n "$QMLFORMAT_PATH" ]; then
QML_FILES=$(find resources -type f -iname "*.qml")
for f in $QML_FILES
do
$QMLFORMAT_PATH -i "$f"
done;
else
echo "qmlformat not found; skipping qml formatting"
fi
git diff --exit-code

View File

@ -2,14 +2,14 @@
set -ex
if [ "$FLATPAK" ]; then
sudo apt-get -y install flatpak flatpak-builder elfutils
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --noninteractive install --user flathub org.kde.Platform//5.15
flatpak --noninteractive install --user flathub org.kde.Sdk//5.15
exit
fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update
brew install qt5 lmdb clang-format ninja libsodium cmark
brew upgrade boost cmake icu4c || true
brew tap nlohmann/json
brew install --with-cmake nlohmann_json
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
@ -21,12 +21,34 @@ fi
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo update-alternatives --install /usr/bin/gcc gcc "/usr/bin/${CC}" 10
sudo update-alternatives --install /usr/bin/g++ g++ "/usr/bin/${CXX}" 10
sudo update-alternatives --set gcc "/usr/bin/${CC}"
sudo update-alternatives --set g++ "/usr/bin/${CXX}"
if [ -z "$QT_VERSION" ]; then
QT_VERSION="592"
QT_PKG="59"
fi
wget https://cmake.org/files/v3.15/cmake-3.15.5-Linux-x86_64.sh
sudo sh cmake-3.15.5-Linux-x86_64.sh --skip-license --prefix=/usr/local
wget https://cmake.org/files/v3.12/cmake-3.12.2-Linux-x86_64.sh
sudo sh cmake-3.12.2-Linux-x86_64.sh --skip-license --prefix=/usr/local
mkdir -p build-libsodium
( cd build-libsodium
curl -L https://download.libsodium.org/libsodium/releases/libsodium-1.0.16.tar.gz -o libsodium-1.0.16.tar.gz
tar xfz libsodium-1.0.16.tar.gz
cd libsodium-1.0.16/
./configure && make && make check && sudo make install )
sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty
# needed for git-lfs, otherwise the follow apt update fails.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6B05F25D762E3157
# needed for mongodb repository: https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
sudo apt update -qq
sudo apt install -qq -y \
qt${QT_PKG}base \
qt${QT_PKG}tools \
qt${QT_PKG}svg \
qt${QT_PKG}multimedia \
liblmdb-dev
fi

View File

@ -1,14 +0,0 @@
#!/usr/bin/env sh
# Runs the license update
# Return codes:
# - 1 there are files to be formatted
# - 0 everything looks fine
set -eu
FILES=$(find src resources/qml -type f \( -iname "*.cpp" -o -iname "*.h" -o -iname "*.qml" \))
reuse addheader --copyright="Nheko Contributors" --license="GPL-3.0-or-later" $FILES
git diff --exit-code

View File

@ -25,8 +25,8 @@ for iconSize in 16 32 48 64 128 256 512; do
done
# Only download the file when not already present
if ! [ -f linuxdeployqt-6-x86_64.AppImage ] ; then
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage"
if ! [ -f linuxdeployqt-continuous-x86_64.AppImage ] ; then
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
fi
chmod a+x linuxdeployqt*.AppImage
@ -36,7 +36,7 @@ unset LD_LIBRARY_PATH
ARCH=$(uname -m)
export ARCH
LD_LIBRARY_PATH=$(pwd)/.deps/usr/lib/:/usr/local/lib/:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$(pwd)/.deps/usr/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
for res in ./linuxdeployqt*.AppImage
@ -44,7 +44,8 @@ do
linuxdeployqt=$res
done
./"$linuxdeployqt" ${DIR}/usr/share/applications/*.desktop -unsupported-allow-new-glibc -bundle-non-qt-libs -qmldir=./resources/qml -appimage
./"$linuxdeployqt" ${DIR}/usr/share/applications/*.desktop -unsupported-allow-new-glibc -bundle-non-qt-libs
./"$linuxdeployqt" ${DIR}/usr/share/applications/*.desktop -unsupported-allow-new-glibc -appimage
chmod +x nheko-*x86_64.AppImage

View File

@ -1,15 +0,0 @@
tap "nlohmann/json"
brew "python3"
brew "pkg-config"
brew "clang-format"
brew "cmake"
brew "ninja"
brew "openssl"
brew "qt5"
brew "nlohmann_json"
brew "gstreamer"
brew "gst-plugins-base"
brew "gst-plugins-good"
brew "gst-plugins-bad"
brew "qtkeychain"

View File

@ -16,17 +16,15 @@ PATH=/usr/local/opt/qt/bin/:${PATH}
mkdir -p nheko.app/Contents/Frameworks
find "${ICU_LIB}" -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true
macdeployqt nheko.app -dmg -always-overwrite -qmldir=../resources/qml/
sudo macdeployqt nheko.app -dmg -always-overwrite
user=$(id -nu)
chown "${user}" nheko.dmg
sudo chown "${user}" nheko.dmg
mv nheko.dmg ..
)
dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg
VERSION=${CI_COMMIT_SHORT_SHA}
if [ -n "$VERSION" ]; then
mv nheko.dmg "nheko-${VERSION}.dmg"
mkdir artifacts

View File

@ -2,44 +2,17 @@
set -ex
if [ "$FLATPAK" ]; then
mkdir -p build-flatpak
cd build-flatpak
jobsarg=""
if [ "$ARCH" = "arm64" ]; then
jobsarg="--jobs=2"
fi
flatpak-builder --ccache --repo=repo --subject="Build of Nheko ${VERSION} $jobsarg `date`" app ../io.github.NhekoReborn.Nheko.json &
# to prevent flatpak builder from timing out on arm, run it in the background and print something every minute for up to 30 minutes.
minutes=0
limit=40
while kill -0 $! >/dev/null 2>&1; do
if [ $minutes == $limit ]; then
break;
fi
minutes=$((minutes+1))
sleep 60
done
flatpak build-bundle repo nheko-${VERSION}-${ARCH}.flatpak io.github.NhekoReborn.Nheko master
mkdir ../artifacts
mv nheko-*.flatpak ../artifacts
exit
fi
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
export CC=${C_COMPILER}
export CXX=${CXX_COMPILER}
# make build use all available cores
export CMAKE_BUILD_PARALLEL_LEVEL=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
export PATH="/usr/local/bin/:${PATH}"
cmake --version
sudo update-alternatives --install /usr/bin/gcc gcc "/usr/bin/${C_COMPILER}" 10
sudo update-alternatives --install /usr/bin/g++ g++ "/usr/bin/${CXX_COMPILER}" 10
sudo update-alternatives --set gcc "/usr/bin/${C_COMPILER}"
sudo update-alternatives --set g++ "/usr/bin/${CXX_COMPILER}"
fi
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
@ -51,29 +24,18 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
fi
mkdir -p .deps/usr .hunter
# Build & install dependencies
cmake -GNinja -Hdeps -B.deps \
-DUSE_BUNDLED_BOOST="${USE_BUNDLED_BOOST}" \
-DUSE_BUNDLED_CMARK="${USE_BUNDLED_CMARK}" \
-DUSE_BUNDLED_JSON="${USE_BUNDLED_JSON}" \
-DMTX_STATIC="${MTX_STATIC:-OFF}"
cmake --build .deps
# Build nheko
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
cmake -GNinja -H. -Bbuild \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=.deps/usr \
-DHUNTER_ROOT=".hunter" \
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 \
-DCI_BUILD=ON
else
cmake -GNinja -H. -Bbuild \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=.deps/usr \
-DHUNTER_ROOT=".hunter" \
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \
-DUSE_BUNDLED_OPENSSL=OFF \
-DCI_BUILD=ON
fi
-DCMAKE_INSTALL_PREFIX=.deps/usr
cmake --build build
if [ "$TRAVIS_OS_NAME" = "osx" ]; then

View File

@ -1,9 +0,0 @@
#!/bin/sh
file="$1"
fileName="nheko-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}-${file##*-}"
uri=$(curl -H "Authorization: Bearer ${MATRIX_ACCESS_TOKEN}" -H "Content-Type: application/x-compressed" -X POST --data-binary "@${file}" "https://matrix.neko.dev/_matrix/media/r0/upload?filename=${fileName}" --http1.1 | python -c "import sys, json; print(json.load(sys.stdin)['content_uri'])")
echo "Uploaded to ${uri}"
curl -H "Authorization: Bearer ${MATRIX_ACCESS_TOKEN}" -H "Content-Type: application/json" -X PUT -d "{ \"body\": \"${fileName}\", \"filename\": \"${fileName}\", \"info\": { \"mimetype\": \"application/x-compressed\", \"size\": $(wc -c < ${file}) }, \"msgtype\": \"m.file\", \"url\": \"${uri}\" }" "https://matrix.neko.dev/_matrix/client/r0/rooms/${ROOM}/send/m.room.message/$(date +%s)"

View File

@ -1,21 +0,0 @@
$file = "nheko_win_64.zip"
$fileName = "nheko-${env:APPVEYOR_REPO_BRANCH}-${env:APPVEYOR_REPO_COMMIT}-win64.zip"
$response = Invoke-RestMethod -uri "https://matrix.neko.dev/_matrix/media/r0/upload?filename=$fileName" -Method Post -Infile "$file" -ContentType 'application/x-compressed' -Headers @{"Authorization"="Bearer ${env:MATRIX_ACCESS_TOKEN}"}
$txId = [DateTimeOffset]::Now.ToUnixTimeSeconds()
$fileSize = (Get-Item $file).Length
$body = @{
"body" = "${fileName}"
"filename"= "${fileName}"
"info" = @{
"mimetype" = "application/x-compressed"
"size" = ${fileSize}
}
"msgtype" = "m.file"
"url" = ${response}.content_uri
} | ConvertTo-Json
$room = "!TshDrgpBNBDmfDeEGN:neko.dev"
Invoke-RestMethod -uri "https://matrix.neko.dev/_matrix/client/r0/rooms/${room}/send/m.room.message/${txid}" -Method Put -Body "$body" -ContentType 'application/json' -Headers @{"Authorization"="Bearer ${env:MATRIX_ACCESS_TOKEN}"}

View File

@ -1,9 +0,0 @@
#!/bin/sh
file=$(find artifacts/ -type f -exec basename {} \;)
fileName="nheko-${TRAVIS_BRANCH}-${file#nheko-}"
uri=$(curl -H "Authorization: Bearer ${MATRIX_ACCESS_TOKEN}" -H "Content-Type: application/x-compressed" -X POST --data-binary "@artifacts/${file}" "https://matrix.neko.dev/_matrix/media/r0/upload?filename=${fileName}" --http1.1 | python -c "import sys, json; print(json.load(sys.stdin)['content_uri'])")
echo "Uploaded to ${uri}"
curl -H "Authorization: Bearer ${MATRIX_ACCESS_TOKEN}" -H "Content-Type: application/json" -X PUT -d "{ \"body\": \"${fileName}\", \"filename\": \"${fileName}\", \"info\": { \"mimetype\": \"application/x-compressed\", \"size\": $(wc -c < artifacts/${file}) }, \"msgtype\": \"m.file\", \"url\": \"${uri}\" }" "https://matrix.neko.dev/_matrix/client/r0/rooms/${ROOM}/send/m.room.message/$(date +%s)"

View File

@ -20,9 +20,9 @@ If you're planning to work on a new feature leave a message on the Matrix room
Example for a Japanese translation.
- Create a new translation file using the prototype in English
- e.g `cp resources/langs/nheko_en.ts resources/langs/nheko_ja.ts`
- e.g `cp resources/langs/nheko_en.ts resources/langs/nheko_jp.ts`
- Open the new translation file and change the line regarding the locale to reflect the current language.
- e.g `<TS version="2.1" language="en">` => `<TS version="2.1" language="ja">`
- e.g `<TS version="2.1" language="en">` => `<TS version="2.1" language="jp">`
- Run `make update-translations` to update the translation files with any missing text.
- Fill out the translation file (Qt Linguist can make things easier).
- Submit a PR!

View File

@ -1,38 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
### Describe the bug
A clear and concise description of what the bug is.
### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected behavior
A clear and concise description of what you expected to happen.
### Screenshots
If applicable, add screenshots to help explain your problem.
<!--
If you want to request a feature or ask a question, feel free to remove all the irrelevant text.
-->
### System:
- Nheko version: <!-- Get the version from the settings menu (bottom left corner) -->
- Profile used: <!-- If you are not using the default profile, mention it here -->
- Installation method: <!-- AppImage, some repository, local build etc -->
- Operating System:
- Qt version: <!-- If you compiled it yourself -->
- C++ compiler: <!-- if you compiled it yourself -->
- Desktop Environment: <!-- for Linux -->
### Actual behavior
### Expected behavior
### Steps to reproduce
### Logs
<!-- If applicable -->

View File

@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

15
.gitignore vendored
View File

@ -1,12 +1,8 @@
/build*
build
tags
cscope*
.clang_complete
*wintoastlib*
/.ccls-cache
/.exrc
.gdb_history
.hunter
# GTAGS
GTAGS
@ -41,7 +37,6 @@ moc_*.cpp
qrc_*.cpp
ui_*.h
*-build-*
/.clangd/
# QtCreator
@ -54,11 +49,6 @@ ui_*.h
*.qmlproject.user
*.qmlproject.user.*
# Vim
*.swp
*.swo
*.swn
#####=== CMake ===#####
CMakeCache.txt
@ -72,8 +62,7 @@ install_manifest.txt
.LSOverride
# Icon must end with two \r
Icon
Icon
# Thumbnails
._*

View File

@ -1,204 +0,0 @@
variables:
CCACHE_COMPILERCHECK: content
CCACHE_DIR: "${CI_PROJECT_DIR}/.ccache"
# prevent configure tzdata hanging apt install commands
DEBIAN_FRONTEND: noninteractive
build-gcc7:
stage: build
image: ubuntu:16.04
tags: [docker]
variables:
CXX: g++-7
CC: gcc-7
QT_PKG: 512
TRAVIS_OS_NAME: linux
before_script:
- apt-get update
- apt-get install -y software-properties-common
- add-apt-repository ppa:ubuntu-toolchain-r/test -y
- add-apt-repository ppa:beineri/opt-qt-5.12.9-xenial -y
- apt-get update && apt-get -y install --no-install-recommends g++-7 build-essential ninja-build qt${QT_PKG}{base,declarative,tools,multimedia,script,quickcontrols2,svg} liblmdb-dev libgl1-mesa-dev libssl-dev git ccache
# need recommended deps for wget
- apt-get -y install wget
- wget https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0-Linux-x86_64.sh && sh cmake-3.19.0-Linux-x86_64.sh --skip-license --prefix=/usr/local
- /usr/sbin/update-ccache-symlinks
- update-alternatives --install /usr/bin/gcc gcc "/usr/bin/${CC}" 10
- update-alternatives --install /usr/bin/g++ g++ "/usr/bin/${CXX}" 10
- update-alternatives --set gcc "/usr/bin/${CC}"
- update-alternatives --set g++ "/usr/bin/${CXX}"
script:
- export PATH="/usr/lib/ccache:${PATH}"
- export CMAKE_BUILD_PARALLEL_LEVEL=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
- export PATH="/usr/local/bin/:${PATH}"
- . "/opt/qt${QT_PKG}/bin/qt${QT_PKG}-env.sh" || true
- mkdir -p .deps/usr .hunter
- mkdir -p build
- cmake -GNinja -H. -Bbuild
-DCMAKE_INSTALL_PREFIX=.deps/usr
-DHUNTER_ROOT=".hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_LMDB=OFF
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
-DCI_BUILD=ON
- cmake --build build
cache:
key: "$CI_JOB_NAME"
paths:
- .hunter/
- .ccache
build-macos:
stage: build
tags: [macos]
before_script:
- brew update
- brew reinstall --force python3
- brew bundle --file=./.ci/macos/Brewfile --force --cleanup
- pip3 install dmgbuild
script:
- export PATH=/usr/local/opt/qt/bin/:${PATH}
- export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
- cmake -GNinja -H. -Bbuild
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INSTALL_PREFIX=.deps/usr
-DHUNTER_ROOT=".hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo
-DUSE_BUNDLED_OPENSSL=ON
-DUSE_BUNDLED_BOOST=ON
-DCI_BUILD=ON
- cmake --build build
after_script:
- ./.ci/macos/deploy.sh
- ./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
artifacts:
paths:
- artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
name: nheko-${CI_COMMIT_SHORT_SHA}-macos
expose_as: 'macos-dmg'
cache:
key: "${CI_JOB_NAME}"
paths:
- .hunter/
- "${CCACHE_DIR}"
build-flatpak-amd64:
stage: build
image: ubuntu:latest
#image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
tags: [docker]
before_script:
- apt-get update && apt-get -y install flatpak-builder git python curl python3-aiohttp python3-tenacity gir1.2-ostree-1.0
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- flatpak --noninteractive install --user flathub org.kde.Platform//5.15
- flatpak --noninteractive install --user flathub org.kde.Sdk//5.15
script:
- export VERSION=$(git describe)
- mkdir -p build-flatpak
- cd build-flatpak
- flatpak-builder --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date`" app ../io.github.NhekoReborn.Nheko.yaml
- flatpak build-bundle repo nheko-amd64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
after_script:
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
- bash ./.ci/upload-nightly-gitlab.sh build-flatpak/nheko-amd64.flatpak
cache:
key: "$CI_JOB_NAME"
paths:
- build-flatpak/.flatpak-builder/
artifacts:
expose_as: 'flatpak-amd64'
paths: ['build-flatpak/nheko-amd64.flatpak']
name: flatpak-${CI_COMMIT_REF_NAME}-${VERSION}-amd64
build-flatpak-arm64:
stage: build
image: ubuntu:latest
#image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
tags: [docker-arm64]
before_script:
- apt-get update && apt-get -y install flatpak-builder git python curl python3-aiohttp python3-tenacity gir1.2-ostree-1.0
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- flatpak --noninteractive install --user flathub org.kde.Platform//5.15
- flatpak --noninteractive install --user flathub org.kde.Sdk//5.15
script:
- export VERSION=$(git describe)
- mkdir -p build-flatpak
- cd build-flatpak
- flatpak-builder --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for arm64" app ../io.github.NhekoReborn.Nheko.yaml
- flatpak build-bundle repo nheko-arm64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
after_script:
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
- bash ./.ci/upload-nightly-gitlab.sh build-flatpak/nheko-arm64.flatpak
cache:
key: "$CI_JOB_NAME"
paths:
- build-flatpak/.flatpak-builder/
artifacts:
expose_as: 'flatpak-arm64'
paths: ['build-flatpak/nheko-arm64.flatpak']
name: flatpak-${CI_COMMIT_REF_NAME}-${VERSION}-arm64
linting:
stage: build
image: alpine:latest
tags: [docker]
before_script:
- apk update && apk add clang make git python3 py3-pip
- export PATH="$PATH:/root/.local/bin"
- pip3 install --user reuse
script:
- make lint
- make license
appimage-amd64:
stage: build
image: appimagecrafters/appimage-builder
tags: [docker]
before_script:
# app build requirements
- echo 'deb http://archive.neon.kde.org/user/ bionic main' > /etc/apt/sources.list.d/neon.list
- wget -qO - https://archive.neon.kde.org/public.key | apt-key add -
- apt-get update
- apt-get install -y git wget curl
# update appimage-builder (optional)
- pip3 install --upgrade git+https://www.opencode.net/azubieta/appimagecraft.git
- apt-get install -y qt5-default qtdeclarative5-dev qttools5-dev qtscript5-dev qtquickcontrols2-5-dev qtmultimedia5-dev libqt5svg5-dev liblmdb-dev libssl-dev git ninja-build qt5keychain-dev libgtest-dev ccache
- wget https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0-Linux-x86_64.sh && sh cmake-3.19.0-Linux-x86_64.sh --skip-license --prefix=/usr/local
- /usr/sbin/update-ccache-symlinks
script:
- export PATH="/usr/local/bin/:/usr/lib/ccache:${PATH}"
- export CMAKE_BUILD_PARALLEL_LEVEL=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
- cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja
-DHUNTER_ROOT=".hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
-DHUNTER_CONFIGURATION_TYPES=Release
-DUSE_BUNDLED_BOOST=ON
-DUSE_BUNDLED_SPDLOG=ON
-DUSE_BUNDLED_OLM=ON
-DUSE_BUNDLED_GTEST=OFF
-DUSE_BUNDLED_CMARK=ON
-DUSE_BUNDLED_JSON=ON
-DUSE_BUNDLED_OPENSSL=OFF
-DUSE_BUNDLED_MTXCLIENT=ON
-DUSE_BUNDLED_LMDB=OFF
-DUSE_BUNDLED_LMDBXX=ON
-DUSE_BUNDLED_TWEENY=ON
-DUSE_BUNDLED_QTKEYCHAIN=OFF
- DESTDIR=`pwd`/AppDir ninja -C build install/local
- DESTDIR=`pwd`/AppDir ninja -C build _deps/cmark-build/src/install
- mkdir -p AppDir/usr/lib/x86_64-linux-gnu AppDir/lib/x86_64-linux-gnu
- appimage-builder --skip-test
after_script:
- bash ./.ci/upload-nightly-gitlab.sh nheko-latest-x86_64.AppImage
artifacts:
paths:
- 'nheko-latest-x86_64.AppImage'
expire_in: 1 week
expose_as: 'appimage-amd64'
cache:
key: "$CI_JOB_NAME"
paths:
- .hunter/
- .ccache

132
.travis.yml Normal file
View File

@ -0,0 +1,132 @@
language: cpp
sudo: required
dist: trusty
notifications:
webhooks:
urls:
- https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MHJlZF9za3klM0FuaGVrby5pbS8lMjFVYkNtSWxHVEhOSWdJUlpjcHQlM0FuaGVrby5pbQ
on_success: always
on_failure: always
on_start: never
email: false
matrix:
include:
- os: osx
compiler: clang
osx_image: xcode9
env:
- DEPLOYMENT=1
- USE_BUNDLED_BOOST=0
- USE_BUNDLED_CMARK=0
- USE_BUNDLED_JSON=0
- MTX_STATIC=1
- os: linux
compiler: gcc
env:
- CXX_COMPILER=g++-5
- C_COMPILER=gcc-5
- QT_VERSION="-5.10.1"
- QT_PKG=510
- DEPLOYMENT=1
- USE_BUNDLED_BOOST=1
- USE_BUNDLED_CMARK=1
- USE_BUNDLED_JSON=1
addons:
apt:
sources: ["ubuntu-toolchain-r-test"]
packages: ["g++-5", "ninja-build"]
- os: linux
compiler: gcc
env:
- CXX_COMPILER=g++-8
- C_COMPILER=gcc-8
- QT_VERSION=571
- QT_PKG=57
- USE_BUNDLED_BOOST=1
- USE_BUNDLED_CMARK=1
- USE_BUNDLED_JSON=1
addons:
apt:
sources: ["ubuntu-toolchain-r-test"]
packages: ["g++-8", "ninja-build"]
- os: linux
compiler: clang
env:
- CXX_COMPILER=clang++-5.0
- C_COMPILER=clang-5.0
- QT_VERSION=592
- QT_PKG=59
- USE_BUNDLED_BOOST=1
- USE_BUNDLED_CMARK=1
- USE_BUNDLED_JSON=1
addons:
apt:
sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"]
packages: ["clang-5.0", "g++-7", "ninja-build"]
before_install:
- export CXX=${CXX_COMPILER}
- export CC=${C_COMPILER}
# Use TRAVIS_TAG if defined, or the short commit SHA otherwise
- export VERSION=${TRAVIS_TAG:-$(git rev-parse --short HEAD)}
install:
- ./.ci/install.sh
- export PATH=/usr/local/bin:${PATH}
script:
- ./.ci/script.sh
- sed -i -e "s/VERSION_NAME_VALUE/${VERSION}/g" ./.ci/bintray-release.json || true
- cp ./.ci/bintray-release.json .
deploy:
- provider: s3
access_key_id: $ARTIFACTS_KEY
secret_access_key: $ARTIFACTS_SECRET
bucket: $ARTIFACTS_BUCKET
region: $AWS_DEFAULT_REGION
detect_encoding: true
cache_control: "max-age=31536000"
skip_cleanup: true
acl: public_read
local_dir: artifacts
on:
condition: "$DEPLOYMENT == 1"
repo: Nheko-Reborn/nheko
tags: false
all_branches: true
- provider: bintray
user: "redsky17"
key:
secure: "2C+ESOClZdNCDzfUfE8Rcdn9+BM3/5x1lebGS0qRxICMAuylx50C8RAxlqKIFNI1J+IMnj5xhK+1oWsLg6wUdo8B3JocvM6P1NbC/WwfY5UJVwtSmzcqvEC+IjM90Bng8OoM5f6ED3IAUyYPBgo8J14+2l5Oruvr99t0mrpniLXDf66TJrI9u/+05JYa2pm0EWlQkDVaziI+96zAt1pMIX9Z/ToTmUbq2OAlHaN8H4hR5aBRmYuF11FQVyARK64eqRsBV4RXKJ9DjW7BR+pQV008hQUoXrCxK8xIf/Qph9h1fz63961NJxfru62LeuZ4Z8MUcV9L+p0HYZzkhNdn5Z3QFf3SXbrVCYs6LK6+uKHpmYS7vB5XwjDx9SWc2szsd5OVKJg3YEdBcC4KUSL3VEbBHDSQ3GFsVKoBsZvopwHkyCmPotY47HtEiPBLdEcsOvcVyeU5Gfq9EOp9dB+nJbNrujBgav1l13CorkBG2rgD+NRivV1otclXnPsIj85ySrc6xk0VDN3zogLAdLw0f+fNOaK17N8GmhPbCu/iX2Vjem/fdjh4NPC4pSNDei2MoWUfqGBmoTxuQEsZeywigwV2c51W9RZuwo8X810N3ehVcBmmNyLjbKmYT+8Kp+dJbaf/ErFnvdZl06mX2bgyxFakv5iQY3dwX4WYHvl77c4="
skip_cleanup: true
overwrite: true
file: bintray-release.json
on:
condition: "$DEPLOYMENT == 1"
repo: Nheko-Reborn/nheko
tags: false
all_branches: true
deploy:
- skip_cleanup: true
overwrite: true
provider: releases
api_key:
secure: "rDFG4DIwIG+A9R8seQ3SIXfWOWhJgJHlNQHtAsnfRrPOSIpI7kMebHLDO5sBPNaJ+9MH9acVTJZOabVLf0DdPqRsDUw/PN28aiiqbaH9+zAGOTxahaQ222Gz/ROf/iXvDoTDUnUzURqQUA0YlHy89Z1CnO7TKwlsYhA5A8n0biG7d8i7vQayvwYXfxlk7CouK+Y86ana4r54j1emGRg97p7BOhORibg54ZD520hN0Iif7EJM2hQDTWKZzTDdBt3mF1kBr7cBbuBHWuvE+eIFO3F3yi+u7ggHzw5FaAv245N4fhkpYUl/mSbhLrQG2NOnkglFCpQ2lLd6mWdXHwUNrxN/j+UPewmLg7CymY25zkiL43deDsT8KmpzYalmdaevCqEaX2VehuBzblmH4Re8wnXqBrab14fq0TNDfPqC+NKxy75mdxszbKBC55nTlTB+hsox43dvfvyXDSON4qAzwe9Q/tfp8mL2mehcM868vhw5cbNIskKT8SrhMwmA+sxoqnqLsmAjNVJVTgg6ppbMhjNMOBTndblRHfH6bxsgpTXPtnzC17o9Mw1WgF63eOWNYBEj2wW5ZvWX95Gvg5YzvsF178ipHZDqZfA62ShB3b89fcqN5SOxBsE8UYoHjQIHxQdWeKv23iFwmT8fWAOD8sKDcRyz0WCgidZ1/RjLqsU="
file_glob: true
file:
- nheko-${VERSION}-x86_64.AppImage
on:
condition: "$TRAVIS_OS_NAME == linux && $DEPLOYMENT == 1"
repo: Nheko-Reborn/nheko
tags: true
- skip_cleanup: true
overwrite: true
provider: releases
api_key:
secure: "rDFG4DIwIG+A9R8seQ3SIXfWOWhJgJHlNQHtAsnfRrPOSIpI7kMebHLDO5sBPNaJ+9MH9acVTJZOabVLf0DdPqRsDUw/PN28aiiqbaH9+zAGOTxahaQ222Gz/ROf/iXvDoTDUnUzURqQUA0YlHy89Z1CnO7TKwlsYhA5A8n0biG7d8i7vQayvwYXfxlk7CouK+Y86ana4r54j1emGRg97p7BOhORibg54ZD520hN0Iif7EJM2hQDTWKZzTDdBt3mF1kBr7cBbuBHWuvE+eIFO3F3yi+u7ggHzw5FaAv245N4fhkpYUl/mSbhLrQG2NOnkglFCpQ2lLd6mWdXHwUNrxN/j+UPewmLg7CymY25zkiL43deDsT8KmpzYalmdaevCqEaX2VehuBzblmH4Re8wnXqBrab14fq0TNDfPqC+NKxy75mdxszbKBC55nTlTB+hsox43dvfvyXDSON4qAzwe9Q/tfp8mL2mehcM868vhw5cbNIskKT8SrhMwmA+sxoqnqLsmAjNVJVTgg6ppbMhjNMOBTndblRHfH6bxsgpTXPtnzC17o9Mw1WgF63eOWNYBEj2wW5ZvWX95Gvg5YzvsF178ipHZDqZfA62ShB3b89fcqN5SOxBsE8UYoHjQIHxQdWeKv23iFwmT8fWAOD8sKDcRyz0WCgidZ1/RjLqsU="
file: nheko-${VERSION}.dmg
on:
condition: "$TRAVIS_OS_NAME == osx && $DEPLOYMENT == 1"
repo: Nheko-Reborn/nheko
tags: true

View File

@ -1,123 +0,0 @@
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
AppDir:
path: ./AppDir
app_info:
id: nheko
name: nheko
icon: nheko
version: latest
exec: usr/bin/nheko
exec_args: $@
runtime:
env:
APPDIR_LIBRARY_PATH: $APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/x86_64-linux-gnu/gconv:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu/pulseaudio
apt:
arch: amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic main restricted
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic universe
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates universe
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic multiverse
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ bionic-backports main restricted
universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security multiverse
- sourceline: deb http://archive.neon.kde.org/user/ bionic main
include:
- gstreamer1.0-libav
- gstreamer1.0-plugins-bad
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-pulseaudio
- gstreamer1.0-x
- kimageformat-plugins
- libbs2b0
- libbz2-1.0
- libelf1
- libexpat1
- libhogweed4
- libjpeg-turbo8
- libkf5archive5
- libllvm10
- liblmdb0
- liblz4-1
- libnorm1
- libnss-mdns
- libopenexr22
- libpcre3
- libqt5keychain1
- libqt5multimedia5-plugins
- libqt5multimediagsttools5
- libqt5multimediawidgets5
- libqt5quickcontrols2-5
- libqt5quicktemplates2-5
- libqt5quickwidgets5
- libqt5svg5
- librubberband2
- libsensors4
- libsm6
- libsnappy1v5
- libsystemd0
- libwayland-server0
- libx264-152
- libxau6
- libxcb-render-util0
- libxcb-sync1
- libxcb-xinerama0
- libxcb-xkb1
- libxcursor1
- libxdmcp6
- libxext6
- libxfixes3
- libxrender1
- libxshmfence1
- libxv1
- libxxf86vm1
- libzstd1
- qml-module-qt-labs-platform
- qml-module-qtgraphicaleffects
- qml-module-qtmultimedia
- qml-module-qtquick-controls2
- qml-module-qtquick-layouts
- qml-module-qtquick-templates2
- qml-module-qtquick-window2
- qml-module-qtquick2
- qt5-image-formats-plugins
exclude: []
files:
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
test:
fedora:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
use_host_x: true
debian:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
use_host_x: true
arch:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
use_host_x: true
centos:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
use_host_x: true
ubuntu:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
use_host_x: true
AppImage:
arch: x86_64
update-information: None
sign-key: None

View File

@ -1,366 +1,25 @@
# Changelog
## [0.8.2] -- 2021-04-23
## [Unreleased]
### Highlights
- Edits
- If you made a typo, just press the `Up` key and edit what you wrote.
- Messages other users edited will get updated automatically and have a small
pen symbol next to them.
- Privacy Screen
- Blur your messages, when Nheko looses focus, which prevents others from
peeking at your messages.
- You can configure the timeout of when this happens.
- Improved notifications (contributed by lorendb)
- No more breakage, because the message included a > on KDE based DEs.
- Render html and images where possible in the notification.
- Render if a message is a reply or someone sent an emote message more nicely
where possible.
- Encrypted notifications now show, that the content is encrypted instead of
being empty.
- Screenshare support in calls on X11 (contributed by trilene)
- Share your screen in a call!
- Select if your mouse cursor should be shown or not and if your webcam should
be included.
- SEND MESSAGES AS RAINBOWS! (contributed by LordMZTE)
- YES MESSAGES, EMOTES AND NOTICES!
### Features
- Set your displayname and avatar from Nheko either globally or per room.
(contributed by jedi18)
- Show room topic in the room settings.
- Double tap a message to reply to it.
- Leave a room using `/part` or `/leave`. (contributed by lorendb)
- Show mxid when hovering a username or avatar.
- Allow opening matrix: uris on Windows.
- Disable room pings caused by replies sent via Nheko (unless you are using
Element Web/Desktop).
### Improvements
- Userprofile can be closed via the Escape key. No more hotel california!
(contributed by lorendb)
- Most dialogs are now centered on the Nheko window. (contributed by lorendb)
- Update Hungarian translations. (contributed by maxigaz)
- Update Estonian translations. (contributed by Priit)
- Update Russian translations. (contributed by Alexey Murz and Artem)
- Update Swedish translations. (contributed by Emilie)
- Update French translations. (contributed by MayeulC, Nicolas Guichard and Carl Schwan)
- Allow drag and drop of files on the whole timeline. (contributed by lorendb)
- Enable notifications on Haiku. (contributed by kallisti5)
- Update scheme handler to the latest matrix: scheme proposal.
- Close completers when typing a space after the colon. (contributed by jedi18)
- Port room settings to Qml. (contributed by jedi18)
- Improved read marker handling. Read marker should now get stuck less often.
- Various changes around hover and tap handling in the timeline, which hopefully
now works more predicatably.
- Buttons in the timeline are now rendered in a box on hover on desktop
platforms.
- Complete room links in the timeline after typing a # character. (contributed
by jedi18)
- An improved quick switcher with better rendering and search. (contributed by jedi18)
- Some fixes around inline emoji and images.
- Jump into new rooms, after you created them. (contrubuted by jedi18)
- Improved search in the emoji picker.
- Allow disabling certificate checks via the config file.
- Use native menus where possible.
- Fix video playback on Windows. (contrubuted by jedi18)
- Send image messages by pressing Enter. (contributed by salahmak)
- Escape closes the upload widget. (contributed by salahmak)
- Improve session rotation and sharing in E2EE rooms.
### Bugfixes
- Emojis joined from separate emojis with a 0xfe0f in the middle should now
render correctly.
- Fix a bug when logging out of a non default profile clearing the wrong
profile. (contrubuted by lorendb)
- Various fixed around profile handling. (contributed by lorendb)
- Focus message input after a reaction. (contributed by jedi18)
- Disable native rendering to prevent kerning bugs on non integer scale factors.
- Fix duplex call devices not showing up. (contributed by trilene)
- Fix a few crashes when leaving a room. (contributed by jedi18)
- Fix hidden tags not updating properly. (contributed by jedi18)
- Fix some issues with login, when a server had SSO as well as password login
enabled (for example matrix.org).
- Properly set the dialog flag for dialogs on most platforms. (Wayland does not
support that.)
- Properly add license to source files.
- Fix fingerprint increasing the minimum window size.
- Don't send markdown links in the plain text body of events when autocompleting
user or room names.
- Fix webcam not working in flatpaks.
- Fix markdown override in replies.
- Fix unsupported events causing errors when saving them. (contributed by
anjanik)
- Fix exif rotation not being respected anymore in E2EE rooms.
- Remove unused qml plugins in the windows package.
- Fix broken olm channels automatically when noticed.
- Fix pasting not overwriting the selection.
- Fix Nheko sometimes overwriting received keys with keys it requested, even if
they have a higher minimum index.
### Packaging changes
- Added xcb dependency on X11 based platforms for screensharing (optional)
- Bumped lmdbxx version from 0.9.14.0 to 1.0.0, which is a BREAKING change. You
can get the new version here: https://github.com/hoytech/lmdbxx/releases
(repo changed)
- Removed tweeny as a dependency.
## [0.8.1] -- 2021-01-27
### Features
- `/plain` and `/md` commands to override the current markdown setting. (contributed by lorendb)
- Allow persistent hiding of rooms with a specific tag (or from a community) via a context menu.
- Allow open media messages in an external program immediately. (contributed by rnhmjoj)
### Improvements
- Use async dbus connection for notifications. (contributed by lorendb)
- Update Hungarian translations. (contributed by maxigaz)
- Update Finnish translations. (contributed by Priit)
- Update Malayalam translations. (contributed by vachan-maker)
- Update Dutch translations. (contributed by Glael)
- Store splitter size across restarts.
- Add a border around the completer. (contributed by lorendb)
- Request keys for messages with unknown message indices (once per restart, when they are shown).
- Move the database location to XDG_DATA_DIR. (contributed by rnhmjoj)
- Reload the timeline after key backup import.
- Autoclose completer on `space`, when there are no matches.
- Make completer only react, when the mouse cursor is moved.
### Bugfixes
- Fix unhandled exception, when a device has no keys.
- Fix some cmake warnings regarding GNUInstallDirs.
- Fix tags being broken. If you have no tags showing up, you may want to logout and login again.
- Fix versionOk being called on the wrong thread. (contributed by Jedi18)
- Fix font tags showing up in media message filenames.
- Fix user profile in dark themes showing the wrong colors. (contributed by lorendb)
- Fix emoji category switching on old Qt versions. (contributed by lorendb)
- Fix old messages being replayed after a limited timeline.
- Fix empty secrets being returned from the wallet breaking verification.
- Make matrix link chat invites create a direct chat.
- Fix focus handling on room change or reply button clicks.
- Fix username completion deleting the character before it.
## [0.8.0] -- 2021-01-21
### Highlights
- Voice and Video Calls (contributed by trilene)
- Call your friends right from within Nheko.
- Use your camera if you want them to see your face!
- This requires a somewhat new gstreamer, so our builds don't support it on all platforms yet.
- Cross-Signing and Device/User Verification (contributed by Chethan)
- Verify who you are talking to!
- Ensure no malicious people eavesdrop on you!
- Enable your connected devices to access key backup and your friends to see, which of your devices you trust!
- Show devices in a users profile.
- Separate profiles (contributed by lorendb)
- Run multiple Nheko instances with separate profiles side by side.
- Use multiple accounts at the same time in separate windows.
### Features
- Before a call select which audio device to use. (contributed by trilene)
- Auto request unknown keys from your own devices.
- Add a command to clear the timeline and reload it. (/clear-timeline).
- Add a command to rotate the outbound megolm session. (/rotate-megolm-session).
- React to messages instead of replying with arbitrary strings using `/react`.
- Inline emoji and user completers. (contributed by Lurkki)
- Show filename on hover over an image. (contributed by kamathmanu)
- Mobile mode, that disables text selection and changes some dialogs.
- Allow sending text after a `/shrug` command. (contributed by MayeulC)
- Allow selecting a ringtone. (contributed by trilene)
- View avatars fullscreen. (contributed by kamathmanu)
- Request or download cross signing secrets in the settings.
- Support 'matrix:' URIs. This works in app on all platforms and on Linux Nheko may be opened by clicking a 'matrix:' link.
- Support inline replies on notifications on Linux.
### Improvements
- Remove dependency on libsodium.
- Keep a cache of received messages on disk.
- Warn when kicking, banning or inviting people.
- Align day separators in the timeline. (contributed by not-chicken)
- Confirm quit during an active call. (contributed by trilene)
- Make timestamps somwhat fixed width.
- Add NixOS to readme. (contributed by Tony)
- Speed up database accesses.
- A lot of translation updates by various users.
- Port a few more parts of the UI to Qml.
- Various end-to-end encryption fixes.
- Use a QFontComboBox to select fonts. (contributed by lorendb)
- Delete text in input area with Ctrl+U. (contributed by lorendb)
- Reduce memory usage by not loading members into RAM.
- Speed up rendering the timeline by a lot by removing excessive clipping.
- Reload encrypted message when room_key is received.
- Improve wording in various places. (contributed by MayeulC)
- Improve rendering of avatars in various places. (contributed by MayeulC)
- Riot -> Element in README. (Contributed by Kim)
- Improve login and registration page error reporting. (contributed by kirillpt)
- Move CI to Gitlab.
- Use system Nheko icon on login page. (contributed by lorendb)
- Add Fedora build requirements. (contributed by trilene)
- Add ripple effect to various buttons.
- Allow more font sizes to be selected.
- Swedish translation. (contributed by Emilie)
- German translation. (contributed by Mr X and various others)
- Romanian translation. (contributed by Mihai)
- Polish translation. (contributed by luff)
- Russian translation. (contributed by kirillpt and librehacker)
- Italian translation. (contributed by Lorenzo)
- French translation. (contributed by MayeulC)
- Hungarian translation. (contributed by maxigaz)
- Show read markers when clicking read indicator. (contributed by lorendb)
### Bugfixes
- Fix text sometimes being rendered blurry.
- Fix not being able to change theme (contributed by not-chicken)
- Fix relations sometimes being sent as null in encrypted messages.
- Don't send formatted body without format.
- Links sometimes not opening properly from Qml.
- Fix autolinking breaking on single quotes.
- Fix translation loading on some locales.
- Don't send url in encrypted file events.
- Prevent duplicate messages from showing up in the timeline.
- Fix crash when pasting image from clipboard on macOS.
- Settings toggles don't get stuck anymore. (contributed by kirillpt)
- Fix some emojis being rendered as two emoji.
- Fix SSO login on some servers that allow multiple login methods. (contributed by d42)
### For packagers
- Nheko now depends on QtKeychain.
- Nheko optionally depends on GStreamer for VOIP.
- Nheko does not depend on Sodium anymore.
- Minimum OpenSSL version is now 1.1.
## [0.7.2] -- 2020-06-12
### Highlights
- Reactions
- React to a message with an emoji! 🎉
- Reactions are shown below a message in a small bubble with a counter.
- By clicking on that, others can add to the reaction count.
- It may help you celebrating a new Nheko Release or react with a đź‘Ž to a failed build to express your frustration.
- This uses a new emoji picker. The picker will be improved in the near future (better scrolling, sections, favorites, recently used or similar) and then probably replace the current picker.
- Support for tagging rooms `[tag]`
- Assign custom tags to rooms from the context menu in the room list.
- This allows filtering rooms via the group list. This puts you in a focus mode showing only the selected tags.
- You can assign multiple tags to group rooms however you like.
- SSO Login
- With this you can now login on servers, that only provide SSO.
- Just enter any mxid on the server. Nheko will figure out that you need to use SSO and redirect your browser to the login page.
- Complete the login in your browser and Nheko should automatically log you in.
- Presence
- Shows online status of the people you are talking to.
- You can define a custom status message to tell others what you are currently up to.
- The status message appears next to the usernames in the timeline.
- Your server needs to have presence enabled for this to work.
### Features
- Respect exif rotation of images
- An italian translation (contributed by Lorenzo Ancora)
- Optional alerts in your taskbar (contributed by z33ky)
- Optional bigger emoji only messages in the timeline (contributed by lkito)
- Optional hover feedback on messages (contributed by lkito)
- `/roomnick` to change your displayname in a single room.
- Preliminary support for showing inline images.
- Warn about unencrypted messages in encrypted rooms.
### Improvements
- perf: Use less CPU to sort the room list.
- Limit size of replies. This currently looks a bit rough, but should improve in the future with a gradient or at some other transition.
- perf: Only clean out old messages from the database every 500 syncs. (There is usually more than one sync every second)
- Improve the login and register masks a bit with hints and validation.
- Descriptions for settings (contributed by lkito)
- A visual indicator, that nheko is fetching messages and improved scrolling (contributed by Lasath Fernando)
### Bugfixes
- Fix not being able to join rooms
- Fix scale factor setting
- Buildfixes against gcc10 and Qt5.15 (missing includes)
- Settings now apply immediately again after changing them (only exception should be the scale factor)
- Join messages should never have empty texts now
- Timeline should now fail to render less often on platforms with native sibling windows.
- Don't rescale images on every frame on highdpi screens.
### Upgrade Notes
<span style="color: red;">This updates includes some changes to the database. Older versions don't handle that gracefully and will delete your database. It is therefore recommended to not downgrade below this version!</span>
## [0.7.1] -- 2020-04-24
### Features
- Show decrypted message source (helps debugging)
- Allow user to show / hide messages in encrypted rooms in sidebar
### Bugfixes
- Fix display of images sent by the user (thank you, wnereiz and not-chicken for reporting)
- Fix crash when trying to maximize image, that wasn't downloaded yet.
- Fix Binding restoreMode flooding logs on Qt 5.14.2+
- Fix with some qml styles hidden menu items leave empty space
- Fix encrypted messages not showing a user in the sidebar
- Fix hangs when generating colors with some system theme color schemes (#172)
## [0.7.0] -- 2020-04-19
### [0.7.0] -- Unreleased
0.7.0 *requires* mtxclient 0.3.0. Make sure you compile against 0.3.0
if you do not use the mtxclient bundled with nheko.
### Features
- Make nheko session import / export format match riot. Fixes #48
- Implement proper replies
#### Features
- Make nheko session import / export format match riot. Fixes #48 (WIP)
- Implement proper replies (WIP)
- Add .well-known support for auto-completing homeserver information
- Add mentions viewer so you can see all the messages you have been mentioned in
- Currently broken due to QML changes. Will be fixed in the future.
- Add mentions viewer so you can see all the messages you have been mentioned in (WIP)
- Add emoji font selection preference
- Encryption and decryption of media in E2EE rooms
- Square avatars
- Support for muting and unmuting rooms
- Basic support for playing audio and video messages in the timeline
- Support for a lot more event types (hiding them will come in the future)
- Support for sending all messages as plain text
- Support for inviting, kicking, banning and unbanning users
- Sort the room list by importance of messages (thanks @Alch-Emi)
- Experimental support for [blurhashes](https://github.com/matrix-org/matrix-doc/pull/2448)
### Improvements
#### Improvements
- Add dedicated reply button to Timeline items. Add button for other options so
that right click isn't always required.
- Fix various things with regards to emoji rendering and the emoji picker
- Fix various things with regards to emoji rendering and the emoji picker (WIP)
- Lots and lots and lots of localization updates.
- Additional tweaks to the system theme
- Render timeline in Qml to drop memory usage
- Reduce memory usage of avatars
- Close notifications after they have been read on Linux
- Escape html properly in most places
- A lot of improvements around the image overlay
- The settings page now resizes properly for small screens
- Miscellaneous styling improvements
- Simplify and speedup build
- Display more emojis in the selected emoji font
- Use 'system' theme as default if QT_QPA_PLATFORMTHEME is set
### Bugfixes
- Fix messages stuck on unread
- Reduce the amount of messages shown as "xxx sent an encrypted message"
- Fix various race conditions and crashes
- Fix some compatibility issues with the construct homeserver
Be aware, that Nheko now requires Qt 5.10 and boost 1.70 or higher.
## [0.6.4] - 2019-05-22

File diff suppressed because it is too large Load Diff

View File

@ -1,66 +1,46 @@
{
"configurations": [
{
"name": "Debug",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "Debug",
"buildRoot": "${workspaceRoot}\\build-vc\\${name}",
"cmakeCommandArgs": "",
"variables": [
{
"name": "HUNTER_ENABLED",
"value": "OFF",
"type": "BOOL"
},
{
"name": "BUILD_SHARED_LIBS",
"value": "ON",
"type": "BOOL"
},
{
"name": "CMAKE_INSTALL_PREFIX",
"value": "${workspaceRoot}/.deps",
"type": "STRING"
},
{
"name": "Qt5_DIR",
"value": "C:\\Qt\\5.12.5\\msvc2017_64\\lib\\cmake\\Qt5", // <-- change qt location here
"type": "STRING"
}
],
"cmakeToolchain": "${workspaceRoot}\\toolchain.cmake",
"inheritEnvironments": [ "msvc_x64" ]
},
{
"name": "Release",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "Release",
"buildRoot": "${workspaceRoot}\\build-vc\\${name}",
"cmakeCommandArgs": "",
"variables": [
{
"name": "HUNTER_ENABLED",
"value": "ON",
"type": "BOOL"
},
{
"name": "BUILD_SHARED_LIBS",
"value": "OFF",
"type": "BOOL"
},
{
"name": "CMAKE_INSTALL_PREFIX",
"value": "${workspaceRoot}/.deps",
"type": "STRING"
},
{
"name": "Qt5_DIR",
"value": "C:\\Qt\\5.12.5\\msvc2017_64\\lib\\cmake\\Qt5", // <-- change qt location here
"type": "STRING"
}
],
"cmakeToolchain": "${workspaceRoot}\\toolchain.cmake",
"inheritEnvironments": [ "msvc_x64" ]
}
]
}
{
"configurations": [
{
"name": "Debug",
"generator": "Visual Studio 15 2017 Win64",
"configurationType": "Debug",
"buildRoot": "${workspaceRoot}\\build-vc\\${name}",
"cmakeCommandArgs": "",
"variables": [
{
"name": "CMAKE_TOOLCHAIN_FILE",
"value": "${workspaceRoot}\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake" // <-- change vcpkg location here
},
{
"name": "CMAKE_INSTALL_PREFIX",
"value": "${workspaceRoot}/.deps"
},
{
"name": "Qt5_DIR",
"value": "C:\\Qt\\5.11.1\\msvc2017_64\\lib\\cmake\\Qt5" // <-- change qt location here
}
]
},
{
"name": "Release",
"generator": "Visual Studio 15 2017 Win64",
"configurationType": "Release",
"buildRoot": "${workspaceRoot}\\build-vc\\${name}",
"cmakeCommandArgs": "",
"variables": [
{
"name": "CMAKE_TOOLCHAIN_FILE",
"value": "${workspaceRoot}\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake" // <-- change vcpkg location here
},
{
"name": "CMAKE_INSTALL_PREFIX",
"value": "${workspaceRoot}/.deps"
},
{
"name": "Qt5_DIR",
"value": "C:\\Qt\\5.11.1\\msvc2017_64\\lib\\cmake\\Qt5" // <-- change qt location here
}
]
},
]
}

View File

@ -7,7 +7,7 @@ RUN \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update -qq && \
apt-get install -y \
qt510base qt510tools qt510svg qt510multimedia qt510quickcontrols2 qt510graphicaleffects \
qt510base qt510tools qt510svg qt510multimedia \
gcc-5 g++-5
RUN \
@ -44,4 +44,4 @@ ENV PATH=/opt/qt510/bin:$PATH
RUN mkdir /build
WORKDIR /build
WORKDIR /build

View File

@ -41,9 +41,6 @@ macos-app-install:
lint:
./.ci/format.sh
license:
./.ci/licenses.sh
image:
docker build -t nheko-app-image .
@ -71,7 +68,7 @@ update-translations:
-locations relative \
-Iinclude/dialogs \
-Iinclude \
src/ resources/qml/ -ts resources/langs/nheko_*.ts -no-obsolete
src/ -ts resources/langs/nheko_*.ts -no-obsolete
clean:
rm -rf build

244
README.md
View File

@ -1,40 +1,31 @@
nheko
----
[![Build Status](https://nheko.im/nheko-reborn/nheko/badges/master/pipeline.svg)](https://nheko.im/nheko-reborn/nheko/-/pipelines/latest)
[![Build Status](https://travis-ci.org/Nheko-Reborn/nheko.svg?branch=master)](https://travis-ci.org/Nheko-Reborn/nheko)
[![Build status](https://ci.appveyor.com/api/projects/status/07qrqbfylsg4hw2h/branch/master?svg=true)](https://ci.appveyor.com/project/redsky17/nheko/branch/master)
[![Stable Version](https://img.shields.io/badge/download-stable-green.svg)](https://github.com/Nheko-Reborn/nheko/releases/v0.8.2-RC)
[![Nightly](https://img.shields.io/badge/download-nightly-green.svg)](https://matrix-static.neko.dev/room/!TshDrgpBNBDmfDeEGN:neko.dev/)
<a href='https://flatpak.neko.dev/repo/nightly/appstream/io.github.NhekoReborn.Nheko.flatpakref' download='nheko-nightly.flatpakref'><img alt='Download Nightly Flatpak' src='https://img.shields.io/badge/download-flatpak--nightly-green'/></a>
[![Stable Version](https://img.shields.io/badge/download-stable-green.svg)](https://github.com/Nheko-Reborn/nheko/releases/v0.6.4)
[![Nightly](https://img.shields.io/badge/download-nightly-green.svg)](https://nheko-reborn-artifacts.s3.us-east-2.amazonaws.com/list.html)
[![#nheko-reborn:matrix.org](https://img.shields.io/matrix/nheko-reborn:matrix.org.svg?label=%23nheko-reborn:matrix.org)](https://matrix.to/#/#nheko-reborn:matrix.org)
[![AUR: nheko](https://img.shields.io/badge/AUR-nheko-blue.svg)](https://aur.archlinux.org/packages/nheko)
<a href='https://flathub.org/apps/details/io.github.NhekoReborn.Nheko'><img width='240' alt='Download on Flathub' src='https://flathub.org/assets/badges/flathub-badge-en.png'/></a>
The motivation behind the project is to provide a native desktop app for [Matrix] that
feels more like a mainstream chat app ([Element], Telegram etc) and less like an IRC client.
### Translations ###
[![Translation status](http://weblate.nheko.im/widgets/nheko/-/nheko-master/svg-badge.svg)](http://weblate.nheko.im/engage/nheko/?utm_source=widget)
Help us with translations so as many people as possible will be able to use nheko!
feels more like a mainstream chat app ([Riot], Telegram etc) and less like an IRC client.
### Note regarding End-to-End encryption
Currently the implementation is at best a **proof of concept** and it should only be used for
testing purposes. Most importantly, it is missing device verification, so while your messages
and media are encrypted, nheko doesn't verify who gets the messages.
testing purposes.
## Features
Most of the features you would expect from a chat application are missing right now
but we are getting close to a more feature complete client.
Specifically there is support for:
- E2E encryption.
- VoIP calls (voice & video).
- E2E encryption (text messages only: attachments are currently sent unencrypted).
- User registration.
- Creating, joining & leaving rooms.
- Sending & receiving invites.
- Sending & receiving files and emoji (inline widgets for images, audio and file messages).
- Replies with text, images and other media (and actually render them as inline widgets).
- Typing notifications.
- Username auto-completion.
- Message & mention notifications.
@ -43,31 +34,21 @@ Specifically there is support for:
- Basic communities support.
- Room switcher (ctrl-K).
- Light, Dark & System themes.
- Creating separate profiles (command line only, use `-p name`).
## Installation
### Releases
Releases for Linux (AppImage), macOS (disk image) & Windows (x64 installer)
can be found in the [GitHub releases](https://github.com/Nheko-Reborn/nheko/releases).
can be found in the [Github releases](https://github.com/Nheko-Reborn/nheko/releases).
### Repositories
[![Packaging status](https://repology.org/badge/tiny-repos/nheko.svg)](https://repology.org/project/nheko/versions)
#### Arch Linux
```bash
pacaur -S nheko # nheko-git
```
#### Debian (10 and above) / Ubuntu (18.04 and above)
```bash
sudo apt install nheko
```
#### Fedora
```bash
sudo dnf install nheko
@ -75,18 +56,10 @@ sudo dnf install nheko
#### Gentoo Linux
```bash
sudo eselect repository enable guru
sudo layman -a matrix
sudo emerge -a nheko
```
#### Nix(os)
```bash
nix-env -iA nixpkgs.nheko
# or
nix-shell -p nheko --run nheko
```
#### Alpine Linux (and postmarketOS)
Make sure you have the testing repositories from `edge` enabled. Note that this is not needed on postmarketOS.
@ -101,85 +74,34 @@ sudo apk add nheko
flatpak install flathub io.github.NhekoReborn.Nheko
```
#### Guix
#### macOS (10.12 and above)
```
guix install nheko
```
#### macOS (10.14 and above)
with [homebrew](https://brew.sh/):
with [macports](https://www.macports.org/) :
```sh
brew install --cask nheko
sudo port install nheko
```
#### Windows
with [Chocolatey](https://chocolatey.org/):
```posh
choco install nheko-reborn
```
### FAQ
##
**Q:** Why don't videos run for me on Windows?
**A:** You're probably missing the required video codecs, download [K-Lite Codec Pack](https://codecguide.com/download_kl.htm).
##
### Build Requirements
- Qt5 (5.12 or greater). Required for overlapping hover handlers in Qml.
- CMake 3.15 or greater. (Lower version may work, but may break boost linking)
- Qt5 (5.7 or greater). Qt 5.7 adds support for color font rendering with
Freetype, which is essential to properly support emoji.
- CMake 3.1 or greater.
- [mtxclient](https://github.com/Nheko-Reborn/mtxclient)
- [LMDB](https://symas.com/lightning-memory-mapped-database/)
- [lmdb++](https://github.com/hoytech/lmdbxx)
- [cmark](https://github.com/commonmark/cmark) 0.29 or greater.
- Boost 1.70 or greater.
- [libolm](https://gitlab.matrix.org/matrix-org/olm)
- [cmark](https://github.com/commonmark/cmark)
- Boost 1.66 or greater.
- [libolm](https://git.matrix.org/git/olm)
- [libsodium](https://github.com/jedisct1/libsodium)
- [spdlog](https://github.com/gabime/spdlog)
- [GStreamer](https://gitlab.freedesktop.org/gstreamer) 1.18.0 or greater (optional, needed for VoIP support).
- Installing the gstreamer core library plus gst-plugins-base, gst-plugins-good & gst-plugins-bad
is often sufficient. The qmlgl plugin though is often packaged separately. The actual plugin requirements
are as follows:
- Voice call support: dtls, opus, rtpmanager, srtp, webrtc
- Video call support (optional): compositor, opengl, qmlgl, rtp, vpx
- [libnice](https://gitlab.freedesktop.org/libnice/libnice)
- [qtkeychain](https://github.com/frankosterfeld/qtkeychain)
- A compiler that supports C++ 17:
- Clang 6 (tested on Travis CI)
- A compiler that supports C++ 14:
- Clang 5 (tested on Travis CI)
- GCC 7 (tested on Travis CI)
- MSVC 19.13 (tested on AppVeyor)
Nheko can use bundled version for most of those libraries automatically, if the versions in your distro are too old.
To use them, you can enable the hunter integration by passing `-DHUNTER_ENABLED=ON`.
It is probably wise to link those dependencies statically by passing `-DBUILD_SHARED_LIBS=OFF`
You can select which bundled dependencies you want to use by passing various `-DUSE_BUNDLED_*` flags. By default all dependencies are bundled *if* you enable hunter. (The exception to that is OpenSSL, which is always disabled by default.)
If you experience build issues and you are trying to link `mtxclient` library without hunter, make sure the library version(commit) as mentioned in the `CMakeList.txt` is used. Sometimes we have to make breaking changes in `mtxclient` and for that period the master branch of both repos may not be compatible.
The bundle flags are currently:
- USE_BUNDLED_BOOST
- USE_BUNDLED_SPDLOG
- USE_BUNDLED_OLM
- USE_BUNDLED_GTEST
- USE_BUNDLED_CMARK
- USE_BUNDLED_JSON
- USE_BUNDLED_OPENSSL
- USE_BUNDLED_MTXCLIENT
- USE_BUNDLED_LMDB
- USE_BUNDLED_LMDBXX
- USE_BUNDLED_TWEENY
A note on bundled OpenSSL: You need to explicitly enable it and it will not be using your system certificate directory by default, if you enable it. You need to override that at runtime with the SSL_CERT_FILE variable. On Windows it will still be using your system certificates though, since it loads them from the system store instead of the OpenSSL directory.
#### Linux
If you don't want to install any external dependencies, you can generate an AppImage locally using docker. It is not that well maintained though...
If you don't want to install any external dependencies, you can generate an AppImage locally using docker.
```bash
make docker-app-image
@ -198,56 +120,30 @@ sudo pacman -S qt5-base \
lmdb \
cmark \
boost \
qtkeychain-qt5
libsodium
```
##### Gentoo Linux
```bash
sudo emerge -a ">=dev-qt/qtgui-5.10.0" media-libs/fontconfig dev-libs/qtkeychain
sudo emerge -a ">=dev-qt/qtgui-5.7.1" media-libs/fontconfig
```
##### Ubuntu 20.04
##### Ubuntu (e.g 14.04)
```bash
# Build requirements + qml modules needed at runtime (you may not need all of them, but the following seem to work according to reports):
sudo apt install g++ cmake zlib1g-dev libssl-dev qt{base,declarative,tools,multimedia,quickcontrols2-}5-dev libqt5svg5-dev libboost-system-dev libboost-thread-dev libboost-iostreams-dev libolm-dev liblmdb++-dev libcmark-dev nlohmann-json3-dev libspdlog-dev libgtest-dev qml-module-qt{gstreamer,multimedia,quick-extras,-labs-settings,-labs-platform,graphicaleffects,quick-controls2} qt5keychain-dev
```
This will install all dependencies, except for tweeny (use bundled tweeny)
and mtxclient (needs to be build separately).
##### Debian Buster (or higher probably)
(User report, not sure if all of those are needed)
```bash
sudo apt install cmake gcc make automake liblmdb-dev \
qt5-default libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev \
qml-module-qtgstreamer qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev \
qml-module-qtgraphicaleffects qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform\
qt5keychain-dev
sudo add-apt-repository ppa:beineri/opt-qt592-trusty
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo add-apt-repository ppa:ubuntu-toolchain-r-test
sudo apt-get update
sudo apt-get install -y g++-7 qt59base qt59svg qt59tools qt59multimedia cmake liblmdb-dev libsodium-dev
```
##### Fedora
```bash
sudo dnf install qt5-qtbase-devel qt5-linguist qt5-qtsvg-devel qt5-qtmultimedia-devel \
qt5-qtquickcontrols2-devel qtkeychain-qt5-devel spdlog-devel openssl-devel \
libolm-devel cmark-devel lmdb-devel lmdbxx-devel tweeny-devel
```
##### Guix
```bash
guix environment nheko
```
##### macOS (Xcode 10.2 or later)
##### macOS (Xcode 8 or later)
```bash
brew update
brew install qt5 lmdb cmake llvm spdlog boost cmark libolm qtkeychain
brew install qt5 lmdb cmake llvm libsodium spdlog boost cmark
```
##### Windows
@ -256,29 +152,61 @@ brew install qt5 lmdb cmake llvm spdlog boost cmark libolm qtkeychain
(for the CMake integration) workloads.
2. Download the latest Qt for windows installer and install it somewhere.
Make sure to install the `MSVC 2017 64-bit` toolset for at least Qt 5.10
Make sure to install the `MSVC 2017 64-bit` toolset for at least Qt 5.9
(lower versions does not support VS2017).
3. If you don't have openssl installed, you will need to install perl to build it (i.e. Strawberry Perl).
3. Install dependencies with `vcpkg`. You can simply clone it into a subfolder
of the root nheko source directory.
```powershell
git clone http:\\github.com\Microsoft\vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg install --triplet x64-windows \
boost-asio \
boost-beast \
boost-iostreams \
boost-random \
boost-signals2 \
boost-system \
boost-thread \
cmark \
libsodium \
lmdb \
openssl \
zlib
```
4. Install dependencies not managed by vcpkg. (libolm, libmtxclient, libmatrix_structs)
Inside the project root run the following (replacing the path to vcpkg as necessary).
```bash
cmake -G "Visual Studio 15 2017 Win64" -Hdeps -B.deps
-DCMAKE_TOOLCHAIN_FILE=C:/Users/<your-path>/vcpkg/scripts/buildsystems/vcpkg.cmake
-DUSE_BUNDLED_BOOST=OFF
cmake --build .deps --config Release
cmake --build .deps --config Debug
```
### Building
We can now build nheko:
First we need to install the rest of the dependencies that are not available in our system
```bash
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake -Hdeps -B.deps \
-DUSE_BUNDLED_BOOST=OFF # if we already have boost & spdlog installed.
-DUSE_BUNDLED_SPDLOG=OFF
cmake --build .deps
```
We can now build nheko by pointing it to the path that we installed the dependencies.
```bash
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=.deps/usr
cmake --build build
```
To use bundled dependencies you can use hunter, i.e.:
```bash
cmake -S. -Bbuild -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=OFF
cmake --build build --config Release
```
Adapt the USE_BUNDLED_* as needed.
If the build fails with the following error
```
Could not find a package configuration file provided by "Qt5Widgets" with
@ -292,7 +220,7 @@ You might need to pass `-DCMAKE_PREFIX_PATH` to cmake to point it at your qt5 in
e.g on macOS
```
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
cmake --build build
```
@ -303,16 +231,15 @@ The `nheko` binary will be located in the `build` directory.
After installing all dependencies, you need to edit the `CMakeSettings.json` to
be able to load and compile nheko within Visual Studio.
You need to fill out the paths for the `Qt5_DIR`.
The Qt5 dir should point to the `lib\cmake\Qt5` dir.
You need to fill out the paths for the `CMAKE_TOOLCHAIN_FILE` and the `Qt5_DIR`.
The toolchain file should point to the `vcpkg.cmake` and the Qt5 dir to the `lib\cmake\Qt5` dir.
Examples for the paths are:
- `C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake`
- `C:\\Qt\\5.10.1\\msvc2017_64\\lib\\cmake\\Qt5`
You should also enable hunter by setting `HUNTER_ENABLED` to `ON` and `BUILD_SHARED_LIBS` to `OFF`.
Now right click into the root nheko source directory and choose `Open in Visual Studio`.
You can choose the build type Release and Debug in the top toolbar.
You can choose the build type Release and Debug in the top toolbar.
After a successful CMake generation you can select the `nheko.exe` as the run target.
Now choose `Build all` in the CMake menu or press `F7` to compile the executable.
@ -328,9 +255,6 @@ windeployqt nheko.exe
The final binary will be located inside `build-vc\Release\Release` for the Release build
and `build-vc\Debug\Debug` for the Debug build.
Also copy the respective cmark.dll to the binary dir from `build/cmark-build/src/Release` (or Debug).
### Contributing
See [CONTRIBUTING](.github/CONTRIBUTING.md)
@ -346,7 +270,9 @@ Here are some screen shots to get a feel for the UI, but things will probably ch
### Third party
[Single Application for Qt](https://github.com/itay-grudev/SingleApplication)
- [Emoji One](http://emojione.com)
- [Font Awesome](http://fontawesome.io/)
- [Open Sans](https://fonts.google.com/specimen/Open+Sans)
[Matrix]:https://matrix.org
[Element]:https://element.io
[Riot]:https://riot.im

View File

@ -1,38 +1,46 @@
---
version: 0.8.0-{build}
version: 0.6.4-{build}
configuration: Release
image: Visual Studio 2019
image: Visual Studio 2017
platform: x64
environment:
BINTRAY_APIKEY:
secure: "iGl5mzE9/ta9kFELUxDw9XtlYMSCMai9xowXIkYzU8WKHz7NfW0mLwMJZvblZFXJ"
MATRIX_ACCESS_TOKEN:
secure: Qoy+QQ8zWXYCQrck9GtXJsoPTv9r/rhgCDUlKJ6ue+gkteYG40E9MxgwP1svn6bse20H4z6Svrxn8kFbcJB7Wg2Cnv1s326/vsJJzhWir2eHFFGK+f4SB992/U0HoQmk3Cq5hPk7dLcA7KqHIa1g1PTSFPfl1VODJ2UqqAyn8nzbC5ym+wwU1buJqoWPlTyHBW7eE8wNe77+qI18XpF7NN8yuOOyg3Tzup9YyXLrI36XiJu/5JD3j3s3V1QiUTpuLyQzqwuBUOf1MHTbzuPwHm3ZwzSM98WD6aL6riaK9qa7mDbSx1aY0ukIYSY9IdAfHNwZY/DEAn+QAVD+ZTvPq04ASv+kmSFpOBKr07kpqfM=
cache:
- c:\hunter\ -> appveyor.yml
- build\_deps -> appveyor.yml
cache: c:\tools\vcpkg\installed\
build:
verbosity: minimal
install:
- set QT_DIR=C:\Qt\5.15\msvc2019_64
- set PATH=Path=C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;C:\Program Files\7-Zip;C:\Program Files\Microsoft\Web Platform Installer\;C:\Tools\NuGet;C:\Tools\PsTools;C:\Program Files\Git\usr\bin;C:\Program Files\Git LFS;C:\Program Files\Mercurial\;C:\Program Files (x86)\Subversion\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin;C:\Tools\xUnit;C:\Tools\xUnit20;C:\Tools\NUnit\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\TestPlatform;C:\Ruby193\bin;C:\Tools\WebDriver;C:\Python27;C:\Python27\Scripts;C:\Program Files\erl10.7\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft DirectX SDK;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Tools\Doxygen;C:\Program Files (x86)\CMake\bin;C:\ProgramData\chocolatey\bin;C:\Tools\vcpkg;C:\Tools\Coverity\bin;C:\Program Files (x86)\NSIS;C:\Tools\Octopus;C:\Program Files\Meson\;C:\Tools\GitVersion;C:\Tools\NUnit3\bin;C:\Users\appveyor\AppData\Local\Microsoft\WindowsApps;C:\Users\appveyor\.dotnet\tools;C:\Program Files\AppVeyor\BuildAgent\
- set PATH=C:\Strawberry\perl\bin;C:\Python39-x64;%QT_DIR%\bin;%PATH%
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
- set QT_DIR=C:\Qt\5.10.1\msvc2017_64
- set PATH=%PATH%;%QT_DIR%\bin;C:\MinGW\bin
- set PATH=%PATH%;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- cd "C:\Tools\vcpkg"&& git pull && .\bootstrap-vcpkg.bat && cd %APPVEYOR_BUILD_FOLDER%
- vcpkg install
nlohmann-json:%PLATFORM%-windows
boost-asio:%PLATFORM%-windows
boost-beast:%PLATFORM%-windows
boost-iostreams:%PLATFORM%-windows
boost-random:%PLATFORM%-windows
boost-signals2:%PLATFORM%-windows
boost-system:%PLATFORM%-windows
boost-thread:%PLATFORM%-windows
libsodium:%PLATFORM%-windows
lmdb:%PLATFORM%-windows
openssl:%PLATFORM%-windows
zlib:%PLATFORM%-windows
build_script:
# VERSION format: branch-master/branch-1.2
# INSTVERSION format: x.y.z
# WINVERSION format: 9999.0.0.123/1.2.0.234
- if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=0.8.2
- if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=0.8.2
- if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=0.6.4
- if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=0.6.4
- if "%APPVEYOR_REPO_TAG%"=="false" if "%APPVEYOR_REPO_BRANCH%"=="master" set INSTVERSION=9999.0
- if "%APPVEYOR_REPO_TAG%"=="false" set WINVERSION=%INSTVERSION%.0.%APPVEYOR_BUILD_NUMBER%
# VERSION format: v1.2.3/v1.3.4
@ -46,12 +54,23 @@ build_script:
- echo %INSTVERSION%
- echo %DATE%
# Build nheko
- cmake -G "Visual Studio 16 2019" -A x64 -H. -Bbuild
-DHUNTER_ROOT="C:\hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
# Build & install the dependencies
- cmake -G "Visual Studio 15 2017 Win64" -Hdeps -B.deps
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DUSE_BUNDLED_BOOST=OFF
-DUSE_BUNDLED_JSON=OFF
-DMTX_STATIC=ON
- cmake --build .deps --config Release
# Build nheko
- rm -f cmake/FindOlm.cmake
- cmake -G "Visual Studio 15 2017 Win64" -H. -Bbuild
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DLMDBXX_INCLUDE_DIR=.deps/usr/include
-DTWEENY_INCLUDE_DIR=.deps/usr/include
-DCMARK_INCLUDE_DIR=C:/projects/nheko/.deps/usr/include
-DCMARK_LIBRARY=C:/projects/nheko/.deps/usr/lib/cmark.lib
-DJSON_INCLUDE_DIR=.deps/usr/include
- cmake --build build --config Release
after_build:
@ -60,8 +79,13 @@ after_build:
- echo %BUILD%
- mkdir NhekoRelease
- copy build\Release\nheko.exe NhekoRelease\nheko.exe
- copy build\_deps\cmark-build\src\Release\cmark.dll NhekoRelease\cmark.dll
- windeployqt --qmldir resources\qml\ NhekoRelease\nheko.exe
- windeployqt --qmldir %QT_DIR%\qml\ --release NhekoRelease\nheko.exe
- copy C:\Tools\vcpkg\installed\x64-windows\lib\*.lib .\NhekoRelease\
- copy C:\Tools\vcpkg\installed\x64-windows\bin\*.dll .\NhekoRelease\
- copy C:\projects\nheko\.deps\usr\lib\cmark.lib .\NhekoRelease\
- copy C:\projects\nheko\.deps\usr\bin\cmark.dll .\NhekoRelease\
- 7z a nheko_win_64.zip .\NhekoRelease\*
- ls -lh build\Release\
@ -74,52 +98,53 @@ after_build:
- mkdir installer
- mkdir installer\config
- mkdir installer\packages
- mkdir installer\packages\io.github.nhekoreborn.nheko
- mkdir installer\packages\io.github.nhekoreborn.nheko\data
- mkdir installer\packages\io.github.nhekoreborn.nheko\meta
- mkdir installer\packages\com.mujx.nheko
- mkdir installer\packages\com.mujx.nheko\data
- mkdir installer\packages\com.mujx.nheko\meta
- mkdir installer\packages\com.mujx.nheko.cleanup\meta
# Copy installer data
- copy %BUILD%\resources\nheko.ico installer\config
- copy %BUILD%\resources\nheko.png installer\config
- copy %BUILD%\COPYING installer\packages\io.github.nhekoreborn.nheko\meta\license.txt
- copy %BUILD%\COPYING installer\packages\com.mujx.nheko\meta\license.txt
- copy %BUILD%\COPYING installer\packages\com.mujx.nheko.cleanup\meta\license.txt
- copy %BUILD%\deploy\installer\config.xml installer\config
- copy %BUILD%\deploy\installer\controlscript.qs installer\config
- copy %BUILD%\deploy\installer\uninstall.qs installer\packages\io.github.nhekoreborn.nheko\data
- copy %BUILD%\deploy\installer\gui\package.xml installer\packages\io.github.nhekoreborn.nheko\meta
- copy %BUILD%\deploy\installer\gui\installscript.qs installer\packages\io.github.nhekoreborn.nheko\meta
- copy %BUILD%\deploy\installer\uninstall.qs installer\packages\com.mujx.nheko\data
- copy %BUILD%\deploy\installer\gui\package.xml installer\packages\com.mujx.nheko\meta
- copy %BUILD%\deploy\installer\gui\installscript.qs installer\packages\com.mujx.nheko\meta
- copy %BUILD%\deploy\installer\cleanup\package.xml installer\packages\com.mujx.nheko.cleanup\meta
- copy %BUILD%\deploy\installer\cleanup\installscript.qs installer\packages\com.mujx.nheko.cleanup\meta
# Amend version and date
- sed -i "s/__VERSION__/0.8.2/" installer\config\config.xml
- sed -i "s/__VERSION__/0.8.2/" installer\packages\io.github.nhekoreborn.nheko\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\io.github.nhekoreborn.nheko\meta\package.xml
- sed -i "s/__VERSION__/0.6.4/" installer\config\config.xml
- sed -i "s/__VERSION__/0.6.4/" installer\packages\com.mujx.nheko\meta\package.xml
- sed -i "s/__VERSION__/0.6.4/" installer\packages\com.mujx.nheko.cleanup\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\com.mujx.nheko\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\com.mujx.nheko.cleanup\meta\package.xml
# Copy nheko data
- xcopy NhekoData\*.* installer\packages\io.github.nhekoreborn.nheko\data\*.* /s /e /c /y
- move NhekoRelease\nheko.exe installer\packages\io.github.nhekoreborn.nheko\data
- xcopy NhekoData\*.* installer\packages\com.mujx.nheko\data\*.* /s /e /c /y
- move NhekoRelease\nheko.exe installer\packages\com.mujx.nheko\data
- mkdir tools
#- curl -L -O https://download.qt.io/official_releases/qt-installer-framework/3.0.4/QtInstallerFramework-win-x86.exe
# Since the official download.qt.io is down atm
- curl -L -O https://qt-mirror.dannhauer.de/official_releases/qt-installer-framework/4.0.1/QtInstallerFramework-win-x86.exe
- curl -L -O https://download.qt.io/official_releases/qt-installer-framework/3.0.4/QtInstallerFramework-win-x86.exe
- 7z x QtInstallerFramework-win-x86.exe -otools -aoa
- set PATH=%BUILD%\tools\bin;%PATH%
- binarycreator.exe -f -c installer\config\config.xml -p installer\packages nheko-installer.exe
- copy nheko-installer.exe nheko-%APPVEYOR_REPO_TAG_NAME%-installer.exe
- copy nheko-installer.exe nheko-%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%-installer.exe
- ps: .\.ci\upload-nightly.ps1
- mv nheko-installer.exe nheko-%APPVEYOR_REPO_TAG_NAME%-installer.exe
on_success:
- if "%APPVEYOR_REPO_TAG%" == "true" (curl -T nheko-%APPVEYOR_REPO_TAG_NAME%-installer.exe -uredsky17:%BINTRAY_APIKEY% https://api.bintray.com/content/nheko-reborn/nheko/%APPVEYOR_REPO_TAG_NAME%/nheko/%APPVEYOR_REPO_TAG_NAME%/)
deploy:
- description: "Development builds"
provider: GitHub
auth_token:
secure: "ShStWeqp+TkYqJPQr7uFZb+B8ZTgC7Iwth+IkhjfRDCTLhy8gtWvlPzlQilder3E"
artifact: nheko-${APPVEYOR_REPO_TAG_NAME}-installer.exe
force_update: true
prerelease: true
on:
appveyor_repo_tag: true
description: "Development builds"
provider: GitHub
auth_token:
secure: "ShStWeqp+TkYqJPQr7uFZb+B8ZTgC7Iwth+IkhjfRDCTLhy8gtWvlPzlQilder3E"
artifact: nheko-${APPVEYOR_REPO_TAG_NAME}-installer.exe
force_update: true
prerelease: true
on:
appveyor_repo_tag: true
artifacts:
- path: nheko_win_64.zip
- path: nheko-$(APPVEYOR_REPO_TAG_NAME)-installer.exe
- path: nheko-$(APPVEYOR_PULL_REQUEST_HEAD_COMMIT)-installer.exe

View File

@ -1,15 +0,0 @@
#
# Find the lmdb library & include dir.
#
find_path (LMDB_INCLUDE_DIR NAMES lmdb.h PATHS "$ENV{LMDB_DIR}/include")
find_library (LMDB_LIBRARY NAMES lmdb PATHS "$ENV{LMDB_DIR}/lib" )
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARY)
add_library(lmdb INTERFACE IMPORTED GLOBAL)
target_include_directories(lmdb INTERFACE ${LMDB_INCLUDE_DIR})
target_link_libraries(lmdb INTERFACE ${LMDB_LIBRARY})
add_library(liblmdb::lmdb ALIAS lmdb)

44
cmake/FindOlm.cmake Normal file
View File

@ -0,0 +1,44 @@
#
# CMake module to search for the olm library
#
# On success, the macro sets the following variables:
# OLM_FOUND = if the library found
# OLM_LIBRARY = full path to the library
# OLM_INCLUDE_DIR = where to find the library headers
#
if(WIN32)
message(STATUS "FindOlm is not supported in Windows")
return()
endif()
find_path(OLM_INCLUDE_DIR
NAMES olm/olm.h
PATHS /usr/include
/usr/local/include
$ENV{LIB_DIR}/include
$ENV{LIB_DIR}/include/olm)
find_library(OLM_LIBRARY
NAMES olm
PATHS /usr/lib /usr/local/lib $ENV{LIB_DIR}/lib)
if(OLM_FOUND)
set(OLM_INCLUDE_DIRS ${OLM_INCLUDE_DIR})
if(NOT OLM_LIBRARIES)
set(OLM_LIBRARIES ${OLM_LIBRARY})
endif()
endif()
if(NOT TARGET Olm::Olm)
add_library(Olm::Olm UNKNOWN IMPORTED)
set_target_properties(Olm::Olm
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${OLM_INCLUDE_DIR})
set_property(TARGET Olm::Olm APPEND PROPERTY IMPORTED_LOCATION ${OLM_LIBRARY})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OLM DEFAULT_MSG OLM_INCLUDE_DIR OLM_LIBRARY)
mark_as_advanced(OLM_LIBRARY OLM_INCLUDE_DIR)

View File

@ -1,9 +0,0 @@
hunter_config(
Boost
VERSION "1.70.0-p1"
CMAKE_ARGS IOSTREAMS_NO_BZIP2=1
)
hunter_config(
nlohmann_json
CMAKE_ARGS JSON_MultipleHeaders=ON
)

View File

@ -1,539 +0,0 @@
# Copyright (c) 2013-2019, Ruslan Baratov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This is a gate file to Hunter package manager.
# Include this file using `include` command and add package you need, example:
#
# cmake_minimum_required(VERSION 3.2)
#
# include("cmake/HunterGate.cmake")
# HunterGate(
# URL "https://github.com/path/to/hunter/archive.tar.gz"
# SHA1 "798501e983f14b28b10cda16afa4de69eee1da1d"
# )
#
# project(MyProject)
#
# hunter_add_package(Foo)
# hunter_add_package(Boo COMPONENTS Bar Baz)
#
# Projects:
# * https://github.com/hunter-packages/gate/
# * https://github.com/ruslo/hunter
option(HUNTER_ENABLED "Enable Hunter package manager support" ON)
if(HUNTER_ENABLED)
if(CMAKE_VERSION VERSION_LESS "3.2")
message(
FATAL_ERROR
"At least CMake version 3.2 required for Hunter dependency management."
" Update CMake or set HUNTER_ENABLED to OFF."
)
endif()
endif()
include(CMakeParseArguments) # cmake_parse_arguments
option(HUNTER_STATUS_PRINT "Print working status" ON)
option(HUNTER_STATUS_DEBUG "Print a lot info" OFF)
option(HUNTER_TLS_VERIFY "Enable/disable TLS certificate checking on downloads" ON)
set(HUNTER_ERROR_PAGE "https://docs.hunter.sh/en/latest/reference/errors")
function(hunter_gate_status_print)
if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)
foreach(print_message ${ARGV})
message(STATUS "[hunter] ${print_message}")
endforeach()
endif()
endfunction()
function(hunter_gate_status_debug)
if(HUNTER_STATUS_DEBUG)
foreach(print_message ${ARGV})
string(TIMESTAMP timestamp)
message(STATUS "[hunter *** DEBUG *** ${timestamp}] ${print_message}")
endforeach()
endif()
endfunction()
function(hunter_gate_error_page error_page)
message("------------------------------ ERROR ------------------------------")
message(" ${HUNTER_ERROR_PAGE}/${error_page}.html")
message("-------------------------------------------------------------------")
message("")
message(FATAL_ERROR "")
endfunction()
function(hunter_gate_internal_error)
message("")
foreach(print_message ${ARGV})
message("[hunter ** INTERNAL **] ${print_message}")
endforeach()
message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
hunter_gate_error_page("error.internal")
endfunction()
function(hunter_gate_fatal_error)
cmake_parse_arguments(hunter "" "ERROR_PAGE" "" "${ARGV}")
if("${hunter_ERROR_PAGE}" STREQUAL "")
hunter_gate_internal_error("Expected ERROR_PAGE")
endif()
message("")
foreach(x ${hunter_UNPARSED_ARGUMENTS})
message("[hunter ** FATAL ERROR **] ${x}")
endforeach()
message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
hunter_gate_error_page("${hunter_ERROR_PAGE}")
endfunction()
function(hunter_gate_user_error)
hunter_gate_fatal_error(${ARGV} ERROR_PAGE "error.incorrect.input.data")
endfunction()
function(hunter_gate_self root version sha1 result)
string(COMPARE EQUAL "${root}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("root is empty")
endif()
string(COMPARE EQUAL "${version}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("version is empty")
endif()
string(COMPARE EQUAL "${sha1}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("sha1 is empty")
endif()
string(SUBSTRING "${sha1}" 0 7 archive_id)
if(EXISTS "${root}/cmake/Hunter")
set(hunter_self "${root}")
else()
set(
hunter_self
"${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked"
)
endif()
set("${result}" "${hunter_self}" PARENT_SCOPE)
endfunction()
# Set HUNTER_GATE_ROOT cmake variable to suitable value.
function(hunter_gate_detect_root)
# Check CMake variable
string(COMPARE NOTEQUAL "${HUNTER_ROOT}" "" not_empty)
if(not_empty)
set(HUNTER_GATE_ROOT "${HUNTER_ROOT}" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT detected by cmake variable")
return()
endif()
# Check environment variable
string(COMPARE NOTEQUAL "$ENV{HUNTER_ROOT}" "" not_empty)
if(not_empty)
set(HUNTER_GATE_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT detected by environment variable")
return()
endif()
# Check HOME environment variable
string(COMPARE NOTEQUAL "$ENV{HOME}" "" result)
if(result)
set(HUNTER_GATE_ROOT "$ENV{HOME}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT set using HOME environment variable")
return()
endif()
# Check SYSTEMDRIVE and USERPROFILE environment variable (windows only)
if(WIN32)
string(COMPARE NOTEQUAL "$ENV{SYSTEMDRIVE}" "" result)
if(result)
set(HUNTER_GATE_ROOT "$ENV{SYSTEMDRIVE}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug(
"HUNTER_ROOT set using SYSTEMDRIVE environment variable"
)
return()
endif()
string(COMPARE NOTEQUAL "$ENV{USERPROFILE}" "" result)
if(result)
set(HUNTER_GATE_ROOT "$ENV{USERPROFILE}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug(
"HUNTER_ROOT set using USERPROFILE environment variable"
)
return()
endif()
endif()
hunter_gate_fatal_error(
"Can't detect HUNTER_ROOT"
ERROR_PAGE "error.detect.hunter.root"
)
endfunction()
function(hunter_gate_download dir)
string(
COMPARE
NOTEQUAL
"$ENV{HUNTER_DISABLE_AUTOINSTALL}"
""
disable_autoinstall
)
if(disable_autoinstall AND NOT HUNTER_RUN_INSTALL)
hunter_gate_fatal_error(
"Hunter not found in '${dir}'"
"Set HUNTER_RUN_INSTALL=ON to auto-install it from '${HUNTER_GATE_URL}'"
"Settings:"
" HUNTER_ROOT: ${HUNTER_GATE_ROOT}"
" HUNTER_SHA1: ${HUNTER_GATE_SHA1}"
ERROR_PAGE "error.run.install"
)
endif()
string(COMPARE EQUAL "${dir}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("Empty 'dir' argument")
endif()
string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("HUNTER_GATE_SHA1 empty")
endif()
string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("HUNTER_GATE_URL empty")
endif()
set(done_location "${dir}/DONE")
set(sha1_location "${dir}/SHA1")
set(build_dir "${dir}/Build")
set(cmakelists "${dir}/CMakeLists.txt")
hunter_gate_status_debug("Locking directory: ${dir}")
file(LOCK "${dir}" DIRECTORY GUARD FUNCTION)
hunter_gate_status_debug("Lock done")
if(EXISTS "${done_location}")
# while waiting for lock other instance can do all the job
hunter_gate_status_debug("File '${done_location}' found, skip install")
return()
endif()
file(REMOVE_RECURSE "${build_dir}")
file(REMOVE_RECURSE "${cmakelists}")
file(MAKE_DIRECTORY "${build_dir}") # check directory permissions
# Disabling languages speeds up a little bit, reduces noise in the output
# and avoids path too long windows error
file(
WRITE
"${cmakelists}"
"cmake_minimum_required(VERSION 3.2)\n"
"project(HunterDownload LANGUAGES NONE)\n"
"include(ExternalProject)\n"
"ExternalProject_Add(\n"
" Hunter\n"
" URL\n"
" \"${HUNTER_GATE_URL}\"\n"
" URL_HASH\n"
" SHA1=${HUNTER_GATE_SHA1}\n"
" DOWNLOAD_DIR\n"
" \"${dir}\"\n"
" TLS_VERIFY\n"
" ${HUNTER_TLS_VERIFY}\n"
" SOURCE_DIR\n"
" \"${dir}/Unpacked\"\n"
" CONFIGURE_COMMAND\n"
" \"\"\n"
" BUILD_COMMAND\n"
" \"\"\n"
" INSTALL_COMMAND\n"
" \"\"\n"
")\n"
)
if(HUNTER_STATUS_DEBUG)
set(logging_params "")
else()
set(logging_params OUTPUT_QUIET)
endif()
hunter_gate_status_debug("Run generate")
# Need to add toolchain file too.
# Otherwise on Visual Studio + MDD this will fail with error:
# "Could not find an appropriate version of the Windows 10 SDK installed on this machine"
if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
get_filename_component(absolute_CMAKE_TOOLCHAIN_FILE "${CMAKE_TOOLCHAIN_FILE}" ABSOLUTE)
set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=${absolute_CMAKE_TOOLCHAIN_FILE}")
else()
# 'toolchain_arg' can't be empty
set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=")
endif()
string(COMPARE EQUAL "${CMAKE_MAKE_PROGRAM}" "" no_make)
if(no_make)
set(make_arg "")
else()
# Test case: remove Ninja from PATH but set it via CMAKE_MAKE_PROGRAM
set(make_arg "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}")
endif()
execute_process(
COMMAND
"${CMAKE_COMMAND}"
"-H${dir}"
"-B${build_dir}"
"-G${CMAKE_GENERATOR}"
"${toolchain_arg}"
${make_arg}
WORKING_DIRECTORY "${dir}"
RESULT_VARIABLE download_result
${logging_params}
)
if(NOT download_result EQUAL 0)
hunter_gate_internal_error(
"Configure project failed."
"To reproduce the error run: ${CMAKE_COMMAND} -H${dir} -B${build_dir} -G${CMAKE_GENERATOR} ${toolchain_arg} ${make_arg}"
"In directory ${dir}"
)
endif()
hunter_gate_status_print(
"Initializing Hunter workspace (${HUNTER_GATE_SHA1})"
" ${HUNTER_GATE_URL}"
" -> ${dir}"
)
execute_process(
COMMAND "${CMAKE_COMMAND}" --build "${build_dir}"
WORKING_DIRECTORY "${dir}"
RESULT_VARIABLE download_result
${logging_params}
)
if(NOT download_result EQUAL 0)
hunter_gate_internal_error("Build project failed")
endif()
file(REMOVE_RECURSE "${build_dir}")
file(REMOVE_RECURSE "${cmakelists}")
file(WRITE "${sha1_location}" "${HUNTER_GATE_SHA1}")
file(WRITE "${done_location}" "DONE")
hunter_gate_status_debug("Finished")
endfunction()
# Must be a macro so master file 'cmake/Hunter' can
# apply all variables easily just by 'include' command
# (otherwise PARENT_SCOPE magic needed)
macro(HunterGate)
if(HUNTER_GATE_DONE)
# variable HUNTER_GATE_DONE set explicitly for external project
# (see `hunter_download`)
set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
endif()
# First HunterGate command will init Hunter, others will be ignored
get_property(_hunter_gate_done GLOBAL PROPERTY HUNTER_GATE_DONE SET)
if(NOT HUNTER_ENABLED)
# Empty function to avoid error "unknown function"
function(hunter_add_package)
endfunction()
set(
_hunter_gate_disabled_mode_dir
"${CMAKE_CURRENT_LIST_DIR}/cmake/Hunter/disabled-mode"
)
if(EXISTS "${_hunter_gate_disabled_mode_dir}")
hunter_gate_status_debug(
"Adding \"disabled-mode\" modules: ${_hunter_gate_disabled_mode_dir}"
)
list(APPEND CMAKE_PREFIX_PATH "${_hunter_gate_disabled_mode_dir}")
endif()
elseif(_hunter_gate_done)
hunter_gate_status_debug("Secondary HunterGate (use old settings)")
hunter_gate_self(
"${HUNTER_CACHED_ROOT}"
"${HUNTER_VERSION}"
"${HUNTER_SHA1}"
_hunter_self
)
include("${_hunter_self}/cmake/Hunter")
else()
set(HUNTER_GATE_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}")
string(COMPARE NOTEQUAL "${PROJECT_NAME}" "" _have_project_name)
if(_have_project_name)
hunter_gate_fatal_error(
"Please set HunterGate *before* 'project' command. "
"Detected project: ${PROJECT_NAME}"
ERROR_PAGE "error.huntergate.before.project"
)
endif()
cmake_parse_arguments(
HUNTER_GATE "LOCAL" "URL;SHA1;GLOBAL;FILEPATH" "" ${ARGV}
)
string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" _empty_sha1)
string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" _empty_url)
string(
COMPARE
NOTEQUAL
"${HUNTER_GATE_UNPARSED_ARGUMENTS}"
""
_have_unparsed
)
string(COMPARE NOTEQUAL "${HUNTER_GATE_GLOBAL}" "" _have_global)
string(COMPARE NOTEQUAL "${HUNTER_GATE_FILEPATH}" "" _have_filepath)
if(_have_unparsed)
hunter_gate_user_error(
"HunterGate unparsed arguments: ${HUNTER_GATE_UNPARSED_ARGUMENTS}"
)
endif()
if(_empty_sha1)
hunter_gate_user_error("SHA1 suboption of HunterGate is mandatory")
endif()
if(_empty_url)
hunter_gate_user_error("URL suboption of HunterGate is mandatory")
endif()
if(_have_global)
if(HUNTER_GATE_LOCAL)
hunter_gate_user_error("Unexpected LOCAL (already has GLOBAL)")
endif()
if(_have_filepath)
hunter_gate_user_error("Unexpected FILEPATH (already has GLOBAL)")
endif()
endif()
if(HUNTER_GATE_LOCAL)
if(_have_global)
hunter_gate_user_error("Unexpected GLOBAL (already has LOCAL)")
endif()
if(_have_filepath)
hunter_gate_user_error("Unexpected FILEPATH (already has LOCAL)")
endif()
endif()
if(_have_filepath)
if(_have_global)
hunter_gate_user_error("Unexpected GLOBAL (already has FILEPATH)")
endif()
if(HUNTER_GATE_LOCAL)
hunter_gate_user_error("Unexpected LOCAL (already has FILEPATH)")
endif()
endif()
hunter_gate_detect_root() # set HUNTER_GATE_ROOT
# Beautify path, fix probable problems with windows path slashes
get_filename_component(
HUNTER_GATE_ROOT "${HUNTER_GATE_ROOT}" ABSOLUTE
)
hunter_gate_status_debug("HUNTER_ROOT: ${HUNTER_GATE_ROOT}")
if(NOT HUNTER_ALLOW_SPACES_IN_PATH)
string(FIND "${HUNTER_GATE_ROOT}" " " _contain_spaces)
if(NOT _contain_spaces EQUAL -1)
hunter_gate_fatal_error(
"HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces."
"Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error"
"(Use at your own risk!)"
ERROR_PAGE "error.spaces.in.hunter.root"
)
endif()
endif()
string(
REGEX
MATCH
"[0-9]+\\.[0-9]+\\.[0-9]+[-_a-z0-9]*"
HUNTER_GATE_VERSION
"${HUNTER_GATE_URL}"
)
string(COMPARE EQUAL "${HUNTER_GATE_VERSION}" "" _is_empty)
if(_is_empty)
set(HUNTER_GATE_VERSION "unknown")
endif()
hunter_gate_self(
"${HUNTER_GATE_ROOT}"
"${HUNTER_GATE_VERSION}"
"${HUNTER_GATE_SHA1}"
_hunter_self
)
set(_master_location "${_hunter_self}/cmake/Hunter")
if(EXISTS "${HUNTER_GATE_ROOT}/cmake/Hunter")
# Hunter downloaded manually (e.g. by 'git clone')
set(_unused "xxxxxxxxxx")
set(HUNTER_GATE_SHA1 "${_unused}")
set(HUNTER_GATE_VERSION "${_unused}")
else()
get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE)
set(_done_location "${_archive_id_location}/DONE")
set(_sha1_location "${_archive_id_location}/SHA1")
# Check Hunter already downloaded by HunterGate
if(NOT EXISTS "${_done_location}")
hunter_gate_download("${_archive_id_location}")
endif()
if(NOT EXISTS "${_done_location}")
hunter_gate_internal_error("hunter_gate_download failed")
endif()
if(NOT EXISTS "${_sha1_location}")
hunter_gate_internal_error("${_sha1_location} not found")
endif()
file(READ "${_sha1_location}" _sha1_value)
string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal)
if(NOT _is_equal)
hunter_gate_internal_error(
"Short SHA1 collision:"
" ${_sha1_value} (from ${_sha1_location})"
" ${HUNTER_GATE_SHA1} (HunterGate)"
)
endif()
if(NOT EXISTS "${_master_location}")
hunter_gate_user_error(
"Master file not found:"
" ${_master_location}"
"try to update Hunter/HunterGate"
)
endif()
endif()
include("${_master_location}")
set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
endif()
endmacro()

29
cmake/LMDB.cmake Normal file
View File

@ -0,0 +1,29 @@
#
# Find the lmdb library & include dir.
# Build lmdb on Appveyor.
#
if(APPVEYOR_BUILD)
set(LMDB_VERSION "LMDB_0.9.21")
set(NTDLIB "C:/WINDDK/7600.16385.1/lib/win7/amd64/ntdll.lib")
execute_process(
COMMAND git clone --depth=1 --branch ${LMDB_VERSION} https://github.com/LMDB/lmdb)
set(LMDB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb)
add_library(lmdb
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/lmdb.h
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/mdb.c
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/midl.h
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/midl.c)
set(LMDB_LIBRARY lmdb)
else()
find_path (LMDB_INCLUDE_DIR NAMES lmdb.h PATHS "$ENV{LMDB_DIR}/include")
find_library (LMDB_LIBRARY NAMES lmdb PATHS "$ENV{LMDB_DIR}/lib" )
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARY)
endif()
include_directories(${LMDB_INCLUDE_DIR})

View File

@ -21,8 +21,4 @@ if(NOT EXISTS ${_qrc})
endif()
qt5_add_resources(LANG_QRC ${_qrc})
if(Qt5QuickCompiler_FOUND AND COMPILE_QML)
qtquick_compiler_add_resources(QRC resources/res.qrc)
else()
qt5_add_resources(QRC resources/res.qrc)
endif()
qt5_add_resources(QRC resources/res.qrc)

View File

@ -0,0 +1,28 @@
function Component()
{
}
Component.prototype.createOperations = function()
{
component.createOperations();
try
{
if( installer.value("os") === "win" )
{
/**
* Cleanup AppData and registry
*/
component.addElevatedOperation("Execute","UNDOEXECUTE","cmd /C reg delete HKEY_CURRENT_USER\Software\nheko\nheko /f");
var localappdata = installer.environmentVariable("LOCALAPPDATA");
if( localappdata != "" )
{
component.addElevatedOperation("Execute","UNDOEXECUTE","cmd /C rmdir "+localappdata+"\nheko /f");
}
}
}
catch( e )
{
print( e );
}
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>Cleanup AppData and Registry</DisplayName>
<Description>Cleans up AppData and Registry when selected (logs you out) - Broken</Description>
<Version>__VERSION__</Version>
<ReleaseDate>__DATE__</ReleaseDate>
<SortingPriority>80</SortingPriority>
<Script>installscript.qs</Script>
<Checkable>false</Checkable>
</Package>

View File

@ -23,18 +23,6 @@ Component.prototype.createOperations = function()
component.addOperation( "CreateShortcut", "@TargetDir@\\nheko.exe", "@DesktopDir@\\nheko.lnk",
"workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\nheko.exe",
"iconId=0", "description=Desktop client for the Matrix protocol");
var reg = installer.environmentVariable("SystemRoot") + "\\System32\\reg.exe";
var key= "HKEY_CLASSES_ROOT\\matrix";
component.addOperation("Execute", reg, "ADD", key, "/f", "/t", "REG_SZ", "/d", "URL:Matrix Protocol");
component.addOperation("Execute", reg, "ADD", key, "/f", "/v", "URL Protocol", "/t", "REG_SZ");
var iconkey = "HKEY_CLASSES_ROOT\\matrix\\DefaultIcon";
component.addOperation("Execute", reg, "ADD", iconkey, "/f", "/t", "REG_SZ", "/d", "@TargetDir@\\nheko.exe,1");
component.addOperation("Execute", reg, "ADD", "HKEY_CLASSES_ROOT\\matrix\\shell", "/f");
component.addOperation("Execute", reg, "ADD", "HKEY_CLASSES_ROOT\\matrix\\shell\\open", "/f");
var commandkey = "HKEY_CLASSES_ROOT\\matrix\\shell\\open\\command"
component.addOperation("Execute", reg, "ADD", commandkey, "/f");
component.addOperation("Execute", reg, "ADD", commandkey, "/f", "/t", "REG_SZ", "/d", "\"@TargetDir@\\nheko.exe\" \"%1\"");
}
}
catch( e )

125
deps/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,125 @@
cmake_minimum_required(VERSION 3.11)
project(NHEKO_DEPS)
# Point CMake at any custom modules we may ship
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr"
CACHE PATH "Dependencies install directory.")
set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin"
CACHE PATH "Dependencies binary install directory.")
set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib"
CACHE PATH "Dependencies library install directory.")
set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build"
CACHE PATH "Dependencies build directory.")
set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads"
CACHE PATH "Dependencies download directory.")
option(USE_BUNDLED "Use bundled dependencies." ON)
option(USE_BUNDLED_BOOST "Use the bundled version of Boost." ${USE_BUNDLED})
option(USE_BUNDLED_CMARK "Use the bundled version of cmark." ${USE_BUNDLED})
option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${USE_BUNDLED})
option(USE_BUNDLED_OLM "Use the bundled version of libolm." ${USE_BUNDLED})
option(USE_BUNDLED_TWEENY "Use the bundled version of Tweeny." ${USE_BUNDLED})
option(USE_BUNDLED_LMDBXX "Use the bundled version of lmdbxx." ${USE_BUNDLED})
option(USE_BUNDLED_MATRIX_CLIENT "Use the bundled version of mtxclient."
${USE_BUNDLED})
option(USE_BUNDLED_JSON "Use the bundled version of nlohmann json." ${USE_BUNDLED})
option(MTX_STATIC "Compile / link bundled mtx client statically" OFF)
if(USE_BUNDLED_BOOST)
# bundled boost is 1.68, which requires CMake 3.12 or greater.
cmake_minimum_required(VERSION 3.12)
endif()
include(ExternalProject)
set(BOOST_URL
https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2)
set(BOOST_SHA256
8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406)
set(
MTXCLIENT_URL
https://github.com/Nheko-Reborn/mtxclient/archive/6eee767cc25a9db9f125843e584656cde1ebb6c5.tar.gz
)
set(MTXCLIENT_HASH
72fe77da4fed98b3cf069299f66092c820c900359a27ec26070175f9ad208a03)
set(
TWEENY_URL
https://github.com/mobius3/tweeny/archive/b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf.tar.gz
)
set(TWEENY_HASH
9a632b9da84823fae002ad5d9ba02c8d77c0a3810479974c6b637c5504165475)
set(
LMDBXX_HEADER_URL
https://raw.githubusercontent.com/bendiken/lmdbxx/0b43ca87d8cfabba392dfe884eb1edb83874de02/lmdb%2B%2B.h
)
set(LMDBXX_HASH
c57b501a4e8fa1187fa7fd348da415c7685a50a7cb25b17b3f257b9e9426f73d)
set(OLM_URL https://gitlab.matrix.org/matrix-org/olm.git)
set(OLM_TAG 4065c8e11a33ba41133a086ed3de4da94dcb6bae)
set(CMARK_URL https://github.com/commonmark/cmark/archive/0.28.3.tar.gz)
set(CMARK_HASH acc98685d3c1b515ff787ac7c994188dadaf28a2d700c10c1221da4199bae1fc)
set(SPDLOG_URL https://github.com/gabime/spdlog/archive/v1.1.0.tar.gz)
set(SPDLOG_HASH
3dbcbfd8c07e25f5e0d662b194d3a7772ef214358c49ada23c044c4747ce8b19)
set(JSON_URL
https://github.com/nlohmann/json.git)
set(JSON_TAG
v3.2.0)
if(USE_BUNDLED_JSON)
include(Json)
endif()
if(USE_BUNDLED_BOOST)
include(Boost)
endif()
if(USE_BUNDLED_SPDLOG)
include(SpdLog)
endif()
if(USE_BUNDLED_OLM)
include(Olm)
endif()
if(USE_BUNDLED_CMARK)
include(cmark)
endif()
if(USE_BUNDLED_TWEENY)
include(Tweeny)
endif()
if(USE_BUNDLED_LMDBXX)
file(DOWNLOAD ${LMDBXX_HEADER_URL} ${DEPS_INSTALL_DIR}/include/lmdb++.h
EXPECTED_HASH SHA256=${LMDBXX_HASH})
endif()
if(WIN32)
if("${TARGET_ARCH}" STREQUAL "X86_64")
set(TARGET_ARCH x64)
elseif(TARGET_ARCH STREQUAL "X86")
set(TARGET_ARCH ia32)
endif()
endif()
add_custom_target(third-party ALL
COMMAND ${CMAKE_COMMAND} -E touch .third-party
DEPENDS ${THIRD_PARTY_DEPS})
if(USE_BUNDLED_MATRIX_CLIENT)
include(MatrixClient)
add_dependencies(MatrixClient third-party)
endif()

23
deps/cmake/Boost.cmake vendored Normal file
View File

@ -0,0 +1,23 @@
if(WIN32)
message(STATUS "Building Boost in Windows is not supported (skipping)")
return()
endif()
ExternalProject_Add(
Boost
URL ${BOOST_URL}
URL_HASH SHA256=${BOOST_SHA256}
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/boost
DOWNLOAD_NO_PROGRESS 0
BUILD_IN_SOURCE 1
SOURCE_DIR ${DEPS_BUILD_DIR}/boost
CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/boost/bootstrap.sh
--with-libraries=random,thread,system,iostreams,atomic,chrono,date_time,regex
--prefix=${DEPS_INSTALL_DIR}
BUILD_COMMAND ${DEPS_BUILD_DIR}/boost/b2 -d0 cxxstd=14 variant=release link=shared runtime-link=shared threading=multi --layout=system
INSTALL_COMMAND ${DEPS_BUILD_DIR}/boost/b2 -d0 install
)
list(APPEND THIRD_PARTY_DEPS Boost)

19
deps/cmake/Json.cmake vendored Normal file
View File

@ -0,0 +1,19 @@
ExternalProject_Add(
Json
GIT_REPOSITORY ${JSON_URL}
GIT_TAG ${JSON_TAG}
BUILD_IN_SOURCE 1
SOURCE_DIR ${DEPS_BUILD_DIR}/json
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DJSON_BuildTests=OFF
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
BUILD_COMMAND ${CMAKE_COMMAND} --build ${DEPS_BUILD_DIR}/json
INSTALL_COMMAND make install
)
list(APPEND THIRD_PARTY_DEPS Json)

43
deps/cmake/MatrixClient.cmake vendored Normal file
View File

@ -0,0 +1,43 @@
set(PLATFORM_FLAGS "")
if(MSVC)
set(PLATFORM_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
endif()
if(APPLE)
set(PLATFORM_FLAGS "-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl")
endif()
# Force to build with the bundled version of Boost. This is necessary because
# if an outdated version of Boost is installed, then CMake will grab that
# instead of the bundled version of Boost, like we wanted.
set(BOOST_BUNDLE_ROOT "-DBOOST_ROOT=${DEPS_BUILD_DIR}/boost")
set (MTX_SHARED ON)
if (MTX_STATIC)
set (MTX_SHARED OFF)
endif()
ExternalProject_Add(
MatrixClient
URL ${MTXCLIENT_URL}
URL_HASH SHA256=${MTXCLIENT_HASH}
BUILD_IN_SOURCE 1
SOURCE_DIR ${DEPS_BUILD_DIR}/mtxclient
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DCMAKE_BUILD_TYPE=Release
-DBUILD_LIB_TESTS=OFF
-DBUILD_LIB_EXAMPLES=OFF
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
${BOOST_BUNDLE_ROOT}
-DBUILD_SHARED_LIBS=${MTX_SHARED}
${PLATFORM_FLAGS}
${DEPS_BUILD_DIR}/mtxclient
BUILD_COMMAND
${CMAKE_COMMAND} --build ${DEPS_BUILD_DIR}/mtxclient --config Release)
list(APPEND THIRD_PARTY_DEPS MatrixClient)

34
deps/cmake/Olm.cmake vendored Normal file
View File

@ -0,0 +1,34 @@
set(WINDOWS_FLAGS "")
if(MSVC)
set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
endif()
ExternalProject_Add(
Olm
GIT_REPOSITORY ${OLM_URL}
GIT_TAG ${OLM_TAG}
BUILD_IN_SOURCE 1
SOURCE_DIR ${DEPS_BUILD_DIR}/olm
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/cmake/OlmCMakeLists.txt
${DEPS_BUILD_DIR}/olm/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/cmake/OlmConfig.cmake.in
${DEPS_BUILD_DIR}/olm/cmake/OlmConfig.cmake.in
COMMAND ${CMAKE_COMMAND}
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DCMAKE_BUILD_TYPE=Release
${DEPS_BUILD_DIR}/olm
${WINDOWS_FLAGS}
BUILD_COMMAND ${CMAKE_COMMAND}
--build ${DEPS_BUILD_DIR}/olm
--config Release
INSTALL_COMMAND ${CMAKE_COMMAND}
--build ${DEPS_BUILD_DIR}/olm
--config Release
--target install)
list(APPEND THIRD_PARTY_DEPS Olm)

107
deps/cmake/OlmCMakeLists.txt vendored Normal file
View File

@ -0,0 +1,107 @@
cmake_minimum_required(VERSION 3.1)
project(olm VERSION 2.2.2 LANGUAGES CXX C)
add_definitions(-DOLMLIB_VERSION_MAJOR=${PROJECT_VERSION_MAJOR})
add_definitions(-DOLMLIB_VERSION_MINOR=${PROJECT_VERSION_MINOR})
add_definitions(-DOLMLIB_VERSION_PATCH=${PROJECT_VERSION_PATCH})
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
add_library(olm
src/account.cpp
src/base64.cpp
src/cipher.cpp
src/crypto.cpp
src/memory.cpp
src/message.cpp
src/pickle.cpp
src/ratchet.cpp
src/session.cpp
src/utility.cpp
src/ed25519.c
src/error.c
src/inbound_group_session.c
src/megolm.c
src/olm.cpp
src/outbound_group_session.c
src/pickle_encoding.c
lib/crypto-algorithms/aes.c
lib/crypto-algorithms/sha256.c
lib/curve25519-donna/curve25519-donna.c)
add_library(Olm::Olm ALIAS olm)
target_include_directories(olm
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/lib)
set_target_properties(olm PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION})
set_target_properties(olm PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
#
# Installation
#
include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Olm)
install(TARGETS olm
EXPORT olm-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
# The exported target will be named Olm.
set_target_properties(olm PROPERTIES EXPORT_NAME Olm)
install(FILES
${CMAKE_SOURCE_DIR}/include/olm/olm.h
${CMAKE_SOURCE_DIR}/include/olm/outbound_group_session.h
${CMAKE_SOURCE_DIR}/include/olm/inbound_group_session.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/olm)
# Export the targets to a script.
install(EXPORT olm-targets
FILE OlmTargets.cmake
NAMESPACE Olm::
DESTINATION ${INSTALL_CONFIGDIR})
# Create a ConfigVersion.cmake file.
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/OlmConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)
configure_package_config_file(
${CMAKE_CURRENT_LIST_DIR}/cmake/OlmConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/OlmConfig.cmake
INSTALL_DESTINATION ${INSTALL_CONFIGDIR})
#Install the config & configversion.
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/OlmConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/OlmConfigVersion.cmake
DESTINATION ${INSTALL_CONFIGDIR})
# Register package in user's package registry
export(EXPORT olm-targets
FILE ${CMAKE_CURRENT_BINARY_DIR}/OlmTargets.cmake
NAMESPACE Olm::)
export(PACKAGE Olm)

11
deps/cmake/OlmConfig.cmake.in vendored Normal file
View File

@ -0,0 +1,11 @@
get_filename_component(Olm_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH ${Olm_CMAKE_DIR})
list(REMOVE_AT CMAKE_MODULE_PATH -1)
if(NOT TARGET Olm::Olm)
include("${Olm_CMAKE_DIR}/OlmTargets.cmake")
endif()
set(Olm_LIBRARIES Olm::Olm)

23
deps/cmake/SpdLog.cmake vendored Normal file
View File

@ -0,0 +1,23 @@
set(WINDOWS_FLAGS "")
if(MSVC)
set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
endif()
ExternalProject_Add(
SpdLog
URL ${SPDLOG_URL}
URL_HASH SHA256=${SPDLOG_HASH}
BUILD_IN_SOURCE 1
SOURCE_DIR ${DEPS_BUILD_DIR}/spdlog
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DSPDLOG_BUILD_EXAMPLES=0
-DSPDLOG_BUILD_BENCH=0
-DSPDLOG_BUILD_TESTING=0
${DEPS_BUILD_DIR}/spdlog
${WINDOWS_FLAGS})
list(APPEND THIRD_PARTY_DEPS SpdLog)

22
deps/cmake/Tweeny.cmake vendored Normal file
View File

@ -0,0 +1,22 @@
set(WINDOWS_FLAGS "")
if(MSVC)
set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
endif()
ExternalProject_Add(
Tweeny
URL ${TWEENY_URL}
URL_HASH SHA256=${TWEENY_HASH}
BUILD_IN_SOURCE 1
SOURCE_DIR ${DEPS_BUILD_DIR}/tweeny
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DTWEENY_BUILD_EXAMPLES=OFF
-DTWEENY_BUILD_DOCUMENTATION=OFF
${DEPS_BUILD_DIR}/tweeny
${WINDOWS_FLAGS})
list(APPEND THIRD_PARTY_DEPS Tweeny)

21
deps/cmake/cmark.cmake vendored Normal file
View File

@ -0,0 +1,21 @@
set(WINDOWS_FLAGS "")
if(MSVC)
set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
endif()
ExternalProject_Add(
cmark
URL ${CMARK_URL}
URL_HASH SHA256=${CMARK_HASH}
BUILD_IN_SOURCE 0
SOURCE_DIR ${DEPS_BUILD_DIR}/cmark
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DCMARK_TESTS=OFF
${DEPS_BUILD_DIR}/cmark
${WINDOWS_FLAGS})
list(APPEND THIRD_PARTY_DEPS cmark)

View File

@ -1,180 +0,0 @@
id: io.github.NhekoReborn.Nheko
command: nheko
runtime: org.kde.Platform
runtime-version: '5.15'
sdk: org.kde.Sdk
rename-icon: nheko
rename-desktop-file: nheko.desktop
rename-appdata-file: nheko.appdata.xml
finish-args:
- --device=dri
# needed for webcams, see #517
- --device=all
- --share=ipc
- --share=network
- --socket=pulseaudio
- --socket=wayland
- --socket=x11
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.freedesktop.secrets
- --talk-name=org.freedesktop.StatusNotifierItem
- --talk-name=org.kde.*
cleanup:
- /include
- /bin/mdb*
- '*.a'
build-options:
arch:
aarch64:
cxxflags: -DBOOST_ASIO_DISABLE_EPOLL
modules:
- name: lmdb
sources:
- sha256: f3927859882eb608868c8c31586bb7eb84562a40a6bf5cc3e13b6b564641ea28
type: archive
url: https://github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz
make-install-args:
- prefix=/app
no-autogen: true
subdir: libraries/liblmdb
- name: cmark
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DCMARK_TESTS=OFF
sources:
- sha256: 2558ace3cbeff85610de3bda32858f722b359acdadf0c4691851865bb84924a6
type: archive
url: https://github.com/commonmark/cmark/archive/0.29.0.tar.gz
- name: spdlog
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DSPDLOG_BUILD_EXAMPLES=0
- -DSPDLOG_BUILD_BENCH=0
- -DSPDLOG_BUILD_TESTING=0
sources:
- sha256: 5197b3147cfcfaa67dd564db7b878e4a4b3d9f3443801722b3915cdeced656cb
type: archive
url: https://github.com/gabime/spdlog/archive/v1.8.1.tar.gz
- config-opts:
- -DCMAKE_BUILD_TYPE=Release
buildsystem: cmake-ninja
name: olm
sources:
- commit: 6753595300767dd70150831dbbe6f92d64e75038
disable-shallow-clone: true
tag: 3.1.4
type: git
url: https://gitlab.matrix.org/matrix-org/olm.git
- config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_TEST_APPLICATION=OFF
- -DQTKEYCHAIN_STATIC=ON
buildsystem: cmake-ninja
name: QtKeychain
sources:
- commit: 815fe610353ff8ad7e2f1121c368a74df8db5eb7
tag: v0.12.0
type: git
url: https://github.com/frankosterfeld/qtkeychain.git
- config-opts:
- -DJSON_BuildTests=OFF
buildsystem: cmake
name: nlohmann
sources:
- sha256: d51a3a8d3efbb1139d7608e28782ea9efea7e7933157e8ff8184901efd8ee760
type: archive
url: https://github.com/nlohmann/json/archive/v3.7.0.tar.gz
- build-commands:
- ./bootstrap.sh --with-libraries=thread,system,iostreams --prefix=/app
- ./b2 -d0 variant=release link=static threading=multi --layout=system
- ./b2 -d0 install
buildsystem: simple
name: boost
sources:
- sha256: 59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722
type: archive
url: https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2
- buildsystem: meson
name: gstreamer
sources:
- commit: a42fe476d3ee5576921f67a331464065ec33b9a4
tag: 1.18.3
type: git
url: https://gitlab.freedesktop.org/gstreamer/gstreamer.git
- config-opts:
- -Dcompositor=enabled
- -Dgl=enabled
buildsystem: meson
name: gstreamer-plugins-base
sources:
- commit: 2cc319ee13f6b72df3d432b7c75aca81feb260e5
tag: 1.18.3
type: git
url: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base.git
- config-opts:
- -Dpulse=enabled
- -Dqt5=enabled
- -Drtp=enabled
- -Drtpmanager=enabled
- -Dvpx=enabled
buildsystem: meson
name: gstreamer-plugins-good
sources:
- commit: e816c6cd73c9e0676828c9e227a049ebad3d019f
tag: 1.18.3
type: git
url: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good.git
- config-opts:
- -Ddtls=enabled
- -Dgl=enabled
- -Dopenh264=enabled
- -Dopus=enabled
- -Dsrtp=enabled
- -Dwebrtc=enabled
- -Dflite=disabled
buildsystem: meson
name: gstreamer-plugins-bad
sources:
- commit: 382e373d9be363f1e21b12990a4d12f1ecb6df41
tag: 1.18.3
type: git
url: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git
- config-opts:
- -DBUILD_LIB_TESTS=OFF
- -DBUILD_LIB_EXAMPLES=OFF
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_SHARED_LIBS=OFF
buildsystem: cmake-ninja
name: mtxclient
sources:
- commit: 5d2f055ea9403770039ddf66b1900f890cd5cde7
type: git
url: https://github.com/Nheko-Reborn/mtxclient.git
- config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DTWEENY_BUILD_DOCUMENTATION=OFF
- -DTWEENY_BUILD_EXAMPLES=OFF
buildsystem: cmake-ninja
name: tweeny
sources:
- sha256: 482857256a7235646004682912badb6521d361ed6987c8ebdae7986bf64ce694
type: archive
url: https://github.com/mobius3/tweeny/archive/43f4130f7e4a67c19d870b60864bc2862c19b81f.tar.gz
- config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DLMDBXX_INCLUDE_DIR=.deps/lmdbxx
- -DCOMPILE_QML=ON
buildsystem: cmake-ninja
name: nheko
sources:
- path: .
type: dir
skip:
- build-flatpak
- dest: .deps/lmdbxx
sha256: 5e12eb3aefe9050068af7df2c663edabc977ef34c9e7ba7b9d2c43e0ad47d8df
type: archive
url: https://github.com/hoytech/lmdbxx/archive/1.0.0.tar.gz

View File

@ -1,10 +0,0 @@
[Flatpak Ref]
Title=Nheko Nightly
Name=io.github.NhekoReborn.Nheko
Branch=master
Url=https://flatpak.neko.dev/repo/nightly
Homepage=https://nheko-reborn.github.io/
Icon=https://nheko.im/nheko-reborn/nheko/-/raw/master/resources/nheko.svg
RuntimeRepo=https://dl.flathub.org/repo/flathub.flatpakrepo
IsRuntime=false
GPGKey=mDMEXENMphYJKwYBBAHaRw8BAQdAqn+Eo42lPoGpJ5HaOf4nFGfxR0QtOggJTCfsdbOyL4e0Kk5pY29sYXMgV2VybmVyIDxuaWNvbGFzLndlcm5lckBob3RtYWlsLmRlPoiWBBMWCAA+FiEE1YtGJCWmo3Elxv7bkgauGyMeBbsFAlxDTVUCGwMFCQtJjooFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQkgauGyMeBbs2rQD/dAEoOGT21BL85A8LmPK743EboBAjoRbWcI1hHnvS28AA/3b3HYGwgvTC6hQLyz75zjpeO5ZaUtbezRyDUR4xabMAtCROaWNvbGFzIFdlcm5lciA8bmljb2xhc0BuZWtvZGV2Lm5ldD6IlgQTFggAPhYhBNWLRiQlpqNxJcb+25IGrhsjHgW7BQJcQ01GAhsDBQkLSY6KBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEJIGrhsjHgW7GxwBANT4gL03Uu9N5KmTBihC7B71+0r7M/azPbUh86NthCeIAQCF2JXa0axBKhgQF5fWC5ncL+m8ZpH7C5rzDqVgO82WALQnTmljb2xhcyBXZXJuZXIgPG5pY29sYXMud2VybmVyQGdteC5uZXQ+iJYEExYIAD4WIQTVi0YkJaajcSXG/tuSBq4bIx4FuwUCXENMpgIbAwUJC0mOigULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCSBq4bIx4FuxU5APoCRDYlJW0oTsJs3lcTTB5Nsqb3X4iCEDCjIgsA3wtsIwEAlGBzD8ElCYi2+8m8esSRNlmpRcGoqgXbceLxPUXFpQu4OARcQ0ymEgorBgEEAZdVAQUBAQdAD8dBmT3iqrqdlxSw90L0SIH11fVxiX9MdWfBkTi6PzUDAQgHiH4EGBYIACYWIQTVi0YkJaajcSXG/tuSBq4bIx4FuwUCXENMpgIbDAUJC0mOigAKCRCSBq4bIx4Fu/LNAQDhH64IBic6h7H3uvtSAFT4xNn7Epobt2baIaDp7uKsQQEAyI+oc5dLknABwIOMrQQuZCmGejx9e4/8HEqLCdszhgG4MwRgNICHFgkrBgEEAdpHDwEBB0DR9eFFzfR62FIi7g+txcQenLvKFzhlyTz0wo3icOy6RYj1BBgWCAAmFiEE1YtGJCWmo3Elxv7bkgauGyMeBbsFAmA0gIcCGwIFCQlmAYAAgQkQkgauGyMeBbt2IAQZFggAHRYhBGz14re9h4cNPaFEKMjXXmEHc/LZBQJgNICHAAoJEMjXXmEHc/LZhVMBAPdYRspdeFh6E9BDxGubT705e/pZFdCHjCToDyxgdW5KAP9sU0hFI5VDHD1h98RzxSt7hc3jxyPSzbG1MBUJ9gbfCVhcAPsFfeZc3v5UBgmn4uICFEGjlzAWCQ7WctE6QTSkY5aL/wD9ETJH5lB+i/8km/sOBKQozXR0yHHw46gB6ZWMeN1wfgq4MwRgNPutFgkrBgEEAdpHDwEBB0APwMn0FJmnAds8IO8iCl/RHr7fz8xnpGd7E4zVgCNZpIj1BBgWCAAmFiEE1YtGJCWmo3Elxv7bkgauGyMeBbsFAmA0+60CGwIFCQANLwAAgQkQkgauGyMeBbt2IAQZFggAHRYhBAH7QBkzNfVIZJM93RNnXzGtBKQcBQJgNPutAAoJEBNnXzGtBKQcHnUA/0E2H5sxmfZ+EWFTso3X4NWu3uN2xF+MdNaY8C72f9H6AP91XaNmlB9gV61rg6wcB5E/j0998yWS9gltY1XY1ImqDPvlAP4sHFs5zuDazgKYxZ/kFhENCgEStdpnvJjt/DxmQPVT3AD/QK5vGoMTIeYjihv0QCnnRDfboTTZHlaEqJW8i02PQww=

View File

@ -1,8 +0,0 @@
[Flatpak Repo]
Title=Nheko Nightly
Url=https://flatpak.neko.dev/repo/nightly
Homepage=https://nheko.im/
Comment=Nheko nightly release repository
Description=Nheko nightly release repository
Icon=https://nheko.im/nheko-reborn/nheko/-/raw/master/resources/nheko.svg
GPGKey=mDMEXENMphYJKwYBBAHaRw8BAQdAqn+Eo42lPoGpJ5HaOf4nFGfxR0QtOggJTCfsdbOyL4e0Kk5pY29sYXMgV2VybmVyIDxuaWNvbGFzLndlcm5lckBob3RtYWlsLmRlPoiWBBMWCAA+FiEE1YtGJCWmo3Elxv7bkgauGyMeBbsFAlxDTVUCGwMFCQtJjooFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQkgauGyMeBbs2rQD/dAEoOGT21BL85A8LmPK743EboBAjoRbWcI1hHnvS28AA/3b3HYGwgvTC6hQLyz75zjpeO5ZaUtbezRyDUR4xabMAtCROaWNvbGFzIFdlcm5lciA8bmljb2xhc0BuZWtvZGV2Lm5ldD6IlgQTFggAPhYhBNWLRiQlpqNxJcb+25IGrhsjHgW7BQJcQ01GAhsDBQkLSY6KBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEJIGrhsjHgW7GxwBANT4gL03Uu9N5KmTBihC7B71+0r7M/azPbUh86NthCeIAQCF2JXa0axBKhgQF5fWC5ncL+m8ZpH7C5rzDqVgO82WALQnTmljb2xhcyBXZXJuZXIgPG5pY29sYXMud2VybmVyQGdteC5uZXQ+iJYEExYIAD4WIQTVi0YkJaajcSXG/tuSBq4bIx4FuwUCXENMpgIbAwUJC0mOigULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCSBq4bIx4FuxU5APoCRDYlJW0oTsJs3lcTTB5Nsqb3X4iCEDCjIgsA3wtsIwEAlGBzD8ElCYi2+8m8esSRNlmpRcGoqgXbceLxPUXFpQu4OARcQ0ymEgorBgEEAZdVAQUBAQdAD8dBmT3iqrqdlxSw90L0SIH11fVxiX9MdWfBkTi6PzUDAQgHiH4EGBYIACYWIQTVi0YkJaajcSXG/tuSBq4bIx4FuwUCXENMpgIbDAUJC0mOigAKCRCSBq4bIx4Fu/LNAQDhH64IBic6h7H3uvtSAFT4xNn7Epobt2baIaDp7uKsQQEAyI+oc5dLknABwIOMrQQuZCmGejx9e4/8HEqLCdszhgG4MwRgNICHFgkrBgEEAdpHDwEBB0DR9eFFzfR62FIi7g+txcQenLvKFzhlyTz0wo3icOy6RYj1BBgWCAAmFiEE1YtGJCWmo3Elxv7bkgauGyMeBbsFAmA0gIcCGwIFCQlmAYAAgQkQkgauGyMeBbt2IAQZFggAHRYhBGz14re9h4cNPaFEKMjXXmEHc/LZBQJgNICHAAoJEMjXXmEHc/LZhVMBAPdYRspdeFh6E9BDxGubT705e/pZFdCHjCToDyxgdW5KAP9sU0hFI5VDHD1h98RzxSt7hc3jxyPSzbG1MBUJ9gbfCVhcAPsFfeZc3v5UBgmn4uICFEGjlzAWCQ7WctE6QTSkY5aL/wD9ETJH5lB+i/8km/sOBKQozXR0yHHw46gB6ZWMeN1wfgq4MwRgNPutFgkrBgEEAdpHDwEBB0APwMn0FJmnAds8IO8iCl/RHr7fz8xnpGd7E4zVgCNZpIj1BBgWCAAmFiEE1YtGJCWmo3Elxv7bkgauGyMeBbsFAmA0+60CGwIFCQANLwAAgQkQkgauGyMeBbt2IAQZFggAHRYhBAH7QBkzNfVIZJM93RNnXzGtBKQcBQJgNPutAAoJEBNnXzGtBKQcHnUA/0E2H5sxmfZ+EWFTso3X4NWu3uN2xF+MdNaY8C72f9H6AP91XaNmlB9gV61rg6wcB5E/j0998yWS9gltY1XY1ImqDPvlAP4sHFs5zuDazgKYxZ/kFhENCgEStdpnvJjt/DxmQPVT3AD/QK5vGoMTIeYjihv0QCnnRDfboTTZHlaEqJW8i02PQww=

File diff suppressed because it is too large Load Diff

1
resources/emoji.json Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 773 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

View File

@ -1 +0,0 @@
*.qm

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,5 +0,0 @@
The below media files were obtained from https://github.com/matrix-org/matrix-react-sdk/tree/develop/res/media
callend.ogg
ringback.ogg
ring.ogg

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More