[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Process to build standalone Emacs + deps in Windows
From: |
Juan José García-Ripoll |
Subject: |
Re: Process to build standalone Emacs + deps in Windows |
Date: |
Wed, 25 Mar 2020 17:41:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) |
Eli Zaretskii <address@hidden> writes:
>> From: Juan José García-Ripoll
>> <address@hidden>
>> Date: Wed, 25 Mar 2020 15:54:05 +0100
>>
>> + 'libexec/*/*.exe',
>
> This is not necessarily wise. It could be TRT with the current
> dependencies, but might lose in the long run. E.g., suppose someone
> decides to add GNU Findutils to the bundle.
Understood. Can we remove the ones that are not used?
>> + 'share/doc/*', # No documentation from libraries
>> + 'share/gtk-doc/*',
>> + 'share/man/*',
>> + 'share/info/*',
>
> Questionable. Why deprive the users from being able to read the docs
> of the dependencies? Some of that could be very relevant. E.g., what
> about the docs of bzip2.exe, xz.exe, etc.? they might come in handy
> for setting up all kinds of *-switches defcustoms.
Ok. This relates to an earlier email where I asked about what of those
tools one should keep, but not completely.
Many of those directories contain manuals and documentation for
libraries (e.g. C/python interfaces to gettext, libxml, etc), not for
tools (bzip2, bunzip2, etc). Since users do not have exposed access to
those libraries, it makes as much sense to bundle them with emacs as it
would make it to bundle the documentation of the C library.
>> + 'bin/fc-*.exe', # No font configuration tools
>
> If some dependency is configured to access fonts via Fontconfig (is it
> HarfBuzz?), then this is a mistake, because some of those utilities
> are needed to maintain the font cache.
Thanks. So far I have been using emacs-27 w/o them. But maybe it is
because I built emacs before HarfBuzz was added to build-dep*.py? In any
case, I can remove it.
Does the newly attached script look more reasonable?
--
Juan José García Ripoll
http://juanjose.garciaripoll.com
http://quinfog.hbar.es
diff --git a/admin/nt/dist-build/build-dep-zips.py
b/admin/nt/dist-build/build-dep-zips.py
index 33ed4b6..118fde2 100755
--- a/admin/nt/dist-build/build-dep-zips.py
+++ b/admin/nt/dist-build/build-dep-zips.py
@@ -83,6 +83,11 @@ def immediate_deps(pkg):
dependencies = [d.split(">")[0] for d in dependencies if d]
dependencies = [d for d in dependencies if not d == "None"]
+ if dependencies:
+ print(f"Package {pkg} depends on:")
+ for d in dependencies:
+ print(f" -> {d}")
+
dependencies = [MUNGE_DEP_PKGS.get(d, d) for d in dependencies]
return dependencies
@@ -107,7 +112,8 @@ def extract_deps():
def gather_deps(deps, arch, directory):
- os.mkdir(arch)
+ if not os.path.exists(arch):
+ os.mkdir(arch)
os.chdir(arch)
## Replace the architecture with the correct one
@@ -135,11 +141,56 @@ def gather_deps(deps, arch, directory):
print("Copying dependencies: {}".format(arch))
check_output_maybe(["rsync", "-R"] + deps_files + ["."])
+ ## exclude files
+ excludes=['lib/*.a', # No files to link against
+ 'lib/*/*.exe', # No hidden executables
+ 'libexec/p11-kit/*.exe',
+ 'include/*', # No development files
+ 'lib/cmake/*',
+ 'lib/pkgconfig/*',
+ 'lib/python*/*',
+ 'share/aclocal/*',
+ 'share/gettext/*',
+ 'share/doc/lib*', # No documentation from libraries
+ 'share/doc/gettext/*',
+ 'share/gtk-doc/*',
+ 'share/man/man3/*',
+ 'share/man/man5/*',
+ 'bin/*tiff*.exe', # No graphic manipulation tools
+ 'bin/img*.exe',
+ 'bin/*gif*.exe',
+ 'bin/*jpg*.exe',
+ 'bin/*jpeg*.exe',
+ 'bin/*png*.exe',
+ 'bin/*svg*.exe',
+ 'bin/*xpm*.exe',
+ 'bin/*icc.exe',
+ 'bin/fax2*.exe',
+ 'bin/pango-*.exe',
+ 'bin/gdk-*.exe',
+ 'bin/jasper.exe',
+ 'bin/gr2fonttest.exe', # No font visualization tools
+ 'bin/hb-*.exe',
+ 'bin/msg*.exe', # No tools to manipulate gettext catalogues
+ 'bin/*gettext.exe'
+ ]
+ ## Files that might have been excluded by those rules
+ includes=[]
+ ## Build command line argument for zip
+ if excludes:
+ excludes = '-x '+' '.join(excludes).replace('*','\\*')
+ else:
+ excludes = ''
+ if includes:
+ includes = '-i '+' '.join(includes).replace('*','\\*')
+ else:
+ includes=''
+
## And package them up
os.chdir(directory)
print("Zipping: {}".format(arch))
- check_output_maybe("zip -9r ../../emacs-{}-{}{}-deps.zip *"
- .format(EMACS_MAJOR_VERSION, DATE, arch),
+ check_output_maybe("zip -9r ../../emacs-{}-{}{}-deps.zip * {} {}"
+ .format(EMACS_MAJOR_VERSION, DATE, arch, excludes,
includes),
shell=True)
os.chdir("../../")
@@ -255,6 +306,17 @@ def clean():
args = parser.parse_args()
do_all=not (args.c or args.r or args.f or args.t)
+if( args.c ):
+ clean()
+ exit(0)
+
+# The dependency extraction relies on an English version of pacman
+# We need to configure the locale to match the expectations
+if 'LANG' in os.environ:
+ os_lang = os.environ['LANG']
+ if (len(os_lang) > 2) and (os_lang[0:2] != 'en'):
+ os.environ['LANG']='en_US'
+
deps=extract_deps()
DRY_RUN=args.d
@@ -277,6 +339,3 @@ def clean():
if( do_all or args.r ):
gather_source(deps)
-
-if( args.c ):
- clean()
- Re: Process to build standalone Emacs + deps in Windows, (continued)
- Re: Process to build standalone Emacs + deps in Windows, Eli Zaretskii, 2020/03/22
- Re: Process to build standalone Emacs + deps in Windows, Phillip Lord, 2020/03/22
- Re: Process to build standalone Emacs + deps in Windows, Eli Zaretskii, 2020/03/22
- Re: Process to build standalone Emacs + deps in Windows, Phillip Lord, 2020/03/23
- Re: Process to build standalone Emacs + deps in Windows, Eli Zaretskii, 2020/03/23
- Re: Process to build standalone Emacs + deps in Windows, Phillip Lord, 2020/03/24
- Re: Process to build standalone Emacs + deps in Windows, Juan José García-Ripoll, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Juan José García-Ripoll, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Juan José García-Ripoll, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Eli Zaretskii, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows,
Juan José García-Ripoll <=
- Re: Process to build standalone Emacs + deps in Windows, Eli Zaretskii, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Juan José García-Ripoll, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Eli Zaretskii, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Phillip Lord, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Juan José García-Ripoll, 2020/03/26
- Re: Process to build standalone Emacs + deps in Windows, Eli Zaretskii, 2020/03/26
- Re: Process to build standalone Emacs + deps in Windows, Phillip Lord, 2020/03/26
- Re: Process to build standalone Emacs + deps in Windows, Phillip Lord, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Stefan Monnier, 2020/03/25
- Re: Process to build standalone Emacs + deps in Windows, Juan José García-Ripoll, 2020/03/26