Compare commits

..

14 Commits

Author SHA1 Message Date
d88e73bebe Makefile: Don't clear release dir
New versions will take new subfolder and existing files will be overwritten
2020-11-10 22:54:12 +01:00
bfb153dfed Update to 1.7.13 2020-11-10 22:13:53 +01:00
2616080e27 Update submodules 2020-11-10 18:43:08 +01:00
1a1f8ae42a Sync alternative_package.sh colors with SchildiChat-Android 2020-11-07 12:32:06 +01:00
93547b09d8 Makefile: Let config be copied in setup target 2020-11-03 19:22:20 +01:00
2f51bd750d Update submodules to get rid of unwanted submodule changes 2020-11-03 13:16:26 +01:00
de5fa4e9e4 setup.sh: get rid of maybe preexisting yarn links 2020-11-03 13:16:13 +01:00
511bc6a2bc Call setup after upstream merge and ensure branch 2020-11-03 13:16:01 +01:00
7cfef33376 Makefile: Add release targets 2020-11-03 09:54:49 +01:00
1efd1b0ffe Add windows-portable target 2020-11-02 12:34:17 +01:00
3c3c600ec7 Update screenshots 2020-11-01 00:09:54 +01:00
3c4c9253d3 Update to 1.7.12 2020-10-30 22:29:55 +01:00
2c93b960f2 Update repo URLs to organization 2020-10-30 20:43:12 +01:00
7391966cd7 Update README 2020-10-13 16:59:51 +02:00
14 changed files with 211 additions and 33 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
release.mk
/release

8
.gitmodules vendored
View File

@ -1,12 +1,12 @@
[submodule "matrix-js-sdk"]
path = matrix-js-sdk
url = https://github.com/SpiritCroc/matrix-js-sdk.git
url = https://github.com/SchildiChat/matrix-js-sdk.git
[submodule "matrix-react-sdk"]
path = matrix-react-sdk
url = https://github.com/SpiritCroc/matrix-react-sdk.git
url = https://github.com/SchildiChat/matrix-react-sdk.git
[submodule "element-web"]
path = element-web
url = https://github.com/SpiritCroc/element-web.git
url = https://github.com/SchildiChat/element-web.git
[submodule "element-desktop"]
path = element-desktop
url = https://github.com/SpiritCroc/element-desktop.git
url = https://github.com/SchildiChat/element-desktop.git

View File

@ -1,17 +1,44 @@
.PHONY: all web desktop desktop-common linux windows clean
.PHONY: all setup web desktop desktop-common linux windows windows-portable
.PHONY: web-release debian-release pacman-release windows-setup-release windows-unpacked-release windows-portable-release windows-release release
.PHONY: clean
CFGDIR ?= configs/sc
all: desktop
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|')
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
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_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
OUT_WIN64_UNPACKED_BETTER_NAME := $(PRODUCT_NAME)_win-unpacked_v$(VERSION).zip
OUT_WIN64_PORTABLE_BETTER_NAME := $(PRODUCT_NAME)_win-portable_v$(VERSION)
RELEASE_DIR := release
CURRENT_RELEASE_DIR := $(RELEASE_DIR)/$(VERSION)
-include release.mk
web:
setup:
if [ ! -L "element-desktop/webapp" ]; then ./setup.sh; fi
cp $(CFGDIR)/config.json element-web/
web: export DIST_VERSION=$(WEB_OUT_DIST_VERSION)
web: setup
$(YARN) --cwd element-web dist
desktop-common: web
@ -32,8 +59,40 @@ pacman: desktop-common
windows: desktop-common
$(YARN) --cwd element-desktop run build64windows
windows-portable: desktop-common
$(YARN) --cwd element-desktop run build64windows-portable
web-release: web
mkdir -p $(CURRENT_RELEASE_DIR)
cp $(OUT_WEB) $(CURRENT_RELEASE_DIR)/$(OUT_WEB_BETTER_NAME)
debian-release: debian
mkdir -p $(CURRENT_RELEASE_DIR)
cp $(OUT_DEB64) $(CURRENT_RELEASE_DIR)
pacman-release: pacman
mkdir -p $(CURRENT_RELEASE_DIR)
cp $(OUT_PAC64) $(CURRENT_RELEASE_DIR)
windows-setup-release: windows
mkdir -p $(CURRENT_RELEASE_DIR)
cp $(OUT_WIN64) $(CURRENT_RELEASE_DIR)/$(OUT_WIN64_BETTER_NAME)
windows-unpacked-release: windows
mkdir -p $(CURRENT_RELEASE_DIR)
cd element-desktop/dist/win-unpacked && zip -r ../../../$(CURRENT_RELEASE_DIR)/$(OUT_WIN64_UNPACKED_BETTER_NAME) *
windows-portable-release: windows-portable
./windowsportable.sh $(OUT_WIN64_PORTABLE) $(OUT_WIN64_PORTABLE_BETTER_NAME) $(CURRENT_RELEASE_DIR) $(VERSION)
windows-release: windows-setup-release windows-unpacked-release windows-portable-release
release: web-release debian-release pacman-release windows-release
clean:
$(YARN) --cwd matrix-js-sdk clean
$(YARN) --cwd matrix-react-sdk clean
$(YARN) --cwd element-web clean
$(YARN) --cwd element-desktop clean
rm -f element-desktop/webapp
rm -rf element-web/dist

View File

@ -1,9 +1,37 @@
# SchildiChat-Desktop
Wrapper project for element-desktop, element-web, matrix-react-sdk and matrix-js-sdk, in order to build SchildiChat-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:
- A unifed chat list for both direct and group chats
- Message bubbles
- Bigger items in the room list
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 <br/>
Hosted web variant: https://schildiweb.spiritcroc.de/
Feel free to [join the discussion on matrix](https://matrix.to/#/#schildichat-web:matrix.org).
<img src="https://raw.githubusercontent.com/SchildiChat/schildichat-desktop/sc/screenshots/1.png"/>
# Debian compilation dependencies
# Building 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-Desktop.
## Debian compilation 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:
```
# apt install vim curl git make gcc g++ libsqlcipher-dev pkg-config libsecret-1-dev bsdtar
@ -21,18 +49,18 @@ $ echo 'export PATH="$PATH:$HOME/.cargo/bin"' >> .bashrc
$ source .bashrc
```
# Initial setup
## Initial setup
```
git clone --recurse-submodules https://github.com/SpiritCroc/schildichat-desktop.git
git clone --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git
cd schildichat-desktop
./setup.sh
make setup # optional step if using the other make targets
```
# Build
## Build
`make`
`make [{web|debian|pacman|windows}-release]`
# Install
## Install
Installable packages should appear in element-desktop/dist/.
Installable packages should appear in release/.

View File

@ -50,22 +50,31 @@ logo_alternative() {
# Analog to SchildiChat-Android's alternative_package.sh
case "$package_add" in
"a")
# cyan
logo_alternative "#00ACC1" "#006064" "#B2EBF2"
# blue
logo_alternative "#2196F3" "#0D47A1" "#BBDEFB"
;;
"b")
# orange: 900 color recuded in value
logo_alternative "#FB8C00" "#7f2c00" "#FFE0B2"
;;
"c")
# purple
logo_alternative "#5E35B1" "#311B92" "#D1C4E9"
;;
"d")
# red: 900 color reduced in value
logo_alternative "#E53935" "#4c0b0b" "#FFCDD2"
;;
"d")
# purple
logo_alternative "#5E35B1" "#311B92" "#D1C4E9"
;;
"e")
# pink
logo_alternative "#D81B60" "#880E4F" "#F8BBD0"
;;
"x")
# cyan
logo_alternative "#00ACC1" "#006064" "#B2EBF2"
;;
"z")
# white
logo_alternative "#ffffff" "#000000" "#eeeeee"
;;
esac

View File

@ -10,10 +10,10 @@ add_upstream() {
local sc_remote="$(git remote -v|grep origin|grep fetch|sed 's|.*\t\(.*\) (fetch)|\1|')"
if echo "$sc_remote" | grep -q matrix; then
# matrix.org repo
local upstream_remote="$(echo "$sc_remote" | sed 's|SpiritCroc|matrix-org|')"
local upstream_remote="$(echo "$sc_remote" | sed 's|SchildiChat|matrix-org|')"
elif echo "$sc_remote" | grep -q element; then
# vector-im repo
local upstream_remote="$(echo "$sc_remote" | sed 's|SpiritCroc|vector-im|')"
local upstream_remote="$(echo "$sc_remote" | sed 's|SchildiChat|vector-im|')"
else
echo "Don't know upstream repo for $sc_remote"
return 1
@ -37,3 +37,18 @@ forall_repos() {
"$@"
popd
}
ensure_yes() {
read -e -p "$1 [y/N] " choice
if [[ "$choice" != [Yy]* ]]; then
exit 1
fi
}
check_branch() {
if [[ $(git branch --show-current) != "$1" ]]; then
repo_name=$(basename `git rev-parse --show-toplevel`)
ensure_yes "$repo_name not in branch $1. Continue?"
fi
}

View File

@ -3,13 +3,18 @@
set -e
mydir="$(dirname "$(realpath "$0")")"
branch=${BRANCH:-"sc"}
pushd "$mydir" > /dev/null
source ./merge_helpers.sh
check_branch $branch
forall_repos check_branch $branch
forall_repos git fetch upstream
forall_repos git merge upstream/master
./setup.sh
popd > /dev/null

BIN
screenshots/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@ -5,12 +5,14 @@ set -e
yarn=yarnpkg
pushd matrix-js-sdk
$yarn unlink &>/dev/null || true
$yarn link
$yarn install
popd
pushd matrix-react-sdk
$yarn link matrix-js-sdk
$yarn unlink &>/dev/null || true
$yarn link
$yarn install
popd
@ -18,14 +20,10 @@ popd
pushd element-web
$yarn link matrix-js-sdk
$yarn link matrix-react-sdk
$yarn link
$yarn install
popd
pushd element-desktop
#$yarn link matrix-js-sdk
#$yarn link matrix-react-sdk
#$yarn link riot-web
$yarn install
ln -s ../element-web/webapp ./ || true
popd

63
windowsportable.sh Executable file
View File

@ -0,0 +1,63 @@
#!/bin/bash
set -e
portable_exe=$1
dest_name=$2
release_dir=$3
version=$4
dest_path=$release_dir/$dest_name/SchildiChat
mkdir -p $dest_path/app
cp "$portable_exe" $dest_path/app/dontclick.exe
cat >$dest_path/SchildiChat_Portable.bat <<EOL
REM -- Adapted from: https://superuser.com/a/1226026
REM -- Path to the directory of this script (make sure to remove ending slash)
set CURRENT_DIR=%~dp0
REM -- Great example from Strawberry Perl's portable shell launcher:
if not "" == "%CURRENT_DIR%" if #%CURRENT_DIR:~-1%# == #\# set CURRENT_DIR=%CURRENT_DIR:~0,-1%
REM -- Path to data directory
set DATA_DIR=%CURRENT_DIR%\data
REM -- Ensure directories exists
if not exist %DATA_DIR%\AppData\Roaming mkdir %DATA_DIR%\AppData\Roaming
REM -- OVERRIDE the user environment variable to point to a portable directory
set USERPROFILE=%DATA_DIR%
REM -- (Optional) Some programs do not use these environment variables
set APPDATA=%DATA_DIR%\AppData\Roaming>nul
set ALLUSERSPROFILE=%DATA_DIR%\AppData\Roaming>nul
set PROGRAMDATA=%DATA_DIR%\AppData\Roaming>nul
REM -- Start the application
start "" /D"%CURRENT_DIR%\app" "dontclick.exe"
EOL
cat >$dest_path/README.txt <<EOL
Just extract this zip file to a folder of your choice (e.g. on a USB-Stick).
The .\app\dontclick.exe file is the real portable executable.
SchildiChat_Portable.bat is a batch script to run this executable but with the data in the .\data folder instead of the system's %APPDATA%.
Thus you can move your data along with this portable app.
To update just extract the new zip file to the same folder as the previous version whilst merging folders and overwriting files.
EOL
# if $version looks like semver with leading v, strip it before writing to file
if [[ ${version} =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then
echo ${version:1} > $dest_path/app/version
else
echo ${version} > $dest_path/app/version
fi
pushd $dest_path/..
zip -r ../$dest_name.zip *
popd
rm -r $release_dir/$dest_name
echo
echo "Packaged $release_dir/$dest_name.zip"