建议用户阅读../emacs/nt/INSTALL
Emacs源代码中包含的全部内容。
快速入门-5个简单步骤:
该答案已经在WindowsXP--SP3上进行了测试。安装路径将需要根据用户的个人喜好进行调整。在此示例中:
桌面是: C:\Documents and Settings\lawlist\Desktop
该git
安装: C:\git
该MinGW
安装: C:\mingw
Emacs master分支的git下载位置是: C:\Documents and Settings\lawlist\Desktop\emacs
Emacs安装的目标是: C:\Documents and Settings\lawlist\Desktop\trunk
步骤1:安装,git
并确保在安装过程中选择“按原样签出,按原样提交”:
https://git-scm.com/download/win
Git-2.5.3-32位.exe
运行安装程序。
下一个
下一个
标准安装目录为C:\Program Files\Git
,但我改为选择: c:\git
选择组件:默认是可以的,但是我什么也没选择。
选择开始菜单文件夹:默认是可以的,我选择不创建文件夹。
调整PATH环境:默认是可以的:仅从Bash使用Git。
;; 对于下一部分,请密切注意非默认设置-请参阅Emacs错误#21582。
配置行尾转换:Emacs需要非默认设置为“按原样签出,按原样提交”
配置终端模拟器以与Git Bash一起使用:默认是可以的:使用MinTTY(MSys2的默认终端)
配置实验性性能调整:我选择“不启用文件系统缓存”。
完成[如果需要,请查看发行说明]
注意:( autogen.sh
以及某些第三方程序)需要设置git
PATH,以便可以在不使用绝对路径的情况下调用可执行文件。这个答案的作者个人偏爱使用绝对路径而不修改PATH。但是,大多数人似乎更喜欢为当前和将来的会话修改PATH。例如,在Windows XP上,可以在“控制面板” /“系统属性” /“高级”选项卡/“环境变量”按钮中设置PATH,关于用户应该设置用户变量还是系统,似乎有两(2)个视图/观点。变量-路径之间用分号分隔,没有空格。该答案仅使用export
下面所述的设置会话持续时间的PATH 。Emacs autogen.sh
寻找git
PATH上的命令,并抱怨是否找不到它。
步骤2:安装MinGW
http://www.mingw.org/wiki/Getting_Started
mingw-get-setup.exe
c:\mingw\bin\mingw-get install mingw32-base
c:\mingw\bin\mingw-get install msys-base
c:\mingw\bin\mingw-get install autoconf
c:\mingw\bin\mingw-get install automake
c:\mingw\bin\mingw-get install msys-coreutils
c:\mingw\bin\mingw-get remove mingw32-libiconv
c:\mingw\bin\mingw-get install "libiconv=1.13.1-1"
c:\mingw\msys\1.0\msys.bat
mount c:/mingw /mingw
步骤3:下载以下ezwinports
压缩包并解压缩到根mingw
目录。
https://sourceforge.net/projects/ezwinports/files/
;; 将以下所有ezwinports软件包解压缩到中c:/mingw
,覆盖所有重复项。
cairo-1.12.16-w32-bin.zip
gdk-pixbuf-2.30.2-w32-bin.zip
giflib-5.1.0-w32-bin.zip
glib-2.38.2-w32-bin.zip
gnutls-3.3.11-w32-bin.zip
jpeg-v9a-w32-bin.zip
libpng-1.6.12-w32-bin.zip
librsvg-2.40.1-2-w32-bin.zip
libtasn1-4.2-w32-bin.zip
libxml2-2.7.8-w32-bin.zip
libXpm-3.5.11-2-w32-bin.zip
nettle-2.7.1-w32-bin.zip
p11-kit-0.9-w32-bin.zip
pixman-0.32.4-w32-bin.zip
pkg-config-0.28-w32-bin.zip
tiff-4.0.3-w32-bin.zip
zlib-1.2.8-2-w32-bin.zip
步骤4:使用git-bash
Shell 下载最新的Emacs master分支源文件。
c:\git\git-bash.exe
cd /c/docume~1/lawlist/desktop/
git clone -b master git://git.sv.gnu.org/emacs.git
exit
步骤5:构建Emacs master分支,完成后复制.dll文件。
;; 打开通用命令提示符
c:\mingw\msys\1.0\msys.bat
export PATH=$PATH:/c/git/bin
cd /c/docume~1/lawlist/desktop/emacs
./autogen.sh
./configure --prefix=/c/docume~1/lawlist/desktop/trunk
make
make install
;; copy the following files to the `/bin` directory where `emacs.exe` is located.
cp /c/mingw/bin/libXpm-noX4.dll /c/docume~1/lawlist/desktop/trunk/bin/libXpm-noX4.dll
cp /c/mingw/bin/libpng16-16.dll /c/docume~1/lawlist/desktop/trunk/bin/libpng16-16.dll
cp /c/mingw/bin/libtiff-5.dll /c/docume~1/lawlist/desktop/trunk/bin/libtiff-5.dll
cp /c/mingw/bin/libjpeg-9.dll /c/docume~1/lawlist/desktop/trunk/bin/libjpeg-9.dll
cp /c/mingw/bin/libgif-7.dll /c/docume~1/lawlist/desktop/trunk/bin/libgif-7.dll
cp /c/mingw/bin/librsvg-2-2.dll /c/docume~1/lawlist/desktop/trunk/bin/librsvg-2-2.dll
cp /c/mingw/bin/libgdk_pixbuf-2.0-0.dll /c/docume~1/lawlist/desktop/trunk/bin/libgdk_pixbuf-2.0-0.dll
cp /c/mingw/bin/libglib-2.0-0.dll /c/docume~1/lawlist/desktop/trunk/bin/libglib-2.0-0.dll
cp /c/mingw/bin/libgobject-2.0-0.dll /c/docume~1/lawlist/desktop/trunk/bin/libgobject-2.0-0.dll
cp /c/mingw/bin/libxml2-2.dll /c/docume~1/lawlist/desktop/trunk/bin/libxml2-2.dll
cp /c/mingw/bin/zlib1.dll /c/docume~1/lawlist/desktop/trunk/bin/zlib1.dll
将的全部内容解压缩gnutls-3.3.11-w32-bin.zip
到C:\Documents and Settings\lawlist\Desktop\trunk
手动安装 -MinGW / MSYS / EZwinports
对于那些喜欢手动安装MinGW / MSYS / EZwinports的冒险者,以下是Windows XP上该作者使用的文件,该文件在默认启用以下配置选项的情况下创建成功的32位版本。设置和配置会因个人用户的个人喜好而异,超出了此答案的范围。
Configured for 'i686-pc-mingw32'.
Where should the build process find the source code? .
What compiler should emacs be built with? gcc -std=gnu99 -g3 -O 2 -gdwarf-2
Should Emacs use the GNU version of malloc? no
(The GNU allocators don't work with this system configuration.)
Should Emacs use a relocating allocator for buffers? no
Should Emacs use mmap(2) for buffer allocation? yes
What window system should Emacs use? w32
What toolkit should Emacs use? none
Where do we find X Windows header files? NONE
Where do we find X Windows libraries? NONE
Does Emacs use -lXaw3d? no
Does Emacs use -lXpm? yes
Does Emacs use -ljpeg? yes
Does Emacs use -ltiff? yes
Does Emacs use a gif library? yes
Does Emacs use a png library? yes
Does Emacs use -lrsvg-2? yes
Does Emacs use cairo? no
Does Emacs use imagemagick? no
Does Emacs support sound? yes
Does Emacs use -lgpm? no
Does Emacs use -ldbus? no
Does Emacs use -lgconf? no
Does Emacs use GSettings? no
Does Emacs use a file notification library? yes (w32)
Does Emacs use access control lists? yes
Does Emacs use -lselinux? no
Does Emacs use -lgnutls? yes
Does Emacs use -lxml2? yes
Does Emacs use -lfreetype? no
Does Emacs use -lm17n-flt? no
Does Emacs use -lotf? no
Does Emacs use -lxft? no
Does Emacs directly use zlib? yes
Does Emacs use toolkit scroll bars? yes
EZWINPORTS
cairo-1.12.16-w32-bin.zip
gdk-pixbuf-2.30.2-w32-bin.zip
giflib-5.1.0-w32-bin.zip
glib-2.38.2-w32-bin.zip
gnutls-3.3.11-w32-bin.zip
jpeg-v9a-w32-bin.zip
libXpm-3.5.11-2-w32-bin.zip
libpng-1.6.12-w32-bin.zip
librsvg-2.40.1-2-w32-bin.zip
libtasn1-4.2-w32-bin.zip
libxml2-2.7.8-w32-bin.zip
nettle-2.7.1-w32-bin.zip
p11-kit-0.9-w32-bin.zip
pixman-0.32.4-w32-bin.zip
pkg-config-0.28-w32-bin.zip
tiff-4.0.3-w32-bin.zip
zlib-1.2.8-2-w32-bin.zip
明格
autoconf-10-1-mingw32-bin.tar.lzma
autoconf-10-1-mingw32-lic.tar.lzma
autoconf2.1-2.13-4-mingw32-bin.tar.lzma
autoconf2.5-2.68-1-mingw32-bin.tar.lzma
automake-4-1-mingw32-bin.tar.lzma
automake-4-1-mingw32-lic.tar.lzma
automake1.10-1.10.2-1-mingw32-bin.tar.lzma
automake1.11-1.11.1-1-mingw32-bin.tar.lzma
automake1.4-1.4p6-1-mingw32-bin.tar.lzma
automake1.5-1.5-1-mingw32-bin.tar.lzma
automake1.6-1.6.3-1-mingw32-bin.tar.lzma
automake1.7-1.7.9-1-mingw32-bin.tar.lzma
automake1.8-1.8.5-1-mingw32-bin.tar.lzma
automake1.9-1.9.6-3-mingw32-bin.tar.lzma
binutils-2.25.1-1-mingw32-bin.tar.xz
gcc-core-4.8.1-4-mingw32-bin.tar.lzma
gcc-core-4.8.1-4-mingw32-dev.tar.lzma
gcc-core-4.8.1-4-mingw32-dll.tar.lzma
gcc-core-4.8.1-4-mingw32-lic.tar.lzma
gdb-7.6.1-1-mingw32-bin.tar.lzma
gmp-5.1.2-1-mingw32-dll.tar.lzma
libcharset-1.13.1-1-mingw32-dll-1.tar.lzma
libiconv-1.13.1-1-mingw32-bin.tar.lzma
libiconv-1.13.1-1-mingw32-dev.tar.lzma
libiconv-1.13.1-1-mingw32-dll-2.tar.lzma
libiconv-1.13.1-1-mingw32-doc.tar.lzma
libiconv-1.13.1-1-mingw32-lic.tar.lzma
libintl-0.17-1-mingw32-dll-8.tar.lzma
libmpc-1.0.2-mingw32-dll-3.tar.xz
make-3.82.90-2-mingw32-cvs-20120902-bin.tar.lzma
mingwrt-3.21.1-mingw32-dev.tar.xz
mingwrt-3.21.1-mingw32-dll.tar.xz
mpfr-3.1.2-2-mingw32-dll.tar.lzma
pthreads-w32-2.9.1-1-mingw32-dll.tar.lzma
w32api-3.17-2-mingw32-dev.tar.lzma
MSYS
bash-3.1.23-1-msys-1.0.18-bin.tar.xz
bzip2-1.0.6-1-msys-1.0.17-bin.tar.lzma
coreutils-5.97-3-msys-1.0.13-bin.tar.lzma
coreutils-5.97-3-msys-1.0.13-doc.tar.lzma
coreutils-5.97-3-msys-1.0.13-ext.tar.lzma
coreutils-5.97-3-msys-1.0.13-lang.tar.lzma
coreutils-5.97-3-msys-1.0.13-lic.tar.lzma
diffutils-2.8.7.20071206cvs-3-msys-1.0.13-bin.tar.lzma
dos2unix-7.2.3-1-msys-1.0.18-bin.tar.lzma
file-5.04-1-msys-1.0.13-bin.tar.lzma
findutils-4.4.2-2-msys-1.0.13-bin.tar.lzma
gawk-3.1.7-2-msys-1.0.13-bin.tar.lzma
grep-2.5.4-2-msys-1.0.13-bin.tar.lzma
gzip-1.3.12-2-msys-1.0.13-bin.tar.lzma
less-436-2-msys-1.0.13-bin.tar.lzma
libbz2-1.0.6-1-msys-1.0.17-dll-1.tar.lzma
libcrypt-1.1_1-3-msys-1.0.13-dll-0.tar.lzma
libexpat-2.0.1-1-msys-1.0.13-dll-1.tar.lzma
libgdbm-1.8.3-3-msys-1.0.13-dll-3.tar.lzma
libiconv-1.14-1-msys-1.0.17-dll-2.tar.lzma
libintl-0.18.1.1-1-msys-1.0.17-dll-8.tar.lzma
liblzma-5.0.3-1-msys-1.0.17-dll-5.tar.lzma
libmagic-5.04-1-msys-1.0.13-dll-1.tar.lzma
libregex-1.20090805-2-msys-1.0.13-dll-1.tar.lzma
libtermcap-0.20050421_1-2-msys-1.0.13-dll-0.tar.lzma
libxml2-2.7.6-1-msys-1.0.13-dll-2.tar.lzma
m4-1.4.16-2-msys-1.0.17-bin.tar.lzma
make-3.81-3-msys-1.0.13-bin.tar.lzma
msysCORE-1.0.18-1-msys-1.0.18-bin.tar.lzma
msysCORE-1.0.18-1-msys-1.0.18-doc.tar.lzma
msysCORE-1.0.18-1-msys-1.0.18-ext.tar.lzma
msysCORE-1.0.18-1-msys-1.0.18-lic.tar.lzma
perl-5.8.8-1-msys-1.0.17-bin.tar.lzma
sed-4.2.1-2-msys-1.0.13-bin.tar.lzma
tar-1.23-1-msys-1.0.13-bin.tar.lzma
termcap-0.20050421_1-2-msys-1.0.13-bin.tar.lzma
texinfo-4.13a-2-msys-1.0.13-bin.tar.lzma
xz-5.0.3-1-msys-1.0.17-bin.tar.lzma
zlib-1.2.7-1-msys-1.0.17-dll.tar.lzma