From 88ef11d7160bd0bb7c62ff6733b68c315613a6e6 Mon Sep 17 00:00:00 2001 From: su-ex Date: Sat, 26 Dec 2020 15:28:02 +0100 Subject: [PATCH 01/16] deploy: Fix flathub releases --- deploy/update_flathub.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/update_flathub.sh b/deploy/update_flathub.sh index b0a096f..da23d61 100755 --- a/deploy/update_flathub.sh +++ b/deploy/update_flathub.sh @@ -34,7 +34,7 @@ jsonString=$(echo $jsonString | jq -r ".modules[]? |= ((select(.name?==\"schildi echo $jsonString | jq --indent 4 "." > $jsonFile -sed -i "s|^\s\s$| \n '|" $xmlFile +sed -i "s|^\s\s$| \n |" $xmlFile git add $jsonFile $xmlFile git commit -m "Bump version to v$version" From cdd8ec775cd9d99989709f70927363ffac1857a2 Mon Sep 17 00:00:00 2001 From: su-ex Date: Sat, 26 Dec 2020 18:39:36 +0100 Subject: [PATCH 02/16] Enable labs settings with the default config Close #19 --- configs/sc/config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/sc/config.json b/configs/sc/config.json index cb432c9..dfc32f4 100644 --- a/configs/sc/config.json +++ b/configs/sc/config.json @@ -11,6 +11,7 @@ "https://scalar-staging.vector.im/api", "https://scalar-staging.riot.im/scalar/api" ], + "showLabsSettings": true, "roomDirectory": { "servers": [ "matrix.org" From ed9740a4c200e6800cd3ccb6c471bba8a6e1afe3 Mon Sep 17 00:00:00 2001 From: su-ex Date: Wed, 13 Jan 2021 21:46:39 +0100 Subject: [PATCH 03/16] Add script to deploy a release on GitHub --- deploy/create-github-release.sh | 80 +++++++++++++++++++++++++++ deploy/upload-github-release-asset.sh | 64 --------------------- deploy/upload_github.sh | 14 ----- 3 files changed, 80 insertions(+), 78 deletions(-) create mode 100755 deploy/create-github-release.sh delete mode 100755 deploy/upload-github-release-asset.sh delete mode 100755 deploy/upload_github.sh diff --git a/deploy/create-github-release.sh b/deploy/create-github-release.sh new file mode 100755 index 0000000..b93f7d5 --- /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=master + +# 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/upload-github-release-asset.sh b/deploy/upload-github-release-asset.sh deleted file mode 100755 index 206e3cd..0000000 --- a/deploy/upload-github-release-asset.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash -# -# Author: Stefan Buck -# License: MIT -# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 -# -# -# This script accepts the following parameters: -# -# * owner -# * repo -# * tag -# * filename -# * github_api_token -# -# Script to upload a release asset using the GitHub API v3. -# -# Example: -# -# upload-github-release-asset.sh github_api_token=TOKEN owner=stefanbuck repo=playground tag=v0.1.0 filename=./build.zip -# - -# Check dependencies. -set -e -xargs=$(which gxargs || which xargs) - -# Validate settings. -[ "$TRACE" ] && set -x - -CONFIG=$@ - -for line in $CONFIG; do - eval "$line" -done - -# Define variables. -GH_API="https://api.github.com" -GH_REPO="$GH_API/repos/$owner/$repo" -GH_TAGS="$GH_REPO/releases/tags/$tag" -AUTH="Authorization: token $github_api_token" -WGET_ARGS="--content-disposition --auth-no-challenge --no-cookie" -CURL_ARGS="-LJO#" - -if [[ "$tag" == 'LATEST' ]]; then - GH_TAGS="$GH_REPO/releases/latest" -fi - -# Validate token. -curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; } - -# Read asset tags. -response=$(curl -sH "$AUTH" $GH_TAGS) - -# Get ID of the asset based on given filename. -eval $(echo "$response" | grep -m 1 "id.:" | grep -w id | tr : = | tr -cd '[[:alnum:]]=') -[ "$id" ] || { echo "Error: Failed to get release id for tag: $tag"; echo "$response" | awk 'length($0)<100' >&2; exit 1; } - -# Upload asset -echo "Uploading asset... " - -# Construct url -GH_ASSET="https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename)" - -curl "$GITHUB_OAUTH_BASIC" --data-binary @"$filename" -H "Authorization: token $github_api_token" -H "Content-Type: application/octet-stream" $GH_ASSET diff --git a/deploy/upload_github.sh b/deploy/upload_github.sh deleted file mode 100755 index f18bbcb..0000000 --- a/deploy/upload_github.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -e -set -x - -DEPLOY_ROOT="$(dirname "$(realpath "$0")")" - -version="$1" -releasepath="$2" - -find "$releasepath" -type f | while read p; do - echo "Uploading $p ..." - $DEPLOY_ROOT/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=SchildiChat repo=schildichat-desktop tag=v$version filename=$p -done \ No newline at end of file From 52a7dfcd8294d55941a0eb921f9d0e0bf59216b2 Mon Sep 17 00:00:00 2001 From: su-ex Date: Wed, 13 Jan 2021 21:50:36 +0100 Subject: [PATCH 04/16] Let AUR and flathub deploy scripts push --- deploy/{update_aur-bin.sh => update-aur-bin.sh} | 6 ++++-- deploy/{update_flathub.sh => update-flathub.sh} | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) rename deploy/{update_aur-bin.sh => update-aur-bin.sh} (90%) rename deploy/{update_flathub.sh => update-flathub.sh} (95%) diff --git a/deploy/update_aur-bin.sh b/deploy/update-aur-bin.sh similarity index 90% rename from deploy/update_aur-bin.sh rename to deploy/update-aur-bin.sh index 4eb98d8..ad6e4ea 100755 --- a/deploy/update_aur-bin.sh +++ b/deploy/update-aur-bin.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -set -x +# set -x DEPLOY_ROOT="$(dirname "$(realpath "$0")")" @@ -28,6 +28,8 @@ makepkg --printsrcinfo > .SRCINFO git add .SRCINFO PKGBUILD git commit -m "Bump version to v$version" -#git push +git push popd > /dev/null + +echo "Release v$version published on AUR!" diff --git a/deploy/update_flathub.sh b/deploy/update-flathub.sh similarity index 95% rename from deploy/update_flathub.sh rename to deploy/update-flathub.sh index da23d61..da21f06 100755 --- a/deploy/update_flathub.sh +++ b/deploy/update-flathub.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -set -x +# set -x DEPLOY_ROOT="$(dirname "$(realpath "$0")")" @@ -39,6 +39,8 @@ sed -i "s|^\s\s$| \n /dev/null + +echo "Release v$version published on flathub!" From 3d4259827d71727ee31ff2641ac837c5d2c7cee7 Mon Sep 17 00:00:00 2001 From: su-ex Date: Thu, 14 Jan 2021 20:46:00 +0100 Subject: [PATCH 05/16] New release v1.7.17-sc1 --- element-desktop | 2 +- element-web | 2 +- matrix-react-sdk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/element-desktop b/element-desktop index eed928a..bdcf4b4 160000 --- a/element-desktop +++ b/element-desktop @@ -1 +1 @@ -Subproject commit eed928aa5b87e15a3a233ffb3ec2130526617fc5 +Subproject commit bdcf4b4449a89c34ca18188669dcd51214ccf246 diff --git a/element-web b/element-web index f647f3e..422851e 160000 --- a/element-web +++ b/element-web @@ -1 +1 @@ -Subproject commit f647f3e4280b567d92cd7743849966a48e711e78 +Subproject commit 422851e9cc5cbce01fceadc5fa115996ca1e1e83 diff --git a/matrix-react-sdk b/matrix-react-sdk index 894e7d0..cb31ace 160000 --- a/matrix-react-sdk +++ b/matrix-react-sdk @@ -1 +1 @@ -Subproject commit 894e7d02d82a1d325dfc6bf3c49b186434c0199c +Subproject commit cb31acec3cb6da90aaf690d408d67fb7540d2c6d From 263a269da9384573cb735a504d4c957ae238d95e Mon Sep 17 00:00:00 2001 From: su-ex Date: Thu, 14 Jan 2021 21:04:47 +0100 Subject: [PATCH 06/16] Adapt AUR bin deploy script to _pkgver for hyphens --- deploy/update-aur-bin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/update-aur-bin.sh b/deploy/update-aur-bin.sh index ad6e4ea..81b999d 100755 --- a/deploy/update-aur-bin.sh +++ b/deploy/update-aur-bin.sh @@ -20,7 +20,7 @@ pushd "$repopath" > /dev/null git fetch git reset --hard origin/master -sed -i "s|^pkgver=.*$|pkgver=$version|" PKGBUILD +sed -i "s|^_pkgver=.*$|_pkgver=$version|" PKGBUILD sed -i "s|^sha256sums=('.*'$|sha256sums=('$sha256sum'|" PKGBUILD makepkg --printsrcinfo > .SRCINFO From 80e65529bbab78196a31ba6274d31e1b9b8937c2 Mon Sep 17 00:00:00 2001 From: su-ex Date: Thu, 14 Jan 2021 21:17:56 +0100 Subject: [PATCH 07/16] Change GitHub branch for release --- deploy/create-github-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/create-github-release.sh b/deploy/create-github-release.sh index b93f7d5..d0cab53 100755 --- a/deploy/create-github-release.sh +++ b/deploy/create-github-release.sh @@ -15,7 +15,7 @@ release_notes_file="/tmp/scrn.md" owner=SchildiChat repo=schildichat-desktop -target=master +target=sc # Define variables GH_API="https://api.github.com" From e417f25130d338f28f3c60dd203f735558aff015 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Thu, 28 Jan 2021 10:54:06 +0100 Subject: [PATCH 08/16] Add target to create a local PKGBUILD to install .deb on Arch pacman target is somewhat broken, so let's do it similarly like the official AUR package for local installs. --- .gitignore | 1 + Makefile | 9 +++- create_local_pkgbuild.sh | 42 +++++++++++++++++++ local-pkgbuild-template/PKGBUILD | 25 +++++++++++ .../schildichat-desktop.sh | 3 ++ 5 files changed, 79 insertions(+), 1 deletion(-) create mode 100755 create_local_pkgbuild.sh create mode 100644 local-pkgbuild-template/PKGBUILD create mode 100644 local-pkgbuild-template/schildichat-desktop.sh diff --git a/.gitignore b/.gitignore index f134509..1937f78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ release.mk /release +/local-pkgbuild diff --git a/Makefile b/Makefile index a3ddbc1..7982e81 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all setup web desktop desktop-common linux windows windows-portable +.PHONY: all setup web desktop desktop-common linux debian pacman local-pkgbuild local-pkgbuild-install windows windows-portable .PHONY: web-release debian-release pacman-release windows-setup-release windows-unpacked-release windows-portable-release windows-release release .PHONY: clean @@ -67,6 +67,12 @@ windows: desktop-common windows-portable: desktop-common $(YARN) --cwd element-desktop run build64windows-portable +local-pkgbuild: debian + ./create_local_pkgbuild.sh $(VERSION) $(DESKTOP_APP_NAME) $(PRODUCT_NAME) $(OUT_DEB64) + +local-pkgbuild-install: local-pkgbuild + cd local-pkgbuild; makepkg --install + web-release: web mkdir -p $(CURRENT_RELEASE_DIR) cp $(OUT_WEB) $(CURRENT_RELEASE_DIR) @@ -105,3 +111,4 @@ clean: $(YARN) --cwd element-desktop clean rm -f element-desktop/webapp rm -rf element-web/dist + rm -rf local-pkgbuild diff --git a/create_local_pkgbuild.sh b/create_local_pkgbuild.sh new file mode 100755 index 0000000..eddcbc3 --- /dev/null +++ b/create_local_pkgbuild.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e + +mydir="$(dirname "$(realpath "$0")")" +cd "$mydir" + +version="$1" +appName="$2" +productName="$3" +debOut="$4" + +template_dir="local-pkgbuild-template" +out_dir="local-pkgbuild" + +if [ -z "$version" ] || [ -z "$appName" ] || [ -z "$productName" ] || [ -z "$debOut" ]; then + echo "Usage: $0 version appName productName debOut" + exit 1 +fi + +debName="$(basename "$debOut")" + +rm -rf "$out_dir" +mkdir "$out_dir" + +setup_file() { + local file="$1" + local outfile="$2" + if [ -z "$outfile" ]; then + local outfile="$file" + fi + cat "$template_dir/$file" \ + | sed "s|---version---|$version|g" \ + | sed "s|---appName---|$appName|g" \ + | sed "s|---productName---|$productName|g" \ + | sed "s|---debName---|$debName|g" \ + > "$out_dir/$outfile" +} + +setup_file PKGBUILD +setup_file schildichat-desktop.sh "$appName.sh" +ln -r -s "$debOut" "$out_dir/$debName" diff --git a/local-pkgbuild-template/PKGBUILD b/local-pkgbuild-template/PKGBUILD new file mode 100644 index 0000000..df4c516 --- /dev/null +++ b/local-pkgbuild-template/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: su-ex +# Maintainer: SpiritCroc +# Contributor: David Mehren + +pkgname=---appName----git +_pkgver=---version--- +pkgver=${_pkgver//-/.} +pkgrel=1 +pkgdesc="SchildiChat is a Matrix client based on Element with a more traditional instant messaging experience." +arch=('x86_64') +url="https://schildi.chat" +license=('Apache') +depends=('sqlcipher') +provides=('---appName---') +conflicts=('---appName---') +source=("---debName---" + "---appName---.sh") +sha256sums=('SKIP' + 'SKIP') + +package() { + msg2 "Extracting the data.tar.xz..." + bsdtar -xf data.tar.xz -C "$pkgdir/" + install -Dm755 "${srcdir}"/---appName---.sh "${pkgdir}"/usr/bin/---appName--- +} diff --git a/local-pkgbuild-template/schildichat-desktop.sh b/local-pkgbuild-template/schildichat-desktop.sh new file mode 100644 index 0000000..99168a8 --- /dev/null +++ b/local-pkgbuild-template/schildichat-desktop.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec "/opt/---productName---/---appName---" "$@" From a95770fb4958e0b72bff09ba9ecf2bf900eb476c Mon Sep 17 00:00:00 2001 From: su-ex Date: Thu, 28 Jan 2021 11:54:46 +0100 Subject: [PATCH 09/16] Add LICENSE --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + 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. From 4efaa0782b99e895a5a0f4537ac858490abe3d74 Mon Sep 17 00:00:00 2001 From: su-ex Date: Fri, 5 Feb 2021 19:30:47 +0100 Subject: [PATCH 10/16] New release v1.7.20-sc1 --- element-desktop | 2 +- element-web | 2 +- matrix-js-sdk | 2 +- matrix-react-sdk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/element-desktop b/element-desktop index bdcf4b4..ef09103 160000 --- a/element-desktop +++ b/element-desktop @@ -1 +1 @@ -Subproject commit bdcf4b4449a89c34ca18188669dcd51214ccf246 +Subproject commit ef0910357c8ac845c3fc0b9132842f71554a7348 diff --git a/element-web b/element-web index 422851e..20846ab 160000 --- a/element-web +++ b/element-web @@ -1 +1 @@ -Subproject commit 422851e9cc5cbce01fceadc5fa115996ca1e1e83 +Subproject commit 20846ab1dc580c7e3c6dc9899afc2b06ab3cb7e2 diff --git a/matrix-js-sdk b/matrix-js-sdk index cc018cd..209f239 160000 --- a/matrix-js-sdk +++ b/matrix-js-sdk @@ -1 +1 @@ -Subproject commit cc018cd44bbd97e3a8f508fe21f33e0461d45127 +Subproject commit 209f23989a7f921a515ecdee20e91a703b0a3b54 diff --git a/matrix-react-sdk b/matrix-react-sdk index cb31ace..4f0e45e 160000 --- a/matrix-react-sdk +++ b/matrix-react-sdk @@ -1 +1 @@ -Subproject commit cb31acec3cb6da90aaf690d408d67fb7540d2c6d +Subproject commit 4f0e45ecaf5f4b85995141a338ddb619b7d33023 From e2465f6176d17533f3c068161f854e9df3702b47 Mon Sep 17 00:00:00 2001 From: su-ex Date: Fri, 5 Feb 2021 22:16:12 +0100 Subject: [PATCH 11/16] Add option to build for macos --- Makefile | 13 ++++++++++++- README.md | 5 +++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7982e81..57c8973 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all setup web desktop desktop-common linux debian pacman local-pkgbuild local-pkgbuild-install windows windows-portable +.PHONY: all setup react-reskindex web desktop desktop-common linux debian pacman local-pkgbuild local-pkgbuild-install windows windows-portable .PHONY: web-release debian-release pacman-release windows-setup-release windows-unpacked-release windows-portable-release windows-release release .PHONY: clean @@ -27,6 +27,7 @@ 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) +OUT_MACOS := $(DESKTOP_OUT)/$(PRODUCT_NAME)-$(VERSION).dmg RELEASE_DIR := release CURRENT_RELEASE_DIR := $(RELEASE_DIR)/$(VERSION) @@ -38,6 +39,9 @@ setup: if [ ! -L "element-desktop/webapp" ]; then ./setup.sh; fi cp $(CFGDIR)/config.json element-web/ +react-reskindex: setup + $(YARN) --cwd matrix-react-sdk reskindex + web: export DIST_VERSION=$(WEB_OUT_DIST_VERSION) web: setup $(YARN) --cwd element-web dist @@ -67,6 +71,9 @@ windows: desktop-common windows-portable: desktop-common $(YARN) --cwd element-desktop run build64windows-portable +macos: react-reskindex desktop-common + $(YARN) --cwd element-desktop run build --mac dmg -c.mac.identity=null + local-pkgbuild: debian ./create_local_pkgbuild.sh $(VERSION) $(DESKTOP_APP_NAME) $(PRODUCT_NAME) $(OUT_DEB64) @@ -102,6 +109,10 @@ windows-portable-release: windows-portable windows-release: windows-setup-release windows-unpacked-release windows-portable-release +macos-release: macos + mkdir -p $(CURRENT_RELEASE_DIR) + cp $(OUT_MACOS) $(CURRENT_RELEASE_DIR) + release: web-release debian-release pacman-release windows-release clean: diff --git a/README.md b/README.md index 646ba44..9ea8c6d 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Those are the builds distributed via GitHub releases. ``` # The single make targets are explained below -make [{web|debian|windows-setup|windows-portable}-release] +make [{web|debian|windows-setup|windows-portable|macos}-release] ``` After that these packages which belong to to their respective make target should appear in release/\/: @@ -65,6 +65,7 @@ After that these packages which belong to to their respective make target should - `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**) +- `macos`: Build a *.dmg for macOS #### 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` @@ -73,7 +74,7 @@ After that these packages which belong to to their respective make target should ### 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: +Then create a file named `release.mk` and fill it similar to that: ``` .PHONY: your-deploy-web From 1f5be68a1985430291e3ec80b0ce670775da1001 Mon Sep 17 00:00:00 2001 From: su-ex Date: Tue, 16 Feb 2021 13:10:09 +0100 Subject: [PATCH 12/16] Add macOS build dependencies to readme Thanks to @michi7801 --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 9ea8c6d..eaa9447 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,20 @@ $ echo 'export PATH="$PATH:$HOME/.cargo/bin"' >> .bashrc $ source .bashrc ``` +### macOS build dependencies + +#### Install brew package manager +``` +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` + +#### Install packages + +``` +brew install tcl rust node gpg vim curl git yarn git make gcc +``` + + ### Initial setup ``` From e31047073f85cf291adf844a1b61af5ecda75343 Mon Sep 17 00:00:00 2001 From: su-ex Date: Tue, 16 Feb 2021 13:32:30 +0100 Subject: [PATCH 13/16] make: Fix for reskindex --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 57c8973..bffbe85 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all setup react-reskindex web desktop desktop-common linux debian pacman local-pkgbuild local-pkgbuild-install windows windows-portable +.PHONY: all setup reskindex web desktop desktop-common linux debian pacman local-pkgbuild local-pkgbuild-install windows windows-portable .PHONY: web-release debian-release pacman-release windows-setup-release windows-unpacked-release windows-portable-release windows-release release .PHONY: clean @@ -39,11 +39,12 @@ setup: if [ ! -L "element-desktop/webapp" ]; then ./setup.sh; fi cp $(CFGDIR)/config.json element-web/ -react-reskindex: setup +reskindex: setup $(YARN) --cwd matrix-react-sdk reskindex + $(YARN) --cwd element-web reskindex web: export DIST_VERSION=$(WEB_OUT_DIST_VERSION) -web: setup +web: setup reskindex $(YARN) --cwd element-web dist echo "$(VERSION)" > element-web/webapp/version From 2654090ccc250943c121f011d06ca983cc775dad Mon Sep 17 00:00:00 2001 From: su-ex Date: Tue, 16 Feb 2021 13:35:35 +0100 Subject: [PATCH 14/16] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eaa9447..4f6500d 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,9 @@ Feel free to [join the discussion on matrix](https://matrix.to/#/#schildichat-we 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. +### Install dependencies -### Debian build dependencies +#### Debian build dependencies Since Debian is usually slow to update packages on its stable releases, some dependencies might not be recent enough to build SchildiChat. @@ -43,14 +44,14 @@ $ echo 'export PATH="$PATH:$HOME/.cargo/bin"' >> .bashrc $ source .bashrc ``` -### macOS build dependencies +#### macOS build dependencies -#### Install brew package manager +##### Install brew package manager ``` /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -#### Install packages +##### Install packages ``` brew install tcl rust node gpg vim curl git yarn git make gcc From 8d8a5044f1626d399414c1b2c8621f3281a9f052 Mon Sep 17 00:00:00 2001 From: su-ex Date: Fri, 19 Feb 2021 14:52:27 +0100 Subject: [PATCH 15/16] make: Remove old macos reskindex leftover --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bffbe85..10cbb35 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ windows: desktop-common windows-portable: desktop-common $(YARN) --cwd element-desktop run build64windows-portable -macos: react-reskindex desktop-common +macos: desktop-common $(YARN) --cwd element-desktop run build --mac dmg -c.mac.identity=null local-pkgbuild: debian From d8e3854033851fc0b8e85f342a69fddad5e2b54c Mon Sep 17 00:00:00 2001 From: su-ex Date: Wed, 3 Mar 2021 20:19:10 +0100 Subject: [PATCH 16/16] New release v1.7.22-sc1 --- element-desktop | 2 +- element-web | 2 +- matrix-js-sdk | 2 +- matrix-react-sdk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/element-desktop b/element-desktop index ef09103..8fb3501 160000 --- a/element-desktop +++ b/element-desktop @@ -1 +1 @@ -Subproject commit ef0910357c8ac845c3fc0b9132842f71554a7348 +Subproject commit 8fb350141acbd8d61cbb9e837c7f947809131956 diff --git a/element-web b/element-web index 20846ab..84434c6 160000 --- a/element-web +++ b/element-web @@ -1 +1 @@ -Subproject commit 20846ab1dc580c7e3c6dc9899afc2b06ab3cb7e2 +Subproject commit 84434c6e1662114268bd50847f2a57800e45f44f diff --git a/matrix-js-sdk b/matrix-js-sdk index 209f239..a9c4c51 160000 --- a/matrix-js-sdk +++ b/matrix-js-sdk @@ -1 +1 @@ -Subproject commit 209f23989a7f921a515ecdee20e91a703b0a3b54 +Subproject commit a9c4c51e62c1fd41138d0e062223bf549d5dceee diff --git a/matrix-react-sdk b/matrix-react-sdk index 4f0e45e..c1e1e0c 160000 --- a/matrix-react-sdk +++ b/matrix-react-sdk @@ -1 +1 @@ -Subproject commit 4f0e45ecaf5f4b85995141a338ddb619b7d33023 +Subproject commit c1e1e0c5526d3aba6907d0faeabaaf312f842d41