Skip to content
This repository was archived by the owner on Oct 3, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Toolchain-mingw32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
SET(CMAKE_SYSTEM_NAME Windows)

# which compilers to use for C and C++
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)

# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /target )
Expand Down
6 changes: 3 additions & 3 deletions windows.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ RUN apt-get update && apt-get install -y -q \
xz-utils \
yasm

RUN update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
RUN update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
RUN update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
RUN update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix

RUN mkdir -p /src
RUN mkdir -p /target/stow
Expand All @@ -55,5 +55,5 @@ WORKDIR /src/windows
# Separate this step to cache it before any build failures.
RUN make all-downloads

# RUN make
RUN make

26 changes: 11 additions & 15 deletions windows/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Target compiler
host=x86_64-w64-mingw32
host=i686-w64-mingw32
cc=$(host)-gcc
cxx=$(host)-g++
ranlib=$(host)-ranlib

# Local compiler
build=x86_64-linux-gnu
build=i486-linux-gnu

# How many source files to build in parallel within each package
jobs=-j8
Expand All @@ -22,7 +22,7 @@ include ../makefile.common
clementine_dlls=glew32.dll \
libcdio-19.dll \
libchromaprint.dll \
libcrypto-1_1-x64.dll \
libcrypto-1_1.dll \
libfaad-2.dll \
libffi-7.dll \
libfftw3-3.dll \
Expand All @@ -34,7 +34,7 @@ clementine_dlls=glew32.dll \
libgmp-10.dll \
libgnutls-30.dll \
libgobject-2.0-0.dll \
libgpg-error6-0.dll \
libgpg-error-0.dll \
libgpod.dll \
libgstapp-1.0-0.dll \
libgstaudio-1.0-0.dll \
Expand Down Expand Up @@ -67,7 +67,7 @@ clementine_dlls=glew32.dll \
libplist.dll \
libprotobuf-17.dll \
libpsl-5.dll \
libssl-1_1-x64.dll \
libssl-1_1.dll \
libsoup-2.4-1.dll \
libspeex-1.dll \
libspotify.dll \
Expand Down Expand Up @@ -149,7 +149,7 @@ pkgconfig=PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig
autoconf=ACLOCAL_PATH=$(prefix)/share/aclocal:/usr/share/aclocal
ldflags=-L$(prefix)/lib -lpthread
# -O2 is required to work around link errors in gettext
cflags=-I$(prefix)/include -O2 -D__USE_MINGW_ANSI_STDIO -m64
cflags=-I$(prefix)/include -O2 -D__USE_MINGW_ANSI_STDIO
cxxflags=$(cflags)
configure=$(pkgconfig) LDFLAGS="$(ldflags)" CFLAGS="$(cflags)" CXXFLAGS="$(cxxflags)" ./configure --host=$(host) --build=$(build) --prefix=$(prefix)
cmake=$(pkgconfig) cmake .. -DCMAKE_TOOLCHAIN_FILE=$(src)/Toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_C_FLAGS="$(cflags)" -DCMAKE_CXX_FLAGS="$(cxxflags)"
Expand Down Expand Up @@ -203,7 +203,7 @@ clementine-deps: clementine-build-deps clementine-gst-plugins openssl glibnetwor
cp -v $(prefix)/lib/gio/modules/libgiognutls.dll clementine-deps/gio-modules/

cp -vr /usr/lib/gcc/$(host)/*-posix/libstdc++-6.dll clementine-deps/
cp -vr /usr/lib/gcc/$(host)/*-posix/libgcc_s_seh-1.dll clementine-deps/
cp -vr /usr/lib/gcc/$(host)/*-posix/libgcc_s_dw2-1.dll clementine-deps/
cp -vr /usr/$(host)/lib/libwinpthread-1.dll clementine-deps/

# openSUSE
Expand Down Expand Up @@ -279,7 +279,7 @@ clementine-deps: clementine-build-deps clementine-gst-plugins openssl glibnetwor
.done-gmp:
rm -f $(prefix)/share/info/dir
$(call extractpkg,$(gmptgz))
cd $(gmp) && CC_FOR_BUILD=$(build)-gcc $(configure) --enable-shared --disable-static
cd $(gmp) && $(configure) --enable-shared --disable-static
cd $(gmp) && $(make)
$(call installpkg,$(gmp))

Expand Down Expand Up @@ -448,11 +448,7 @@ clementine-deps: clementine-build-deps clementine-gst-plugins openssl glibnetwor
$(call installpkg,$(gstugly))

.done-oil:
$(call extractpkg,$(oiltgz))
cd $(oil) && patch -p1 < ../patches/liboil-1-fixes.patch
cd $(oil) && CONFIG_SITE=../config/liboil.site $(configure)
cd $(oil) && $(make)
$(call installpkg,$(oil))
$(call extractandbuild,$(oiltgz),$(oil))

.done-id3tag:
$(call extractpkg,$(id3tagtgz))
Expand Down Expand Up @@ -556,7 +552,7 @@ clementine-deps: clementine-build-deps clementine-gst-plugins openssl glibnetwor
-I/target/include \
-release \
-xplatform win32-g++ \
-device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \
-device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32- \
-prefix $(stow)/$(qt) \
-confirm-license \
-opensource \
Expand Down Expand Up @@ -670,7 +666,7 @@ clementine-deps: clementine-build-deps clementine-gst-plugins openssl glibnetwor
--cross-compile-prefix="$(host)-" \
--prefix=$(stow)/$(openssl) \
--shared \
mingw64 \
mingw \
LDFLAGS="-L/target/bin $(ldflags)" CFLAGS="$(cflags)"
cd $(openssl) && make
cd $(openssl) && make install
Expand Down
2 changes: 0 additions & 2 deletions windows/config/liboil.site

This file was deleted.

162 changes: 0 additions & 162 deletions windows/patches/liboil-1-fixes.patch

This file was deleted.