-
Notifications
You must be signed in to change notification settings - Fork 1
Msys2 on Wine
As of wine <= 2.15 & current MSYS2 (20161025 base package or newer), this won't work.
See this issue: https://github.com/Alexpux/MSYS2-packages/issues/682
Older MSYS2 (pre-Cygwin 2.6) may work.
- IMPORTANT Install latest Wine Staging. Wine Staging provides pre-built packages for a couple of distributions every two weeks.
-
Backup or remove your old wineprefix:
$ mv ~/.wine ~/.wine.bak
Refer to http://wiki.winehq.org/FAQ#wineprefix for more backgrounds about wineprefix.
-
Download Msys2 installer
$ wget http://repo.msys2.org/distrib/msys2-i686-latest.exe
-
Install Msys2
$ wine msys2-i686-latest.exe
(Ignore error "mintty: could not load icon from '/msys2.ico': File not found" if it happens)
-
Initialize Msys2 shell
-
In Unix shell:
-
$ cd ~/.wine/drive_c/msys32/
-
$ MSYSTEM=MSYS wine usr/bin/mintty.exe --exec /usr/bin/bash -l
- If you see a screen that says "This is first start of Msys2. You MUST restart shell to apply necessary actions.", then everything seems fine so far. Now you can leave Msys2, just type
exit
in Msys2 Shell in Wine console: $ exit
- If you see a screen that says "This is first start of Msys2. You MUST restart shell to apply necessary actions.", then everything seems fine so far. Now you can leave Msys2, just type
-
-
Restart Msys2 shell
$ MSYSTEM=MSYS wine usr/bin/mintty.exe --exec /usr/bin/bash -l
-
(optional) Edit
/etc/pacman.d/mirrorlist.*
to switch to a faster repo. For example, Chinese users might prefer USTC Mirror rather than the default repo. You can extract msys-ustc-mirror.zip in~/.wine/drive_c/msys32/etc/pacman.d
to overwrite the mirrorlist. -
Update the package database, then you can install packages from Msys2 repo
- In Msys2 shell:
$ pacman -Sy
- and for example
$ pacman -S vim
- In Msys2 shell:
-
Update system core packages with:
$ update-core
-
Close Msys2, run it again with
wine start msys2_shell.bat
and update the rest with:$ pacman -Su
-
After update, if
wine start msys2_shell.bat
works abnormally, runwine usr/bin/mintty.exe --exec /usr/bin/bash -l
instead to work around bug 40482 and 40483.Refer to https://msys2.github.io/ for generic Msys2 help.
Refer to https://wiki.archlinux.org/index.php/pacman for generic pacman help.
-
Install toolchain using pacman
For example,
$ pacman -S --needed base-devel msys2-devel
-
Start building
Just checkout the repo with PKGBUILD for the package to build and run
makepkg
(ormakepkg --skippgpcheck
if needed).Here is an example for building the
file
package in https://github.com/Alexpux/MSYS2-packages/tree/master/fileFirstly, use git to checkout https://github.com/Alexpux/MSYS2-packages
Then, in MSYS2,
cd
to the directory offile
package:$ cd /path/to/MSYS2-packages/file
Then, try
makepkg -f -s --skippgpcheck --noconfirm
The
file
package should compile and pack correctly on latest Wine Staging.Refer to http://sourceforge.net/p/msys2/wiki/Contributing%20to%20MSYS2/ for MSYS2 makepkg and makepkg-mingw help.
Refer to https://wiki.archlinux.org/index.php/Makepkg for generic makepkg help.
We created https://www.tea-ci.org for Windows open source application developers.
Examples:
http://tea-ci.org/Alexpux/MSYS2-packages
http://tea-ci.org/Alexpux/MINGW-packages
Documentation: https://docs.tea-ci.org/usage/overview/
Project | Build Status |
---|---|
LibrePilot | |
winpty | |
Merkaartor | |
MAME | |
MyPaint | |
libbsdf | |
BSDFProcessor | |
Lucciefr |
Feel free to share Tea CI to more open source developers. Please add your project to this wiki page as a collection. Join https://gitter.im/TeaCI/drone for discussion about Tea CI.
OUTDATED: Please help us port build configurations from Travis CI to Tea CI
Travis CI is a continuous integration platform, supports Linux and OS X. Travis CI provides free service to open source projects.
Here is a demo for how to build the elinks package in Msys2 on top of Wine in Travis CI: https://travis-ci.org/fracting/elinks In the above demo, we collect all known workarounds together in a set of script, which makes normal users' life easier. Refer to https://github.com/fracting/elinks/blob/master/.travis.yml for more details. The command line interface of our script set is not stable yet, we will document more details once we have a stable interface.
-
mintty.exe
,vim.exe
,emacs.exe
,gcc.exe
,clang.exe
,make.exe
,strace.exe
,gdb.exe
,autoreconf
,file.exe
,git.exe
,xz.exe
,bsdtar.exe
and many other tools works. -
winpty.exe
does not work. There is a workaround: WINPTY_SHOW_CONSOLE=1 -
performance is not perfect, see performance bugs
-
Cygwin works as well if filesystem is mounted as noacl or mktemp() issue is worked around on Wine.
-
Search wine-staging bugzilla for known bugs. If you find bugs which aren't in the search result, please report one and CC
fracting AT gmail DOT com
.
It is very useful to use Valgrind + Wine to discovery memory bug of Win32 software. See also http://wiki.winehq.org/Wine_and_Valgrind
Known bugs and limitations for Wine + Valgrind:
-
Msys2/Cygwin hangs unless
--smc-check=all
is used, see bug 550 -
Valgrind doesn't understand symbols from Win32 .dbg files yet.
-
Compile and run test suites of all Msys2 packages on top of Wine. See also http://wiki.winehq.org/UnitTestSuites
-
Use c-reduce to convert failure test suite into simplified minimal test case for Wine, integrate c-reduce with CI platform.
-
Upstream our CI build scripts to open source projects.
-
Set up a build bot on Appveyor CI (for Windows, as comparison build). Improve Travis CI build, or investigate customer Drone CI build environment to support Msys2. Run regression tests for every commit to catch bugs in first minute.
-
Implement Wine based build slaver, upstream to Jenkins, buildbot, Drone CI, GitLab CI, etc.
-
Hack Wine + MSYS2 / Wine + Cygwin to provide a Reproducible Build environment.
-
Integrate Wine with Docker, with Mozilla Record Replay pre-installed, Valgrind pre-installed, Dr. Memory pre-installed, etc. Provide an out of box debugging / testing environment for Windows developers through Docker Machine.
-
Improve performance.
-
Full stack on Wine!