support aqt-specific FTL files
This commit is contained in:
parent
515623a293
commit
7230b6e390
@ -25,7 +25,6 @@ PROTODEPS := $(wildcard ../proto/*.proto)
|
||||
|
||||
.build/py-proto: .build/dev-deps $(PROTODEPS)
|
||||
protoc --proto_path=../proto --python_out=anki --mypy_out=anki $(PROTODEPS)
|
||||
# fixup import path
|
||||
perl -i'' -pe 's/from fluent_pb2/from anki.fluent_pb2/' anki/backend_pb2.pyi
|
||||
perl -i'' -pe 's/import fluent_pb2/import anki.fluent_pb2/' anki/backend_pb2.py
|
||||
@touch $@
|
||||
|
1
qt/ftl/.gitignore
vendored
Normal file
1
qt/ftl/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
repo
|
9
qt/ftl/scripts/fetch-latest-translations
Executable file
9
qt/ftl/scripts/fetch-latest-translations
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Downloading latest translations..."
|
||||
|
||||
if [ ! -d repo ]; then
|
||||
git clone https://github.com/ankitects/anki-desktop-ftl repo
|
||||
fi
|
||||
|
||||
(cd repo && git pull)
|
9
qt/ftl/scripts/upload-latest-templates
Executable file
9
qt/ftl/scripts/upload-latest-templates
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# expects to be run from the ftl folder
|
||||
#
|
||||
|
||||
test -d repo || exit 1
|
||||
|
||||
rsync -av --delete *.ftl repo/desktop/templates/
|
||||
(cd repo && git add desktop; git commit -m update; git push)
|
@ -23,7 +23,7 @@ develop: .build/vernum ftl/repo
|
||||
ftl/repo:
|
||||
(cd ftl && ./scripts/fetch-latest-translations)
|
||||
|
||||
ALL_SOURCE := $(find src -type f) $(wildcard ftl/*.ftl)
|
||||
ALL_SOURCE := $(shell find src -type f) $(wildcard ftl/*.ftl)
|
||||
|
||||
# nightly currently required for ignoring files in rustfmt.toml
|
||||
RUST_TOOLCHAIN := $(shell cat rust-toolchain)
|
||||
|
@ -9,16 +9,23 @@ $(shell mkdir -p .build ../dist)
|
||||
OUTDIR := ../dist
|
||||
BUILDFLAGS := --release --strip
|
||||
|
||||
FTLS := ../qt/ftl
|
||||
|
||||
.PHONY: all develop build check fix clean
|
||||
|
||||
all: develop
|
||||
|
||||
develop: .build/tools .build/vernum
|
||||
maturin develop $(BUILDFLAGS)
|
||||
develop: .build/develop
|
||||
|
||||
build: .build/tools .build/vernum
|
||||
.build/develop: .build/tools .build/vernum $(wildcard $(FTLS)/*.ftl)
|
||||
touch ../proto/backend.proto
|
||||
FTL_TEMPLATE_DIRS="$(FTLS)" maturin develop $(BUILDFLAGS)
|
||||
touch $@
|
||||
|
||||
build: .build/tools .build/vernum $(wildcard $(FTLS)/*.ftl)
|
||||
rm -rf $(OUTDIR)/ankirspy*
|
||||
maturin build -i $(shell which python3) -o $(OUTDIR) $(BUILDFLAGS)
|
||||
touch ../proto/backend.proto
|
||||
FTL_TEMPLATE_DIRS="$(FTLS)" maturin build -i $(shell which python3) -o $(OUTDIR) $(BUILDFLAGS)
|
||||
|
||||
check: .build/check
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user