unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Juan José García-Ripoll" <juanjose.garciaripoll@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Avoid duplicate emacs.exe / emacs-$version.exe
Date: Sat, 28 Mar 2020 21:19:11 +0300	[thread overview]
Message-ID: <83v9mo5om8.fsf@gnu.org> (raw)
In-Reply-To: <865zeoctg3.fsf@csic.es> (juanjose.garciaripoll@gmail.com)

> From: Juan José García-Ripoll
>  <juanjose.garciaripoll@gmail.com>
> 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	other threads:[~2020-03-28 18:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28 16:53 Avoid duplicate emacs.exe / emacs-$version.exe Juan José García-Ripoll
2020-03-28 18:19 ` Eli Zaretskii [this message]
2020-03-28 20:41   ` Juan José García-Ripoll
2020-03-28 22:45     ` Phillip Lord
2020-03-29  2:31     ` Eli Zaretskii
2020-03-29  9:38       ` Juan José García-Ripoll
2020-03-29 13:08         ` Phillip Lord
2020-03-29 14:10         ` Eli Zaretskii
2020-03-28 18:19 ` Eli Zaretskii
2020-03-28 20:13   ` Phillip Lord
2020-03-28 20:48     ` Juan José García-Ripoll
2020-03-28 22:22       ` Phillip Lord
2020-03-28 23:36         ` Juan José García-Ripoll
2020-03-29 12:55           ` Phillip Lord
2020-03-29  2:27     ` Eli Zaretskii
2020-03-29 12:52       ` Phillip Lord
2020-03-29 13:56         ` Eli Zaretskii
2020-03-29 17:25           ` Phillip Lord
2020-03-28 23:36   ` Juan José García-Ripoll
2020-03-29  2:36     ` Eli Zaretskii
2020-03-29 12:59       ` Phillip Lord
2020-03-29 13:59         ` Eli Zaretskii
2020-03-29 18:18           ` Phillip Lord
2020-03-29 18:34             ` Eli Zaretskii
2020-03-29 20:49               ` Phillip Lord
  -- strict thread matches above, loose matches on Subject: below --
2020-03-29 17:01 Angelo Graziosi
2020-03-29 17:22 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83v9mo5om8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juanjose.garciaripoll@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).