GTK+-2.14.6 / Win32 cross build environment on MacOS X

I also have to have GTK/Windows building environment… I have an old one on my MacBook, but I decided to make a new environment on my MacBook (with Leopard / Core2Duo processor) from scratch.
[ Prepare ]
Here’s what I’ve downloaded.
– MinGW runtime (mingwrt-3.15.1-mingw32.tar.gz)
– MinGW Win32 API (w32api-3.13-mingw32-dev.tar.gz)
– Win32 developer’s all-in-one bundle from GTK Website here.
– binutils-2.19.tar.bz2, gcc-core-4.2.4.tar.bz2, gcc-g++-4.2.4.tar.bz2
[ Unpack basic packages ]
% cd mingw
% tar xzf archives/mingwrt-3.15.1-mingw32.tar.gz
% tar xzf archives/w32api-3.13-mingw32-dev.tar.gz
[ Unpack GTK ]
% mkdir GTK
% cd GTK
% unzip ../archives/gtk+-bundle_2.14.6-20081216_win32.zip
Fix pkg-config .pc files for my directory configuration:
% cd GTK/lib/pkgconfig
% foreach i ( *.pc )
foreach? sed -e “/^prefix/c\\
prefix=/Users/yasu/mingw/GTK” -i \~ $i
foreach? end
[ build binutils ]
I did this at outside my mingw root.
% mkdir build-binutils-2.19
% cd build-binutils-2.19/
% ../binutils-2.19/configure –prefix=/Users/yasu/mingw –target=i386-pc-mingw32
% make && make install
[ build gcc + g++ ]
% mkdir build-gcc-4.2.4
% cd build-gcc-4.2.4
% ../gcc-4.2.4/configure –program-prefix=i386-pc-mingw32- –program-suffix=-4.2.4 –with-gcc –with-gnu-ld –with-gnu-as –target=i386-pc-mingw32 –prefix=/Users/yasu/mingw –enable-threads –disable-nls –enable-languages=c,c++ –disable-win32-registry –disable-shared –enable-sjis-exceptions –with-headers=/Users/yasu/mingw/include –with-libs=/Users/yasu/mingw/lib –with-build-time-tools=/Users/yasu/mingw/bin
% make && make install
This may require automake, autoconf and bison. I have them build with MacPorts.
I hope all these stuff work, but I’m not tested yet.

コメントを残す