From 6b2b1a696866ae3372058b3898ff0f8883146c48 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Sun, 20 Oct 2024 17:50:08 +0200 Subject: [PATCH] Update README --- FEATURES.md | 2 +- README.md | 87 ++++++++++++++++++++++++++++----- RELEASE.md | 26 ++++++++++ deploy/create-github-release.sh | 5 ++ 4 files changed, 108 insertions(+), 12 deletions(-) create mode 100644 RELEASE.md diff --git a/FEATURES.md b/FEATURES.md index 05b87369..0b1171ab 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -5,7 +5,7 @@ Note that this list may be incomplete or outdated. ## General UI -... TODO Schildi theme? +- Schildi theme ## Chat overview ("room list") diff --git a/README.md b/README.md index b34abadc..73a1f830 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,82 @@ SchildiChat Web/Desktop is a fork of Element [Web](https://github.com/element-hq/element-web)/[Desktop](https://github.com/element-hq/element-desktop). +## Initial build setup + +``` +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 +``` + +## Building on Linux + +Easiest to build on Linux is using `podman`, i.e. use one of the following make targets: + +``` +make container-appimage-release +make container-debian-release +make container-rpm-release +make container-web-release +``` + + +## Windows building dependencies + +To build on Windows, use [Element's](https://web-docs.element.dev/Element%20Desktop/windows-requirements.html) guide as starting point. + +Some additional notes I found useful: + + +### Before build + +To prepare your build environment for VSC tools (use 2022 rather than 2019 mentioned upstream: + +``` +"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 +``` + +Additionally, make sure some programs are in your `PATH`: + +``` +export PATH="/C/Strawberry/perl/bin:$PATH:/C/Program Files/NASM:/C/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/" +``` + +- Strawberry perl needs to go before possibly already installed `/usr/bin/perl` +- NASM needs to be available +- `nmake` bundled with VSC wasn't available without adding that additionally (make sure the version is correct for what you installed) + + +### Additional packages not mentioned upstream + +``` +npm install yarn +npm install gyp +npm install electron-builder +npm install @electron/fuses +pip install setuptools +``` + +To update outdated npm packages: + +``` +npm outdated +npm update +``` + +### Troubleshooting + +- `yarn link` fails with permission denied: [kill any running nodejs task](https://stackoverflow.com/questions/64603970/an-unexpected-error-occurred-eperm-operation-not-permitted-in-yarn) +- `electron-builder` fails to extract `winCodeSign`: + - Download [source code](https://github.com/electron-userland/electron-builder-binaries/releases/tag/winCodeSign-2.6.0) manually + - Extract `electron-builder-binaries-winCodeSign-2.6.0.zip\electron-builder-binaries-winCodeSign-2.6.0\winCodeSign` to your `AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0 + - [Source](https://github.com/electron-userland/electron-builder/issues/8149#issuecomment-2328460139) + + +## Release builds + +See [here](RELEASE.md). + ## Old build instructions, to be revised in the future @@ -67,17 +143,6 @@ or set `CSC_NAME` to your certificate name or id. To notarize a build with Apple set `NOTARIZE_APPLE_ID` to your AppleID and set the keychain item `NOTARIZE_CREDS` to an App specific AppleID password. - -### Initial setup - -As already noted above, **`master` contains the latest release** and **`sc` is the development branch**! - -``` -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 -``` - ### Create release builds ``` diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..128d7615 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,26 @@ +# Releasing SchildiChat deskop + +## Build Linux releases + +On a Linux machine with podman: + +``` +make container-release-linux +``` + +## Build Windows releases + +On a Windows machine in git bash (**not** WSL), run: + +``` +make windows-setup-release +``` + +## Upload the release + +Copy the Windows-generated `.exe` from the `release` directory into the release directory on your Linux machine. +Then (after ensuring you have a GitHub API token setup for the script to pick up): + +``` +./deploy/create-github-release.sh +``` diff --git a/deploy/create-github-release.sh b/deploy/create-github-release.sh index 63c327c7..beec5a40 100755 --- a/deploy/create-github-release.sh +++ b/deploy/create-github-release.sh @@ -10,6 +10,11 @@ set -e version="$1" releasepath="$2" +if [ -z "$version" ] || [ -z "$releasepath" ]; then + echo "Usage: $0 " + exit 1 +fi + if [ -z "$GITHUB_API_TOKEN" ]; then github_api_token=`cat ~/githubtoken` else