Skip to content

Commit

Permalink
[doc] Add FFmpeg to build instructions in README
Browse files Browse the repository at this point in the history
... and reword/fix some minor things.
  • Loading branch information
grandchild committed Jan 2, 2025
1 parent 2249b02 commit 4d74e94
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ of AVS itself there are _many_ ideas for improvement and known bugs. Have a look
new.


## Building & Running on Linux
## Cross-Compiling & Running on Linux & Wine

### Build

First, install a 32bit MingW-w64 GCC (with C++ support) and and a cross-compiler CMake.

If you want Video support through FFmpeg, you'll need to install 32bit FFmpeg packages
too. This is highly variable depending on your distro, and not described below.

Choose your Linux distro, and run the respective commands to install the build
dependencies and cross-compile AVS:

Expand Down Expand Up @@ -127,8 +130,13 @@ cp vis_avs.dll /my/path/to/Winamp/Plugins/

# Not all of these might exist on your system, that's okay, you can ignore errors for
# some of the files.
# You only need to copy these files once, they don't change.
cp /usr/i686-w64-mingw32/bin/lib{gcc_s_dw2-1,ssp-0,stdc++-6,winpthread-1}.dll /my/path/to/Winamp/
# You only need to copy these files once in a while, they don't change that often.
cp \
/usr/i686-w64-mingw32/bin/lib{gcc_s_dw2-1,ssp-0,stdc++-6,winpthread-1}.dll \
/my/path/to/Winamp/

# If you built with FFmpeg support, you'll need to copy the FFmpeg DLLs too. If you
# don't, AVS will still work, but again without video support.

# Run Winamp
wine /my/path/to/Winamp/winamp.exe
Expand All @@ -147,7 +155,7 @@ rustup target add i686-unknown-linux-gnu

# Compile
cmake -B build_linux --toolchain CMake-Linux32cross-toolchain.txt
cmake --build build_linux --parallel 15
cmake --build build_linux --parallel $(nproc)
```

Then run either the C version:
Expand All @@ -159,7 +167,7 @@ build_linux/avs-cli

or the Rust version:
```sh
RUSTFLAGS="-L build_linux" LD_LIBRARY_PATH=build_linux build_linux/avs video.avs-preset
RUSTFLAGS="-L build_linux" LD_LIBRARY_PATH=build_linux build_linux/avs /path/to/some/preset.avs
# opens a window if given a preset file as first parameter.
```

Expand Down

0 comments on commit 4d74e94

Please sign in to comment.