Created
October 8, 2014 12:16
-
-
Save Quintus/b25cb52402b39c630a0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
General: | |
* NEVER use make’s -j option. It will crash (especially under 32-bit | |
Windows) without any meaningful error messages. This is a known bug | |
in MinGW’s MSYS-make (without any solution in sight). | |
* "~" is your MSYS home directory, usually C:\MinGW\msys\1.0\home\yourname. | |
--- | |
Main MinGW installation: | |
Download mingw-get from mingw.org. Add it to PATH, then: | |
> mingw-get install gcc g++ msys-base | |
$ /postinstall/pi.sh | |
$ exit | |
--- | |
* Install a proper editor! (Notepad++ probably?) | |
* Download precompiled CMake from cmake.org and install to ~/cmake. | |
* Download precompiled Ruby 7z file from rubyinstaller.org and install | |
to ~/ruby. | |
* Install precompiled python from python.org via MSI. Ensure you use | |
Python 2.x, NOT 3.x. | |
* OPTIONAL: Install precompiled subversion: http://sourceforge.net/projects/win32svn/ | |
Set PATH via ~/.profile: | |
export PATH="$HOME/cmake/bin:$HOME/ruby/bin:/c/Python27:$HOME/tsc-build/bin:$PATH" | |
Prepare GCC so it finds the new libraries without fiddling with CFLAGS | |
and such later. Add to ~/.profile: | |
--------------------- | |
# Make gcc find our local stuff | |
export C_INCLUDE_PATH=$HOME/tsc-build/include | |
export CPLUS_INCLUDE_PATH=$HOME/tsc-build/include:$HOME/tsc-build/boost/include/boost-1_56 | |
export LIBRARY_PATH=$HOME/tsc-build/lib:$HOME/tsc-build/boost/lib | |
--------------------- | |
Test: | |
$ mkdir tsc-build | |
$ cmake --version | |
$ ruby -v | |
$ python --version | |
$ echo LIBRARY_PATH | |
--- | |
Install necessary MinGW and MSYS packages: | |
$ mingw-get install msys-autoconf msys-autogen msys-automake msys-bison mingw32-libiconv | |
--- | |
Download TSC, extract, and read the README and INSTALL files. | |
$ cd /c/Users/xxx/Downloads | |
$ tar -xJf TSC-*.tar.xz | |
$ exit | |
README und INSTALL lesen. | |
======================================= | |
Installation of build tools and most basic libraries. | |
Install NASM: | |
http://www.nasm.us | |
$ ./configure --prefix=$HOME/tsc-build | |
$ make | |
$ make install | |
-- | |
install gperf: | |
www.gnu.org/software/gperf | |
$ ./configure --prefix=$HOME/tsc-build | |
$ make | |
$ make install | |
-- | |
install gettext: | |
http://www.gnu.org/software/gettext/ | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
-- | |
install zlib: | |
http://www.zlib.net | |
$ make -fwin32/Makefile.gcc | |
$ make -fwin32/Makefile.gcc install DESTDIR=$HOME/tsc-build/ INCLUDE_PATH=include LIBRARY_PATH=lib BINARY_PATH=bin | |
ACHTUNG! / am Ende von DESTDIR ist wichtig! | |
-- | |
install libffi: | |
http://sourceware.org/libffi/ | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
$ mv ~/tsc-build/lib/libffi-3.1/include/*.h ~/tsc-build/include/ | |
$ rmdir ~/tsc-build/lib/libffi-3.1/include | |
$ rmdir ~/tsc-build/lib/libffi-3.1 | |
-- | |
install glib: | |
* REQUIRES: | |
* gettext | |
* zlib | |
* libffi | |
* Python | |
http://www.gtk.org/download/win32.php | |
CAUTION! Use GTK3’s glib. | |
$ PYTHON=/c/Python27/python.exe LIBFFI_CFLAGS="-I$HOME/tsc-build/include" LIBFFI_LIBS="-lffi" ./configure --prefix=$HOME/tsc-build --disable-gtk-doc --disable-modular-tests --enable-static | |
$ make | |
$ make install | |
-- | |
install pkg-config: | |
* REQUIRES: | |
* glib | |
$ GLIB_CFLAGS="-I$HOME/tsc-build/include/glib-2.0 -I$HOME/tsc-build/lib/glib-2.0/include" GLIB_LIBS="-lglib-2.0 -lintl" ./configure --prefix=$HOME/tsc-build --with-pc-path=$HOME/tsc-build/lib/pkgconfig:/lib/pkgconfig:/usr/lib/pkgconfig | |
$ make | |
$ make install | |
-- | |
=================================== | |
BASIC ENVIRONMENT SETUP FINISHED | |
=================================== | |
MinGW already provides an OpenGL library (libopengl32.a). No need to install. | |
libpng | |
------ | |
http://www.libpng.org | |
$ ./configure --prefix=$HOME/tsc-build --enable-static --disable-shared | |
$ make | |
$ make install | |
GLEW | |
---- | |
http://glew.sourceforge.net | |
$ make GLEW_PREFIX=$HOME/tsc-build | |
$ make GLEW_PREFIX=$HOME/tsc-build GLEW_DEST=$HOME/tsc-build install | |
libPCRE | |
------- | |
http://www.pcre.org | |
$ ./configure --prefix=$HOME/tsc-build --enable-utf --enable-unicode-properties | |
$ make | |
$ make install | |
libxml2 | |
------- | |
http://www.xmlsoft.org | |
$ cd win32 | |
$ export CFLAGS="-DHAVE_STDINT_H" | |
$ cscript configure.js compiler=mingw prefix=$HOME/tsc-build static=yes | |
$ mkdir bin.mingw int.mingw int.a.mingw int.utils.mingw | |
$ make -f Makefile.mingw | |
$ make -f Makefile.mingw install | |
$ unset CFLAGS #<<<< IMPORTANT | |
$ cd .. | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ cp libxml-2.0.pc ~/tsc-build/lib/pkgconfig/ | |
If an interactive CMD prompt pops up (happens multiple times), issue | |
the command specified above and leave with "exit". | |
Example: | |
------------------------------------ | |
gcc.exe -Wl,--major-image-version,2 -Wl,--minor-image-version,9 -Wl,-L,bin.mingw -Wl,-L,C:/MinGW/msys/1.0/home/foo/tsc-build\lib -o bin.mingw/testThreadsWin32.exe int.utils.mingw/testThreadsWin32.o -llibxml2 -lwsock32 -lws2_32 -lwsock32 -lws2_32 -liconv -lkernel32 -L. | |
cmd.exe /C "if not exist C:/MinGW/msys/1.0/home/foo/tsc-build\include\libxml2 mkdir C:/MinGW/msys/1.0/home/foo/tsc-build\include\libxml2" | |
Microsoft Windows [Version 6.1.7601] | |
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten. | |
c:\Users\foo\Downloads\libxml\libxml2-2.9.1\win32>mkdir C:\MinGW\msys\1.0\home\foo\tsc-build\include\libxml2 | |
c:\Users\foo\Downloads\libxml\libxml2-2.9.1\win32> exit | |
------------------------------------ | |
Ensure your REPLACE the Slashes / with Backslashes \ in pathes. | |
libsigc++ | |
--------- | |
http://libsigc.sourceforge.net/ | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
glibmm | |
------ | |
Requires: | |
* libsigc++ | |
http://www.gtkmm.org | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
libxml++ | |
-------- | |
Requires: | |
* glibmm | |
* libxml2 | |
http://libxmlplusplus.sourceforge.net | |
$ ./configure --prefix=$HOME/tsc-build --enable-static --disable-shared | |
$ make | |
$ make install | |
freetype2 | |
--------- | |
http://freetype.sourceforge.net | |
$ cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=$HOME/tsc-build . | |
$ make | |
$ make install | |
SDL | |
--- | |
(Core SDL libraries) | |
http://libsdl.org | |
Do NOT use version 2, it is unsupported! Last 1.2 version is 1.2.15. | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
libjpeg-turbo | |
------------- | |
Requires: | |
* NASM | |
http://libjpeg-turbo.virtualgl.org/ | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
libtiff | |
------- | |
http://www.remotesensing.org/libtiff/ | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
SDL_image | |
--------- | |
Requires: | |
* libjpeg-turbo | |
* libtiff | |
http://libsdl.org/projects/SDL_image/release-1.2.html | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
libogg | |
------ | |
http://www.xiph.org/ogg/ | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
libvorbis | |
--------- | |
http://www.xiph.org/vorbis/ | |
Requires: | |
* libogg | |
$ ./configure --prefix=$HOME/tsc-build --enable-static | |
$ make | |
$ make install | |
libmikmod | |
--------- | |
http://mikmod.sourceforge.net | |
$ cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=$HOME/tsc-build . | |
$ make | |
$ make install | |
$ cp libmikmod.dll ~/tsc-build/bin | |
For whatever reason, libmikmod.dll is not automatically installed. | |
smpeg | |
----- | |
[[ OPTIONAL, see note on SDL_mixer below ]] | |
http://icculus.org/smpeg | |
For this, and only for this, subversion is needed because these guys | |
appear too stupid to provide a proper source tarball. | |
$ svn co svn://svn.icculus.org/smpeg/tags/release_0_4_5 smpeg | |
$ cd smpeg | |
$ ./autogen.sh | |
$ ./configure --prefix=$HOME/tsc-build --enable-static --disable-gtk-player --disable-gtktest --disable-opengl-player | |
$ make | |
$ make install | |
SDL_mixer | |
--------- | |
http://www.libsdl.org/projects/SDL_mixer/release-1.2.html | |
Requires: | |
* libvorbis | |
* libmikmod | |
* smpeg [OPTIONAL, no mp3 support without this] | |
It appears that SDL_mixer fails to build with smpeg on Windows, it can't | |
find the correct linking options and fails with lots of "undefined reference" | |
linking errors. Compiling without it results in an SDL_mixer library without | |
mp3 support. This is not needed for TSC anyway. | |
$ ./configure --prefix=$HOME/tsc-build --enable-static --disable-music-cmd | |
Apply this patch to the generated Makefile (removes the build of some | |
executables we do not need and that do not link): | |
=============================== | |
--- Makefile.org 2014-10-08 09:14:54 +0000 | |
+++ Makefile 2014-10-08 09:16:06 +0000 | |
@@ -47,7 +47,7 @@ | |
LT_REVISION = 0 | |
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) | |
-all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE) | |
+all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) | |
$(srcdir)/configure: $(srcdir)/configure.in | |
@echo "Warning, configure.in is out of date" | |
=============================== | |
SDL_ttf | |
------- | |
Requires: | |
* freetype2 | |
http://www.libsdl.org/projects/SDL_ttf | |
THIS MUST BE VERSION 2 FOR SDL VERSION 1.2! | |
SDL_ttf is developed separately from the rest of SDL it appears. | |
$ export CFLAGS="-I$HOME/tsc-build/include/freetype2 " | |
$ export LIBS="-lfreetype " | |
$ ./configure --prefix=$HOME/tsc-build --enable-static --with-freetype-prefix=$HOME/tsc-build | |
$ make | |
$ make install | |
$ unset CFLAGS LIBS #<<<< IMPORTANT! | |
FreeImage | |
--------- | |
http://freeimage.sourceforge.net | |
$ make -f Makefile.mingw FREEIMAGE_LIBRARY_TYPE=STATIC | |
$ cp Dist/FreeImage.h $HOME/tsc-build/include | |
$ cp Dist/libFreeImage.a $HOME/tsc-build/lib | |
CEGUI | |
----- | |
http://cegui.org.uk | |
Requires: | |
* FreeImage | |
* SDL + SDL_* libs | |
* freetype2 | |
$ export freetype2_CFLAGS="-I$HOME/tsc-build/include/freetype2 " | |
$ export freetype2_LIBS="-lfreetype " | |
$ ./configure --prefix=$HOME/tsc-build --enable-static --disable-shared --disable-samples | |
$ unset freetype2_CFLAGS freetype2_LIBS #<< IMPORTANT! | |
Boost | |
----- | |
http://boost.org | |
OMG SO MUCH. | |
$ cmd | |
> bootstrap.bat mingw | |
$ ./b2 prefix=$HOME/tsc-build/boost toolset=gcc | |
$ ./b2 prefix=$HOME/tsc-build/boost toolset=gcc install | |
==================================== | |
THE SECRET CHRONICLES. | |
==================================== | |
$ mkdir build | |
$ cd build | |
$ export CMAKE_INCLUDE_PATH=$CPLUS_INCLUDE_PATH | |
$ export CMAKE_LIBRARY_PATH=$LIBRARY_PATH | |
$ export CMAKE_PREFIX_PATH=$HOME/tsc-build:$HOME/tsc-build/boost | |
Edit mruby/mgems/mruby-pcre-regexp/mrbgem.rake and remove the "3" in "pcre3". | |
$ cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=$PWD/TESTINSTALL -DCMAKE_BUILD_TYPE=Debug .. | |
$ make | |
$ make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment