2018-10-03 12:11:54 -04:00
|
|
|
Building wxMSW port with Win32 MSys2 backend {#plat_msw_msys2}
|
|
|
|
------------------------------------------------
|
|
|
|
|
|
|
|
The MSys2 website is http://www.msys2.org/
|
|
|
|
|
|
|
|
These building steps are NOT the normal way to build MSys2 MinGW packages.
|
|
|
|
But, they are a way the wxWidgets developers can test that wxWidgets
|
|
|
|
can build the wxMSW libraries under MSys2 MinGW.
|
|
|
|
|
2021-05-08 12:58:54 -04:00
|
|
|
For the MSys2 way please see
|
|
|
|
https://github.com/msys2/MINGW-packages and
|
|
|
|
https://www.msys2.org/wiki/Creating-Packages/
|
2018-10-03 12:11:54 -04:00
|
|
|
|
|
|
|
Building steps:
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
A. Install the mingw32 packages needed to build wxMSW using the
|
2018-10-03 12:11:54 -04:00
|
|
|
configure/make build method.
|
2020-02-27 21:50:52 -05:00
|
|
|
From the MSys2 MinGW prompt:
|
2018-10-03 12:11:54 -04:00
|
|
|
|
|
|
|
pacman -S --needed --noconfirm make
|
2020-02-27 21:50:52 -05:00
|
|
|
pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-libjpeg-turbo
|
|
|
|
pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-libpng
|
|
|
|
pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-libtiff
|
|
|
|
pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-gcc
|
2018-10-03 12:11:54 -04:00
|
|
|
|
|
|
|
Packages that are needed but are normally installed already.
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-gcc-libs
|
|
|
|
pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-expat
|
|
|
|
pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-xz
|
|
|
|
pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-zlib
|
2018-10-03 12:11:54 -04:00
|
|
|
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
B. Build the wxMSW static library
|
2018-10-03 12:11:54 -04:00
|
|
|
1. Open MSys2 MinGW Prompt
|
2020-02-27 21:50:52 -05:00
|
|
|
(These steps were tested on MinGW64; but, should work under MinGW32)
|
2018-10-03 12:11:54 -04:00
|
|
|
2. Use the cd command to change directory to the wxWidgets top folder.
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
3. Create the "build-${MSYSTEM_CARCH}-msw-static" folder to build the static libraries
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
mkdir -p build-${MSYSTEM_CARCH}-msw-static
|
2018-10-03 12:11:54 -04:00
|
|
|
|
|
|
|
4. Configure wxWidgets
|
|
|
|
|
|
|
|
Option "--disable-precomp-headers" is NOT needed.
|
|
|
|
I am doing it to check for compile issues;
|
|
|
|
And, I think my old 32 bit Windows machine
|
|
|
|
works best with it disabled.
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static && \
|
2018-10-03 12:11:54 -04:00
|
|
|
../configure --with-msw \
|
|
|
|
--disable-shared \
|
|
|
|
--disable-precomp-headers \
|
|
|
|
&& cd ..
|
|
|
|
|
|
|
|
5. make the wxMSW static libraries
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static && make && cd ..
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
C. Build and run the minimal static sample
|
2018-10-03 12:11:54 -04:00
|
|
|
|
|
|
|
1. Clean the minimal sample
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static/samples/minimal && make clean && cd ../../..
|
2018-10-03 12:11:54 -04:00
|
|
|
|
|
|
|
2. Build the minimal sample
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static/samples/minimal && make && cd ../../..
|
2018-10-03 12:11:54 -04:00
|
|
|
|
|
|
|
3. Run the minimal sample
|
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
./build-${MSYSTEM_CARCH}-msw-static/samples/minimal/minimal.exe
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
D. Clean the static samples
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static/samples && make clean && cd ../..
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
E. Build and run the typetest static sample to verify MIME database works
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static/samples/typetest && make && cd ../../..
|
|
|
|
./build-${MSYSTEM_CARCH}-msw-static/samples/typetest/typetest.exe
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
F. Build and run the drawing static sample
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static/samples/drawing && make && cd ../../..
|
|
|
|
cd samples/drawing && ../../build-${MSYSTEM_CARCH}-msw-static/samples/drawing/drawing.exe && cd ../..
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
G. Build and run the splash static sample
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static/samples/splash && make && cd ../../..
|
|
|
|
cd samples/splash && ../../build-${MSYSTEM_CARCH}-msw-static/samples/splash/splash.exe && cd ../..
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
H. Build and run the widgets static sample
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static/samples/widgets && make && cd ../../..
|
|
|
|
cd samples/widgets && ../../build-${MSYSTEM_CARCH}-msw-static/samples/widgets/widgets.exe && cd ../..
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
I. Build all the rest of the static samples
|
2018-10-03 12:11:54 -04:00
|
|
|
|
2020-02-27 21:50:52 -05:00
|
|
|
cd build-${MSYSTEM_CARCH}-msw-static/samples && make && cd ../..
|