green arrow down download
version 0.8
.tgz | .deb | .rpm | .exe

EPM for win32 installers

epm-win32sfx is a wrapper around epm, which creates simplistic Windows installers from a package.

EPM (ESP Package Manager) usually creates Unix packages, like Debian .deb and Redhat .rpm archives. It can also create portable packages and installers from a single epm .list description.

mini screenshot of generated installer package

This wrapper just adds an additional target. It uses the very same package description format for generating a typical "setup.exe" from it.

Without additional options, the generated Windows installers are often very simplistic. But generally, creating them doesn't take any extra effort, if you can live with them extracting the package to a default /usr directory on Windows' C:\ drive.

Generated installers per default install without asking further questions, and like Linux/Unix packages aren't relocatable. To do so, the epm .list file and the application had to be adapted for making a fully Windows-tailored archive.

epm-win32sfx itself relies on the open-source (GNU GPL) makesfx.exe from FreeExtractor. This generates the actual Windows installers. It is executed via wine. epm-win32sfx just serves as wrapper here, and simply bridges the epm package description to makesfx.exe options.

%product epm win32 sfx target %vendor mario %license %version 0.8 %copyright Public Domain, GNU GPL (makesfx.exe) %readme /dev/null %description Creates a Windows SFX Installer from an EPM package %requires epm %system all f 755 root root /usr/bin/epm-win32sfx ./src/epm-win32sfx f 555 root root /usr/bin/makesfx.exe ./src/makesfx.exe #f 444 root root /usr/share/doc/epm/epmwin32.list ./epmwin32.list %system win32 %relocatable 1 %defaultpath c:/ %icon app.ico %shortcut $desktop$/epm-win32|$targetdir$/usr/bin/epm-win32sfx %postinstall $targetdir$/tmp/install.bat

As said, the epm .list description can usually stay the same. There are however additional options, which can be set here:

%relocatable
If set to 1 or YES or TRUE, will make the Win installer ask the user for a destination directory first. Per default the installer would else just have an [Extract] button.
%defaultpath
Target extraction directory, if the package is relocatable
%icon
Use another 32x32x256colors .ico file for the generated install.exe
%shortcut
Creates Windows' visual shortcuts after installation. Use "target|src" syntax here. There are various $directorynames$ to use for that. (please consult makesfx.exe /? for them)
%postinstall
epm-win32sfx will recognize postinstall rules/scripts for Windows, if they also have one of the $virtual$ directory names in them.

Please consult the internal documentation of the script for further information.

The wrapper is released into the Public Domain. EPM and makesfx.exe are governed by the GNU GPL.

Possibly Arising Questions

How is it invoked? epm-win32sfx package will generate the .exe installer in a win32/ subdirectory usually, if a "package.list" file exists.

How can I add a homepage link? Use the -h option to specify an URL. This will get displayed by the windows installer. You could also define it in the epm .list file using the %homepage directive.

Why do the installers not force users to "accept the license"!!?! The makesfx.exe packages do not support it.
And as much as we enjoy pestering Windows users with needles license acceptings, and Windows users enjoy being pestered by it, this is usually not necessary. In fact, forcing users to accept the license violates most open source licenses. The GNU GPL for example specifically contains a section: Acceptance Not Required for Having Copies.
If you want, you could just include a license note in the description of your packages. Outside the U.S. this is equally void as any license acceptance screen. Users however tend to spent more attention on it this way (if it's kept informative and buzzword-free).

Where can I download that MakeSFX.exe? It is available directly from the FreeExtractor.sf.net homepage as MakeSFX.exe. You can however just download the epm-win32sfx package here, as it is included. If you have wine on your system, the exe is best just copied into /usr/local/bin.

How to actually make an application relocatable? It is insufficient to just make the installer extract a package to a user-defined target directory. The application itself must know how to find its resources later. But basically you can just use -r or the %relocatable directive. Often it is more senseful to extract everything into a temp directory and use a %postinstall (.bat) script to do the final setup. This sometimes includes copying all extracted files to a different directory. But depending on the application, it might suffice to just create/update a configuration file in the $targetdir$.