Sigil 0.24.10
A packaging and build release. Cross-builds now pick the code and libraries for the system your app will run on. Portable Linux apps can read from the terminal and add a launcher to the desktop menu. You can install Sigil's packages from the registry without Git.
Build a macOS app from Linux
You can now use a Linux build machine to produce a macOS app with the code and libraries it needs on a Mac. If your project has a macos-arm64 configuration, run sigil deps install --config macos-arm64 before sigil build myapp --config macos-arm64. Sigil picks the Darwin branches of cond-expand in your package manifests and app code, and selects the dependencies for that target when it reads the lockfile. The same target selection also fixes the Linux Oriel build so it links just the Wayland provider it uses.
Load optional native libraries when you need them
Say your app can export video, and that feature needs a large native library. The app can start without loading that library and load it when someone exports a video. With a dynamically linked x86-64 Linux runtime using glibc and configured for explicit activation, declare the library as a separate native component. Sigil leaves it out of the initial link and checks the component and its declared interfaces before loading it.
Sign the code and assets that ship with your app
If you sign a macOS or Windows app, the signature can now cover the bundled Sigil modules and assets. When Sigil links a Linux, macOS or Windows app against a runtime that supports image bundles, it puts their ZIP in an executable section. On macOS this lets an app like Oriel put its core executable back in Contents/MacOS and keep its application identity. Existing bundles with an appended archive still run.
Windows version information
You can put your app's product name and version in Explorer's Properties dialog before you've made an icon. Set product-name: in the build configuration and link with Zig. Sigil reports an error if the build copies a prebuilt runtime or uses another linker.
Portable Linux apps at the terminal and on the desktop
An interactive app packaged as a single Linux executable can now read from the terminal. Ctrl+C interrupts it, Ctrl+Z suspends it and fg brings it back to the foreground, just like any other shell job. In a terminal session, the launcher forwards SIGINT, SIGTERM, SIGHUP and SIGQUIT sent to its PID to the app and its supervised helpers.
If you want users to open your app from the desktop menu or a file manager, the bundle can register a menu entry, icons and file associations for the current user without root. If you move the app or its cached runtime, running it again refreshes the registration.
A bundle can also ship an installer so users can run install and uninstall directly. The launcher keeps the unpacked runtime in its own cache, separate from the app's data. When removing a cached runtime, it deletes only entries verified against the runtime manifest. Unexpected files are preserved, and a failed uninstall can leave them in quarantine. The launcher can start installers on older Linux kernels that reject newer flags for creating in-memory installation files.
Work with Linux files and subprocesses
If another program renames a directory while you're working in it, an open directory handle still refers to the same directory. On Linux, use (sigil fs anchored) and (sigil fs tree) to update metadata and copy or remove trees relative to that handle. Copies can preserve permissions, timestamps and extended attributes, including POSIX ACLs. The mount-safe operations can refuse mount crossings and avoid following symbolic links.
A PID can belong to another program by the time you try to signal a child that has exited. On Linux, (sigil process) lets you send the signal through a handle tied to the original process. If a child only needs certain open file ports or filesystem handles, use pass-fds: to choose which descriptors it inherits. For a temporary signal handler, call-with-signal-handlers from (sigil signals) restores the previous handlers when you leave the scope.
Fixes
- The bundled sigil-http moves to 0.18.12. Its request loop drops disconnected clients and continues serving the other connections.