- I should be able to build any branch or release from Emacs. This includes the last release branch (right now emacs-27), as well as the master branch for development. Always using pristine sources from Savannah.
- I want to build emacs with different options from the default, which is to use all features available. For instance, I do not care for SVG support.
- The script needs to track all packages that are required by the Emacs build even if I change the build options.
- The installation should take as little space as possible, removing useless directories or files that come from the dependencies. For instance, headers from libraries used by emacs, spurious documentation files, etc.
- The script should be able to build other components I regularly use, such as mu, mu4e or pdf-tools, in a way that is not affected by updates to the mingw or msys environments.
- The `emacs-build.cmd` assumes nothing about your system, except for an existing installation of PowerShell. It will download and install a minimal MSYS/MINGW64 environment and build Emacs and all other requested components. This allows for a more deterministic build, without perturbing your computer.
- The `emacs-build.sh` is meant to be ran from an existing MSYS/MINGW64 environment, which will be modified to allow building Emacs and all tools. Use this version at your own risk.
2. Download a minimal set of MSYS and MINGW programs needed to build Emacs and the extensions
3. Clone the latest emacs repository on the branch emacs-27
4. Ensure that all required packages Mingw64 are installed, or install them.
5. Configure and build Emacs using those packages
6. Pack all the dependencies into a ZIP file.
7. Download and build pdf-tools, hunspell, mu and isync (plus xapian and gmime3). In the process, ensure that the required packages are also installed.
8. Create a ZIP file with Emacs, all the dependencies and all the extensions.
-`emacs-xx-xxxx-deps.zips` is the file with optional libraries (png, jpeg, etc) used by Emacs.
-`emacs-xx-xxxx-nodeps.zip` is a bare Emacs installation. It runs even if the 'deps' file is not used
-`emacs-xx-xxxx-full.zip` is a complete Emacs installation, with the optional libraries and all extensions (pdf-tools, mu, etc) you mentioned in the command line.
-`pdf-tools-xxxx.zip` and others are the Zip files for the extensions. They can be unpacked inside an Emacs installation, but may assume that 'deps' have also been unpacked.
- If `c:\emacs` is where you unpacked the full installation, some extensions will reside in `c:\emacs\bin` (e.g. pdftools) and some others in `c:\emacs\usr\bin` (e.g. mu and mbsync).
- Even though elisp files are provided, it is highly recommended that you install pdf-tools and mu4e from Melpa or other repositories, to properly take care of dependencies from other elisp libraries.