Pull the VideoLAN Docker container and run it in interactive mode with bash:
docker pull registry.videolan.org:5000/vlc-debian-win64
docker run -v ~/docker:/root/shared -it registry.videolan.org:5000/vlc-debian-win64 /bin/bash
Clone the VLC git
cd /root/shared
git clone https://git.videolan.org/git/vlc/vlc-3.0.git
Add the mingw tools to the PATH
export PATH="/opt/gcc-x86_64-w64-mingw32/bin:$PATH"
cd vlc-3.0/contrib
Fetch prebuilt contribs and make them usable: (To find prebuild contribs, check the nightlies)
wget https://nightlies.videolan.org/build/win64/last-3/vlc-contrib-x86_64-w64-mingw32-$(date +%Y%m%d).tar.bz2
tar xf vlc-contrib-x86_64-w64-mingw32-$(date +%Y%m%d).tar.bz2
cd x86_64-w64-mingw32
../src/change_prefix.sh
cd ..
If you're using the nightlies, also build the lua compiler:
mkdir contrib-extras && cd contrib-extras
../bootstrap
make .luac
cd ../bin && mv x86_64-linux-gnu-luac x86_64-w64-mingw32-luac
cd ../..
Alternatively, if the nightlies are broken somehow (this is what build.sh does, but takes a long time):
../bootstrap --host=x86_64-w64-mingw32
make fetch
make
cd ../..
Build extra tools
cd extras/tools
./bootstrap
make
export PATH="/root/shared/vlc-3.0/extras/tools/build/bin:$PATH"
cd ../..
Build VLC
./bootstrap
mkdir -p build && cd build
../extras/package/win32/configure.sh --disable-nls --host="x86_64-w64-mingw32"
make
make package-win32-exe
This usually is not necessary, unless you know what you are doing, skip this!
cd && mkdir -p nsis && cd nsis
apt-get remove nsis nsis-common
apt-get update && apt-get install scons libz-dev
wget https://download.sourceforge.net/project/nsis/NSIS%203/3.02.1/nsis-3.02.1-src.tar.bz2
tar xfjv nsis-3.02.1-src.tar.bz2 && cd nsis-3.02.1-src
scons VER_MAJOR=3 VER_MINOR=2 SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA=no PREFIX=/usr/local/ install-compiler
cd ..
wget https://download.sourceforge.net/project/nsis/NSIS%203/3.02.1/nsis-3.02.1.zip
unzip nsis-3.02.1.zip
cp -R nsis-3.02.1 /usr/local/share/nsis
If in doubt, check out https://jenkins.videolan.org/job/vlc-nightly/job/vlc-3.0-nightly-win64-x86_64/lastBuild/consoleFull to see if it's doing something tricky. It should be running https://github.com/videolan/vlc-3.0/blob/master/extras/package/win32/build.sh. You may also need to git clean -dfx
if you change between nightlies/not nightlies.