Warning
Other build methods like native builds are no more supported. Prefer using Podman (or Docker) for a better experience. You can still set up a development environment by simply installing Go, but won't be able to compile on Windows or MacOS due to the dependencies on ffmpeg.
Docker buildx or any OCI builder can also be used, but we won't help you with that.
withny-dl
uses the shared libraries of ffmpeg (more precisely libavformat
, libavcodec
and libavutil
).
-
Install the development packages
libavformat-dev libavcodec-dev libavutil-dev
orffmpeg-devel
depending on your OS distribution. -
Install Go
-
Run:
go install github.com/Darkness4/withny-dl@latest
Or
git clone
this repository and run:make
which basically runs:
# make CGO_ENABLED=1 go build -o "bin/withny-dl" ./main.go
To build static binaries, we use Podman with Gentoo Musl Linux containers.
You can run:
make target-static
If you wish to build a static executable. Note that it will build an arm64 version too. If you want to build just for your platform you can run:
podman build \
--target export \
--output=type=local,dest=./target \
-f Dockerfile.static .
The binary will be in the target
directory.
It is recommended to use Dockerfile.static-windows instead of doing everything manually.
You can simply run:
make target-static-windows
Which will run:
podman build \
--target export \
--output=type=local,dest=./target \
-f Dockerfile.static-windows .
The binary will be in the target
directory.
It is recommended to use Dockerfile.static-macos instead of doing everything manually.
You can simply run:
make target-darwin
Which will run:
podman build \
--target export \
--output=type=local,dest=./target \
-f Dockerfile.darwin .
The binary will be in the target
directory.