Emacsビルド方法(Windows)まとめ

msys2をインストール
以下のパッケージをpacmanでインストール
bash
gcc
mingw-w64-x86_64-toolchain
make
autoconf
mingw-w64-x86_64-make
mingw-w64-x86_64-libxml2
mingw-w64-x86_64-gnutls
mingw-w64-x86_64-xpm-nox
mingw-w64-x86_64-jansson
mingw-w64-x86_64-kglobalaccel-qt5
mingw-w64-x86_64-librsvg
mingw-w64-x86_64-winpthreads-git
mingw-w64-x86_64-pango
mingw-w64-x86_64-libgccjit
mingw-w64-x86_64-lcms
mingw-w64-x86_64-pcre
mingw-w64-x86_64-libunistring
mingw-w64-x86_64-tree-sitter
コンフィグ(prefixにインストール先を指定)
./configure --with-json --with-native-compilation --without-pop --prefix=C:/opt/emacs-29.3
メイク
make -j 32
make install
DLLをインストール先のemacsのbinディレクトリへコピーする。
以下のような感じ。

$ToPath = 'C:/opt/emacs-29.3/bin'
$mingwbin = 'c:/msys64/mingw64/bin'

'libbrotlicommon.dll', `
'libbrotlidec.dll', `
'libbz2-*.dll', `
'libcairo-[0-9]*.dll', `
'libcairo-gobject-*.dll', `
'liblcms*-*.dll', `
'libdatrie-*.dll', `
'libdeflate.dll', `
'libexpat-*.dll', `
'libffi-*.dll', `
'libfontconfig-*.dll', `
'libfreetype-*.dll', `
'libfribidi-*.dll', `
'libgcc_s_seh-*.dll', `
'libgdk_pixbuf-2.0-*.dll', `
'libgif-*.dll', `
'libgio-2.0-*.dll', `
'libglib-2.0-*.dll', `
'libgmodule-2.0-*.dll', `
'libgmp-*.dll', `
'libgmpxx-*.dll', `
'libgnutls-[0-9]*.dll', `
'libgnutls-openssl-*.dll', `
'libgnutlsxx-*.dll', `
'libgobject-*.dll', `
'libgraphite2.dll', `
'libharfbuzz-*.dll', `
'libharfbuzz-gobject-*.dll', `
'libharfbuzz-icu-*.dll', `
'libharfbuzz-subset-*.dll', `
'libhogweed-*.dll', `
'libiconv-*.dll', `
'libidn2-*.dll', `
'libintl-*.dll', `
'libjansson-*.dll', `
'libjbig-*.dll', `
'libjpeg-*.dll', `
'libLerc.dll', `
'liblzma-*.dll', `
'libnettle-*.dll', `
'libp11-kit-*.dll', `
'libpango*.dll', `
'libpixman-1-*.dll', `
'libpcre-*.dll', `
'libpng16-*.dll', `
'librsvg-2-*.dll', `
'libsqlite*.dll', `
'libstdc++-*.dll', `
'libtasn1-*.dll', `
'libthai-*.dll', `
'libtiff*.dll', `
'libtree*.dll', `
'libturbojpeg.dll', `
'libunistring-*.dll', `
'libwebp*.dll', `
'libwinpthread-*.dll', `
'libxml2-*.dll', `
'libXpm-noX4.dll', `
'libzstd.dll', `
'libgccjit-*.dll', `
'zlib1.dll' | %{
	  $path = Join-Path $mingwbin $_
	  #"$path"
	  $item = Get-Item $path
	  if($item){ "Alive: $path" }
	  else     { throw "DEAD : $path" }
	  copy $path $ToPath
 }


いいなと思ったら応援しよう!