This is a guide about compiling GrafX2 for Windows using a Linux (Debian Strecth) system and mingw. It may be useful for continuous integration, where Windows running CI slaves are not always an option.
Install dependencies
apt install \ libz-mingw-w64 \ libz-mingw-w64-dev \ binutils-mingw-w64-i686 \ gcc-mingw-w64-base \ mingw-w64-common \ mingw-w64-i686-dev \ gcc-mingw-w64-i686 \ mingw-w64-tools \ win-iconv-mingw-w64-dev
Build more dependencies
Some of our dependencies are not available in Debian repos. So we must build them ourselves.
libpng
wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.29.tar.gz tar xvf libpng-1.6.29.tar.gz cd libpng-1.6.29 ./configure --host=i686-w64-mingw32 --prefix=/usr/local/cross-tools/i386-mingw32/ make sudo make install
freetype
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gz tar xvf freetype-2.7.1.tar.gz cd freetype-2.7.1 ./configure --host=i686-w64-mingw32 --prefix=/usr/local/cross-tools/i386-mingw32/ make sudo make install
SDL
wget http://libsdl.org/release/SDL-1.2.15.tar.gz tar xvf SDL-1.2.15.tar.gz cd SDL-1.2.15 ./configure --host=i686-w64-mingw32 make sudo make install
SDL-image
wget https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz tar xvf SDL_image-1.2.12.tar.gz cd SDL_image-1.2.12 export PKG_CONFIG_PATH=/usr/local/cross-tools/i386-mingw32/lib/pkgconfig/ ./configure --host=i686-w64-mingw32 --with-sdl-prefix=/usr/local/cross-tools/i386-mingw32 make sudo make install
SDL_ttf
wget https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz tar xvf SDL_ttf-2.0.11.tar.gz cd SDL_ttf-2.0.11 ./configure --host=i686-w64-mingw32 --with-sdl-prefix=/usr/local/cross-tools/i386-mingw32/ --with-freetype-prefix=/usr/local/cross-tools/i386-mingw32 make sudo make install
Do the build
make WIN32CROSS=1
The output is ../bin/grafx2.exe. It may need some extra DLLs. You can test it with wine32, it should run just fine.
Last modified
7 years ago
Last modified on May 7, 2017, 2:22:28 PM
Note:
See TracWiki
for help on using the wiki.