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)
|
.build/py-proto: .build/dev-deps $(PROTODEPS)
|
||||||
protoc --proto_path=../proto --python_out=anki --mypy_out=anki $(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/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
|
perl -i'' -pe 's/import fluent_pb2/import anki.fluent_pb2/' anki/backend_pb2.py
|
||||||
@touch $@
|
@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:
|
ftl/repo:
|
||||||
(cd ftl && ./scripts/fetch-latest-translations)
|
(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
|
# nightly currently required for ignoring files in rustfmt.toml
|
||||||
RUST_TOOLCHAIN := $(shell cat rust-toolchain)
|
RUST_TOOLCHAIN := $(shell cat rust-toolchain)
|
||||||
|
@ -9,16 +9,23 @@ $(shell mkdir -p .build ../dist)
|
|||||||
OUTDIR := ../dist
|
OUTDIR := ../dist
|
||||||
BUILDFLAGS := --release --strip
|
BUILDFLAGS := --release --strip
|
||||||
|
|
||||||
|
FTLS := ../qt/ftl
|
||||||
|
|
||||||
.PHONY: all develop build check fix clean
|
.PHONY: all develop build check fix clean
|
||||||
|
|
||||||
all: develop
|
all: develop
|
||||||
|
|
||||||
develop: .build/tools .build/vernum
|
develop: .build/develop
|
||||||
maturin develop $(BUILDFLAGS)
|
|
||||||
|
|
||||||
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*
|
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
|
check: .build/check
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user