DwarfWindowsTutorial

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

THIS WEBPAGE IS DEPRECATED - please visit our new website

General

  • Install cygwin (http://www.cygwin.com/): ensure to have make, autoconf, automake included. You require it for the DWARF deployment to your machine. Cygwin is a UNIX shell emulation for Windows - you'll like it smile
    • Cygwin packages: Devel.automake, Devel.autoconf, Devel.make, Devel.cmake, Devel.libtool
  • Shut down every firewall you have running. Firewalls prohibit CORBA communication between the ServiceManager and Services as well as between Servcies.
  • When using Python, the configure script has to be called with prefix as a Windows style path (e.g. --prefix=c:/<install path> and not --prefix=/cygdrive/c/<install path>). This is because another Python installation is used than the one installed with Cygwin.
  • When using C++ the configuration is done via CMake instead of autoconf.

Using Java

  • Delete /usr/bin/jar.exe from the cygwin internal path. This is the GNU jar, which does not implement all opttions of sun's jar, but has the same name nevertheless. Try jar -u to see. This sucks!
  • Install newest version of Java which is available from http://java.sun.com. Maybe you have to set the environment variable JAVA_HOME. Maybe you'll run into path problems. Try to call java -version. If it corresponds to your previous installation, everything is right. If not, refactor the path and place your installation bin directory at the beginning.
  • Copy all jars from one of our lab linux machines out of the directory /usr/lib/java2/jre/lib/ext to %JAVA_HOME%jre/lib/ext. One of these jars is the CORBA implementation. (We should make a tar-ball ... Remind us, if you need the jars...)

Testing if Java works

Before you can test, if Java is working properly, you have to follow the steps in the DwarfBuildTutorial to make a concrete installation of DWARF. After this you can do the following:
  • Start a ServiceManager on another computer of your choice
  • Start DIVE on this machine, too
  • Start e.g. the TestStringSenderJAVA: java -DserviceManager=<hostname> -jar TestStringSenderJAVA.jar
  • Press View->Update and you should see the Service (but it is announced as running on the ServiceManager's computer)
  • Now start the TestStringReceiver: ./TestStringReceiver - It's a C++ Service wink
  • After several seconds press View->Update again. You should see both services interconnected. When looking at the TestStringReceiver terminal window, you should see logging information, that data arrives

Using C++

When installing to use C++, there are a couple of things that needs to be noted. First that everything have to be compiled with the same version of the VC++ compiler, and secondly that everything has to be compiled in debug mode since DWARF is compiled so and uses the debug libraries of third party products. Futhermore it has to be noted, that both CMake and Autoconf creates a non-identical config.h file in the build directory, and therefore the install has to take place just after configuration with both tools. Last but not least, a lot of patience is required.It takes a long while to get and install all the third party products, but it takes even longer to compile everything.
  • Install MS Visual Studio .NET
  • Install MSDN
  • Add to system environment variable path: The "c:\programme\microsoft visual studio .NET2003\Vc7\bin" directory or where the bin directory is located
  • Add to system environment variable path: The "c:\programme\microsoft visual studio .NET2003\Common7\IDE" directory or where the IDE directory is located
  • Add to user environment variable INCLUDE: The "c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include" directory or where the platform include directory is located
  • Also add to INCLUDE: C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\Include
  • Add to user environment variable LIB: The "c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib" directory or where the platform lib directory is located
  • Also add to LIB: C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\Lib
  • Install omniORB, omniNotify, CMake, XercesC and openSLP as described in the sections below. (The two last is only nescesary if the service manager has to run)

Testing if C++ works

  • Try compiling the Service Manager and the debug executables
  • Get it to run together (Se the using ServiceManager section below)

Using Python

Since the Python version preinstalled in cygwin has trouble with loading the .pyd library files in omniORB, it is nescessary to make a external installation of Python.
(Note the comment about the configure script in the General section.)
  • Delete or move the python.exe and python23.exe in the /usr/bin/ in Cygwin.
  • Download newest version of Python for Windows and install it (http://www.python.org/download/)
  • Add to system environment variable path: The "c:\python23\" directory or where Python was installed
  • Install omniORBpy as described in the omniORB section.

Testing if Python works

Installing omniORB

If you are not going to use C++, then you can just get the precompiled version, install that and follow the last three points. Also note that if you plan on using DWARF with Python, then you have to use an extern Python installation and not omniPython
  • Download omniORB in newest (4.0.5 or newer) version from (http://omniorb.sourceforge.net/).
  • Unpack and move to desired loaction. The .../omniORB-x.x.x/ directory is here called <omni-top>.
  • Uncomment the line "platform = x86_nt_4.0_vs_7" in the file /config/config.mk
  • Uncomment and set the PYTHON variable in /mk/platforms/x86_nt_4.0_vs_7.mk to where your Python install as a Cygwin path is (e.g. "PYTHON = /cygdrive/c/Python22/python")
  • Add to system environment variable path: The "<omni-top>\bin\x86_win32" directory
  • Add to user environment variable INCLUDE: "<omni-top>/include" (e.g. c:\Programme\omniORB-4.0.5\include)
  • In Cygwin goto <omni-top> and write "make export" - then take a cup of coffee and wait

Using omniPython

  • Download a precompiled version of omniPython (http://omniorb.sourceforge.net/)
  • Unpack and move the folders in the omniPython directory into the <omni-top> direcotry.

Installing omniORBpy

  • Install omniORB on your system as described above.
  • If you want to use C++ you need the non-precompiled version otherwise download omniORBpy in newest precompiled version from (http://omniorb.sourceforge.net/).
  • With the non-precompiled move the unpacked source to <omni-top>/src/lib and in goto /src/lib/omniORBpy2.4/ and "make export" (do not use the configure script as described in the README). Otherwise with the precompiled omniORBpy just unpack and move into the unpacked files and directories into the <omni-top> directory - overwriting several older files.
  • Add to system environment variable PYTHONPATH: = <omni-top>/lib/x86_win32;<omni-top>/lib/python/-.
    (e.g. c:/Programme/omniORB-4.0.5/lib/x86_win32;c:/Programme/omniORB-4.0.5/lib/python/)

Installing omniNotify

  • Install omniORB as described above
  • Download latest version of omniNotify and follow the README (http://omninotify.sourceforge.net/).
    NOTE: If you use MS Visual C++ in version from 7.1 there is no longer support for several header files as <iostream.h> (Now just <iostream>). You then need to change several files in omniNotify (at least in version 2.1 and older) to include the non-.h headers and afterwards write 'using namespace std;' to make the export.
    To help a bit there is a patch file in the dwarf/win32/ directory. Just copy the patchfile MSv71-omniNotify.patch to the <omni-top>/src/services/omniNotify/ directory and in cygwin type 'patch -p1 < MSv71-omniNotify.patch' and you should be able to compile.

Using CMake

Do not use the internal Cmake in Cygwin, instead
  • Get the newest precompiled version of CMake (version 2.0.5 or newer) at (http://www.cmake.org/).
  • Install and if the CMake bin directory is not already in your enviroment Path variable then add it.
  • Run this Cmake (Not through Cygwin), and in the box "Where is the source code" set the DWARF root directory (e.g c:\dwarf), and "Where to build the binaries" to dwarfs build directory (e.g c:\dwarf\build)
  • Press the Configure button, set any variables you would like to change and then press the configure button again.
  • Last press the OK buttion, this will create all the project files for VC++, with the root in the DWARFs build directory. Which means you should just open the DWARF.sln in the build directory into VC++ and compile.

Using Xercesc

  • Get the source code for Xercesc at http://xml.apache.org/xerces-c/download.cgi
  • Unpack and move the code to desired location
  • Open the <Xerces-root>/Projects/VC<X;>/Xerces-all/Xerces-all.sln (<X;> is your version of VC++) in VC++ and compile the XercesLib project (debug version)
  • Copy DLL's from <Xerces-root>/build/win32/VC<X;>/debug to <Xerces-root>/bin, and LIB's into <Xerces-root>/lib
  • Rename the <Xerces-root>/src to <Xerces-root>/include
  • Set the enviroment variable XERCESCROOT to your <Xerces-root> path
  • Add the <Xerces-root>/bin to your PATH enviroment variable

Using openSLP

  • Download openSLP at http://www.openslp.org/
  • Unpack and move to desired location
  • Open <SLP-root>/win32/openslp.dsw in VC++ and compile all (debug version)
  • Move the <SLP-root>/win32/slpd/Debug/slpd.exe, <SLP-root>/win32/slptool/Debug/slptool.exe and <SLP-root>/win32/libslp/Debug/slp.dll to <SLP-root>/bin
  • Move the <SLP-root>/win32/libslp/Debug/lp.lib to <SLP-root>/lib
  • Move the <SLP-root>/libslp/slp.h to <SLP-root>/include
  • Add <SLP-root>/bin to your enviroment variable PATH
  • Add <SLP-root>/lib to your user enviroment variable LIB
  • Add <SLP-root>/include to your user enviroment variable INCLUDE
  • Move the slp.conf, slpd.log and slp.reg from <SLP-root>/ect/ to the Windows directory.
It has to be noted that the service manager script can currently not detect, start nor stop the slp deamon, so it has to be done manually. Before starting the service manager call slpd -start and after the service manager finished call slpd -stop before starting the service manager again.

Using Coin and SoWin

If you want to use the Viewer you will need to have Coin and SoWin running.
  • Download Coin2 and SoWin in there latest non-precompiled versions (SoWin has to be in a later version than 1.2.0, or get the latest night build) http://www.coin3d.org/download/
  • Put the bin directory in your Coin install directory in your PATH enviroment variable (e.g c:/Coin/bin)
  • Follow the install instructions as described on the download page, but install with the extra configure option --with-msvcrt=multithread-dynamic-debug (e.g ./configure --prefix=c:/Coin/ --with-msvcrt=multithread-dynamic-debug)
  • Create a new enviroment variable called COIN3DDIR and set it to you Coin root directory (e.g c:/Coin)

Using a local ServiceManager

  • Get C++ to work
  • Use cmake to configure, and VC++ to compile the serviceManager
  • Start/restart the slp deamon (e.g. slpd -start)
  • From the install/bin directory call the run-servicemgr script (If something fails, try and restarting the slp deamon and then the script)

Testing if the ServiceManager works

  • Compile the debug executable (option in CMake)
  • Try to start the ServiceManager: ./run-servicemgr
  • Start and connect the TestStringReciever and TestStringSender to the servicemanager
  • If it runs and your services communicate with each other, then the service manager works

-- MarcusToennis - 3 Aug 2004
-- FrimorTroels? - 28 Nov 2004


History (these are not deleted for convenice, but do not follow these steps, when installing DWARF on your platform)

History 1: Previous Twiki page

Steps (not necessarily in perfect order)
  • get latest omniorb for Win32
  • hack configure to remove am__fastdeb problem
  • run configure (get a beverage of choice)
  • run make (get another beverage of choice)
  • use dsw file from win32
  • remove dependencies on ServiceTestStringSend (should be the other way round)
  • add missing Dwarf stubs to stubs library
  • add omni orb include dir
  • add omni orb lib dir
  • add build include dir to common for config.h
  • add build include dir to ServiceTestStringSend for config.h
  • fix in ServiceTestStringSend service DEBUGSTREAM to THROWDEBUGSTREAM
  • fix __x86__ define in ServiceTestStringSend project file
  • compile stubs
  • compile corba
  • compile common
  • compile ServiceTestStringSend

Notes

  • never use _WINSTATIC as define !
  • use -DserviceManager=othermachine to configure a foreign ServiceManager (The ServiceManager is currently not working on windows). For Java services you have to define the -D option as a virtual machine argument and not as a program argument. Example: java -DserviceManager=atbruegge43 -jar TestStringSenderJava.jar

History 2: Document from DWARF discuss BBoard

Viele Files befinden sich auf janus/shared/dwarf. Dieses Verzeichnis wird im folgenden als Z:\dwarf bezeichnet!

Wenn nicht explizit angegeben, bitte Aenderungen von Environmentvariablen so machen (fuer Windows XP): rechtsklick Arbeitsplatz -> Eigenschaften -> Erweitert -> Umgebungsvariablen

1. Internet Explorer 6 und Cortona4 (Z:\dwarf\software\win\cortvrml.exe) installieren

2. Cygwin installieren: Z:\dwarf\software\win\cygwin-download\setup.exe Wichtig: -alle Pakete installieren! -Lokales Installationsverzeichnis auswaehlen: Z:\dwarf\software\win\cygwin-download

3. Im Verzeichnis: Z:\dwarf\software\mandatoryWinInstall -SDKJava40.exe installieren (Installdir/bin zum PATH hinzufuegen) -j2sdk-1_4_0_01-windows-i586.exe installieren (auch hier Installdir/bin zum PATH hinzufuegen)

4. Die .jar-Files von Z:\dwarf\software\mandatoryWinInstall\jars in einen lokalen Ordner kopieren (im folgenden JARORDNER genannt)

5. Folgende Dateien in den Classpath aufnehmen: -die 5 jars aus dem JARORDNER -2 jar Dateien, die beim kompilieren von DWARF noch erzeugt werden: stubs.jar und DWARFstubs.jar. Normalerweise liegen diese im cygwin Filesystem unter /usr/local/libexec/. Also unter windows meist unter: C:\cygwin\usr\local\libexechier mein Classpath: C:\cygwin\home\developer\jars\graham-kirby-compiler.jar;C:\cygwin\home\developer\jars\JavaORB226patched.jar;C:\cygwin\home\developer\jars\log4j-1.2.5.jar;C:\cygwin\home\developer\jars\rakiura-jfern.jar;C:\cygwin\home\developer\jars\rakiura-jrio.jar;C:\cygwin\usr\local\libexec\stubs.jar;C:\cygwin\usr\local\libexec\DWARFstubs.jar

6. DWARF auschchecken und kompilieren. Dabei configure --disable-cplusplus machen!


Edit | Attach | Refresh | Diffs | More | Revision r1.24 - 21 Dec 2005 - 15:18 - MarcusToennis

Lehrstuhl für Computer Aided Medical Procedures & Augmented Reality    rss.gif