Before compiling ngPlant with Visual C++ make sure you have the following prerequisites installed:
- Visual C++ compiler (for example, Visual Studio 2013 Community edition)
- Python 2.7
- SCons software construction tool (for scons method only)
- Mercurial SCM
- wxWidgets development files (headers and libraries) . For detailed information on choosing correct version and files for download look here . For example, for wxWidgets 3.0.2 and Visual Studio 2013 you can use the following download links : header files , release dlls , development libraries. Please follow the blog post mentioned above to correctly choose files to download and setup.
To get latest version of ngplant from code repository use the following command:
hg clone http://hg.code.sf.net/p/ngplant/code ngplant
Building ngplant using Visual Studio IDE
Add wxwin environment variable which should contain the path to the directory where you installed wxwidgets files.
Make sure that PATH environment variable contains the path to python.exe.
Open ngplant.sln solution file with Visual Studio and build all projects.
You may need add path to your wxwidgets dll’s to the PATH environment variable in order to run ngplant.exe.
Building ngplant using scons
Now go to newly created ngplant directory and create msvc.py build configuration file inside config directory with the following content:
WINDRES = "rc" WX_DIR = "<MY_WX_LOCATION>" WX_INC = WX_DIR + "\\include\\ " + WX_DIR + "\\include\\msvc" WX_LIB = "" WX_LIBPATH = WX_DIR + "\\lib\\vc120_dll"
Replace <MY_WX_LOCATION> string with the path to your wxwidgets files.
Build ngplant with the following command:
scons config=msvc ngplant/ngplant.exe
Now you will have compiled ngplant.exe in ngplant directory. You may need to copy wxwidgets dlls to this directory or make them accessible to the system any other way (for example, by adding path to dlls to PATH environment variable) in order to run ngplant.exe.