19f1c98025
1. Documented on README.development how to setup the environment for Windows. 2. Fixed qt/ts/package.json not working due usage of ; instead of && 3. Fixed copy-qt-files rsync using Windows paths instead of Unix ones 4. Fixed Makefile's using Windows Linux Subsystem bash instead of the Cygwin one. 5. Ensured running the correct pip module by using python -m pip instead of just pip. 6. Fixed Makefiles using Windows `find` command, instead of the Cygwin's one (POSIX find). 7. Fixed pyenv sourcing/activate using /pyevn/bin/ instead of /python/Scripts/ on Windows. 8. Fixed pyaudio not installing/linking with portaudio on Windows by installing for a patched fork at evandroforks/pyaudio 9. Forked and fixed portaudio not building with Visual Studio 2017 or superior and added the reference for the patched fork on README.development at evandroforks/portaudio.
65 lines
1.6 KiB
Makefile
65 lines
1.6 KiB
Makefile
SHELL := /bin/bash
|
|
ECHOCMD := /bin/echo -e
|
|
|
|
.SHELLFLAGS := -eu -o pipefail -c
|
|
.DELETE_ON_ERROR:
|
|
MAKEFLAGS += --warn-undefined-variables
|
|
MAKEFLAGS += --no-builtin-rules
|
|
|
|
$(shell mkdir -p .build ../dist)
|
|
|
|
OUTDIR := ../dist
|
|
BUILDFLAGS := --release --strip
|
|
RSPY_TARGET_DIR ?= target
|
|
|
|
QT_FTLS := ../qt/ftl
|
|
|
|
.PHONY: all develop build check fix clean
|
|
|
|
all: develop
|
|
|
|
develop: .build/develop
|
|
|
|
DEPS := .build/tools .build/vernum ../meta/buildhash $(wildcard $(QT_FTLS)/*.ftl) \
|
|
$(shell find ../rslib/src -name '*.rs') $(wildcard ../proto/*) \
|
|
$(shell find ../rslib/ftl -type f)
|
|
|
|
.build/develop: $(DEPS)
|
|
touch ../proto/backend.proto
|
|
FTL_TEMPLATE_DIRS="$(QT_FTLS)" CARGO_TARGET_DIR="$(RSPY_TARGET_DIR)" maturin develop
|
|
touch $@
|
|
|
|
build: $(DEPS)
|
|
rm -rf $(OUTDIR)/ankirspy*
|
|
touch ../proto/backend.proto
|
|
FTL_TEMPLATE_DIRS="$(QT_FTLS)" maturin build -i $(shell which python3) -o $(OUTDIR) $(BUILDFLAGS)
|
|
|
|
check: .build/check
|
|
|
|
fix:
|
|
cargo fmt
|
|
|
|
clean:
|
|
rm -rf .build target
|
|
|
|
# nightly currently required for ignoring files in rustfmt.toml
|
|
RUST_TOOLCHAIN := $(shell cat rust-toolchain)
|
|
|
|
.build/tools: requirements.txt rust-toolchain
|
|
python -m pip install -r requirements.txt
|
|
rustup toolchain install $(RUST_TOOLCHAIN)
|
|
rustup component add rustfmt-preview --toolchain $(RUST_TOOLCHAIN)
|
|
rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN)
|
|
@touch $@
|
|
|
|
.build/check: build
|
|
cargo fmt -- --check
|
|
cargo clippy -- -D warnings
|
|
@touch $@
|
|
|
|
VER := $(shell cat ../meta/version)
|
|
.build/vernum: ../meta/version
|
|
sed -i.bak 's/.*automatically updated.*/version = "$(VER)" # automatically updated/' Cargo.toml
|
|
rm Cargo.toml.bak
|
|
@touch $@
|