Difference between revisions of "Build Win32 Luanti including all required libraries"
Line 1: | Line 1: | ||
=Common= | =Common= | ||
− | == | + | ==CMake (Windows version) == |
− | You need to install | + | You need to install CMake for all versions. It is recommended to use the GUI. |
=Mingw32 build= | =Mingw32 build= |
Revision as of 20:27, 13 April 2014
Common
CMake (Windows version)
You need to install CMake for all versions. It is recommended to use the GUI.
Mingw32 build
mingw32 (tested 0.6.2-beta-20131004-1)
- select following packages:
- mingw32-base
- mingw32-gcc-g++
- msys-base
- mingw32-libz-dev
- mingw32-gettext-(dev/bin/dll)
- mingw32-iconv-(dev/bin/dll)
- msys-patch
- msys-w32api
- make sure C:\mingw\bin is in system path variable
Libidn 2.0.9 (dependency only for curl 7.36)
- extract package
- open msys console
- enter package path
./configure make make install
curl library (different versions)
curl-7.33.0
- extract package
- open msys console
- enter package path
./configure --prefix=/mingw --with-winssl --enable-ipv6 make
curl-7.36.0
- make sure you have libidn installed
- download and install Openssl sdk package 1.0.1g or newer
- open msys console
- add OPENSLL_PATH as environment variable pointed to openssl sdk build folder
export OPENSLL_PATH='C:\Program Files (x86)\OpenSSL-Win32'
- enter package path
./configure --prefix=/mingw --with-winssl --enable-ipv6 cd lib make -f Makefile.m32 SSL=1 IP6=1
gettext
use version from mingw
libogg-1.3.1
- extract package
- open msys console
- enter package path
./configure --prefix=/mingw make make install
libvorbis-1.3.3
- extract package
- open msys console
- enter package path
./configure --prefix=/mingw make make install
Luajit-2.0.2
- extract package
- open msys console
- enter package path
1) preparation: apply patch
diff -Naur LuaJIT-2.0.2/src/lib_package.c LuaJIT-2.0.2-old//src/lib_package.c --- LuaJIT-2.0.2/src/lib_package.c 2013-10-20 16:11:52 +0000 +++ LuaJIT-2.0.2-old//src/lib_package.c 2013-10-20 16:13:28 +0000 @@ -76,9 +76,8 @@ #ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2 -BOOL WINAPI GetModuleHandleExA(DWORD, LPCSTR, HMODULE*); #endif - +WINBASEAPI BOOL WINAPI GetModuleHandleExA(DWORD, LPCSTR, HMODULE*); #undef setprogdir static void setprogdir(lua_State *L)
2) build
make
zlib
use mingw version!
1) fix serialization.cpp to not set ZLIB_WINAPI in case of __MINGW32__ is defined
irrlicht engine (different versions)
directx sdk (tested with June 2010 version)
download direct x sdk from microsoft and install
irrlicht-1.8.1
download official sdk pack it contains precompiled builds
irrlicht-1.8
- extract package
1) edit irrlicht makefile
1.1) add directx sdk inc path to CXXINCS using -I"path"
1.2) add directx sdk lib path to CXXINCS using -L"path"
1.3) enable direct x by commenting the line with NO_IRR_COMPILE_WITH_DIRECT3D_9_
1.4) add -ldinput8 and -ldxguid to win32 LDFLAGS
1.4) replace -ld3dx9d by d3dx9
2) build
- open msys console
- enter package path
cd irrlicht-1.8/source/Irrlicht make win32 NDEBUG=1
irrlicht-1.7.3
- extract package
1) edit irrlicht makefile
1.1) add directx sdk inc path to CXXINCS using -I"path"
1.2) add directx sdk lib path to CXXINCS using -L"path"
1.3) enable direct x by commenting the line with NO_IRR_COMPILE_WITH_DIRECT3D_9_
1.4) add -ldinput8 and -ldxguid to win32 LDFLAGS
1.4) replace -ld3dx9d by d3dx9
1.5) remove -Wl,--no-export-all-symbols from LDFLAGS
1.6) open IrrCompileConfig.h in include folder and comment #define _IRR_COMPILE_WITH_DIRECT3D_8_
2) build
- open msys console
- enter package path
cd irrlicht-1.7.3/source/Irrlicht make win32 NDEBUG=1
libpng-1.6.10
Make sure you have installed libz-dev from mingw and downloaded libpng pack for linux (windows one don't contains ./configure file)
- extract package
- open msys console
- enter package path
./configure --prefix=/mingw --enable-shared make make install
freetype-2.5.3 (requires libpng)
- extract package
- open msys console
- enter package path
./configure --prefix=/mingw make make install
openal sdk
install official sdk 1.1
minetest
- run cmake and configure correctly
- open commandline and enter following command (if it fails check path, make sure mingw/bin is in there)
mingw32-make
Mingw64 Build
mingw64
download install
msys from mingw32
copy e.g. from mingw32 make sure path for you msys shell is set to mingw64 compiler!
TODO all other libs
VS2012 Build
Install VS Express 2012
- download from microsoft and install ;-)
Irrlicht 1.8
- open sln v11 file
- build release
libogg
- open sln v10 file
- convert
- build release
libvorbis
- open sln v10 file
- convert
- add libogg include path
- add libogg lib path
- build release (libvorbis/libvorbisfile)
luajit-2.0.2
- extract
- build (open vs2012 developer console)
cd src msvcbuild.bat
zlib-1.2.8
- extract
- navigate to the /contrib/masmx86 folder.
- Open the “bld_ml32.bat” file in a text editor.
- Add the “/safeseh” switch to both lines in that file (e.g. “ml /safeseh /coff /Zi /c /Flmatch686.lst match686.asm”).
- zLib uses a Version number declaration that can cause the build process to fail. To fix this, go back to the Solution Explorer, then navigate to zlibvc -> zlibvc.def. Double-click to open.
- Change the line that reads “VERSION 1.2.8″ to read “VERSION 1.28″.
- edit iowin32.c comment line "#define IOWIN32_USING_WINRT_API 1"
curl-7.33.0
- extract
- build
cd winbuild nmake /f Makefile.vc mode=dll ENABLE_WINSSL=yes ENABLE_IPV6=yes
- your new build as well as headers is in builds subfolder
freetype-2.5.0
- extract
- open solution in builds\win32\vc2010
- convert
- switch "Configuration type" to "dynamic link library"
- change target extension
- open include/freetype/config/ftconfig.h
- add following lines in MSVC block
#define FT_EXPORT(x) __declspec(dllexport) x #define FT_BASE(x) __declspec(dllexport) x
- build release
gettext (requires libiconv)
use official gnu gettext 0.13.1 win32 build
libiconv
use official gnu libiconv 1.9.1 win32 build
minetest
- run cmake gui and configure correctly
- open msvc developer console and enter mintest base path
msbuild minetest.sln /p:Configuration=Release /t:Clean,Build