diff --git a/Makefile b/Makefile
index 59176ec..a3ddbc1 100644
--- a/Makefile
+++ b/Makefile
@@ -9,18 +9,19 @@ all: release
YARN ?= yarnpkg
VERSION := $(shell grep version element-desktop/package.json | sed 's|.*: \"\(.*\)\",|\1|')
-APP_NAME := $(shell grep '"name"' element-desktop/package.json | head -n 1 | sed 's|.*: \"\(.*\)\",|\1|')
+WEB_APP_NAME := $(shell grep '"name"' element-web/package.json | head -n 1 | sed 's|.*: \"\(.*\)\",|\1|')
+DESKTOP_APP_NAME := $(shell grep '"name"' element-desktop/package.json | head -n 1 | sed 's|.*: \"\(.*\)\",|\1|')
PRODUCT_NAME := $(shell grep '"productName"' element-desktop/package.json | sed 's|.*: \"\(.*\)\",|\1|')
WEB_OUT := element-web/dist
-WEB_OUT_DIST_VERSION := web
-OUT_WEB := $(WEB_OUT)/riot-$(WEB_OUT_DIST_VERSION).tar.gz
-OUT_WEB_BETTER_NAME := schildichat-web-$(VERSION).tar.gz
+WEB_OUT_DIST_VERSION := $(VERSION)
+OUT_WEB := $(WEB_OUT)/$(WEB_APP_NAME)-$(WEB_OUT_DIST_VERSION).tar.gz
DESKTOP_OUT := element-desktop/dist
-OUT_DEB64 := $(DESKTOP_OUT)/$(APP_NAME)_$(VERSION)_amd64.deb
-OUT_PAC64 := $(DESKTOP_OUT)/$(APP_NAME)-$(VERSION).pacman
-OUT_TARXZ64 := $(DESKTOP_OUT)/$(APP_NAME)-$(VERSION).tar.xz
+OUT_DEB64 := $(DESKTOP_OUT)/$(DESKTOP_APP_NAME)_$(VERSION)_amd64.deb
+OUT_PAC64 := $(DESKTOP_OUT)/$(DESKTOP_APP_NAME)-$(VERSION).pacman
+OUT_APPIMAGE64 := $(DESKTOP_OUT)/$(PRODUCT_NAME)-$(VERSION).AppImage
+OUT_TARXZ64 := $(DESKTOP_OUT)/$(DESKTOP_APP_NAME)-$(VERSION).tar.xz
OUT_WIN64 := $(DESKTOP_OUT)/$(PRODUCT_NAME)\ Setup\ $(VERSION).exe
OUT_WIN64_PORTABLE := $(DESKTOP_OUT)/$(PRODUCT_NAME)\ $(VERSION).exe
OUT_WIN64_BETTER_NAME := $(PRODUCT_NAME)_Setup_v$(VERSION).exe
@@ -40,6 +41,7 @@ setup:
web: export DIST_VERSION=$(WEB_OUT_DIST_VERSION)
web: setup
$(YARN) --cwd element-web dist
+ echo "$(VERSION)" > element-web/webapp/version
desktop-common: web
$(YARN) --cwd element-desktop run fetch --cfgdir ''
@@ -56,6 +58,9 @@ debian: desktop-common
pacman: desktop-common
$(YARN) --cwd element-desktop run build64pacman
+appimage: desktop-common
+ $(YARN) --cwd element-desktop run build64appimage
+
windows: desktop-common
$(YARN) --cwd element-desktop run build64windows
@@ -64,7 +69,7 @@ windows-portable: desktop-common
web-release: web
mkdir -p $(CURRENT_RELEASE_DIR)
- cp $(OUT_WEB) $(CURRENT_RELEASE_DIR)/$(OUT_WEB_BETTER_NAME)
+ cp $(OUT_WEB) $(CURRENT_RELEASE_DIR)
debian-release: debian
mkdir -p $(CURRENT_RELEASE_DIR)
@@ -74,6 +79,10 @@ pacman-release: pacman
mkdir -p $(CURRENT_RELEASE_DIR)
cp $(OUT_PAC64) $(CURRENT_RELEASE_DIR)
+appimage-release: appimage
+ mkdir -p $(CURRENT_RELEASE_DIR)
+ cp $(OUT_APPIMAGE64) $(CURRENT_RELEASE_DIR)
+
windows-setup-release: windows
mkdir -p $(CURRENT_RELEASE_DIR)
cp $(OUT_WIN64) $(CURRENT_RELEASE_DIR)/$(OUT_WIN64_BETTER_NAME)
diff --git a/README.md b/README.md
index 6e81bfa..646ba44 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,31 @@
-# SchildiChat-Desktop
+# SchildiChat Web/Desktop
-SchildiChat-Desktop is a fork of [Element-Web](https://github.com/vector-im/element-web)/[-Desktop](https://github.com/vector-im/element-desktop).
-
-The most important changes of SchildiChat-Desktop compared to Element are:
+SchildiChat Web/Desktop is a fork of Element [Web](https://github.com/vector-im/element-web)/[Desktop](https://github.com/vector-im/element-desktop).
+The most important changes of SchildiChat Web/Desktop compared to Element Web/Desktop are:
- A unifed chat list for both direct and group chats
- Message bubbles
- Bigger items in the room list
+- … and more!
-While SchildiChat-Desktop should be already usable as is, it's still better seen as a
-proof-of-concept rather than a finished product, as there are still a few UX bugs
-remaining, and no ways to configure Schildi's features.
-Furthermore, I don't know how much more work I'm going to put into this, but
-if anybody wants to help improving it, contributions are welcome!
-
-Downloads for Desktop: https://github.com/SchildiChat/schildichat-desktop/releases
-Hosted web variant: https://schildiweb.spiritcroc.de/
+Desktop downloads with installation instructions are listed on our website: [https://schildi.chat/desktop](https://schildi.chat/desktop)
+Hosted web variant: [https://app.schildi.chat/](https://app.schildi.chat/)
Feel free to [join the discussion on matrix](https://matrix.to/#/#schildichat-web:matrix.org).
-# Building SchildiChat-Desktop
+## Building SchildiChat Web/Desktop
-This particular repo is a wrapper project for element-desktop, element-web, matrix-react-sdk and matrix-js-sdk, in order to build SchildiChat-Desktop.
+This particular repo is a wrapper project for element-desktop, element-web, matrix-react-sdk and matrix-js-sdk in order to build SchildiChat Web **and** Desktop.
-## Debian compilation dependencies
+### Debian build dependencies
-Since Debian is usually slow to update packages on its stable releases, some dependencies
-might not be recent enough to building Schildi.
-Here are the dependencies which I had to install for compilation on Debian 10:
+Since Debian is usually slow to update packages on its stable releases,
+some dependencies might not be recent enough to build SchildiChat.
+The following are the dependencies required to build SchildiChat Web/Desktop on Debian 10:
```
# apt install vim curl git make gcc g++ libsqlcipher-dev pkg-config libsecret-1-dev bsdtar
@@ -49,7 +43,7 @@ $ echo 'export PATH="$PATH:$HOME/.cargo/bin"' >> .bashrc
$ source .bashrc
```
-## Initial setup
+### Initial setup
```
git clone --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git
@@ -57,10 +51,35 @@ cd schildichat-desktop
make setup # optional step if using the other make targets
```
-## Build
+### Create release builds
-`make [{web|debian|pacman|windows}-release]`
+Those are the builds distributed via GitHub releases.
-## Install
+```
+# The single make targets are explained below
+make [{web|debian|windows-setup|windows-portable}-release]
+```
-Installable packages should appear in release/.
+After that these packages which belong to to their respective make target should appear in release/\/:
+- `web`: _schildichat-web-\.tar.gz_: archive that can be unpacked and served by a **web** server (copy `config.sample.json` to `config.json` and adjust the [configuration](https://github.com/SchildiChat/element-web/blob/sc/docs/config.md) to your likings)
+- `debian`: file ready for installation on a **Debian Linux** (based) system via `dpkg -i schildichat-desktop__amd64.deb`
+- `windows-setup`: _SchildiChat_Setup_v\.exe_: file ready for **installation** on a **Windows** system
+- `windows-portable`: _SchildiChat_win-portable_v\.zip_: **portable** version for a **Windows** system – take SchildiChat together with your login data around with you (the archive contains a readme with **instructions** and **notes**)
+
+#### Additional make targets not used for GitHub releases
+- `pacman`: file ready for installation on an **Arch Linux** (based) system via `pacman -U schildichat-desktop-.pacman`
+- `windows-unpacked`: _SchildiChat_win-unpacked_v\.zip_: **unpacked** archive for a **Windows** system
+
+### Build SchildiChat Web and deploy it directly to your web server
+
+Put the `config.json` with the [configuration](https://github.com/SchildiChat/element-web/blob/sc/docs/config.md) you want for your hosted instance in a subfolder of the `configs` folder.
+Then create a file named `release.mk` and and fill it similar to that:
+```
+.PHONY: your-deploy-web
+
+YOUR_CFGDIR := configs/your_subfolder
+your-deploy-%: CFGDIR := $(YOUR_CFGDIR)
+
+your-deploy-web: web
+ rsync --info=progress2 -rup --del element-web/webapp/ you@yourwebserver:/the/folder/served/for/schildi/
+```
diff --git a/configs/sc/config.json b/configs/sc/config.json
index d03be60..dfc32f4 100644
--- a/configs/sc/config.json
+++ b/configs/sc/config.json
@@ -11,30 +11,20 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
- "hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web",
- "bug_report_endpoint_url": "https://element.io/bugreports/submit",
+ "showLabsSettings": true,
"roomDirectory": {
"servers": [
"matrix.org"
]
},
- "piwik": {
- "url": "https://piwik.riot.im/",
- "siteId": 1,
- "policyUrl": "https://element.io/cookie-policy"
- },
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false
},
"terms_and_conditions_links": [
{
- "url": "https://element.io/privacy",
+ "url": "https://schildi.chat/desktop/privacy",
"text": "Privacy Policy"
- },
- {
- "url": "https://element.io/cookie-policy",
- "text": "Cookie Policy"
}
]
}
diff --git a/deploy/.gitignore b/deploy/.gitignore
new file mode 100644
index 0000000..08935a3
--- /dev/null
+++ b/deploy/.gitignore
@@ -0,0 +1 @@
+repos/*
\ No newline at end of file
diff --git a/deploy/create-github-release.sh b/deploy/create-github-release.sh
new file mode 100755
index 0000000..d0cab53
--- /dev/null
+++ b/deploy/create-github-release.sh
@@ -0,0 +1,80 @@
+#!/usr/bin/env bash
+#
+# Based upon https://hinty.io/ivictbor/publish-and-upload-release-to-github-with-bash-and-curl/
+# and https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
+#
+
+set -e
+# set -x
+
+version="$1"
+releasepath="$2"
+
+github_api_token=`cat ~/githubtoken`
+release_notes_file="/tmp/scrn.md"
+
+owner=SchildiChat
+repo=schildichat-desktop
+target=sc
+
+# Define variables
+GH_API="https://api.github.com"
+GH_REPO="$GH_API/repos/$owner/$repo"
+AUTH="Authorization: token $github_api_token"
+
+# Validate token
+curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; }
+
+# Get release notes
+$EDITOR "$release_notes_file"
+release_notes=`cat "$release_notes_file"`
+
+# Create draft release
+echo "Create GitHub draft release ..."
+json_string=`jq -n --arg tag "v$version" --arg target "$target" --arg body "$release_notes" '{
+ tag_name: $tag,
+ target_commitish: $target,
+ name: $tag,
+ body: $body,
+ draft: true,
+ prerelease: false
+}'`
+# echo "$json_string"
+res=`echo "$json_string" | curl -sH "$AUTH" $GH_REPO/releases -d @-`
+# echo "$res" | jq "."
+
+# Get release id
+id=`echo $res | jq ".id"`
+# echo "id: $id"
+
+# Upload assets
+find "$releasepath" -type f | while read filename; do
+ echo ""
+ echo "Uploading $filename ..."
+
+ # Construct url
+ GH_ASSET="https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename)"
+
+ # Upload
+ res=`curl --progress-bar --data-binary @"$filename" -H "$AUTH" -H "Content-Type: application/octet-stream" $GH_ASSET`
+ state=`echo $res | jq ".state"`
+ if [ "$state" == "\"uploaded\"" ]; then
+ echo "Success!"
+ else
+ echo "Error:"
+ echo $res | jq "."
+ exit -1
+ fi
+done
+
+# Publish draft
+res=`curl -sH "$AUTH" $GH_REPO/releases/$id -d '{"draft": false}'`
+draft=`echo $res | jq ".draft"`
+echo ""
+if [ "$draft" == "false" ]; then
+ echo "Release v$version published on GitHub!"
+else
+ echo "Error:"
+ echo $res | jq "."
+ exit -1
+fi
diff --git a/deploy/update-aur-bin.sh b/deploy/update-aur-bin.sh
new file mode 100755
index 0000000..81b999d
--- /dev/null
+++ b/deploy/update-aur-bin.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+set -e
+# set -x
+
+DEPLOY_ROOT="$(dirname "$(realpath "$0")")"
+
+version="$1"
+debpath="$2"
+
+repopath="$DEPLOY_ROOT/repos/aur-bin"
+repourl="ssh://aur@aur.archlinux.org/schildichat-desktop-bin.git"
+
+sha256sum=($(sha256sum $debpath))
+
+[ -d "$repopath" ] || git clone $repourl $repopath
+
+pushd "$repopath" > /dev/null
+
+git fetch
+git reset --hard origin/master
+
+sed -i "s|^_pkgver=.*$|_pkgver=$version|" PKGBUILD
+sed -i "s|^sha256sums=('.*'$|sha256sums=('$sha256sum'|" PKGBUILD
+
+makepkg --printsrcinfo > .SRCINFO
+
+git add .SRCINFO PKGBUILD
+git commit -m "Bump version to v$version"
+
+git push
+
+popd > /dev/null
+
+echo "Release v$version published on AUR!"
diff --git a/deploy/update-flathub.sh b/deploy/update-flathub.sh
new file mode 100755
index 0000000..da21f06
--- /dev/null
+++ b/deploy/update-flathub.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+set -e
+# set -x
+
+DEPLOY_ROOT="$(dirname "$(realpath "$0")")"
+
+version="$1"
+debpath="$2"
+
+repopath="$DEPLOY_ROOT/repos/flathub"
+repourl="git@github.com:flathub/chat.schildi.desktop.git"
+
+downloadurl="https://github.com/SchildiChat/schildichat-desktop/releases/download/v${version}/schildichat-desktop_${version}_amd64.deb"
+sha256sum=($(sha256sum $debpath))
+debsize=($(wc -c $debpath))
+debdate=$(date +%Y-%m-%d -r $debpath)
+
+[ -d "$repopath" ] || git clone $repourl $repopath
+
+pushd "$repopath" > /dev/null
+
+git fetch
+git reset --hard origin/master
+
+jsonFile="chat.schildi.desktop.json"
+jsonString=$(jq -r "." $jsonFile)
+
+xmlFile="chat.schildi.desktop.appdata.xml"
+
+jsonString=$(echo $jsonString | jq -r ".modules[]? |= ((select(.name?==\"schildichat\") | .sources[0].url = \"${downloadurl}\") // .)")
+jsonString=$(echo $jsonString | jq -r ".modules[]? |= ((select(.name?==\"schildichat\") | .sources[0].sha256 = \"${sha256sum}\") // .)")
+jsonString=$(echo $jsonString | jq -r ".modules[]? |= ((select(.name?==\"schildichat\") | .sources[0].size = ${debsize}) // .)")
+
+echo $jsonString | jq --indent 4 "." > $jsonFile
+
+sed -i "s|^\s\s$| \n |" $xmlFile
+
+git add $jsonFile $xmlFile
+git commit -m "Bump version to v$version"
+
+git push
+
+popd > /dev/null
+
+echo "Release v$version published on flathub!"
diff --git a/element-desktop b/element-desktop
index a50c169..bdcf4b4 160000
--- a/element-desktop
+++ b/element-desktop
@@ -1 +1 @@
-Subproject commit a50c16924fc9628512e8539b35cff7c41bcf361e
+Subproject commit bdcf4b4449a89c34ca18188669dcd51214ccf246
diff --git a/element-web b/element-web
index bb73fed..422851e 160000
--- a/element-web
+++ b/element-web
@@ -1 +1 @@
-Subproject commit bb73fedb2ab82c0194f0f9b9bdffb30414ab979b
+Subproject commit 422851e9cc5cbce01fceadc5fa115996ca1e1e83
diff --git a/matrix-js-sdk b/matrix-js-sdk
index f536e5c..cc018cd 160000
--- a/matrix-js-sdk
+++ b/matrix-js-sdk
@@ -1 +1 @@
-Subproject commit f536e5c6116667335218fa8b8dfe782b70f57200
+Subproject commit cc018cd44bbd97e3a8f508fe21f33e0461d45127
diff --git a/matrix-react-sdk b/matrix-react-sdk
index c846b00..cb31ace 160000
--- a/matrix-react-sdk
+++ b/matrix-react-sdk
@@ -1 +1 @@
-Subproject commit c846b00b3236e5c62000eae87d5608969ca00ec6
+Subproject commit cb31acec3cb6da90aaf690d408d67fb7540d2c6d
diff --git a/merge_upstream.sh b/merge_upstream.sh
index 2d21c08..7956fd3 100755
--- a/merge_upstream.sh
+++ b/merge_upstream.sh
@@ -15,6 +15,13 @@ forall_repos check_branch $branch
forall_repos git fetch upstream
forall_repos git merge upstream/master
-./setup.sh
+# Automatic theme update
+pushd "matrix-react-sdk" > /dev/null
+./theme.sh
+popd > /dev/null
+
+# Refresh environment
+make clean
+make setup
popd > /dev/null
diff --git a/screenshots/1.png b/screenshots/1.png
index ee2b774..fe77672 100644
Binary files a/screenshots/1.png and b/screenshots/1.png differ
diff --git a/screenshots/2.png b/screenshots/2.png
new file mode 100644
index 0000000..29d19f4
Binary files /dev/null and b/screenshots/2.png differ