From a2c363911237c53e1122631a12117f1d1bb2bbdb Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Sat, 2 Dec 2023 12:18:14 +0100 Subject: [PATCH] Bootstrap schildi-lite --- README.md | 41 ++++++---------- element-desktop | 2 +- element-web | 2 +- matrix-js-sdk | 2 +- matrix-react-sdk | 2 +- merge_helpers.sh | 40 ++++++---------- merge_upstream.sh | 27 +++++++---- overlay/element-desktop/package.json | 71 ++++++++++++++++++++++++++++ overlay/element-web/package.json | 8 ++++ 9 files changed, 129 insertions(+), 66 deletions(-) create mode 100644 overlay/element-desktop/package.json create mode 100644 overlay/element-web/package.json diff --git a/README.md b/README.md index 9b1ea85..5743c03 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,9 @@ -# SchildiChat Web/Desktop +# SchildiChat Web/Desktop Lite 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: -- Customizable room list style (compact single line, intermediate and roomy with two line preview) -- Option to show direct and group chats in a combined list -- Improved theming options -- Message bubbles -- … and more! - -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). - - - -
-Public key used to sign the Debian packages - -``` -pub rsa4096 2020-12-08 [SC] - 560BB70DA86A6633A39CEC6023358905FE294D01 -uid Super apt repo key -sub rsa4096 2020-12-08 [E] -``` - -
+This branch builds the "lite" variant, which rebases a reduced feature set of the original fork on top of the latest Element, +in order to keep maintenance effort more manageable while staying up-to-date. ## Building SchildiChat Web/Desktop @@ -95,7 +72,7 @@ To notarize a build with Apple set `NOTARIZE_APPLE_ID` to your AppleID and set t As already noted above, **`master` contains the latest release** and **`sc` is the development branch**! ``` -git clone -b master --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git +git clone -b lite --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git cd schildichat-desktop make setup # optional step if using the other make targets ``` @@ -135,3 +112,13 @@ your-deploy-%: CFGDIR := $(YOUR_CFGDIR) your-deploy-web: web rsync --info=progress2 -rup --del element-web/webapp/ you@yourwebserver:/the/folder/served/for/schildi/ ``` + + +# Merge helpers + +## Add upstream repo remotes + +``` +source merge_helpers.sh +forall_repos add_upstream +``` diff --git a/element-desktop b/element-desktop index 2f54ef6..6c5a11e 160000 --- a/element-desktop +++ b/element-desktop @@ -1 +1 @@ -Subproject commit 2f54ef60617db8b5d4a8acdb3ae90721d05de3b3 +Subproject commit 6c5a11e9011511aece7c7fac8e6acdc335752118 diff --git a/element-web b/element-web index f3e6edb..cf448cf 160000 --- a/element-web +++ b/element-web @@ -1 +1 @@ -Subproject commit f3e6edbe968d21abe48fc64cb2fe93fffd69c4fd +Subproject commit cf448cf08cbd8caa6a6e983f79af3cb66f3792e9 diff --git a/matrix-js-sdk b/matrix-js-sdk index c0ab637..4ab226e 160000 --- a/matrix-js-sdk +++ b/matrix-js-sdk @@ -1 +1 @@ -Subproject commit c0ab63777e1d1bf2e6756359e66b1e3c0ff54a27 +Subproject commit 4ab226e58045f8f072bf3c14374d591c96a7a78b diff --git a/matrix-react-sdk b/matrix-react-sdk index 9e45813..a869ff1 160000 --- a/matrix-react-sdk +++ b/matrix-react-sdk @@ -1 +1 @@ -Subproject commit 9e4581350e1b5b78263558ec992090f450e3ac96 +Subproject commit a869ff1750b3e160477df4c5262fef9cc0b98baf diff --git a/merge_helpers.sh b/merge_helpers.sh index 3808eab..f457d36 100755 --- a/merge_helpers.sh +++ b/merge_helpers.sh @@ -2,7 +2,7 @@ SCHILDI_ROOT="$(dirname "$(realpath "$0")")" -branch=${BRANCH:-"sc"} +branch=${BRANCH:-"lite"} i18n_helper_path="$SCHILDI_ROOT/i18n-helper/index.js" i18n_path="src/i18n/strings" @@ -32,36 +32,24 @@ add_upstream() { } forall_repos() { - pushd "$SCHILDI_ROOT/matrix-js-sdk" > /dev/null - "$@" - popd > /dev/null - - pushd "$SCHILDI_ROOT/matrix-react-sdk" > /dev/null - "$@" - popd > /dev/null - - pushd "$SCHILDI_ROOT/element-web" > /dev/null - "$@" - popd > /dev/null - - pushd "$SCHILDI_ROOT/element-desktop" > /dev/null - "$@" - popd > /dev/null + for repo in "matrix-js-sdk" "matrix-react-sdk" "element-web" "element-desktop"; do + pushd "$SCHILDI_ROOT/$repo" > /dev/null + "$@" + popd > /dev/null + done } forelement_repos() { - pushd "$SCHILDI_ROOT/element-web" > /dev/null - "$@" - popd > /dev/null - - pushd "$SCHILDI_ROOT/element-desktop" > /dev/null - "$@" - popd > /dev/null + for repo in "element-web" "element-desktop"; do + pushd "$SCHILDI_ROOT/$repo" > /dev/null + "$@" + popd > /dev/null + done } ensure_yes() { read -e -p "$1 [y/N] " choice - + if [[ "$choice" != [Yy]* ]]; then exit 1 fi @@ -217,7 +205,7 @@ revert_packagejson_changes() { apply_packagejson_overlay() { local orig_path="$1" - local overlay_path="$2" + local overlay_path="../overlay/$(basename "$PWD")/package.json" # see: https://stackoverflow.com/a/24904276 new_content=`jq -s '.[0] * .[1]' "$orig_path" "$overlay_path"` @@ -240,7 +228,7 @@ automatic_packagejson_adjustment() { local versions get_current_versions - forelement_repos apply_packagejson_overlay "package.json" "overlay-package.json" + forelement_repos apply_packagejson_overlay "package.json" forelement_repos write_version "package.json" } diff --git a/merge_upstream.sh b/merge_upstream.sh index e772262..bd90235 100755 --- a/merge_upstream.sh +++ b/merge_upstream.sh @@ -4,6 +4,13 @@ set -e mydir="$(dirname "$(realpath "$0")")" +if [ "$1" = "--checkout" ]; then + git_action=checkout + shift +else + git_action=merge +fi + pushd "$mydir" > /dev/null source ./merge_helpers.sh @@ -19,8 +26,10 @@ forall_repos check_clean_git forall_repos git fetch upstream # Automatic reversions -automatic_i18n_reversion -automatic_packagejson_reversion +if [ "$git_action" != "checkout" ]; then + automatic_i18n_reversion + automatic_packagejson_reversion +fi # Merge upstream @@ -30,16 +39,16 @@ if [ -z "$1" ]; then else latest_upstream_tag="$1" fi -forelement_repos git merge "$latest_upstream_tag" +forelement_repos git "$git_action" "$latest_upstream_tag" get_current_mxsdk_tags pushd "matrix-js-sdk" > /dev/null -git merge "$current_mxjssdk_tag" +git "$git_action" "$current_mxjssdk_tag" popd > /dev/null pushd "matrix-react-sdk" > /dev/null -git merge "$current_mxreactsdk_tag" +git "$git_action" "$current_mxreactsdk_tag" popd > /dev/null # Refresh environment @@ -47,12 +56,12 @@ make clean make setup # Automatic adjustments -automatic_i18n_adjustment +#automatic_i18n_adjustment automatic_packagejson_adjustment # Automatic theme update -pushd "matrix-react-sdk" > /dev/null -./theme.sh y -popd > /dev/null +#pushd "matrix-react-sdk" > /dev/null +#./theme.sh y +#popd > /dev/null popd > /dev/null diff --git a/overlay/element-desktop/package.json b/overlay/element-desktop/package.json new file mode 100644 index 0000000..44e0c8c --- /dev/null +++ b/overlay/element-desktop/package.json @@ -0,0 +1,71 @@ +{ + "name": "schildichat-desktop-lite", + "productName": "SchildiChatLite", + "description": "A Matrix Client based on Element with a more traditional instant messaging experience", + "author": "SchildiChat", + "repository": { + "url": "https://github.com/SchildiChat/element-desktop" + }, + "homepage": "https://schildi.chat/", + "dependencies": { + "electron-osx-sign": "^0.5.0" + }, + "build": { + "appId": "chat.schildi.desktop.lite", + "linux": { + "target": "deb", + "category": "Network;InstantMessaging;Chat;VideoConference", + "maintainer": "codeworks@supercable.onl", + "desktop": { + "StartupWMClass": "schildichatlite" + } + }, + "deb": { + "depends": ["libgtk-3-0", "libnotify4", "libnss3", "libxss1", "libxtst6", "xdg-utils", "libatspi2.0-0", "libuuid1", "libsecret-1-0"], + "packageCategory": "net", + "priority": "extra" + }, + "mac": { + "category": "public.app-category.social-networking", + "extendInfo": { + "NSUserActivityTypes": [ + "org.matrix.room" + ], + "ITSAppUsesNonExemptEncryption": true + }, + "darkModeSupport": true, + "hardenedRuntime": true, + "entitlements": "build/entitlements.mac.plist", + "entitlementsInherit": "build/entitlements.mac.inherit.plist", + "asarUnpack": [ + ".hak/hakModules/keytar/build/Release/keytar.node", + ".hak/hakModules/matrix-seshat/native/index.node" + ] + }, + "dmg": { + "icon": "build/dmg.icns" + }, + "mas": { + "extendInfo": { + "LSMultipleInstancesProhibited": true + }, + "entitlements": "build/entitlements.mas.plist", + "provisioningProfile": "build/schildi_dev.provisionprofile", + "hardenedRuntime": false + }, + "protocols": [ + { + "name": "element", + "schemes": [ + "element" + ] + }, + { + "name": "schildichat", + "schemes": [ + "schildichat" + ] + } + ] + } +} diff --git a/overlay/element-web/package.json b/overlay/element-web/package.json new file mode 100644 index 0000000..6b0127b --- /dev/null +++ b/overlay/element-web/package.json @@ -0,0 +1,8 @@ +{ + "name": "schildichat-web-lite", + "description": "A Matrix client based on Element with a more traditional instant messaging experience", + "author": "SchildiChat", + "repository": { + "url": "https://github.com/SchildiChat/element-web" + } +}