![]() |
Packages for the various platforms | ![]() |
Distribution packages are made by targets of the autotools Makefile, which use the platform files in
packages/
. All packages are written to the directory ../distr/ next to
src/
. The generic targets make PACKAGE and make BUNDLE are mapped by
tm_platform.m4
to the right target of the platform: GENERIC_PACKAGE on Linux and other Unix systems, MACOS_BUNDLE/MACOS_PACKAGE on macOS, and WINDOWS_BUNDLE/WINDOWS_PACKAGE on Windows.
Most targets need a complete set of libraries which are not part of a standard system (a static Qt, the embedded Guile, …). The official packages are built with the TeXmacs builder, which provides them in an SDK directory given to configure with --with-tmrepo; the AppImage target refuses to run without it.
Every binary package bundles the runtime tree
TeXmacs/
, the ice-9 directory of the Guile library (copied from GUILE_DATA_PATH into progs/, since TeXmacs loads it from there), Ghostscript if it was found at configuration time, and the public key
misc/admin/texmacs_updates_dsa_pub.pem
used to verify automatic updates (see automatic updates). When configure was given a signing identity (
tm_sign.m4
), the executables and installers are signed.
MACOS_BUNDLE builds ../distr/TeXmacs.app: it copies Info.plist, PkgInfo, the icons and Assets.car from
packages/macos/
, the binary as Contents/MacOS/TeXmacs, and the runtime tree into Contents/Resources/share/TeXmacs. The script
packages/macos/bundle-libs.sh
then copies the Qt frameworks and plug-ins and the other dynamic libraries into the bundle and rewrites their install names, and the bundle is signed with codesign if a signing identity was configured. MACOS_PACKAGE wraps the bundle in a disk image with hdiutil, and MACOS_RELEASE makes a signed zip archive for the updater.
The script
build-ns-app.sh
builds the application of the native Cocoa port (the default) or of the Vue port (--gui vue, with MuPDF and optionally ThorVG), with its libraries, in ../distr/TeXmacs.app, and optionally its disk image. The directory also contains an Xcode project (TeXmacs.xcodeproj) with configuration files for the Qt, Cocoa, Vue, SDL and X11 ports (TeXmacsQt.xcconfig, …).
WINDOWS_BUNDLE assembles ../distr/TeXmacs-Windows: the runtime tree, the binary renamed to texmacs.exe, the Aspell dictionaries of the SDK, the Qt plug-ins, and all the DLLs the executables depend on (found by
packages/windows/copydll.sh
). WINDOWS_PACKAGE runs Inno Setup (iscc) on packages/windows/TeXmacs.iss to make the installer. WINDOWS_APPX additionally makes two MSIX packages with makeappx: one for direct distribution and one for the Microsoft Store, from the manifests in
packages/msix/
. The Windows builds are done with MinGW under MSYS2;
packages/windows/configure-tm-mingw-cross-env
is a helper for cross compiling.
GENERIC_PACKAGE strips the binary and makes a tar.gz of the runtime tree; GENERIC_X11_PACKAGE builds a static binary of the X11 port in a temporary copy of the sources.
DEBIAN_PACKAGE and UBUNTU_PACKAGE (with debuild), REDHAT_PACKAGE, FEDORA_PACKAGE, CENTOS_PACKAGE and MANDRIVA_PACKAGE (with rpmbuild and the TeXmacs.spec files) all start from a source archive made by COPY_SOURCES_TGZ, which includes the embedded Guile.
APPIMAGE installs TeXmacs into ../distr/TeXmacs.AppDir, adds the desktop entry and the AppRun script of
packages/appimage/
, fixes the run path of the binary with patchelf and copies the shared libraries of the SDK.
SRC_PACKAGE.
The scripts in
packages/linux/
install the icons and the MIME types into a desktop environment.
ANDROID_LIBTEXMACS compiles TeXmacs into a static library src/Objects/libtexmacs.a (configured for an Android cross compiler). ANDROID_BUNDLE prepares a project in ../distr/TeXmacs-Android from the launcher in
packages/android/launcher/
(whose main calls texmacs_entrypoint), the manifest and resources, and the runtime tree collected as assets by
collect_assets.sh
. ANDROID_AAB and ANDROID_DEV_APK build it with CMake and the Android NDK and SDK into an application bundle or a development APK. The platform layer is described in the system layer.
MACOS_RELEASE archives the wrong path:
Makefile.in:518
writes $MACOS_PACKAGE_APP with a single $, which make reads as the (empty) variable $M followed by the text ACOS_PACKAGE_APP, so zip is asked to archive a non-existent file. It should be $(MACOS_PACKAGE_APP).
The packaging targets only exist in the autotools build; CMake can build and install, but not package (see building with CMake).
distclean does not remove the package descriptions generated from packages/*/*.in, which therefore keep the version of the last configuration until configure is run again.