mirror of
https://github.com/SchildiChat/schildichat-desktop.git
synced 2025-07-03 22:14:43 +02:00
Compare commits
No commits in common. "v1.7.15" and "v1.7.12" have entirely different histories.
14 changed files with 53 additions and 220 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
||||||
release.mk
|
release.mk
|
||||||
/release
|
|
||||||
|
|
76
Makefile
76
Makefile
|
@ -1,47 +1,18 @@
|
||||||
.PHONY: all setup web desktop desktop-common linux windows windows-portable
|
.PHONY: all web desktop desktop-common linux windows clean
|
||||||
.PHONY: web-release debian-release pacman-release windows-setup-release windows-unpacked-release windows-portable-release windows-release release
|
|
||||||
.PHONY: clean
|
|
||||||
|
|
||||||
CFGDIR ?= configs/sc
|
CFGDIR ?= configs/sc
|
||||||
|
|
||||||
all: release
|
all: desktop
|
||||||
|
|
||||||
YARN ?= yarnpkg
|
YARN ?= yarnpkg
|
||||||
|
|
||||||
VERSION := $(shell grep version element-desktop/package.json | sed 's|.*: \"\(.*\)\",|\1|')
|
|
||||||
WEB_APP_NAME := $(shell grep '"name"' element-web/package.json | head -n 1 | sed 's|.*: \"\(.*\)\",|\1|')
|
|
||||||
DESKTOP_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 := $(VERSION)
|
|
||||||
OUT_WEB := $(WEB_OUT)/$(WEB_APP_NAME)-$(WEB_OUT_DIST_VERSION).tar.gz
|
|
||||||
|
|
||||||
DESKTOP_OUT := element-desktop/dist
|
|
||||||
OUT_DEB64 := $(DESKTOP_OUT)/$(DESKTOP_APP_NAME)_$(VERSION)_amd64.deb
|
|
||||||
OUT_PAC64 := $(DESKTOP_OUT)/$(DESKTOP_APP_NAME)-$(VERSION).pacman
|
|
||||||
OUT_APPIMAGE64 := $(DESKTOP_OUT)/$(PRODUCT_NAME)-$(VERSION).AppImage
|
|
||||||
OUT_TARXZ64 := $(DESKTOP_OUT)/$(DESKTOP_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
|
-include release.mk
|
||||||
|
|
||||||
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:
|
||||||
web: setup
|
cp $(CFGDIR)/config.json element-web/
|
||||||
$(YARN) --cwd element-web dist
|
$(YARN) --cwd element-web dist
|
||||||
echo "$(VERSION)" > element-web/webapp/version
|
|
||||||
|
|
||||||
desktop-common: web
|
desktop-common: web
|
||||||
$(YARN) --cwd element-desktop run fetch --cfgdir ''
|
$(YARN) --cwd element-desktop run fetch --cfgdir ''
|
||||||
|
@ -58,50 +29,11 @@ debian: desktop-common
|
||||||
pacman: desktop-common
|
pacman: desktop-common
|
||||||
$(YARN) --cwd element-desktop run build64pacman
|
$(YARN) --cwd element-desktop run build64pacman
|
||||||
|
|
||||||
appimage: desktop-common
|
|
||||||
$(YARN) --cwd element-desktop run build64appimage
|
|
||||||
|
|
||||||
windows: desktop-common
|
windows: desktop-common
|
||||||
$(YARN) --cwd element-desktop run build64windows
|
$(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)
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
appimage-release: appimage
|
|
||||||
mkdir -p $(CURRENT_RELEASE_DIR)
|
|
||||||
cp $(OUT_APPIMAGE64) $(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:
|
clean:
|
||||||
$(YARN) --cwd matrix-js-sdk clean
|
$(YARN) --cwd matrix-js-sdk clean
|
||||||
$(YARN) --cwd matrix-react-sdk clean
|
$(YARN) --cwd matrix-react-sdk clean
|
||||||
$(YARN) --cwd element-web clean
|
$(YARN) --cwd element-web clean
|
||||||
$(YARN) --cwd element-desktop clean
|
$(YARN) --cwd element-desktop clean
|
||||||
rm -f element-desktop/webapp
|
|
||||||
rm -rf element-web/dist
|
|
||||||
|
|
67
README.md
67
README.md
|
@ -1,31 +1,37 @@
|
||||||
# SchildiChat Web/Desktop
|
# SchildiChat-Desktop
|
||||||
|
|
||||||
SchildiChat Web/Desktop is a fork of Element [Web](https://github.com/vector-im/element-web)/[Desktop](https://github.com/vector-im/element-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:
|
||||||
|
|
||||||
The most important changes of SchildiChat Web/Desktop compared to Element Web/Desktop are:
|
|
||||||
- A unifed chat list for both direct and group chats
|
- A unifed chat list for both direct and group chats
|
||||||
- Message bubbles
|
- Message bubbles
|
||||||
- Bigger items in the room list
|
- Bigger items in the room list
|
||||||
- … and more!
|
|
||||||
|
|
||||||
Desktop downloads with installation instructions are listed on our website: [https://schildi.chat/desktop](https://schildi.chat/desktop)
|
While SchildiChat-Desktop should be already usable as is, it's still better seen as a
|
||||||
Hosted web variant: [https://app.schildi.chat/](https://app.schildi.chat/)
|
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).
|
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"/>
|
<img src="https://raw.githubusercontent.com/SchildiChat/schildichat-desktop/sc/screenshots/1.png"/>
|
||||||
|
|
||||||
|
|
||||||
## Building SchildiChat Web/Desktop
|
# 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 Web **and** 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 build dependencies
|
## Debian compilation dependencies
|
||||||
|
|
||||||
Since Debian is usually slow to update packages on its stable releases,
|
Since Debian is usually slow to update packages on its stable releases, some dependencies
|
||||||
some dependencies might not be recent enough to build SchildiChat.
|
might not be recent enough to building Schildi.
|
||||||
The following are the dependencies required to build SchildiChat Web/Desktop on Debian 10:
|
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
|
# apt install vim curl git make gcc g++ libsqlcipher-dev pkg-config libsecret-1-dev bsdtar
|
||||||
|
@ -43,43 +49,18 @@ $ echo 'export PATH="$PATH:$HOME/.cargo/bin"' >> .bashrc
|
||||||
$ source .bashrc
|
$ source .bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
### Initial setup
|
## Initial setup
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git
|
git clone --recurse-submodules https://github.com/SchildiChat/schildichat-desktop.git
|
||||||
cd schildichat-desktop
|
cd schildichat-desktop
|
||||||
make setup # optional step if using the other make targets
|
./setup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Create release builds
|
## Build
|
||||||
|
|
||||||
Those are the builds distributed via GitHub releases.
|
`make`
|
||||||
|
|
||||||
```
|
## Install
|
||||||
# The single make targets are explained below
|
|
||||||
make [{web|debian|windows-setup|windows-portable}-release]
|
|
||||||
```
|
|
||||||
|
|
||||||
After that these packages which belong to to their respective make target should appear in release/\<version\>/:
|
Installable packages should appear in element-desktop/dist/.
|
||||||
- `web`: _schildichat-web-\<version\>.tar.gz_: archive that can be unpacked and served by a **web** server (copy `config.sample.json` to `config.json` and adjust the [configuration](https://github.com/SchildiChat/element-web/blob/sc/docs/config.md) to your likings)
|
|
||||||
- `debian`: file ready for installation on a **Debian Linux** (based) system via `dpkg -i schildichat-desktop_<version>_amd64.deb`
|
|
||||||
- `windows-setup`: _SchildiChat_Setup_v\<version\>.exe_: file ready for **installation** on a **Windows** system
|
|
||||||
- `windows-portable`: _SchildiChat_win-portable_v\<version\>.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**)
|
|
||||||
|
|
||||||
#### Additional make targets not used for GitHub releases
|
|
||||||
- `pacman`: file ready for installation on an **Arch Linux** (based) system via `pacman -U schildichat-desktop-<version>.pacman`
|
|
||||||
- `windows-unpacked`: _SchildiChat_win-unpacked_v\<version\>.zip_: **unpacked** archive for a **Windows** system
|
|
||||||
|
|
||||||
### 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:
|
|
||||||
```
|
|
||||||
.PHONY: your-deploy-web
|
|
||||||
|
|
||||||
YOUR_CFGDIR := configs/your_subfolder
|
|
||||||
your-deploy-%: CFGDIR := $(YOUR_CFGDIR)
|
|
||||||
|
|
||||||
your-deploy-web: web
|
|
||||||
rsync --info=progress2 -rup --del element-web/webapp/ you@yourwebserver:/the/folder/served/for/schildi/
|
|
||||||
```
|
|
||||||
|
|
|
@ -50,31 +50,22 @@ logo_alternative() {
|
||||||
# Analog to SchildiChat-Android's alternative_package.sh
|
# Analog to SchildiChat-Android's alternative_package.sh
|
||||||
case "$package_add" in
|
case "$package_add" in
|
||||||
"a")
|
"a")
|
||||||
# blue
|
# cyan
|
||||||
logo_alternative "#2196F3" "#0D47A1" "#BBDEFB"
|
logo_alternative "#00ACC1" "#006064" "#B2EBF2"
|
||||||
;;
|
;;
|
||||||
"b")
|
"b")
|
||||||
# orange: 900 color recuded in value
|
# orange: 900 color recuded in value
|
||||||
logo_alternative "#FB8C00" "#7f2c00" "#FFE0B2"
|
logo_alternative "#FB8C00" "#7f2c00" "#FFE0B2"
|
||||||
;;
|
;;
|
||||||
"c")
|
"c")
|
||||||
# red: 900 color reduced in value
|
|
||||||
logo_alternative "#E53935" "#4c0b0b" "#FFCDD2"
|
|
||||||
;;
|
|
||||||
"d")
|
|
||||||
# purple
|
# purple
|
||||||
logo_alternative "#5E35B1" "#311B92" "#D1C4E9"
|
logo_alternative "#5E35B1" "#311B92" "#D1C4E9"
|
||||||
;;
|
;;
|
||||||
"e")
|
"d")
|
||||||
# pink
|
# red: 900 color reduced in value
|
||||||
logo_alternative "#D81B60" "#880E4F" "#F8BBD0"
|
logo_alternative "#E53935" "#4c0b0b" "#FFCDD2"
|
||||||
;;
|
;;
|
||||||
"x")
|
"x")
|
||||||
# cyan
|
|
||||||
logo_alternative "#00ACC1" "#006064" "#B2EBF2"
|
|
||||||
;;
|
|
||||||
"z")
|
|
||||||
# white
|
|
||||||
logo_alternative "#ffffff" "#000000" "#eeeeee"
|
logo_alternative "#ffffff" "#000000" "#eeeeee"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -11,19 +11,30 @@
|
||||||
"https://scalar-staging.vector.im/api",
|
"https://scalar-staging.vector.im/api",
|
||||||
"https://scalar-staging.riot.im/scalar/api"
|
"https://scalar-staging.riot.im/scalar/api"
|
||||||
],
|
],
|
||||||
|
"hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web",
|
||||||
|
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
|
||||||
"roomDirectory": {
|
"roomDirectory": {
|
||||||
"servers": [
|
"servers": [
|
||||||
"matrix.org"
|
"matrix.org"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"piwik": {
|
||||||
|
"url": "https://piwik.riot.im/",
|
||||||
|
"siteId": 1,
|
||||||
|
"policyUrl": "https://element.io/cookie-policy"
|
||||||
|
},
|
||||||
"enable_presence_by_hs_url": {
|
"enable_presence_by_hs_url": {
|
||||||
"https://matrix.org": false,
|
"https://matrix.org": false,
|
||||||
"https://matrix-client.matrix.org": false
|
"https://matrix-client.matrix.org": false
|
||||||
},
|
},
|
||||||
"terms_and_conditions_links": [
|
"terms_and_conditions_links": [
|
||||||
{
|
{
|
||||||
"url": "https://schildi.chat/desktop/privacy",
|
"url": "https://element.io/privacy",
|
||||||
"text": "Privacy Policy"
|
"text": "Privacy Policy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://element.io/cookie-policy",
|
||||||
|
"text": "Cookie Policy"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9771a095665629c52c076bc8b38171eeabdbf3b0
|
Subproject commit 3172fb927ddd4a63456028159f40d202512620de
|
|
@ -1 +1 @@
|
||||||
Subproject commit a73a02fad1c04157e5e6c679e6947e65dc36fa69
|
Subproject commit fc486a5044adcc6b39180ffaabd75360f242e635
|
|
@ -1 +1 @@
|
||||||
Subproject commit 02859bc8f06acc06d95a5e68a275e47e85361784
|
Subproject commit 2ef998e8eca5aea54ab5f70e913d8b628290a8c1
|
|
@ -1 +1 @@
|
||||||
Subproject commit 925dd11e874142da1894bfcf75ced55052c6f0b9
|
Subproject commit 6538fca287d25a6f9d986904e315f10b3e0baa5e
|
|
@ -37,18 +37,3 @@ forall_repos() {
|
||||||
"$@"
|
"$@"
|
||||||
popd
|
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
|
|
||||||
}
|
|
||||||
|
|
|
@ -3,18 +3,13 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
mydir="$(dirname "$(realpath "$0")")"
|
mydir="$(dirname "$(realpath "$0")")"
|
||||||
branch=${BRANCH:-"sc"}
|
|
||||||
|
|
||||||
pushd "$mydir" > /dev/null
|
pushd "$mydir" > /dev/null
|
||||||
|
|
||||||
source ./merge_helpers.sh
|
source ./merge_helpers.sh
|
||||||
|
|
||||||
check_branch $branch
|
|
||||||
forall_repos check_branch $branch
|
|
||||||
|
|
||||||
forall_repos git fetch upstream
|
forall_repos git fetch upstream
|
||||||
forall_repos git merge upstream/master
|
forall_repos git merge upstream/master
|
||||||
|
|
||||||
./setup.sh
|
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 90 KiB |
6
setup.sh
6
setup.sh
|
@ -5,14 +5,12 @@ set -e
|
||||||
yarn=yarnpkg
|
yarn=yarnpkg
|
||||||
|
|
||||||
pushd matrix-js-sdk
|
pushd matrix-js-sdk
|
||||||
$yarn unlink &>/dev/null || true
|
|
||||||
$yarn link
|
$yarn link
|
||||||
$yarn install
|
$yarn install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd matrix-react-sdk
|
pushd matrix-react-sdk
|
||||||
$yarn link matrix-js-sdk
|
$yarn link matrix-js-sdk
|
||||||
$yarn unlink &>/dev/null || true
|
|
||||||
$yarn link
|
$yarn link
|
||||||
$yarn install
|
$yarn install
|
||||||
popd
|
popd
|
||||||
|
@ -20,10 +18,14 @@ popd
|
||||||
pushd element-web
|
pushd element-web
|
||||||
$yarn link matrix-js-sdk
|
$yarn link matrix-js-sdk
|
||||||
$yarn link matrix-react-sdk
|
$yarn link matrix-react-sdk
|
||||||
|
$yarn link
|
||||||
$yarn install
|
$yarn install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd element-desktop
|
pushd element-desktop
|
||||||
|
#$yarn link matrix-js-sdk
|
||||||
|
#$yarn link matrix-react-sdk
|
||||||
|
#$yarn link riot-web
|
||||||
$yarn install
|
$yarn install
|
||||||
ln -s ../element-web/webapp ./ || true
|
ln -s ../element-web/webapp ./ || true
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
#!/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"
|
|
Loading…
Add table
Add a link
Reference in a new issue