Skip to content

Instantly share code, notes, and snippets.

@adeii
Last active December 30, 2024 20:34
Show Gist options
  • Save adeii/8940cfc1ca67c5e7619873d151a1024c to your computer and use it in GitHub Desktop.
Save adeii/8940cfc1ca67c5e7619873d151a1024c to your computer and use it in GitHub Desktop.
Jagodica XCompile
The easy way:
git clone https://github.com/strawberrymusicplayer/strawberry-mxe
cd strawberry-mxe
make update-package-strawberry MXE_PLUGIN_DIRS=plugins/apps
make strawberry-installer MXE_PLUGIN_DIRS=plugins/apps
The resulting package with dependencies should be in usr/i686-w64-mingw32.shared/apps/strawberry/
The custom way (from ~/strawberry-mxe):
Assuming MXE is in ~/mxe-shared (but is ~/mxe)
PKG_CONFIG_LIBDIR=~/mxe-shared/usr/x86_64-w64-mingw32.shared/lib/pkgconfig cmake ../strawberry -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/mxe-shared/usr/x86_64-w64-mingw32.shared/qt6/lib/cmake -DCMAKE_TOOLCHAIN_FILE=../strawberry/cmake/Toolchain-x86_64-w64-mingw32-shared.cmake -DARCH=x86_64 -DBUILD_WITH_QT6=ON -DENABLE_DBUS=OFF -DENABLE_WIN32_CONSOLE=OFF -DProtobuf_PROTOC_EXECUTABLE=~/mxe-shared/usr/x86_64-pc-linux-gnu/bin/protoc
make -j1
mkdir -p platforms imageformats styles sqldrivers gio-modules gstreamer-plugins
cp ~/mxe-shared/usr/x86_64-w64-mingw32.shared/qt6/plugins/platforms/qwindows.dll ./platforms/
cp ~/mxe-shared/usr/x86_64-w64-mingw32.shared/qt6/plugins/styles/qwindowsvistastyle.dll ./styles/
cp ~/mxe-shared/usr/x86_64-w64-mingw32.shared/qt6/plugins/imageformats/{qjpeg.dll,qico.dll,qgif.dll} ./imageformats/
cp ~/mxe-shared/usr/x86_64-w64-mingw32.shared/qt6/plugins/sqldrivers/qsqlite.dll ./sqldrivers/
cp ~/mxe-shared/usr/x86_64-w64-mingw32.shared/lib/gio/modules/libgiognutls.dll ./gio-modules/
cp ~/mxe-shared/usr/x86_64-w64-mingw32.shared/bin/gstreamer-1.0/{libgstapp.dll,libgstcoreelements.dll,libgstaudioconvert.dll,libgstaudiofx.dll,libgstaudiomixer.dll,libgstaudioparsers.dll,libgstaudiorate.dll,libgstaudioresample.dll,libgstaudiotestsrc.dll,libgstautodetect.dll,libgstplayback.dll,libgstvolume.dll,libgstspectrum.dll,libgstequalizer.dll,libgstreplaygain.dll,libgsttypefindfunctions.dll,libgstgio.dll,libgstdirectsound.dll,libgstwasapi.dll,libgstpbtypes.dll,libgstapetag.dll,libgsticydemux.dll,libgstid3demux.dll,libgsttaglib.dll,libgsttcp.dll,libgstudp.dll,libgstsoup.dll,libgstcdio.dll,libgstrtp.dll,libgstrtsp.dll,libgstflac.dll,libgstwavparse.dll,libgstwavpack.dll,libgstogg.dll,libgstvorbis.dll,libgstopus.dll,libgstopusparse.dll,libgstspeex.dll,libgstlame.dll,libgstaiff.dll,libgstfaac.dll,libgstfaad.dll,libgstisomp4.dll,libgstasf.dll,libgstasfmux.dll,libgstlibav.dll} ./gstreamer-plugins/
cp ../strawberry/COPYING .
cp ../strawberry/dist/windows/{*.nsi,*.nsh,*.ico} .
cp ~/mxe-shared/usr/x86_64-w64-mingw32.shared/bin/{sqlite3.exe,gst-launch-1.0.exe,gst-discoverer-1.0.exe,libcrypto-1_1-x64.dll,libssl-1_1-x64.dll} .
~/mxe-shared/tools/copydlldeps.sh -c -d . -F . -F ./platforms -F ./sqldrivers -F ./imageformats -F ./styles -F ./gstreamer-plugins -X ~/mxe-shared/usr/x86_64-w64-mingw32.shared/apps -R ~/mxe-shared/usr/x86_64-w64-mingw32.shared
makensis strawberry.nsi
-------------
$ git clone https://github.com/mxe/mxe.git
https://mxe.cc/#requirements-debian
cd mxe && make qt (then qt6) (make qt MXE_TARGETS=x86_64-w64-mingw32.static)
export PATH=<mxe root>/usr/bin:$PATH
patch vxkex.h --- https://github.com/crystalidea/qt6windows7/pull/28/files
<mxe root>/usr/x86_64-w64-mingw32/qt/bin/qmake && make
wine release/foo.exe
-------------
qwin10helpers.cpp > FARPROC error to void*
return ::GetProcAddress(s_hComBase, name); --> return (void *)GetProcAddress(s_hComBase, name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment