Skip to content
/ winebash Public

Patched bash shell that launches exe files via wine for windows cross building in containers lacking binfmt_misc.

License

Notifications You must be signed in to change notification settings

v-joe/winebash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winebash

Patched GNU Bash shell that launches exe files via Wine for windows cross building in containers lacking binfmt_misc support.

Installation

Inside the container, configure bash with e.g.

./configure --prefix=/usr

and build and install with

make && make install

This will overwrite the bash installation in /usr. Alternatively, configure with another prefix than /usr and adjust the PATH environment variable to point this patched version of bash before any other bash installation.

Finally, replace /bin/sh with a link to this version of bash. This is important, as /bin/sh is a default script interpreter which is launched for unrecognized executable files.

cd /bin
ln -sf bash sh

or

ln -sf /usr/bin/bash /bin/sh

depending on the location of the patched bash binary.

Wine is expected to be installed as /usr/bin/wine. Another wine binary path can be defined in shell.h by adjusting the line:

#define WINE "/usr/bin/wine"

How it works

Executable binaries that are not recognized natively as binary executables (i.e. that are not recognized as ELF binaries on Linux), are checked for their header and launched via wine, if the header is 'MZ'.

About

Patched bash shell that launches exe files via wine for windows cross building in containers lacking binfmt_misc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published