aboutsummaryrefslogtreecommitdiffstats
path: root/vextop.sh
blob: fa433266d322275149aa81a0652e6b5b98acd55b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash

set -euo pipefail

# Pull the patches repository
git pull

# Do we have the Vencord sources cloned?
if [ -e Vencord/.git ]; then
	# Update sources
	cd Vencord
	git fetch
else
	# Clone sources
	git clone https://github.com/Vendicated/Vencord.git Vencord
	cd Vencord
fi

# Reset vexcord branch and apply patches
git checkout -B vexcord origin/main
git am ../vencord-patches/*.patch

# Build vencord
pnpm i --frozen-lockfile
node scripts/build/build.mjs

# Save this for later (Vextop needs it)
export VENCORD_FILES_DIR="$(realpath dist)"

# Back out of Vencord directory
cd ..

# Do we have the Vesktop sources cloned?
if [ -e Vesktop/.git ]; then
	# Update sources
	cd Vesktop
	git fetch
else
	# Clone sources
	git clone https://github.com/Vencord/Vesktop.git Vesktop
	cd Vesktop
fi

# Reset vextop branch and apply patches
git checkout -B vextop origin/main
git am ../vesktop-patches/*.patch

# Build vesktop
pnpm i --frozen-lockfile
pnpm build

# Run vesktop
pnpm electron .