diff --git a/.justfiles/clippy.just b/.justfiles/clippy.just index 5a39b5dd0..6f510eee5 100644 --- a/.justfiles/clippy.just +++ b/.justfiles/clippy.just @@ -1,2 +1,2 @@ clippy: - cargo clippy --manifest-path {{justfile_directory() / 'Cargo.toml'}} --all-targets --all-features -- -D warnings + cargo clippy --manifest-path {{ join(justfile_directory(), 'Cargo.toml') }} --all-targets --all-features -- -D warnings diff --git a/.justfiles/dav1d.just b/.justfiles/dav1d.just index fad8b453e..d58dbf955 100644 --- a/.justfiles/dav1d.just +++ b/.justfiles/dav1d.just @@ -1,22 +1,42 @@ -dav1d: install - -clear: - rm -rf {{justfile_directory() / 'target' / 'dav1d_build' }} +dav1d: dirs install-meson: python --version pip install -U meson setuptools ninja clone: - -git clone --branch 1.3.0 --depth 1 https://code.videolan.org/videolan/dav1d.git {{justfile_directory() / 'target' / 'dav1d'}} + -git clone --branch 1.3.0 --depth 1 https://code.videolan.org/videolan/dav1d.git {{ join(justfile_directory(), 'target', 'dav1d') }} + +[unix] +prepare: clone install-meson + pwd + meson setup -Denable_tools=false -Denable_examples=false --buildtype release {{ join(justfile_directory(), 'target', 'dav1d_build') }} {{ join(justfile_directory(), 'target', 'dav1d') }} +[windows] prepare: clone install-meson pwd - meson setup -Denable_tools=false -Denable_examples=false --buildtype release {{justfile_directory() / 'target' / 'dav1d_build' }} {{justfile_directory() / 'target' / 'dav1d' }} + $LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64" + $env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer" + $LinkPath = vswhere -latest -products * -find "$LinkGlob" | Select-Object -Last 1 + $env:PATH = "$env:PATH;$LinkPath" + meson setup -Denable_tools=false -Denable_examples=false --buildtype release {{ join(justfile_directory(), 'target', 'dav1d_build') }} {{ join(justfile_directory(), 'target', 'dav1d') }} compile: prepare pwd - ninja -C {{justfile_directory() / 'target' / 'dav1d_build' }} + ninja -C {{ join(justfile_directory(), 'target', 'dav1d_build') }} install: compile - ninja -C {{justfile_directory() / 'target' / 'dav1d_build' }} install + ninja -C {{ join(justfile_directory(), 'target', 'dav1d_build') }} install + +dirs: + @echo {{ just_executable() }} + @echo {{ join(justfile_directory(), 'target', 'dav1d') }} + @echo {{ join(justfile_directory(), 'target', 'dav1d_build') }} + @echo 'After compiling dav1d set:' + @echo PKG_CONFIG_PATH={{ join(justfile_directory(), 'target', 'dav1d_build', 'pkgconfig') }} + @echo LD_LIBRARY_PATH={{ join(justfile_directory(), 'target', 'dav1d_build') }} + +[confirm("Are you sure you want to remove dav1d and dav1d_build?")] +clear: + rm -rf {{ join(justfile_directory(), 'target', 'dav1d') }} + rm -rf {{ join(justfile_directory(), 'target', 'dav1d_build') }} diff --git a/.justfiles/deny.just b/.justfiles/deny.just index a67c732eb..aabb642ac 100644 --- a/.justfiles/deny.just +++ b/.justfiles/deny.just @@ -1,7 +1,7 @@ deny: workspace workspace: install-cargo-deny - cargo deny --log-level error --workspace --manifest-path {{justfile_directory() / 'Cargo.toml'}} check + cargo deny --log-level error --workspace --manifest-path {{ join(justfile_directory(), 'Cargo.toml') }} check install-cargo-deny: cargo install cargo-deny diff --git a/.justfiles/fmt.just b/.justfiles/fmt.just index e1efdd59b..29625080f 100644 --- a/.justfiles/fmt.just +++ b/.justfiles/fmt.just @@ -1,7 +1,7 @@ fmt: run run: - cargo fmt --all --manifest-path {{ justfile_directory() / 'Cargo.toml'}} + cargo fmt --all --manifest-path {{ join(justfile_directory(), 'Cargo.toml') }} check: - cargo fmt --all --manifest-path {{ justfile_directory() / 'Cargo.toml'}} -- --check + cargo fmt --all --manifest-path {{ join(justfile_directory(), 'Cargo.toml') }} -- --check diff --git a/.justfiles/msrv.just b/.justfiles/msrv.just index 7cb8d2980..df8d9e789 100644 --- a/.justfiles/msrv.just +++ b/.justfiles/msrv.just @@ -1,10 +1,10 @@ msrv: verify run: install-cargo-msrv - cargo msrv --manifest-path {{justfile_directory() / 'Cargo.toml'}} + cargo msrv --manifest-path {{ join(justfile_directory(), 'Cargo.toml') }} verify: install-cargo-msrv - cargo msrv verify --manifest-path {{justfile_directory() / 'Cargo.toml'}} + cargo msrv verify --manifest-path {{ join(justfile_directory(), 'Cargo.toml') }} install-cargo-msrv: cargo install cargo-msrv --version 0.16.0-beta.20 diff --git a/.justfiles/test.just b/.justfiles/test.just index 1449625ca..4bff4c781 100644 --- a/.justfiles/test.just +++ b/.justfiles/test.just @@ -1,7 +1,7 @@ test: all no-default-features all: - cargo test --all + cargo test --all --manifest-path {{ join(justfile_directory(), 'Cargo.toml') }} no-default-features: - cargo test --all --no-default-features + cargo test --all --no-default-features --manifest-path {{ join(justfile_directory(), 'Cargo.toml') }} diff --git a/justfile b/justfile index 845584fd7..25d1a55b9 100644 --- a/justfile +++ b/justfile @@ -6,7 +6,10 @@ mod msrv '.justfiles/msrv.just' mod test '.justfiles/test.just' mod dav1d '.justfiles/dav1d.just' - +[windows] +default: + @echo 'On Windows, run just using:' + @echo 'just --unstable --shell pwsh.exe --shell-arg -c' before-push: # do fmt