This script is modified base on https://corwin.bru.st/emacs-30/build-dist.sh
See more details on https://corwin.bru.st/
mkdir -p ~/emacs-build/git
cd ~/emacs-build/git
git clone https://https.git.savannah.gnu.org/git/emacs.git emacs-30Install Msys2: https://www.msys2.org/
pacman -S --needed base-devel \
mingw-w64-ucrt-x86_64-toolchain \
mingw-w64-ucrt-x86_64-xpm-nox \
mingw-w64-ucrt-x86_64-gmp \
mingw-w64-ucrt-x86_64-gnutls \
mingw-w64-ucrt-x86_64-libtiff \
mingw-w64-ucrt-x86_64-giflib \
mingw-w64-ucrt-x86_64-libpng \
mingw-w64-ucrt-x86_64-libjpeg-turbo \
mingw-w64-ucrt-x86_64-librsvg \
mingw-w64-ucrt-x86_64-libwebp \
mingw-w64-ucrt-x86_64-lcms2 \
mingw-w64-ucrt-x86_64-libxml2 \
mingw-w64-ucrt-x86_64-zlib \
mingw-w64-ucrt-x86_64-harfbuzz \
mingw-w64-ucrt-x86_64-libgccjit \
mingw-w64-ucrt-x86_64-sqlite3 \
mingw-w64-ucrt-x86_64-tree-sitter \
mingw-w64-ucrt-x86_64-libtree-sitter\
mingw-w64-ucrt-x86_64-enchant \
mingw-w64-ucrt-x86_64-aspell \
mingw-w64-ucrt-x86_64-aspell-en \
mingw-w64-ucrt-x86_64-hunspell \
mingw-w64-ucrt-x86_64-hunspell-en \
mingw-w64-ucrt-x86_64-texinfo \
mingw-w64-ucrt-x86_64-ntldd \
mingw-w64-ucrt-x86_64-nsis \
mingw-w64-ucrt-x86_64-cc-libs
pacman -S --needed \
autoconf \
autogen \
automake \
automake-wrapper \
git \
make \
zip \
unzip \
man-db \
python
In Msys Shell, run build-dep-zips.py in $HOME/emacs-build/deps/
mkdir -p ~/emacs-build/deps
cd ~/emacs-build/deps
# copy build-dep-zips.py from dist-build/build-dep-zips.py
# then run build-dep-zips.py in deps directory
python ./build-dep-zips.pyrun build-dist.sh in Msys ucrt64 shell to build Emacs. If the source repos of Emacs is in emacs-30 branch, it will build Emacs 30, if it’s in master branch, it will build Emacs 31.0.50. I prefer building the master branch for personally use.
The artifacts will be created under D:\emacs-build\upload folder, the emacs-31.0.50-xxxxxx-installer.exe and emacs-31.0.50-xxxxxx.zip
include all dependency dlls, so you can run Emacs without Msys2 installed.
- 2025-09-04 emacs-31.0.50-446c037
- 2025-10-03 emacs-31.0.50-1e9893( with igc support)
- 2025-10-26 emacs-31.0.50-6b8b55( with igc support)