NetBeans v6.0 C/C++ and Dependencies from Source
Posted: Fri Jan 04, 2008 06:44
There are many C/C++ programming environment. Here's yet another but it does not yet compile Cegui. This first post will contain the steps I've taken so far; it'll be updated as solutions are found.
Note that I'm specifying my personal directories rather than generic directories. This allows me to more easily relay the information. Once the complete solution is found a nicer document will be presented.
Netbeans
Read the C/C++ Application Learning Trail to activate C/C++ within Netbeans. It contains links to download the latest version of Netbeans as well as all the necessary steps to activate the C/C++ module. You must be able to compile a simple "Hello World" or the "Welcome" project from "File > New Project > Samples > C/C++ > C/C++ > Welcome" within Netbeans before moving to the next step.
Create a project group
From the Netbeans menu: File > Project Group > New Group
Specify the Name: Cegui Dependencies
Select the "Free Group" option
Uncheck the option:
* Use currently Open Projects
Freeglut
SVN checkout into the directory: "C:\Programming\Libraries\freeglut"
https://freeglut.svn.sourceforge.net/sv ... t/freeglut
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "freeglut_static"
* Specify the Project Location: "C:\Programming\Libraries\freeglut\netbeans"
Right click on "Header Files"
* Select "New Logical Folder" and name it "gl"
Right click on "gl"
* Select "Add existing item..."
* add every *.h from within
* "C:\Programming\Libraries\freeglut\include\gl"
* "C:\Programming\Libraries\freeglut\include\src"
Right click on "Source Files" and select "Add existing item..."
* add every *.c from within
* "C:\Programming\Libraries\freeglut\include\src"
Right click on "freeglut_static" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../include"
* Specify the Preprocessor Definitions: "_DEBUG FREEGLUT_STATIC _WIN32 _LIB"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libfreeglut_d.a"
Right click on "freeglut_static" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../include"
* Specify the Preprocessor Definitions: "NDEBUG FREEGLUT_STATIC _WIN32 _LIB"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libfreeglut.a"
Freetype
Download Freetype
Extract into "C:\Programming\Libraries" resulting in "C:\Programming\Libraries\freetype-2.3.5"
Rename "freetype-2.3.5" to "freetype"
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "freetype"
* Specify the Project Location: "C:\Programming\Libraries\freetype\netbeans"
Right click on "Header Files"
* Select "Add existing items from folders" and select "C:\Programming\Libraries\freetype\include"
Right click on ""
* Select "Add existing item..."
* add every *.h from within
* "C:\Programming\Libraries\freeglut\include\gl"
* "C:\Programming\Libraries\freeglut\include\src"
Right click on "Source Files" and select "Add existing item..."
* add the following items from the "C:\Programming\Libraries\freetype\src" directory
* autofit/autofit.c
* base/ftbase.c
* base /ftbitmap.c
* base/ftdebug.c
* base/ftgasp.c
* base/ftglyph.c
* base/ftinit.c
* base/ftstroke.c
* base/ftsystem.c
* bdf/bdf.c
* cache/ftcache.c
* cff/cff.c
* gzip/ftgzip.c
* lzw/ftlzw.c
* smooth/smooth.c
Right click on "Source Files"
* Select "New Logical Folder" and name it "FT_MODULES"
Right click on "FT_MODULES" and select "Add existing item..."
* add the following items from the "C:\Programming\Libraries\freetype\src" directory
* base/ftbbox.c
* base/ftmm.c
* base/ftpfr.c
* base/ftsynth.c
* base/fttype1.c
* base/ftwinfnt.c
* cid/type1cid.c
* pcf/pcf.c
* pfr/pfr.c
* psaux/psaux.c
* pshinter/pshinter.c
* psnames/psmodule.c
* raster/raster.c
* sfnt/sfnt.c
* truetype/truetype.c
* type1/type1.c
* type42/type42.c
* winfonts/winfnt.c
Right click on "freetype" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../include"
* Specify the Preprocessor Definitions: "_DEBUG _WIN32 _LIB FT_DEBUG_LEVEL_ERROR FT_DEBUG_LEVEL_TRACE FT2_BUILD_LIBRARY"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libfreetype_d.a"
Right click on "freetype" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../include"
* Specify the Preprocessor Definitions: "NDEBUG _WIN32 _LIB FT2_BUILD_LIBRARY"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libfreetype.a"
PCRE
Download PCRE
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\pcre-7.4"
rename "pcre-7.4" to "pcre"
Netbeans
* File > New Project > C/C++ > C/C++ Project From Existing Code
* Press the Next button until step 2. Build Tool
* Select the "Using a makefile generated by a 'configure' script" option
* Specify the Configure Script "C:\Programming\Libraries\pcre\configure"
* Press the Next button until step 3. Build Actions
* Specify the Working Directory "C:\Programming\Libraries\pcre"
* Press the Next button until step 4. Source Files
* Ensure that the currently specified folder is "C:\Programming\Libraries\pcre"
* Press the Next button until step 5. Code Assistance Configuration
* Add the "C:\Programming\Libraries\pcre" folder
* Press the Next button until step 6. Project Name and Location
* Specify the Project Name "pcre"
* Specify the Project Location "C:\Programming\Libraries\pcre\Netbeans"
* Let Netbeans finish parsing the project
* Right-click on the "pcre" project and select "Clean and Build"
The static library "libpcre.a" has been placed within "C:\Programming\Libraries\pcre\.libs"
copy "libpcre.a" to "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib"
Todo: build a debug version
Lua
Download Lua
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\lua-5.1.2"
rename "lua-5.1.2" to "lua"
Netbeans
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "lua"
* Specify the Project Location: "C:\Programming\Libraries\lua\Netbeans"
Right click on "Header Files"
* Select "Add existing item..."
* add every *.h from within "C:\Programming\Libraries\lua\src"
Right click on "Source Files" and select "Add existing item..."
* add the following items from the "C:\Programming\Libraries\lua\src" directory
* lapi.c
* lauxlib.c
* lbaselib.c
* lcode.c
* ldblib.c
* ldebug.c
* ldo.c
* ldump.c
* lfunc.c
* lgc.c
* linit.c
* liolib.c
* llex.c
* lmathlib.c
* lmem.c
* loadlib.c
* lobject.c
* lopcodes.c
* loslib.c
* lparser.c
* lstate.c
* lstring.c
* lstrlib.c
* ltable.c
* ltablib.c
* ltm.c
* lundump.c
* lvm.c
* lzio.c
Right click on "lua" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../src"
* Specify the Preprocessor Definitions: "_DEBUG _WIN32 _LIB LUA_BUILD_AS_DLL"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/liblua_d.a"
Right click on "freetype" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../src"
* Specify the Preprocessor Definitions: "NDEBUG _WIN32 _LIB LUA_BUILD_AS_DLL"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/liblua.a"
toLua++
Download toLua++
Not yet
Jpeglib
Download JpegLib
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\jpeg-6b"
rename "jpeg-6b" to "jpeg"
Netbeans
* File > New Project > C/C++ > C/C++ Project From Existing Code
* Select the "Using a makefile generated by a 'configure' script" option
* Specify the Configure Script "C:\Programming\Libraries\jpeg\configure"
* Press the Next button until step 3. Build Actions
* Specify the Working Directory "C:\Programming\Libraries\jpeg"
* Press the Next button until step 4. Source Files
* Ensure that the currently specified folder is "C:\Programming\Libraries\jpeg"
* Press the Next button until step 5. Code Assistance Configuration
* Add the "C:\Programming\Libraries\jpeg" folder
* Press the Next button until step 6. Project Name and Location
* Specify the Project Name "Jpeg"
* Specify the Project Location "C:\Programming\Libraries\jpeg\Netbeans"
* Let Netbeans finish parsing the project
* Right-click on the "pcre" project and select "Clean and Build"
The static library "libjpeg.a" has been placed within "C:\Programming\Libraries\jpeg"
copy "libjpeg.a" to "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib"
Todo: build a debug version
zlib
Download zlib
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\zlib-1.2.3"
Rename "zlib-1.2.3" to "zlib"
Netbeans
* File > New Project > C/C++ > C/C++ Project From Existing Code
* Select the "Using a makefile generated by a 'configure' script" option
* Specify the Configure Script "C:\Programming\Libraries\zlib\configure"
* Press the Next button until step 3. Build Actions
* Specify the Working Directory "C:\Programming\Libraries\zlib"
* Press the Next button until step 4. Source Files
* Ensure that the currently specified folder is "C:\Programming\Libraries\zlib"
* Press the Next button until step 5. Code Assistance Configuration
* Add the "C:\Programming\Libraries\zlib" folder
* Press the Next button until step 6. Project Name and Location
* Specify the Project Name "zlib"
* Specify the Project Location "C:\Programming\Libraries\zlib\Netbeans"
* Let Netbeans finish parsing the project
* Right-click on the "zlib" project and select "Clean and Build"
The static library "libz.a" has been placed within "C:\Programming\Libraries\zlib"
copy "libz.a" to "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib"
Todo: build a debug version
libpng
Download libpng
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\libpng-1.2.24"
rename "libpng-1.2.24" to "libpng"
Netbeans
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "libpng"
* Specify the Project Location: "C:\Programming\Libraries\libpng\Netbeans"
Right click on "Header Files"
* Select "Add existing item..."
* add the following items from within "C:\Programming\Libraries\libpng"
* png.h
* pngconf.h
Right click on "Source Files" and select "Add existing item..."
* add the following items from "C:\Programming\Libraries\libpng"
* png.c
* pngerror.c
* pngget.c
* pnggmem.c
* pngpread.c
* pngread.c
* pngrio.c
* pngrtran.c
* pngrutil.c
* pngset.c
* pngtrans.c
* pngwio.c
* pngwrite.c
* pngwtran.c
* pngwutil.c
Right click on "libpng" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../..;../../../zlib"
* Specify the Preprocessor Definitions: "_WIN32 _DEBUG DEBUG PNG_NO_MMX_CODE PNG_DEBUG=1 _CRT_SECURE_NO_WARNINGS"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libpng_d.a"
Right click on "libpng" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../..;../../../zlib"
* Specify the Preprocessor Definitions: "PNG_NO_MMX_CODE _WIN32 NDEBUG _CRT_SECURE_NO_WARNINGS"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libpng.a"
Expat
http://sourceforge.net/project/download ... uperb-west
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\expat-2.0.1"
Rename "expat-2.0.1" to "expat"
Netbeans
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "expat"
* Specify the Project Location: "C:\Programming\Libraries\expat\Netbeans"
Right click on "Header Files"
* Select "Add existing item..."
* add the following items from within "C:\Programming\Libraries\expat\lib"
* ascii.h
* asciitab.h
* expat.h
* expat_external.h
* iasciitab.h
* internal.h
* latin1tab.h
* nametab.h
* utf8tab.h
* xmlrole.h
* xmltok.h
* xmltok_impl.h
Right click on "Source Files" and select "Add existing item..."
* add the following items from "C:\Programming\Libraries\expat\lib"
* xmlparse.c
* xmlrole.c
* xmltok.c
* xmltok_impl.c
* xmltok_ns.c
Right click on "expat" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../lib"
* Specify the Preprocessor Definitions: "_WIN32 _DEBUG _WINDOWS COMPILED_FROM_DSP _LIB"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/expat_d.a"
Right click on "expat" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../lib"
* Specify the Preprocessor Definitions: "_WIN32 _WINDOWS NDEBUG _LIB COMPILED_FROM_DSP"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/expat.a"
CEGUI
Get Cegui HEAD from SVN into "C:\Programming\CEGUI\cegui_mk2\"
https://crayzedsgui.svn.sourceforge.net ... _mk2/trunk
Download dependencies
Extract into "C:\Programming\CEGUI\" resulting in "C:\Programming\CEGUI\cegui_mk2\dependencies"
Take care not to overwrite the files we've already placed in there. Eventually every dependency will be rebuild, removing the need for downloading the dependency. Ideally a Visual Studio/Netbean/Code Block solution/project would ease the pain of building dependencies from scratch.
* Rename "C:\Programming\CEGUI\cegui_mk2" to "C:\Programming\CEGUI\CEGUI_head_netbeans"
* Edit C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\config.lua
* Remove the DirectX renderers
* Remove the Silly image codec
* Change the DEFAULT_IMAGE_CODEC to "tga"
*Create the file "C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\build_gnu.bat" with content:
premake --file cegui.lua --target gnu
pause
*Execute "C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\build_gnu.bat"
*Copy "C:\Programming\CEGUI\Silly_head\include\SILLYOptions.h" to "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\include"
Netbeans
* File > New Project > C/C++ > C/C++ Project From Existing Code
* Select the "Using an existing makefile" option
* Specify Existing Makefile "C:/Programming/CEGUI/CEGUI_head_netbeans/makefiles/premake/Makefile"
* Press the Next button until step 3. Build Actions
* Specify the Working Directory "C:/Programming/CEGUI/CEGUI_head_netbeans/makefiles/premake"
* Press the Next button until step 4. Source Files
* Remove the currently specified folder
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\include" folder
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\src" folder
* Press the Next button until step 5. Code Assistance Configuration
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\include" folder
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\include" folder
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\Samples\common\include" folder
* (maybe not) Add the "C:\Programming\Gnu\cygwin\usr\include\mingw" folder
* Press the Next button until step 6. Project Name and Location
* Specify the Project Name "cegui"
* Specify the Project Location "C:\Programming\CEGUI\CEGUI_head_netbeans\Netbeans"
* Modify CEGUIDynamicModule.h as described in: http://www.cegui.org.uk/phpBB2/viewtopi ... 2976#12976
* Modify CEGUIBase.h such that
becomes:
* Modify CEGUISingleton.h such that
becomes:
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\ScriptingModules\CEGUILua\LuaScriptModule\src
line 8384
becomes
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\RendererModules\directx9GUIRenderer\d3d9renderer.cppbecome
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\Samples\common\srcbecomes
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\Samples\common\src\Sample_Demo4.cpp
* Add: #include "CEGUIDefaultResourceProvider.h"
* Add within bool Demo4Sample::initialiseSample(), after using namespace CEGUI;
* Temporary change:
* Copy libpng.a to depenedencies\lib\png.lib
* Copy libjpg.a to depenedencies\lib\jpg.lib
* Copy libz.a to depenedencies\lib\z.lib
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\ImageCodecModules\SILLYImageCodec\makefile
* Append "-ljpeg -lpng -z" to LDFLAGS
* Temporary change:
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\RendererModules\DirectX9GUIRenderer\makefile
* Append to CPPFLAGS: -I "C:\Program Files\Microsoft Visual Studio 8\DirectxSDK\Include"
* Append to LDFLAGS: -L"C:\Program Files\Microsoft Visual Studio 8\DirectxSDK\Lib\x86"
* Temporary changes
* Add "-lglut" to LDFLAGS in "C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\Samples\common\makefile"
* Comment line 151 in "C:\Programming\CEGUI\CEGUI_head_netbeans\Samples\common\src\CEGuiOpenGLBaseApplication.cpp"
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\RendererModules\DirectX9GUIRenderer\premake.lua
* Add library("uuid")
* Let Netbeans finish parsing the project
* Right-click on the "CEGUI_head_netbeans" project and select "Clean and Build"
* Copy from "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\bin" to "C:\Programming\CEGUI\CEGUI_head_netbeans\bin"
* freeglut.dll
* freeglut_d.dll
* Copy to "C:\Programming\CEGUI\CEGUI_head_netbeans\bin"
* glut32.dll (was already on my C: drive)
* Temporarily fake "release" versions of the following by renaming
* CEGUITGAImageCodec_d.dll to CEGUITGAImageCodec.dll
* CEGUIExpatParser_d.dll to CEGUIExpatParser.dll
* CEGUIFalagardWRBase_d.dll to CEGUIFalagardWRBase.dll
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\Samples\common\premake.lua
* Copy C:/Programming/Gnu/cygwin/lib/w32api/libwinmm.a to C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib\libwinmm.a
* Copy library("C:/Programming/Gnu/cygwin/lib/w32api/winmm.a", "")
* library C:/Programming/Gnu/cygwin/lib/w32api/libgdi32.a to C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib\libgdi32.lib
* Add to the section: "if OPENGL_RENDERER and SAMPLES_GL then", below "library("freeglut", "_d")"
* library("winmm", "")
* library("gdi32", "")
Note that I'm specifying my personal directories rather than generic directories. This allows me to more easily relay the information. Once the complete solution is found a nicer document will be presented.
Netbeans
Read the C/C++ Application Learning Trail to activate C/C++ within Netbeans. It contains links to download the latest version of Netbeans as well as all the necessary steps to activate the C/C++ module. You must be able to compile a simple "Hello World" or the "Welcome" project from "File > New Project > Samples > C/C++ > C/C++ > Welcome" within Netbeans before moving to the next step.
Create a project group
From the Netbeans menu: File > Project Group > New Group
Specify the Name: Cegui Dependencies
Select the "Free Group" option
Uncheck the option:
* Use currently Open Projects
Freeglut
SVN checkout into the directory: "C:\Programming\Libraries\freeglut"
https://freeglut.svn.sourceforge.net/sv ... t/freeglut
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "freeglut_static"
* Specify the Project Location: "C:\Programming\Libraries\freeglut\netbeans"
Right click on "Header Files"
* Select "New Logical Folder" and name it "gl"
Right click on "gl"
* Select "Add existing item..."
* add every *.h from within
* "C:\Programming\Libraries\freeglut\include\gl"
* "C:\Programming\Libraries\freeglut\include\src"
Right click on "Source Files" and select "Add existing item..."
* add every *.c from within
* "C:\Programming\Libraries\freeglut\include\src"
Right click on "freeglut_static" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../include"
* Specify the Preprocessor Definitions: "_DEBUG FREEGLUT_STATIC _WIN32 _LIB"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libfreeglut_d.a"
Right click on "freeglut_static" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../include"
* Specify the Preprocessor Definitions: "NDEBUG FREEGLUT_STATIC _WIN32 _LIB"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libfreeglut.a"
Freetype
Download Freetype
Extract into "C:\Programming\Libraries" resulting in "C:\Programming\Libraries\freetype-2.3.5"
Rename "freetype-2.3.5" to "freetype"
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "freetype"
* Specify the Project Location: "C:\Programming\Libraries\freetype\netbeans"
Right click on "Header Files"
* Select "Add existing items from folders" and select "C:\Programming\Libraries\freetype\include"
Right click on ""
* Select "Add existing item..."
* add every *.h from within
* "C:\Programming\Libraries\freeglut\include\gl"
* "C:\Programming\Libraries\freeglut\include\src"
Right click on "Source Files" and select "Add existing item..."
* add the following items from the "C:\Programming\Libraries\freetype\src" directory
* autofit/autofit.c
* base/ftbase.c
* base /ftbitmap.c
* base/ftdebug.c
* base/ftgasp.c
* base/ftglyph.c
* base/ftinit.c
* base/ftstroke.c
* base/ftsystem.c
* bdf/bdf.c
* cache/ftcache.c
* cff/cff.c
* gzip/ftgzip.c
* lzw/ftlzw.c
* smooth/smooth.c
Right click on "Source Files"
* Select "New Logical Folder" and name it "FT_MODULES"
Right click on "FT_MODULES" and select "Add existing item..."
* add the following items from the "C:\Programming\Libraries\freetype\src" directory
* base/ftbbox.c
* base/ftmm.c
* base/ftpfr.c
* base/ftsynth.c
* base/fttype1.c
* base/ftwinfnt.c
* cid/type1cid.c
* pcf/pcf.c
* pfr/pfr.c
* psaux/psaux.c
* pshinter/pshinter.c
* psnames/psmodule.c
* raster/raster.c
* sfnt/sfnt.c
* truetype/truetype.c
* type1/type1.c
* type42/type42.c
* winfonts/winfnt.c
Right click on "freetype" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../include"
* Specify the Preprocessor Definitions: "_DEBUG _WIN32 _LIB FT_DEBUG_LEVEL_ERROR FT_DEBUG_LEVEL_TRACE FT2_BUILD_LIBRARY"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libfreetype_d.a"
Right click on "freetype" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../include"
* Specify the Preprocessor Definitions: "NDEBUG _WIN32 _LIB FT2_BUILD_LIBRARY"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libfreetype.a"
PCRE
Download PCRE
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\pcre-7.4"
rename "pcre-7.4" to "pcre"
Netbeans
* File > New Project > C/C++ > C/C++ Project From Existing Code
* Press the Next button until step 2. Build Tool
* Select the "Using a makefile generated by a 'configure' script" option
* Specify the Configure Script "C:\Programming\Libraries\pcre\configure"
* Press the Next button until step 3. Build Actions
* Specify the Working Directory "C:\Programming\Libraries\pcre"
* Press the Next button until step 4. Source Files
* Ensure that the currently specified folder is "C:\Programming\Libraries\pcre"
* Press the Next button until step 5. Code Assistance Configuration
* Add the "C:\Programming\Libraries\pcre" folder
* Press the Next button until step 6. Project Name and Location
* Specify the Project Name "pcre"
* Specify the Project Location "C:\Programming\Libraries\pcre\Netbeans"
* Let Netbeans finish parsing the project
* Right-click on the "pcre" project and select "Clean and Build"
The static library "libpcre.a" has been placed within "C:\Programming\Libraries\pcre\.libs"
copy "libpcre.a" to "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib"
Todo: build a debug version
Lua
Download Lua
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\lua-5.1.2"
rename "lua-5.1.2" to "lua"
Netbeans
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "lua"
* Specify the Project Location: "C:\Programming\Libraries\lua\Netbeans"
Right click on "Header Files"
* Select "Add existing item..."
* add every *.h from within "C:\Programming\Libraries\lua\src"
Right click on "Source Files" and select "Add existing item..."
* add the following items from the "C:\Programming\Libraries\lua\src" directory
* lapi.c
* lauxlib.c
* lbaselib.c
* lcode.c
* ldblib.c
* ldebug.c
* ldo.c
* ldump.c
* lfunc.c
* lgc.c
* linit.c
* liolib.c
* llex.c
* lmathlib.c
* lmem.c
* loadlib.c
* lobject.c
* lopcodes.c
* loslib.c
* lparser.c
* lstate.c
* lstring.c
* lstrlib.c
* ltable.c
* ltablib.c
* ltm.c
* lundump.c
* lvm.c
* lzio.c
Right click on "lua" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../src"
* Specify the Preprocessor Definitions: "_DEBUG _WIN32 _LIB LUA_BUILD_AS_DLL"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/liblua_d.a"
Right click on "freetype" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../src"
* Specify the Preprocessor Definitions: "NDEBUG _WIN32 _LIB LUA_BUILD_AS_DLL"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/liblua.a"
toLua++
Download toLua++
Not yet
Jpeglib
Download JpegLib
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\jpeg-6b"
rename "jpeg-6b" to "jpeg"
Netbeans
* File > New Project > C/C++ > C/C++ Project From Existing Code
* Select the "Using a makefile generated by a 'configure' script" option
* Specify the Configure Script "C:\Programming\Libraries\jpeg\configure"
* Press the Next button until step 3. Build Actions
* Specify the Working Directory "C:\Programming\Libraries\jpeg"
* Press the Next button until step 4. Source Files
* Ensure that the currently specified folder is "C:\Programming\Libraries\jpeg"
* Press the Next button until step 5. Code Assistance Configuration
* Add the "C:\Programming\Libraries\jpeg" folder
* Press the Next button until step 6. Project Name and Location
* Specify the Project Name "Jpeg"
* Specify the Project Location "C:\Programming\Libraries\jpeg\Netbeans"
* Let Netbeans finish parsing the project
* Right-click on the "pcre" project and select "Clean and Build"
The static library "libjpeg.a" has been placed within "C:\Programming\Libraries\jpeg"
copy "libjpeg.a" to "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib"
Todo: build a debug version
zlib
Download zlib
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\zlib-1.2.3"
Rename "zlib-1.2.3" to "zlib"
Netbeans
* File > New Project > C/C++ > C/C++ Project From Existing Code
* Select the "Using a makefile generated by a 'configure' script" option
* Specify the Configure Script "C:\Programming\Libraries\zlib\configure"
* Press the Next button until step 3. Build Actions
* Specify the Working Directory "C:\Programming\Libraries\zlib"
* Press the Next button until step 4. Source Files
* Ensure that the currently specified folder is "C:\Programming\Libraries\zlib"
* Press the Next button until step 5. Code Assistance Configuration
* Add the "C:\Programming\Libraries\zlib" folder
* Press the Next button until step 6. Project Name and Location
* Specify the Project Name "zlib"
* Specify the Project Location "C:\Programming\Libraries\zlib\Netbeans"
* Let Netbeans finish parsing the project
* Right-click on the "zlib" project and select "Clean and Build"
The static library "libz.a" has been placed within "C:\Programming\Libraries\zlib"
copy "libz.a" to "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib"
Todo: build a debug version
libpng
Download libpng
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\libpng-1.2.24"
rename "libpng-1.2.24" to "libpng"
Netbeans
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "libpng"
* Specify the Project Location: "C:\Programming\Libraries\libpng\Netbeans"
Right click on "Header Files"
* Select "Add existing item..."
* add the following items from within "C:\Programming\Libraries\libpng"
* png.h
* pngconf.h
Right click on "Source Files" and select "Add existing item..."
* add the following items from "C:\Programming\Libraries\libpng"
* png.c
* pngerror.c
* pngget.c
* pnggmem.c
* pngpread.c
* pngread.c
* pngrio.c
* pngrtran.c
* pngrutil.c
* pngset.c
* pngtrans.c
* pngwio.c
* pngwrite.c
* pngwtran.c
* pngwutil.c
Right click on "libpng" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../..;../../../zlib"
* Specify the Preprocessor Definitions: "_WIN32 _DEBUG DEBUG PNG_NO_MMX_CODE PNG_DEBUG=1 _CRT_SECURE_NO_WARNINGS"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libpng_d.a"
Right click on "libpng" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../..;../../../zlib"
* Specify the Preprocessor Definitions: "PNG_NO_MMX_CODE _WIN32 NDEBUG _CRT_SECURE_NO_WARNINGS"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/libpng.a"
Expat
http://sourceforge.net/project/download ... uperb-west
Extract into "C:\Programming\Libraries\" resulting in "C:\Programming\Libraries\expat-2.0.1"
Rename "expat-2.0.1" to "expat"
Netbeans
From the Netbeans menu: File > New Project > C/C++ > C/C++ Static Library
* Press the Next button until step 2. Project Name and Location
* Specify the Project Name: "expat"
* Specify the Project Location: "C:\Programming\Libraries\expat\Netbeans"
Right click on "Header Files"
* Select "Add existing item..."
* add the following items from within "C:\Programming\Libraries\expat\lib"
* ascii.h
* asciitab.h
* expat.h
* expat_external.h
* iasciitab.h
* internal.h
* latin1tab.h
* nametab.h
* utf8tab.h
* xmlrole.h
* xmltok.h
* xmltok_impl.h
Right click on "Source Files" and select "Add existing item..."
* add the following items from "C:\Programming\Libraries\expat\lib"
* xmlparse.c
* xmlrole.c
* xmltok.c
* xmltok_impl.c
* xmltok_ns.c
Right click on "expat" and select "Properties..."
* Select the configuration: "Debug"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../lib"
* Specify the Preprocessor Definitions: "_WIN32 _DEBUG _WINDOWS COMPILED_FROM_DSP _LIB"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/expat_d.a"
Right click on "expat" and select "Properties..."
* Select the configuration: "Release"
* Navigate to C/C++ > C Compiler > General
* Specify the Include Directories: "../../lib"
* Specify the Preprocessor Definitions: "_WIN32 _WINDOWS NDEBUG _LIB COMPILED_FROM_DSP"
* Navigate to Archiver > General
* Specify the Output: "../../../../CEGUI/CEGUI_head_netbeans/dependencies/lib/expat.a"
CEGUI
Get Cegui HEAD from SVN into "C:\Programming\CEGUI\cegui_mk2\"
https://crayzedsgui.svn.sourceforge.net ... _mk2/trunk
Download dependencies
Extract into "C:\Programming\CEGUI\" resulting in "C:\Programming\CEGUI\cegui_mk2\dependencies"
Take care not to overwrite the files we've already placed in there. Eventually every dependency will be rebuild, removing the need for downloading the dependency. Ideally a Visual Studio/Netbean/Code Block solution/project would ease the pain of building dependencies from scratch.
* Rename "C:\Programming\CEGUI\cegui_mk2" to "C:\Programming\CEGUI\CEGUI_head_netbeans"
* Edit C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\config.lua
* Remove the DirectX renderers
* Remove the Silly image codec
* Change the DEFAULT_IMAGE_CODEC to "tga"
*Create the file "C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\build_gnu.bat" with content:
premake --file cegui.lua --target gnu
pause
*Execute "C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\build_gnu.bat"
*Copy "C:\Programming\CEGUI\Silly_head\include\SILLYOptions.h" to "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\include"
Netbeans
* File > New Project > C/C++ > C/C++ Project From Existing Code
* Select the "Using an existing makefile" option
* Specify Existing Makefile "C:/Programming/CEGUI/CEGUI_head_netbeans/makefiles/premake/Makefile"
* Press the Next button until step 3. Build Actions
* Specify the Working Directory "C:/Programming/CEGUI/CEGUI_head_netbeans/makefiles/premake"
* Press the Next button until step 4. Source Files
* Remove the currently specified folder
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\include" folder
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\src" folder
* Press the Next button until step 5. Code Assistance Configuration
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\include" folder
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\include" folder
* Add the "C:\Programming\CEGUI\CEGUI_head_netbeans\Samples\common\include" folder
* (maybe not) Add the "C:\Programming\Gnu\cygwin\usr\include\mingw" folder
* Press the Next button until step 6. Project Name and Location
* Specify the Project Name "cegui"
* Specify the Project Location "C:\Programming\CEGUI\CEGUI_head_netbeans\Netbeans"
* Modify CEGUIDynamicModule.h as described in: http://www.cegui.org.uk/phpBB2/viewtopi ... 2976#12976
* Modify CEGUIBase.h such that
Code: Select all
#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
# ifdef CEGUIBASE_EXPORTS
# define CEGUIEXPORT __declspec(dllexport)
# else
# define CEGUIEXPORT __declspec(dllimport)
# endif
# define CEGUIPRIVATE
#else
# define CEGUIEXPORT
# define CEGUIPRIVATE
#endif
becomes:
Code: Select all
#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
# ifdef CEGUIBASE_EXPORTS
# define CEGUIEXPORT __declspec(dllexport)
# else
# define CEGUIEXPORT __declspec(dllimport)
# endif
# define CEGUIPRIVATE
#elif defined(__CYGWIN__) && !defined(CEGUI_STATIC)
# ifdef CEGUIBASE_EXPORTS
# define CEGUIEXPORT __attribute__((dllexport))
# else
# define CEGUIEXPORT __attribute__((dllimport))
# endif
# define CEGUIPRIVATE
#else
# define CEGUIEXPORT
# define CEGUIPRIVATE
#endif
* Modify CEGUISingleton.h such that
Code: Select all
#ifdef __MINGW32__
#endif
becomes:
Code: Select all
#if (defined(__MINGW32__) || defined(__CYGWIN__))
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\ScriptingModules\CEGUILua\LuaScriptModule\src
line 8384
Code: Select all
catch(CEGUI::Exception CEGUIDeadException(&e))
becomes
Code: Select all
catch(CEGUI::GenericException CEGUIDeadException(&e))
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\RendererModules\directx9GUIRenderer\d3d9renderer.cpp
Code: Select all
line 91: throw std::exception("Creation of VertexBuffer for Renderer object failed");
line 100: throw std::exception("Unable to retrieve device capabilities from Direct3DDevice9.");
line 672: throw std::exception("Unable to access required view port information from Direct3DDevice9.");
Code: Select all
line 91: throw String("Creation of VertexBuffer for Renderer object failed");
line 100: throw String("Unable to retrieve device capabilities from Direct3DDevice9.");
line 672: throw String("Unable to access required view port information from Direct3DDevice9.");
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\Samples\common\src
Code: Select all
CEGUISample.h line 31: #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined (CEGUI_STATIC)
CEGuiSample.cpp line 36: #if defined( __WIN32__ ) || defined( _WIN32 )
CEGuiSample.cpp line 145: #if defined( __WIN32__ ) || defined( _WIN32 )
Win32CEGuiRendererSelector.h line 31: #if defined( __WIN32__ ) || defined( _WIN32 )
Win32CEGuiRendererSelector.h line 29: #include <tchar.h>
Code: Select all
CEGUISample.h line 31: #if (defined( __WIN32__ ) || defined( _WIN32 ) || defined(__CYGWIN__)) && !defined (CEGUI_STATIC)
CEGuiSample.cpp line 36: #if defined( __WIN32__ ) || defined( _WIN32 ) || defined(__CYGWIN__)
CEGuiSample.cpp line 145: #if defined( __WIN32__ ) || defined( _WIN32 ) || defined(__CYGWIN__)
Win32CEGuiRendererSelector.h line 31: #if defined( __WIN32__ ) || defined( _WIN32 ) || defined(__CYGWIN__)
Win32CEGuiRendererSelector.h line 29: //#include <tchar.h>
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\Samples\common\src\Sample_Demo4.cpp
* Add: #include "CEGUIDefaultResourceProvider.h"
* Add within bool Demo4Sample::initialiseSample(), after using namespace CEGUI;
Code: Select all
DefaultResourceProvider* rp = reinterpret_cast<DefaultResourceProvider*>(System::getSingleton().getResourceProvider());
rp->setResourceGroupDirectory("fonts", "../samples/datafiles/fonts/");
rp->setResourceGroupDirectory("imagesets", "../samples/datafiles/imagesets/");
rp->setResourceGroupDirectory("layouts", "c:/programming/_Projects/CeguiTestBed/");
rp->setResourceGroupDirectory("looknfeels", "../samples/datafiles/looknfeel/");
rp->setResourceGroupDirectory("lua_scripts", "../samples/datafiles/lua_scripts/");
rp->setResourceGroupDirectory("schemes", "../samples/datafiles/schemes/");
Font::setDefaultResourceGroup("fonts");
Imageset::setDefaultResourceGroup("imagesets");
WindowManager::setDefaultResourceGroup("layouts");
WidgetLookManager::setDefaultResourceGroup("looknfeels");
ScriptModule::setDefaultResourceGroup("lua_scripts");
Scheme::setDefaultResourceGroup("schemes");
* Temporary change:
* Copy libpng.a to depenedencies\lib\png.lib
* Copy libjpg.a to depenedencies\lib\jpg.lib
* Copy libz.a to depenedencies\lib\z.lib
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\ImageCodecModules\SILLYImageCodec\makefile
* Append "-ljpeg -lpng -z" to LDFLAGS
* Temporary change:
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\RendererModules\DirectX9GUIRenderer\makefile
* Append to CPPFLAGS: -I "C:\Program Files\Microsoft Visual Studio 8\DirectxSDK\Include"
* Append to LDFLAGS: -L"C:\Program Files\Microsoft Visual Studio 8\DirectxSDK\Lib\x86"
* Temporary changes
* Add "-lglut" to LDFLAGS in "C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\Samples\common\makefile"
* Comment line 151 in "C:\Programming\CEGUI\CEGUI_head_netbeans\Samples\common\src\CEGuiOpenGLBaseApplication.cpp"
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\RendererModules\DirectX9GUIRenderer\premake.lua
* Add library("uuid")
* Let Netbeans finish parsing the project
* Right-click on the "CEGUI_head_netbeans" project and select "Clean and Build"
* Copy from "C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\bin" to "C:\Programming\CEGUI\CEGUI_head_netbeans\bin"
* freeglut.dll
* freeglut_d.dll
* Copy to "C:\Programming\CEGUI\CEGUI_head_netbeans\bin"
* glut32.dll (was already on my C: drive)
* Temporarily fake "release" versions of the following by renaming
* CEGUITGAImageCodec_d.dll to CEGUITGAImageCodec.dll
* CEGUIExpatParser_d.dll to CEGUIExpatParser.dll
* CEGUIFalagardWRBase_d.dll to CEGUIFalagardWRBase.dll
* Modify C:\Programming\CEGUI\CEGUI_head_netbeans\makefiles\premake\Samples\common\premake.lua
* Copy C:/Programming/Gnu/cygwin/lib/w32api/libwinmm.a to C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib\libwinmm.a
* Copy library("C:/Programming/Gnu/cygwin/lib/w32api/winmm.a", "")
* library C:/Programming/Gnu/cygwin/lib/w32api/libgdi32.a to C:\Programming\CEGUI\CEGUI_head_netbeans\dependencies\lib\libgdi32.lib
* Add to the section: "if OPENGL_RENDERER and SAMPLES_GL then", below "library("freeglut", "_d")"
* library("winmm", "")
* library("gdi32", "")