From e2465f6176d17533f3c068161f854e9df3702b47 Mon Sep 17 00:00:00 2001 From: su-ex Date: Fri, 5 Feb 2021 22:16:12 +0100 Subject: [PATCH] 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