Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (62 loc) · 2.72 KB
/
Copy pathMakefile
File metadata and controls
75 lines (62 loc) · 2.72 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
PREFIX ?= /usr/local
UPDATER_BIN ?= $(HOME)/.local/bin/grok-bot-update
.PHONY: help detect build run update install-deb install-updater install-official clean install-user uninstall-user test mac mac-install linux-packages linux-repos
help:
@echo "Grok Bot Linux port"
@echo
@echo " make detect Print the newest stable version from Cursor's update API"
@echo " make build Rebuild that version for Linux (tarball, .deb, AppImage)"
@echo " FORMATS=tar,deb,appimage picks formats (default: all this host can build)"
@echo " make update Build and install only when a newer version exists"
@echo " make test Smoke-test the staged build (native addons + Xvfb launch)"
@echo " make run Launch the staged app from dist/"
@echo " make install-deb Alias for make update"
@echo " make install-updater Add grok-bot-update to ~/.local/bin"
@echo " make install-official Install Cursor's official Linux build (verified)"
@echo " make install-user Install the built tree into ~/.local (no root, any distro)"
@echo " make uninstall-user Remove that user install"
@echo " make mac macOS 11 only: rebuild the Mac app on Electron 37 (dist/macos)"
@echo " make mac-install Same, then copy Grok Bot.app to /Applications"
@echo " make linux-packages Build helper .deb + .rpm (scripts only, no xAI binaries)"
@echo " make linux-repos Build apt + dnf GitHub Pages tree under dist/gh-pages"
@echo " make clean Remove dist/ (keeps .cache/ downloads)"
detect:
@./scripts/detect-version.sh
build:
./scripts/build.sh $(if $(FORMATS),--formats $(FORMATS))
test:
./scripts/smoke-test.sh
run:
@version="$$(./scripts/detect-version.sh)"; \
app="dist/Grok_Bot_$${version}_linux_x64/grok-bot"; \
if [ ! -x "$$app" ]; then $(MAKE) build; fi; \
sandbox=""; unshare --user true 2>/dev/null || sandbox="--no-sandbox"; \
"$$app" $$sandbox --ozone-platform-hint=auto --class=grok-bot
update install-deb:
./scripts/update.sh
install-updater:
@mkdir -p "$(dir $(UPDATER_BIN))"
@if [ -e "$(UPDATER_BIN)" ] && [ ! -L "$(UPDATER_BIN)" ]; then \
echo "error: $(UPDATER_BIN) exists and is not a symlink" >&2; \
exit 1; \
fi
@ln -sfn "$(abspath scripts/update.sh)" "$(UPDATER_BIN)"
@echo "installed $(UPDATER_BIN)"
install-official:
./scripts/install-official.sh
install-user:
./scripts/install-user.sh
uninstall-user:
./scripts/uninstall-user.sh
mac:
./scripts/build-macos.sh
mac-install:
./scripts/build-macos.sh --install
clean:
rm -rf dist
linux-packages:
mkdir -p dist/linux-repos
./packaging/apt/build-deb.sh dist/linux-repos
./packaging/dnf/build-rpm.sh dist/linux-repos
linux-repos: linux-packages
./packaging/repo/build-pages-repos.sh dist/linux-repos dist/gh-pages