Difference between revisions of "How to install CEGUI 0.8.4 With MinGW"
m |
m |
||
Line 8: | Line 8: | ||
<br> | <br> | ||
In the pngwin.def at <dependencies_source_root>/src/libpng-1.4.7/scripts,<br> | In the pngwin.def at <dependencies_source_root>/src/libpng-1.4.7/scripts,<br> | ||
− | At Line 5, | + | At Line 5, modify LIBRARY to LIBRARY libpng. libpng is the missing library name.<br> |
<br> | <br> | ||
In the devil_internal_exports.h at <dependencies_source_root>/src/devil-1.7.8/include/IL,<br> | In the devil_internal_exports.h at <dependencies_source_root>/src/devil-1.7.8/include/IL,<br> | ||
Line 18: | Line 18: | ||
If Cmake have worked successfully, you can see the Makefile at the target binary directory you choose.<br> | If Cmake have worked successfully, you can see the Makefile at the target binary directory you choose.<br> | ||
Build it.<br> | Build it.<br> | ||
− | You | + | You can find the built dependencies at <dependencies_binary_root>/dependencies.<br> |
<br> | <br> | ||
Third, you build the CEGUI.<br> | Third, you build the CEGUI.<br> | ||
− | Move the dependencies directory where you built dependencies from <dependencies_binary_root> to <cegui_source_root>.<br> | + | Move the dependencies directory where you built the dependencies from <dependencies_binary_root> to <cegui_source_root>.<br> |
<br> | <br> | ||
You also need to modify some files.<br> | You also need to modify some files.<br> | ||
Line 32: | Line 32: | ||
This library is needed for the build of MiniZipResourceProvider.<br> | This library is needed for the build of MiniZipResourceProvider.<br> | ||
<br> | <br> | ||
− | And to solve the C++ mangling problem, you have to remake an import library | + | And to solve the C++ mangling problem, you have to remake an import library for libxerces-c_3.dll.<br> |
To do this,<br> | To do this,<br> | ||
1.Export the .def file from libxerces-c_3.dll at <cegui_source_root>/dependencies/bin.<br> | 1.Export the .def file from libxerces-c_3.dll at <cegui_source_root>/dependencies/bin.<br> | ||
Line 50: | Line 50: | ||
<br> | <br> | ||
Then, you launch cmake-gui, click configure, select the MinGW Makefiles generator, uncheck CEGUI_BUILD_RENDERER_OPENGL3, reconfigure and generate.<br> | Then, you launch cmake-gui, click configure, select the MinGW Makefiles generator, uncheck CEGUI_BUILD_RENDERER_OPENGL3, reconfigure and generate.<br> | ||
− | You should choose the target binary directory same as the source directory, because the reference to datafiles | + | You should choose the target binary directory same as the source directory, because the reference to datafiles is fixed to the source directory.<br> |
If Cmake have worked successfully, you can see the Makefile at the target binary directory you choose.<br> | If Cmake have worked successfully, you can see the Makefile at the target binary directory you choose.<br> | ||
Build it.<br> | Build it.<br> | ||
− | You | + | You can find built cegui-libraries at <cegui_binary_root>/bin.<br> |
Copy the dll files at <cegui_source_root>/dependencies/bin to this directory.<br> | Copy the dll files at <cegui_source_root>/dependencies/bin to this directory.<br> | ||
<br> | <br> | ||
Finally, launch CEGUISampleFramework-0.8.<br> | Finally, launch CEGUISampleFramework-0.8.<br> | ||
− | If you have successfully built all the things, you may enjoy a bunch of cegui | + | If you have successfully built all the things, you may enjoy a bunch of cegui demos.<br> |
Congratulations!<br> | Congratulations!<br> | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Revision as of 02:22, 26 October 2014
First, you need to download the CEGUI source package and its dependencies from The Official Site.
You also need to download and install CMake binary from here.
Second, you build the dependencies.
Build of the D3DX11 package is currently not supported. Moreover, this version of DirectX is deprecated.
You had better avoid using these features if possible.
Patch a few to build all packages successfully except for D3DX11.
In the pngwin.def at <dependencies_source_root>/src/libpng-1.4.7/scripts,
At Line 5, modify LIBRARY to LIBRARY libpng. libpng is the missing library name.
In the devil_internal_exports.h at <dependencies_source_root>/src/devil-1.7.8/include/IL,
At Line 29, change the definition of INLINE from external inline to static inline.
By this change, you can avoid some multiple definition error.
Then, you launch cmake-gui, click configure, select the MinGW Makefiles generator,
check all options except for CEGUI_BUILD_EFFECTS11 and CEGUI_GNUtoMS, configure again and generate.
If Cmake have worked successfully, you can see the Makefile at the target binary directory you choose.
Build it.
You can find the built dependencies at <dependencies_binary_root>/dependencies.
Third, you build the CEGUI.
Move the dependencies directory where you built the dependencies from <dependencies_binary_root> to <cegui_source_root>.
You also need to modify some files.
In the CMakeLists.txt at <cegui_source_root>/cegui/src,
Between Line 84 and Line 85, you have to add
if(MINGW)
target_link_libraries(${CEGUI_TARGET_NAME} <mingw_root>/lib/libshlwapi.a)
endif ()
This library is needed for the build of MiniZipResourceProvider.
And to solve the C++ mangling problem, you have to remake an import library for libxerces-c_3.dll.
To do this,
1.Export the .def file from libxerces-c_3.dll at <cegui_source_root>/dependencies/bin.
2.Modify the exported .def file.
3.Remake an import library from modified .def file.
4.Replace the libxerces-c_3.dll.a at <cegui_source_root>/dependencies/lib/dynamic/ with the new import library.
For example, with the built-in MinGW dlltool,
1.Run dlltool --export-all-symbols libxerces-c_3.dll -z temp.txt
2.Edit the temp.txt.
At Line 6919, modify _ZN11xercesc_3_19XMLString7releaseEPPwPNS_13MemoryManagerE to _ZN11xercesc_3_19XMLString7releaseEPPtPNS_13MemoryManagerE = _ZN11xercesc_3_19XMLString7releaseEPPwPNS_13MemoryManagerE.
At Line 6977, modify _ZN11xercesc_3_19XMLString9transcodeEPKwPNS_13MemoryManagerE to _ZN11xercesc_3_19XMLString9transcodeEPKtPNS_13MemoryManagerE = _ZN11xercesc_3_19XMLString9transcodeEPKwPNS_13MemoryManagerE.
3.Run dlltool -d temp.txt -l libxerces-c_3.dll.a.
4.Replace.
This problem occurs because the number of User-defined types is different between CEGUI and its dependencies.
Then, you launch cmake-gui, click configure, select the MinGW Makefiles generator, uncheck CEGUI_BUILD_RENDERER_OPENGL3, reconfigure and generate.
You should choose the target binary directory same as the source directory, because the reference to datafiles is fixed to the source directory.
If Cmake have worked successfully, you can see the Makefile at the target binary directory you choose.
Build it.
You can find built cegui-libraries at <cegui_binary_root>/bin.
Copy the dll files at <cegui_source_root>/dependencies/bin to this directory.
Finally, launch CEGUISampleFramework-0.8.
If you have successfully built all the things, you may enjoy a bunch of cegui demos.
Congratulations!