Size: 3022
Comment:
|
Size: 3860
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
First read WxArt2dInstallCmake, directory structure required is explained in there, not here. |
|
Line 27: | Line 29: |
Next with the same lines as above goto, and compile the stc library: | Next with the same lines as above goto, and compile the stc library (PS newer version of wxWidgets already have this compiled in): |
Line 45: | Line 47: |
cmake-gui | |
Line 48: | Line 49: |
After starting ''cmake-gui'', you will be asked for the type of generator. Choose "MinGW Makefiles" or the "CodeBlocks - MinW Makefiles". The last one in fact produces the same make files, but with added CodeBlock project file. | See WxArt2dInstallCmake topic for how to continue, directory structure etc. is explained there. After starting ''cmake-gui'', you will be asked for the type of generator. Choose "MinGW Makefiles" or the "CodeBlocks - MingW Makefiles". The last one in fact produces the same make files, but with added CodeBlock project file. |
Line 50: | Line 53: |
For example: | For example for the first packages wxdocview: |
Line 52: | Line 55: |
Where is the source directory: C:/tools/CodeB/wxArt2D Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug |
Where is the source directory: C:/tools/CodeB/wxArt2D/packages/wxdocview Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview |
Line 65: | Line 68: |
And now press configure again, this times things will improve. Continue with generate when all is well. | And now press configure again, this time things will improve. Continue with generate when all is well. |
Line 69: | Line 72: |
cd C:/tools/CodeB/buildwxArt2DDebug | cd C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview |
Line 73: | Line 76: |
This uses the Makefile, which you find in cd C:/tools/CodeB/buildwxArt2DDebug. For release/unicode, you just choose another build directory in the cmake-gui, and the rest is the same. | This uses the Makefile, which you find in cd C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview. For release/unicode, you just choose another build directory in the cmake-gui, and the rest is the same. |
Line 75: | Line 80: |
Now after compiling the wxdocview package you must first compile the wxart2d package. For example for the wxart2d package: {{{ Where is the source directory: C:/tools/CodeB/wxArt2D/packages/wxart2d Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug/packages/wxart2d }}} No all should be ready. To use Cmake for your own project study this topic MyOwnApp, which talks about the myapp target generated on the fly after configuring the wxart2d package. |
Compiling wxArt2D with CodeBlocks (non Unix fashion)
First read WxArt2dInstallCmake, directory structure required is explained in there, not here.
You already have installed CodeBlocks with MingW integrated.
Download latest cmake, wxWidgets, and checkout from CVS wxArt2D.
wxWidgets install
The CodeBlocks twiki tells how we can compile wxWidgets from source.
In short from within a DOS box:
- Install the wxMSW source distribution.
- set WXWIN=c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10
- cd c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10\build\msw
- mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=0 BUILD=release
- mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=0 BUILD=debug
If your not in a hurry, right away do all other:
- mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=release
- mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=debug
Be carefull with the shared versions. Next with the same lines as above goto, and compile the stc library (PS newer version of wxWidgets already have this compiled in):
- c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10\contrib\build\stc
In the you will have compiled wxWidget libraries in:
- c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10\lib\gcc_lib
And for shared:
- c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10\lib\gcc_dll
wxArt2D
Open DOS box and set WXWIN variable. Next extend path to cmake binaries. After that start cmake-gui.
set WXWIN=c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10 PATH=c:\pathToCmake\cmake\bin:%PATH%
See WxArt2dInstallCmake topic for how to continue, directory structure etc. is explained there.
After starting cmake-gui, you will be asked for the type of generator. Choose "MinGW Makefiles" or the "CodeBlocks - MingW Makefiles". The last one in fact produces the same make files, but with added CodeBlock project file. After this you see the interface, choose the source directory of wxArt2D, and choose a new build directory. For example for the first packages wxdocview:
Where is the source directory: C:/tools/CodeB/wxArt2D/packages/wxdocview Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview
Press configure button, Many things turn red, and its start yelling, does not matter.
First make sure you set the options right:
- wxWidgets_USE_DEBUG 1
- wxWidgets_USE_MONOLITHIC 1
- wxWidgets_USE_UNICODE 0
- wxWidgets_USE_STATIC 1
These are the settings for the static, monolithic, debug and non unicode of wxWidgets, which you compiled above. Of course others settings can be generated later in their own build directory.
And now press configure again, this time things will improve. Continue with generate when all is well.
All is set, and we are ready to compile wxArt2D.
cd C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview mingw-make
This uses the Makefile, which you find in cd C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview. For release/unicode, you just choose another build directory in the cmake-gui, and the rest is the same. We always recommend outside source builds!
Now after compiling the wxdocview package you must first compile the wxart2d package.
For example for the wxart2d package:
Where is the source directory: C:/tools/CodeB/wxArt2D/packages/wxart2d Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug/packages/wxart2d
No all should be ready. To use Cmake for your own project study this topic MyOwnApp, which talks about the myapp target generated on the fly after configuring the wxart2d package.