From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Avoid duplicate emacs.exe / emacs-$version.exe Date: Sat, 28 Mar 2020 21:19:41 +0300 Message-ID: <83tv285ole.fsf@gnu.org> References: <865zeoctg3.fsf@csic.es> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="52432"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Juan =?utf-8?Q?Jos=C3=A9_Garc=C3=ADa-Ripoll?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 28 19:20:41 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jIG4X-000DYS-5u for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Mar 2020 19:20:41 +0100 Original-Received: from localhost ([::1]:57768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIG4W-0004Ke-7B for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Mar 2020 14:20:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37696) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIG3u-0003jj-Ol for emacs-devel@gnu.org; Sat, 28 Mar 2020 14:20:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jIG3u-0007Su-L0; Sat, 28 Mar 2020 14:20:02 -0400 Original-Received: from [176.228.60.248] (port=2665 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jIG3r-0004Vy-9b; Sat, 28 Mar 2020 14:20:01 -0400 In-Reply-To: <865zeoctg3.fsf@csic.es> (juanjose.garciaripoll@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245896 Archived-At: > From: Juan José García-Ripoll > > 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 secondary 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.