This project is no longer updated.
This project cross-compiles the Seafile client for Windows (i686/x86_64) from a Fedora machine using MinGW, and also builds the Linux client. It was written because at the time upstream had no Windows build of its own.
Seafile now builds natively on Windows, so these tools are no longer needed.
Upstream added a Visual Studio build on 2020-11-18 — haiwen/seafile commit
cb877e00, "portable visual studio 2019" (PR #2378) — about a year after this
project was last maintained, and moved its Windows dependencies to vcpkg in 2025.
Official instructions for building the client on Windows:
- Windows build guide — https://manual.seafile.com/latest/develop/windows/ (Visual Studio 2019 + vcpkg + Qt; also covers MSI packaging)
- Building Seafile in general — https://manual.seafile.com/latest/develop/build_seafile/
- Linux client — https://manual.seafile.com/latest/develop/linux/
- macOS client — https://manual.seafile.com/latest/develop/osx/
Two consequences of that shift made continuing here pointless:
- The official path is MSVC/vcpkg on a Windows host. It documents no MinGW build and no cross-compilation from Linux, so the approach this project takes is no longer exercised or supported upstream.
- Later Seafile releases depend on libraries that only the vcpkg path supplies —
libargon2, andlibwebsocketsthrough a patched custom vcpkg port. Building a current Seafile with these tools would mean cross-compiling those too, and in the case of libwebsockets the notification support is entangled such that disabling it leaves the daemon unlinkable.
The one thing this repository still does is build the last Seafile it was maintained for, on a current Fedora. See below.
pins.mk pins every upstream source to an exact commit, chosen as the newest
commit on or before 2019-11-25 — the last time this project's build logic was
maintained. That is the combination these tools actually support:
| Source | Commit | Date |
|---|---|---|
| jansson | ca88677b |
2019-10-24 |
| libevent | aff23122 |
2019-11-17 |
| libsearpc | 35a19401 |
2019-11-01 |
| seafile | 2412bc04 |
2019-11-19 (v7.0.4) |
| seafile-client | d2c971c4 |
2019-11-22 |
Clean HOST_OS=MINGW32 and HOST_OS=MINGW64 builds of these pins were verified
on Fedora 44 (gcc 16, mingw-w64 gcc 16, CMake 4.3, Qt 5.15) and produce Windows
binaries:
ms-build/bin/seaf-daemon.exe PE32 (console), i386
ms-build/bin/seafile-applet.exe PE32 (GUI), i386
ms-build64/bin/seaf-daemon.exe PE32+ (console), x86-64
ms-build64/bin/seafile-applet.exe PE32+ (GUI), x86-64
Building 2019 sources with a toolchain six years newer needs compatibility
handling, all of which lives in the Makefile:
RELAX_CFLAGS— current GCC turns several older sloppy-C patterns into hard errors; these relax them back to warnings.WIN32_WINNT_CFLAGS— the sources ask for_WIN32_WINNT0x0403 (NT 4.0), but current mingw headers declare Vista-eraMIB_*types only above 0x0600 whileiphlpapi.huses them unconditionally, so the build fails inside the system headers. Requests Vista instead.PKG_CONFIGoverrides — themingw32-pkg-configwrapper rewrites every.pcprefix into the mingw sysroot, which corrupts the paths of the libraries this build installs into its own prefix.- Source fixups for
seafile-client: glib headers hoisted out ofextern "C"blocks (current glib declares a C++ template there), an explicit<QPainterPath>include (required since Qt 5.15), andCMAKE_POLICY_VERSION_MINIMUM(CMake 4 dropped the policy version this source declares).
UpdatePins.sh was written to move a pin forward only when a clean build with
the newer commit succeeds, reverting otherwise. It is left in place, but note the
limitation above: bumping seafile to a current release needs libargon2 and
libwebsockets added to this build first.
Pinning the sources is only half of it. The Dockerfile and the CI workflow both
name fedora:44 rather than fedora:latest, because the compatibility
handling above is specific to a toolchain generation: a newer Fedora brings a
newer GCC, Qt and CMake, and these 2019 sources then fail again for reasons that
have nothing to do with any change here. Keep the two in step if either moves.
Package versions are deliberately not pinned individually. Within one Fedora release they are stable enough, and pinning exact versions would break sooner — Fedora drops older builds from its repositories, at which point the exact version can no longer be installed at all.
.github/workflows/build.yml builds all three targets on every push and pull
request, as a matrix of MINGW32, MINGW64 and the native Linux build. The job
declares container: fedora:44, so the steps run directly inside the Fedora
toolchain; nothing in CI builds or runs a docker image, and the
*DockerVerification.sh scripts are only for doing the same thing by hand
locally.
For the two Windows targets the workflow also runs ResolveDllDeps.py, which
copies the dependency DLLs (Qt, glib, OpenSSL, libcurl, the MinGW runtime, and
the libraries this build produces) and the Qt plugins next to the executables.
Without that the .exe files cannot start on a Windows machine. The Linux build
skips it and resolves its shared libraries from the system.
Each target then uploads its bin directory, so the artifacts are:
| Artifact | Contents |
|---|---|
seafile-client-windows-i686 |
seafile-applet.exe, seaf-daemon.exe, ~35 DLLs, Qt plugins (i386) |
seafile-client-windows-x86_64 |
the same for x86-64 |
seafile-client-linux-x86_64 |
seafile-applet, seaf-daemon, seaf-cli (ELF) |
Note that GitHub deletes workflow artifacts after 90 days by default; download anything worth keeping.
When you are in Fedora, run InstallDevPackagesFedora.sh script to install all
necessary packages firstly.
Run make or make HOST_OS=MINGW32 and get i686 32-bits ./ms-build folder.
Run make HOST_OS=MINGW64 and get x86_64-bits ./ms-build64 folder.
Run make HOST_OS= and get ./build folder.
Run InitDockerVerification.sh to create docker image and related environment for the first time.
Run RunDockerVerification.sh to create a new docker instance and build Seafile client. The build contents would be placed in your host directory by docker volumn. In your ./build it's the Linux build. The ./ms-build is the 32-bits Windows build and ./ms-build64 is the 64-bits build.
Run DropDockerVerification.sh to drop the docker image and related environment.
This project is not updated any more, so issues about building current Seafile are best directed at upstream (see the links above). For anything about this repository itself: https://github.com/xnervwang/SeafileClientBuildTools, or email Xnerv Wang xnervwang@gmail.com.