CYGNAL:

Cygwin Native Application Library Develop a Cygwin application.

Deploy the same executable as a Windows "native" application.

Summary

The situation: Cygwin provides an excellent, modern ISO C and POSIX library on Windows and a rich development environment. Now that Cygwin is under the GNU LGPL license, applications with various licenses, free as well as proprietary, can be shipped with the Cygwin run-time libraries without obtaining a commercial license from Red Hat Inc. Cygwin can be used for developing and deploying self-contained applications for Windows, since it's possible to ship a Cygwin executable by bundling it with the Cygwin library cygwin1.dll plus the GCC run-time library cyggcc_s-1.dll .

The problem: Unfortunately, some behaviors of the functions in Cygwin DLL depend on and are geared toward the POSIX-like environment which Cygwin provides. For instance, some aspects of the path handling will confuse Windows users. And some things don't work at all: the popen and system functions look for a system command interpreter whose path name is /bin/sh which takes a -c option.

The solution: The Cygnal project provides a patched cygwin1.dll object which changes some of the behaviors such that they make sense in the context of a Windows application. Cygwin executables do not have to be recompiled to use the Cygnal library. They just have to be bundled with it; it is a drop-in replacement. In other words: develop and test in the Cygwin environment, then test and deploy the same executable as a Windows application.

Frequently Asked Questions

Status

The following table is a summary of the fixed and open Cygnal issues, capturing the current level of completion and development scope. The entries in the ID column are navigable links to details:

Since all short-term issues have been addressed, through two test releases (2.5.1.98 "Alpha" and 2.5.1.99 "Beta"), Cygnal is now released as version 2.5.2, reflecting that it is based on Cygwin 2.5.2.

ID Fixed? Summary Target 1 ✓ /bin/sh command interpreter required 2.5.1.98 2 ✓ Nuisance console window pops up when spawning process. 2.5.1.98 3 ✓ Spawned process window shows in background. 2.5.1.98 4 ✓ VT100 emulation incompatibility. 2.5.1.98 5 ✓ Cygnal programs need to know whether they are running on Cygnal or Cygwin 2.5.1.98 6 ✓ Eliminate fake / POSIX root and /cygdrive 2.5.1.98 7 ✓ Restore concept of per-volume current directory and "logged volume". 2.5.1.98 8 ✓ C stdio text streams are using Unix format. 2.5.1.99 9 ✓ Applications with hard-coded /bin/sh don't work. 2.5.1.99 10 ✓ Symbolic links use Cygwin-specific representation default 2.5.1.99 11 ✓ Cygnal should rename CYGWIN environment variable. 2.5.1.99 12 ✓ Remaining VT100 end-of-line cursor position problem. 2.5.2 13 ✓ Repeated clear screen causes cmd.exe strange behavior 2.5.2 14 ✓ The stdin , stdout and stderr streams are binary. 2.8.99.98 15 ✓ Cygwin rewrites some env vars like PATH . 2.8.99.98 16 ✓ Cygwin passes down HOME variable containing /home path. 2.8.99.98 17 ✓ Cygwin getpwent returns non-native paths in struct passwd 2.8.99.98 ?? Contact the mailing list to add your issue.

Release 2.5.2 Downloads

Cygnal 2.5.2, based on Cygwin 2.5.2, is now released.

Arch File Version SHA256 i686 cygwin1.dll 2.5.2 b6cdb6a376ac1835258858496f13d5758a08ce1e2ad9d341f41ddf6508286ec3 x86-64 cygwin1-64.dll 2.5.2 943233be5f47bd10daeaf499fd701d1e88d5f15680512a958f401014193b23b8

Development Release 2.8.99.97 Downloads

cygnal-2.9.0-branch

These are the cygnal-2.8.99.97 tagged development snapshots, built from the cygnal-2.9.0 branch.

Arch File Version SHA256 i686 cygwin1.dll devel 83cee606cdd12dea99cd296458dcef2c3d663e50dcbc96ca324f1b135ee7b748 x86-64 cygwin1-64.dll devel 46f9037d65581b2eb82f084fc53b3b6f704ec65db4ecbe27491a8d17a8cfeb5e

Git repository

The Cygnal git repository is hosted at https://www.kylheku.com/cgit/cygnal. This repository is a clone of the upstream Cygwin repository. The upstream development brach is called cygwin-master in the Cygnal repository. The current Cygnal development branch is called cygnal-2.5.2 , indicating that it's an offshoot of the Cygwin 2.5.2 release. In the future, all of the patches on cygnal-2.5.2 will be migrated to a new cygnal-x.y.z branch based on a newer Cygwin release, and development will continue on that branch.

Mailing List

You can a subscribe here to the Cygnal mailing list to receive messages. To start a discussion, registration is not required. Simply send an e-mail to cygnal@kylheku.com. To view past discussions, visit the list archive.

Projects using Cygnal

Cygnal is used by the TXR Language project. At every release, TXR provides an official 32 bit and a 64 bit package for Cygwin, each represented as a .tar.gz to be unpacked in in the Cygwin root directory. The TXR project also releases native Windows packages, packaged as executable installers, based on the Nullsoft NSIS installation system. These use the Cygnal DLL.

The TXR executable in these two packages is exactly the same file; the installer-based version just ships with Cygnal. The Cygwin TXR exhibits behaviors appropriate to Cygwin; the Windows one exhibits behaviors appropriate to Windows. Yet, the Windows native version of TXR enjoys POSIX niceties, like using termios and VT100 codes for its interactive Lisp listener, and POSIX signal handling. When the user presses Ctrl-C to interrupt a computation in the TXR interactive listener, whether in the Cygwin or native version, this is implemented using POSIX signal handling; the same code that runs on Linux, Mac OS X, Solaris and elsewhere.

Miscellanea