-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (25 loc) · 1.16 KB
/
Makefile
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
.PHONY: grpc clean
.DEFAULT_GOAL := help
ifndef ATUTILS_ROOT
$(error Please set up Python venv first using '`source bin/u-activate`')
endif
help:
@echo "make deps -- Install python dependencies and grpc definitions"
@echo "make grpc -- Download the protobuf/grpc definitions for anytype-heart and compile them into Python"
@echo "make launch-app -- Use Anytype's nativeMessaginHost program to launch Anytype (Mac only - patches accepted)"
@echo "make get-ports -- Use Anytype's nativeMessaginHost program to get Anytype ports (Mac only - patches accepted)"
@echo "make install -- Install as local Python package"
grpc:
bin/update-grpc
deps: grpc
pip install -r requirements.txt
install:
@if command -v uv > /dev/null 2>&1; then \
uv pip install --force-reinstall . ; \
else \
pip install --force-reinstall . ; \
fi
launch-app:
@printf '\x15\0\0\0{"type": "launchApp"}' | '/Applications/Anytype.app/Contents/Resources/app.asar.unpacked/dist/nativeMessagingHost' | cut -c 5- | jq .
get-ports:
@printf '\x14\0\0\0{"type": "getPorts"}' | '/Applications/Anytype.app/Contents/Resources/app.asar.unpacked/dist/nativeMessagingHost' | cut -c 5- | jq .