emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoid duplicate emacs.exe / emacs-$version.exe


From: Eli Zaretskii
Subject: Re: Avoid duplicate emacs.exe / emacs-$version.exe
Date: Sat, 28 Mar 2020 21:19:11 +0300

> From: Juan José García-Ripoll
>  <address@hidden>
> Date: Sat, 28 Mar 2020 17:53:00 +0100
> 
> Right now in my hard disk I have two copies of statically linked Emacs.

(This is a point, but Emacs is not linked statically, at least not by
default.  The large size is mostly due to debug info, and you can
strip it if you want, although I don't recommend doing so for a
pretest version, because you cannot produce meaningful backtraces from
a stripped binary.)

> ~/emacs-27/bin/emacs.exe
> ~/emacs-27/bin/emacs-27.0.90.exe (let me call it emacs-$version.exe)
> 
> Each of them is 128Mb large and waste space.

No, they don't waste space, at least not by default.  When you install
Emacs, the installation procedure produces a hard link with another
name to the same file data.  These two names are just 2 different
names that refer to the same disk space.

> I would suggest one of these options
> 
> a) Remove emacs-$version.exe during installation.
> 
> b) Same as a), but install a script emacs-$version.cmd containing just two
> lines
>     @echo off
>     %~dp0\emacs.exe %*
> 
> c) Instead, remove emacs.exe and leave only emacs-$version.exe Make emacs.cmd 
> a
> script
>     @echo off
>     %~dp0\emacs-$version.exe %*
> where $version is replaced with the current version. We also have to change
> runemacs.exe to look for emacs-$version.exe

None of this is needed, since there's no waste of space, when our
installation procedure is used.

> After the patch:
> juanj@DESKTOP-3A8AAJ0 MINGW64 ~/emacs-build/build/juanjo
> $ du -smc ~/emacs-27/*
> 135     /c/Users/juanj/emacs-27/bin
> 1       /c/Users/juanj/emacs-27/include
> 1       /c/Users/juanj/emacs-27/lib
> 17      /c/Users/juanj/emacs-27/libexec
> 98      /c/Users/juanj/emacs-27/share
> 249     total
> 
> Before the patch:
> juanj@DESKTOP-3A8AAJ0 MINGW64 ~/emacs-build/build/juanjo
> $ du -smc ~/emacs-27/*
> 252     /c/Users/juanj/emacs-27/bin
> 1       /c/Users/juanj/emacs-27/include
> 1       /c/Users/juanj/emacs-27/lib
> 17      /c/Users/juanj/emacs-27/libexec
> 98      /c/Users/juanj/emacs-27/share
> 366     total

This means your installation procedure is modified, or maybe you
installed a binary someone else produced, in which case the archive
used to package the binaries didn't support hard links.  You can
restore the hard link by removing onhe of the copies and making a hard
link to the remaining copy under the other name.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]