|
Size: 10599
Comment:
|
Size: 11266
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 21: | Line 21: |
| Line 25: | Line 26: |
| }}} Now all down here needs to be done. But on Unix there is a ''configure'' script which you can run, to do the same, inclusive testing. Type ''configure -help'' to see some options. Fo example: {{{ /home/klaas/soft/svncheckout/trunk/wxArt2D/configure -g -v -prefix /home/klaas/soft/usr/local }}} If not using the configure script up here, all the next steps needs to be done bu hand. First directories are created in which the several packages will be build. {{{ |
|
| Line 32: | Line 43: |
| Now configure using cmake or better cmake-gui to choose options. | Now configure using cmake or better cmake-gui to choose options, and build one by one. Do not install yet. |
| Line 35: | Line 47: |
| cmake /home/klaas/soft/svncheckout/trunk/wxArt2D/thirdparty/agg-2.4 | cmake-gui /home/klaas/soft/svncheckout/trunk/wxArt2D/thirdparty/agg-2.4 make |
| Line 37: | Line 50: |
| cmake /home/klaas/soft/svncheckout/trunk/wxArt2D/thirdparty/kbool | cmake-gui /home/klaas/soft/svncheckout/trunk/wxArt2D/thirdparty/kbool make |
| Line 39: | Line 53: |
| cmake /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxdocview | cmake-gui /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxdocview make |
| Line 41: | Line 56: |
| cmake /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d | cmake-gui /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d make |
| Line 43: | Line 59: |
| Now build. | At last install all packages. |
| Line 46: | Line 63: |
| make | sudo make install |
| Line 48: | Line 65: |
| make | sudo make install |
| Line 50: | Line 67: |
| make | sudo make install |
| Line 52: | Line 69: |
| make | sudo make install |
| Line 54: | Line 71: |
| On windows same approach. |
On windows same approach. But there you get project files for each cmake configured project. |
| Line 58: | Line 74: |
| The cmake files used by wxArt2D always first look for the environment variable WXWIN, if it is set CMake will use it to to find the wxWidgets libraries. So Start/My Computer/ View System Information-> dialog system properties, choose tab advanced. OR on Windows XP click on the My Computer icon and use the Right Mouse to Edit Properties, This gives you a dialog called "System Properties" with several tabs. Here you choose the tab advanced. At the bottom you find a button Environment Variables, click it and add WXWIN either to the users or system variables. In my case it is set to: WXWIN e:/wxwin/wx262vc. If this variable is not set and you have only one version of wxWidgets installed, it will look in the registry for the place where wxWidgets library is installed. If you want to choose between different version of wxWidgets, just set the variable. | The cmake files used by wxArt2D always first look for the environment variable WXWIN, if it is set CMake will use it to to find the wxWidgets libraries. So Start/My Computer/ View System Information-> dialog system properties, choose tab advanced. OR on Windows XP click on the My Computer icon and use the Right Mouse to Edit Properties, This gives you a dialog called "System Properties" with several tabs. Here you choose the tab advanced. At the bottom you find a button Environment Variables, click it and add WXWIN either to the users or system variables. In my case it is set to: WXWIN e:/wxwin/wx262vc. If this variable is not set and you have only one version of wxWidgets installed, it will look in the registry for the place where wxWidgets library is installed. If you want to choose between different version of wxWidgets, just set the variable. |
| Line 62: | Line 78: |
| set WXWIN=C:\whereIsYourWxWidgets\wxWidgets-2.8.8 set WXLUA=C:\whereIsYourWxLua\wxLua --this one is optional set WXSTEDIT=C:\whereIsYourWxStEdit\wxStEdit --this one is optional set CMAKE=C:\whereIsYourCMake\CMake\bin set PATH=%CMAKE%;%PATH% cmake-gui.exe | set WXWIN=C:\whereIsYourWxWidgets\wxWidgets-2.8.8 set WXLUA=C:\whereIsYourWxLua\wxLua --this one is optional set WXSTEDIT=C:\whereIsYourWxStEdit\wxStEdit --this one is optional set CMAKE=C:\whereIsYourCMake\CMake\bin set PATH=%CMAKE%;%PATH% cmake-gui.exe |
| Line 66: | Line 82: |
| Next run '''cmake-gui''' on windows click on the line "Where is the source installed" and browse to where you have installed wxArt2D. In our case c:/libraries/wxart2d, and on the line "Where to build binaries", you browse to a directory where you want the libraries to be build. ( e.g. c:/libraries/buildwxart2dhere.) | Next run '''cmake-gui''' on windows click on the line "Where is the source installed" and browse to where you have installed wxArt2D. In our case c:/libraries/wxart2d, and on the line "Where to build binaries", you browse to a directory where you want the libraries to be build. ( e.g. c:/libraries/buildwxart2dhere.) |
| Line 70: | Line 86: |
| Choose in the "Build for line" the type of build you want to use. Now click the button configure twice, and check the path to where your wxWidgets distribution was installed. You can change them by hand if needed. Last click on Ok. Go into the directory you used for the build and type ( nmake for Visual C ). In case of generating project files, open those instead. ( for Vc it is called wxart2d.dsw) | Choose in the "Build for line" the type of build you want to use. Now click the button configure twice, and check the path to where your wxWidgets distribution was installed. You can change them by hand if needed. Last click on Ok. Go into the directory you used for the build and type ( nmake for Visual C ). In case of generating project files, open those instead. ( for Vc it is called wxart2d.dsw) |
| Line 75: | Line 91: |
| * If you want debug --enable-debug | * If you want debug --enable-debug |
| Line 78: | Line 94: |
| Make sure ''wx-config'' can be found, using the command ''which wx-config''. If not extend the path to include the path to the place where wxWidgets was installed. The default place is ''/usr/local/bin/wx-config''. Now create a directory where you want to build wxArt2D, do this outside the wxArt2D directory itself. e.g If you have /home/myname/wxArt2D you create /home/myname/buildwxArt2D | Make sure ''wx-config'' can be found, using the command ''which wx-config''. If not extend the path to include the path to the place where wxWidgets was installed. The default place is ''/usr/local/bin/wx-config''. Now create a directory where you want to build wxArt2D, do this outside the wxArt2D directory itself. e.g If you have /home/myname/wxArt2D you create /home/myname/buildwxArt2D |
| Line 82: | Line 98: |
| Now just type cmake-gui /home/myname/wxArt2D within the directory where you want to build ( here /home/myname/buildwxArt2D ) ( You can use cmake-gui /home/myname/wxArt2D to choose the options you want, e.g. samples ) | Now just type cmake-gui /home/myname/wxArt2D within the directory where you want to build ( here /home/myname/buildwxArt2D ) ( You can use cmake-gui /home/myname/wxArt2D to choose the options you want, e.g. samples ) |
| Line 84: | Line 100: |
| Best use cmake-gui since i gives you an idea what can be set. | Best use cmake-gui since i gives you an idea what can be set. |
| Line 97: | Line 113: |
| You must have the cmake distribution that is made for Cygwin, which you can find with the Cygwin setup.exe. Be sure to remove from the PATH (after running the cygwin shell) the path to the windows Cmake distribution, else all will be wrong. Same for the WXWIN variable set under DOS, do set it properly to the wxWidgets you compiled for Cygwin, and not to the one for windows itself. Do this before running cmake in the build directory you created next to wxArt2D its directory. Yes always build outside the distribution, in order to not mix things up. In principle one wxArt2D can be used for wxMSW and Cygwin and Mingw, as long as you build all of the outside the wxArt2D directory. | You must have the cmake distribution that is made for Cygwin, which you can find with the Cygwin setup.exe. Be sure to remove from the PATH (after running the cygwin shell) the path to the windows Cmake distribution, else all will be wrong. Same for the WXWIN variable set under DOS, do set it properly to the wxWidgets you compiled for Cygwin, and not to the one for windows itself. Do this before running cmake in the build directory you created next to wxArt2D its directory. Yes always build outside the distribution, in order to not mix things up. In principle one wxArt2D can be used for wxMSW and Cygwin and Mingw, as long as you build all of the outside the wxArt2D directory. |
| Line 99: | Line 115: |
| Check you have cmake-gui/ccmake/cmake by type "which cmake", it needs to come from /usr/bin/cmake | Check you have cmake-gui/ccmake/cmake by type "which cmake", it needs to come from /usr/bin/cmake |
| Line 101: | Line 117: |
| wxWidgets uses expat internal, and wxArt2D uses that version too. But to bad, the expat header files are not installed by wxWidgets. In order to find the expat headers, make sure to set the WXWIN environment variable to where wxWidgets for Cygwin is installed. This will be used to find those headers. | wxWidgets uses expat internal, and wxArt2D uses that version too. But to bad, the expat header files are not installed by wxWidgets. In order to find the expat headers, make sure to set the WXWIN environment variable to where wxWidgets for Cygwin is installed. This will be used to find those headers. |
| Line 107: | Line 123: |
| Always remove this file if you did some trials before. rm configarg.cache | Always remove this file if you did some trials before. rm configarg.cache |
| Line 113: | Line 129: |
| . /configure --enable-debug --disable-shared | . /configure --enable-debug --disable-shared |
| Line 121: | Line 137: |
| Make sure wx-config can be found, using the command which wx-config. If not extend the path to include the path to the place where wxWidgets was installed. The default place is /usr/local/bin/wx-config. Now create a directory where you want to build wxArt2D, best outside the wxArt2D directory itself. e.g If you have /home/wxArt2D you create /home/buildwxArt2D | Make sure wx-config can be found, using the command which wx-config. If not extend the path to include the path to the place where wxWidgets was installed. The default place is /usr/local/bin/wx-config. Now create a directory where you want to build wxArt2D, best outside the wxArt2D directory itself. e.g If you have /home/wxArt2D you create /home/buildwxArt2D |
| Line 125: | Line 141: |
| cd /whereIswxArt2D/wxArt2D/ cd /whereIswxArt2D/buildwxArt2D cmake-gui ../wxArt2D | cd /whereIswxArt2D/wxArt2D/ cd /whereIswxArt2D/buildwxArt2D cmake-gui ../wxArt2D |
| Line 138: | Line 154: |
| Installation for MinGW systems is similar to installation on unix, with some little differences. There are two ways with MinGW see [[MinGW]] and [[MinGWMSys]]. The Unix way uses MSYS to configure, make and install wxWidgets. | Installation for MinGW systems is similar to installation on unix, with some little differences. There are two ways with MinGW see [[MinGW]] and [[MinGWMSys]]. The Unix way uses MSYS to configure, make and install wxWidgets. |
| Line 140: | Line 156: |
| Again make sure you compiled and installed wxWidgets properly for use in mingw, and do set the environment variable WXWIN to the wxWidgets distribution. For CMake itself you can use the standard windows executables. It is not like on Cygwin, where you need a special made set for Cygwin. Make sure the cmake executables can be found via the PATH. I just installed Cmake in /c/msys, making cmake.exe and cmake-gui.exe go into the /c/msys/bin directory, so they are always found. | Again make sure you compiled and installed wxWidgets properly for use in mingw, and do set the environment variable WXWIN to the wxWidgets distribution. For CMake itself you can use the standard windows executables. It is not like on Cygwin, where you need a special made set for Cygwin. Make sure the cmake executables can be found via the PATH. I just installed Cmake in /c/msys, making cmake.exe and cmake-gui.exe go into the /c/msys/bin directory, so they are always found. |
| Line 142: | Line 158: |
| wxWidgets uses expat internal, and wxArt2D uses that version too. But to bad, the expat header files are not installed by wxWidgets. In order to find the expat headers, make sure to set the WXWIN environment variable to where wxWidgets for MinGW is installed. This will be used to find those headers. Therefore using MSYS on the commandline do set WXWIN (so do NOT use the same setting as you did for wxMSW for instance ). | wxWidgets uses expat internal, and wxArt2D uses that version too. But to bad, the expat header files are not installed by wxWidgets. In order to find the expat headers, make sure to set the WXWIN environment variable to where wxWidgets for MinGW is installed. This will be used to find those headers. Therefore using MSYS on the commandline do set WXWIN (so do NOT use the same setting as you did for wxMSW for instance ). |
| Line 148: | Line 164: |
| Make sure wx-config can be found, using the command which wx-config. If not extend the path to include the path to the place where wxWidgets was installed. The default place is /c/msys/local/bin/wx-config. Now create a directory where you want to build wxArt2D, best outside the wxArt2D directory itself. e.g If you have /c/home/wxArt2D you create /c/home/buildwxArt2D | Make sure wx-config can be found, using the command which wx-config. If not extend the path to include the path to the place where wxWidgets was installed. The default place is /c/msys/local/bin/wx-config. Now create a directory where you want to build wxArt2D, best outside the wxArt2D directory itself. e.g If you have /c/home/wxArt2D you create /c/home/buildwxArt2D |
| Line 154: | Line 170: |
| or better: cd /c/home/buildwxArt2D cmake -G"MSYS Makefiles" ../wxArt2D within the directory where you want to build ( here /c/home/buildwxArt2D ) ( You can use '''cmake-gui''' to choose the options you want, e.g. samples ) | or better: cd /c/home/buildwxArt2D cmake -G"MSYS Makefiles" ../wxArt2D within the directory where you want to build ( here /c/home/buildwxArt2D ) ( You can use '''cmake-gui''' to choose the options you want, e.g. samples ) |
Installation - CMake
Contents
Cmake ways
CMAKE_INSTALL_PREFIX
To install to a specific location, in Cmake you define this with setting CMAKE_INSTALL_PREFIX. This is the solution if you do not have root rights on Linux.
On windows this is default c:/Program Files/wxart2d and on Unix/Linux /usr/local In cmake-gui and/or ccmake you can set this in the advanced View.
CMAKE_VERBOSE_MAKEFILE
This sets makefile to show verbose compile and linked commands, ideal to copy paste as is, in order to find problems in linking etc.
Always try to build outside of the SVN tree which you checked out. First of all to not pollute the tree, which can interfere with subsequent build of other flavors of wxArt2D and/or its dependencies. If your wxArt2D is in /pathToTrunk/trunk/wxArt2D, put your debug build in something like /pathToTrunk/buildWx28StaticDebug and you at the same time a release build can go into /pathToTrunk/buildWx28StaticRelease.
All platforms
First create a build directory plus subdirectories (assuming klaas is the user):
cd /home/klaas/soft/svncheckout mkdir buildart2d291deb cd buildart2d291deb
Now all down here needs to be done. But on Unix there is a configure script which you can run, to do the same, inclusive testing. Type configure -help to see some options. Fo example:
/home/klaas/soft/svncheckout/trunk/wxArt2D/configure -g -v -prefix /home/klaas/soft/usr/local
If not using the configure script up here, all the next steps needs to be done bu hand.
First directories are created in which the several packages will be build.
mkdir thirdparty mkdir thirdparty/agg-2.4 mkdir thirdparty/kbool mkdir packages mkdir packages/wxdocview mkdir packages/wxart2d
Now configure using cmake or better cmake-gui to choose options, and build one by one. Do not install yet.
cd /home/klaas/soft/svncheckout/buildart2d291deb/thirdparty/agg-2.4 cmake-gui /home/klaas/soft/svncheckout/trunk/wxArt2D/thirdparty/agg-2.4 make cd /home/klaas/soft/svncheckout/buildart2d291deb/thirdparty/kbool cmake-gui /home/klaas/soft/svncheckout/trunk/wxArt2D/thirdparty/kbool make cd /home/klaas/soft/svncheckout/buildart2d291deb/packages/wxdocview cmake-gui /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxdocview make cd /home/klaas/soft/svncheckout/buildart2d291deb/packages/wxart2d cmake-gui /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d make
At last install all packages.
cd /home/klaas/soft/svncheckout/buildart2d291deb/thirdparty/agg-2.4 sudo make install cd /home/klaas/soft/svncheckout/buildart2d291deb/thirdparty/kbool sudo make install cd /home/klaas/soft/svncheckout/buildart2d291deb/packages/wxdocview sudo make install cd /home/klaas/soft/svncheckout/buildart2d291deb/packages/wxart2d sudo make install
On windows same approach. But there you get project files for each cmake configured project.
Cmake on Windows
The cmake files used by wxArt2D always first look for the environment variable WXWIN, if it is set CMake will use it to to find the wxWidgets libraries. So Start/My Computer/ View System Information-> dialog system properties, choose tab advanced. OR on Windows XP click on the My Computer icon and use the Right Mouse to Edit Properties, This gives you a dialog called "System Properties" with several tabs. Here you choose the tab advanced. At the bottom you find a button Environment Variables, click it and add WXWIN either to the users or system variables. In my case it is set to: WXWIN e:/wxwin/wx262vc. If this variable is not set and you have only one version of wxWidgets installed, it will look in the registry for the place where wxWidgets library is installed. If you want to choose between different version of wxWidgets, just set the variable.
You can also open a DOS box and type the next:
set WXWIN=C:\whereIsYourWxWidgets\wxWidgets-2.8.8 set WXLUA=C:\whereIsYourWxLua\wxLua --this one is optional set WXSTEDIT=C:\whereIsYourWxStEdit\wxStEdit --this one is optional set CMAKE=C:\whereIsYourCMake\CMake\bin set PATH=%CMAKE%;%PATH% cmake-gui.exe
You must start cmake-gui after setting this variable, else it will not know it.
Next run cmake-gui on windows click on the line "Where is the source installed" and browse to where you have installed wxArt2D. In our case c:/libraries/wxart2d, and on the line "Where to build binaries", you browse to a directory where you want the libraries to be build. ( e.g. c:/libraries/buildwxart2dhere.)
You can have several build directories if you want. Each one having its own specific settings. e.g. i have a build-debug and a build-debug-unicode etc., using cmake-gui you can modify the option for each build directory.
Choose in the "Build for line" the type of build you want to use. Now click the button configure twice, and check the path to where your wxWidgets distribution was installed. You can change them by hand if needed. Last click on Ok. Go into the directory you used for the build and type ( nmake for Visual C ). In case of generating project files, open those instead. ( for Vc it is called wxart2d.dsw)
Cmake on Unix
Compile wxWidgets the latest ( > 2.8.10 ) and make sure to use at least these options:
- If you want debug --enable-debug
- If you want static libraries --disable-shared
Make sure wx-config can be found, using the command which wx-config. If not extend the path to include the path to the place where wxWidgets was installed. The default place is /usr/local/bin/wx-config. Now create a directory where you want to build wxArt2D, do this outside the wxArt2D directory itself. e.g If you have /home/myname/wxArt2D you create /home/myname/buildwxArt2D
In case you want to use the lua scripting language in wxArt2D, als install wxLua and wxStEdit. Set on the command line export WXLUA=/where is wxLua its code. Right not only install, also the code is needed for wrapping!
Now just type cmake-gui /home/myname/wxArt2D within the directory where you want to build ( here /home/myname/buildwxArt2D ) ( You can use cmake-gui /home/myname/wxArt2D to choose the options you want, e.g. samples )
Best use cmake-gui since i gives you an idea what can be set.
After that type make or gmake.
wxArt2D has been set up in such a way, that installation is not necessary, but if needed, type make install
When using wxArt2D in your own program you need to set the following variable to find the libraries:
LD_LIBRARY_PATH=/usr/local/wxart2d/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
Cmake with Cygwin
Installation for Cygwin systems is similar to installation on unix, with some little differences. You must compile wxWidgets for Cygwin, and install it under Cygwin.
You must have the cmake distribution that is made for Cygwin, which you can find with the Cygwin setup.exe. Be sure to remove from the PATH (after running the cygwin shell) the path to the windows Cmake distribution, else all will be wrong. Same for the WXWIN variable set under DOS, do set it properly to the wxWidgets you compiled for Cygwin, and not to the one for windows itself. Do this before running cmake in the build directory you created next to wxArt2D its directory. Yes always build outside the distribution, in order to not mix things up. In principle one wxArt2D can be used for wxMSW and Cygwin and Mingw, as long as you build all of the outside the wxArt2D directory.
Check you have cmake-gui/ccmake/cmake by type "which cmake", it needs to come from /usr/bin/cmake
wxWidgets uses expat internal, and wxArt2D uses that version too. But to bad, the expat header files are not installed by wxWidgets. In order to find the expat headers, make sure to set the WXWIN environment variable to where wxWidgets for Cygwin is installed. This will be used to find those headers.
WXWIN=/cygdrive/c/whereIsYourwxWidgets/wxWidgest2.8.8 export WXWIN
Precompiled headers gave problems in cygwin so those are disabled, shared i could not manage too, due to import export issues.
Always remove this file if you did some trials before. rm configarg.cache
Now this is the line to configure wxWidgest ( debug mode ):
cd /cygdrive/c/whereIsYourwxWidgets/wxWidgets-2.6.X
- /configure --enable-debug --disable-shared
Followed of course by:
make make install
This will install wxWidgets in the /usr/local of your Cygwin installation.
Make sure wx-config can be found, using the command which wx-config. If not extend the path to include the path to the place where wxWidgets was installed. The default place is /usr/local/bin/wx-config. Now create a directory where you want to build wxArt2D, best outside the wxArt2D directory itself. e.g If you have /home/wxArt2D you create /home/buildwxArt2D
Now just type:
cd /whereIswxArt2D/wxArt2D/ cd /whereIswxArt2D/buildwxArt2D cmake-gui ../wxArt2D
This to set option etc.
OR
cmake ../wxArt2D
Now type make.
wxArt2D has been set up in such a way, that installation is not necessary, but if needed, type make install
Cmake with MinGW
Installation for MinGW systems is similar to installation on unix, with some little differences. There are two ways with MinGW see MinGW and MinGWMSys. The Unix way uses MSYS to configure, make and install wxWidgets.
Again make sure you compiled and installed wxWidgets properly for use in mingw, and do set the environment variable WXWIN to the wxWidgets distribution. For CMake itself you can use the standard windows executables. It is not like on Cygwin, where you need a special made set for Cygwin. Make sure the cmake executables can be found via the PATH. I just installed Cmake in /c/msys, making cmake.exe and cmake-gui.exe go into the /c/msys/bin directory, so they are always found.
wxWidgets uses expat internal, and wxArt2D uses that version too. But to bad, the expat header files are not installed by wxWidgets. In order to find the expat headers, make sure to set the WXWIN environment variable to where wxWidgets for MinGW is installed. This will be used to find those headers. Therefore using MSYS on the commandline do set WXWIN (so do NOT use the same setting as you did for wxMSW for instance ).
For more see MinGWMSys, in short:
WXWIN=/c/whereIsYourwxWidgets/wxWidgets-2.8.3 export WXWIN
Make sure wx-config can be found, using the command which wx-config. If not extend the path to include the path to the place where wxWidgets was installed. The default place is /c/msys/local/bin/wx-config. Now create a directory where you want to build wxArt2D, best outside the wxArt2D directory itself. e.g If you have /c/home/wxArt2D you create /c/home/buildwxArt2D
Now just type:
- cmake -G"MSYS Makefiles" /c/home/wxArt2D
or better: cd /c/home/buildwxArt2D cmake -G"MSYS Makefiles" ../wxArt2D within the directory where you want to build ( here /c/home/buildwxArt2D ) ( You can use cmake-gui to choose the options you want, e.g. samples )
After that type make.
wxArt2D has been set up in such a way, that installation is not necessary, but if needed, type make install
