Changes between Initial Version and Version 1 of Hand/280/SoftwareSetup/Windows


Ignore:
Timestamp:
May 17, 2011, 8:12:13 PM (9 years ago)
Author:
edison
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Hand/280/SoftwareSetup/Windows

    v1 v1  
     1= BarrettHand BH8-280 software setup - Windows =
     2
     3This file describes how to build the BarrettHand Control GUI, BarrettHand API Library, Examples, and Demos from the provided source files.  The necessary third party headers and libraries (CTB serial port library, POCO, and wxWidgets) are included in the Windows installer to reduce the effort in compiling the source files for the hand with MinGW and Visual C++ 2008.  The instructions for building these libraries from source code are included below.  Windows XP or later is required (32-bit version) and the Peak drivers for the USB to CAN adapter.
     4
     5
     6== MinGW "Minimalist GNU for Windows" ==
     7
     8
     9Install MinGW, "Minimalist GNU for Windows" (GPL + public domain)
     10
     11  1. Download:
     12      http://www.mingw.org -> Downloads -> Automated MinGW Installer
     13      (tested with version 5.1.4, released 2008-04-26)
     14 
     15  2. Install:
     16      - MinGW base tools
     17      - g++ compiler
     18      - MinGW Make
     19 
     20  3. You will need to add the bin directory to your system's search path:
     21      Control Panel -> System -> Advanced -> Environment Variables ->
     22      System Variables -> Path, add "C:\MinGW\bin" (or your MinGW bin path)
     23
     24
     25
     26== Windows Build Instructions for Third Party Dependencies ==
     27
     28
     29Install and build third party open source dependencies for the BarrettHand API Library:
     30
     311) Build the CTB Serial Port library and set the CTB environment variable
     32
     33- Install SED from http://gnuwin32.sourceforge.net/packages/sed.htm
     34- Locate and run the script build_ctb.bat in "C:\Program Files\Barrett Technology\BHand\ThirdParty"
     35        - This scipt will automatically issue "mingw32-make -f makefile.gcc DEBUG=0 GPIB=0" to build the CTB library
     36
     37
     382) Build the POCO library
     39
     40Find the source code:
     41- Locate the source code in "C:\Program Files\Barrett Technology\BHand\ThirdParty"
     42- Download the "The Economy Package" source code from http://pocoproject.org/
     43
     44Example:
     45- Copy POCO libary to "C:\poco-1.3.6p2"
     46- Set the POCO_BASE environment variable to be "C:\poco-1.3.6p2"
     47- If you do not have Gawk for Windows download it from http://gnuwin32.sourceforge.net/packages/gawk.htm and install it
     48- Download MSYS (tested MSYS-1.0.11) from http://www.mingw.org and install it
     49- Launch MSYS (from the icon on the desktop) and issue
     50
     51        CD C:/poco-1.3.6p2
     52        ./configure --config=MinGW --no-tests --no-samples --omit=XML,Util,Net
     53        make -s -j4 Foundation-libexec
     54
     55At this point you may compile the examples and/or continue building dependencies for the GUI.
     56
     57If you want to build the BarrettHand Control GUI from the source files you will need to build these third party open source dependencies:
     58
     59
     603) Build the wxWidgets library (tested with 2.8.11)
     61
     62Find the source code:
     63- Locate wxMSW-2.8.11-Setup.exe windows installer in "C:\Program Files\Barrett Technology\BHand\ThirdParty"
     64- Download wxMSW with the installer for Windows from http://www.wxwidgets.org/
     65
     66The debug and release libraries still need to be built for MingGW.  Follow these steps:
     67- Edit wxWidgets-2.8.11\include\wx\msw\setup.h and change the #define wxUSE_GLCANVAS 0 to #define wxUSE_GLCANVAS 1
     68- Also change the line that defines wxWIN_COMPATIBILITY from 1 to 0
     69- Open a command prompt and issue the following commands
     70- CD C:\wxWidgets-2.8.11\build\msw
     71- mingw32-make -f makefile.gcc SHARED=0 UNICODE=0 USE_OPENGL=1
     72- mingw32-make -f makefile.gcc SHARED=0 BUILD=release UNICODE=0 USE_OPENGL=1
     73- Set the WXWIN environment variable to be C:\wxWidgets-2.8.11 or the correct path
     74
     75
     764) Setup MinGW to include Glut header file
     77
     78You may find the GLUT binaries for development (version 3.7.6) in the ThirdParty\glut-3.7.6-bin directory.
     79
     80- Place glut.h in C:\MinGW\include\GL
     81
     82Notes:
     83- This instruction was taken from the guide for using GLUT with the MinGW compiler at http://www.mingw.org/wiki/HOWTO_Use_Mark_J_Kilgards_OpenGL_Utility_Toolkit_GLUT_with_MinGW
     84- The file glut32.lib is in the "ThirdParty\glut-3.7.6-bin" directory and the glut32.dll is in the copied to the system directory during installation.
     85
     86
     87== Building the Examples ==
     88
     89
     90To build or rebuild Monitor Strain, RealTime, and Supervisory examples run the "make_examples" batch file located in the examples directory.  The examples do not require the BarrettHand API Library because they include the BarrettHand source files.
     91
     92Alternatively, to build directly from the command prompt:
     93
     94  1. CD to the example directory (examples/supervisory, examples/realtime, etc)
     95  2. Issue: "mingw32-make ARCH=windows" to build the example
     96
     97Note: The POCO_BASE environment variable must be set to the directories of these dependencies.
     98
     99
     100== Code Blocks IDE ==
     101
     102
     103Code Blocks is a cross platform IDE that may be used to build the BarrettHand Control GUI and/or the BarrettHand API Library.
     104
     105Download the binary release WITHOUT MinGW from http://www.codeblocks.org/downloads
     106
     1071) To build the BarrettHand Control GUI
     108- Open the CodeBlocks project file BHControl
     109- Select the build target: Build -> Build Target -> Windows Debug
     110- Build by clicking Build -> Build and Run or press F9
     111
     1122) To build the BarrettHand API Library
     113- Open the CodeBlocks project file BHand
     114- Select the build target: Build -> Build Target -> Windows Release
     115- Build by clicking Build -> Build
     116
     117Note: If the POCO or wxWidgets dependencies were installed to other locations you will need to modify the CodeBlocks project files so that the header and library files can be found.
     118
     119
     120== Building the Demos ==
     121
     122
     123To build bhdemo45 and Force Response demos run the "make_demos" batch file located in the demos directory.  The demos require the BarrettHand API Library and also illustrates it being used in a Makefile.
     124
     125To build a single demo from the command prompt:
     126
     127  1. CD to the demo directory (demos/bhdemo45, demos/ForceResponse, etc)
     128  2. Issue: "mingw32-make ARCH=windows" to build the demo
     129
     130Note: The POCO_BASE environment variable must be set to the directories of these dependencies.
     131
     132
     133== Visual C++ 2008 Express Edition ==
     134
     135
     136If you don't have Visual C++ and would like to use the express edition then you may download it from:
     137
     138   http://www.microsoft.com/express/Downloads/#2008-Visual-CPP -> Visual Studio 2008 Express -> Free Download
     139
     140The following build instructions should be sufficient to build third party dependencies required by the BHControl Visual Studio Solution.  However, they were tested on a system setup for using the MinGW compiler for building all the software described above.
     141
     142   Build wxWidgets:
     143      - Open Windows Explorer and open wxWidgets-2.8.11\build\msw\wx.dsw
     144      - Select Build -> Configuration Manager -> Active solution configuration -> Release
     145      - Right-click Solution 'wx' and do Build Solution (do this twice so that all projects are built)
     146      - Set the WXWIN environment variable to be C:\wxWidgets-2.8.11 or the correct path
     147
     148   Build the POCO library:
     149      - Navigate to C:\poco-1.3.6\Foundation
     150      - Open Foundation_vs90.vcproj
     151      - Select Build -> Configuration Manager -> Active solution configuration -> release_shared
     152      - Right-click the Foundation project and then Build
     153      - Copy C:\poco-1.3.6\bin\PocoFoundation.dll to C:\Windows\system32
     154
     155   Build the CTB library (optional step - you should already have this lib):
     156      - Navigate to ctb-0.14\build
     157      - run nmake -f makefile.vc DEBUG=0 GPIB=0
     158
     159   Open BHControl.sln which should be located in C:\Program Files\Barrett Technology\BHand\BHControl
     160      - Select the Release configuration (debug build of the GUI in Visual Studio does not build)
     161      - Right-click BHControl project in Solution Explorer and select Build