Windows

You need to separately compile the following 3 solutions, in the order given below:

  1. src/OCALA_Suite/OCALA/visual_studio/OCALA_windows.sln
  2. src/OCALA_Suite/i3/visual_studio/i3.sln
  3. src/OCALA_Suite/sampleOCD/visual_studio/SampleOCD/SampleOCD.sln
  4. src/OCALA_Suite/RSPTunnelOCD/visual_studio/RSPTunnelOCD/RSPTunnelOCD.sln

Note

OCALA has been tested to compile with Visual Studio.NET 2003. It may not compile on Visual Studio.NET 2005 without modifications.

If you are familiar with Visual Studio, you can directly jump to the Compilation & Run Steps section. Otherwise, let us first get familiar with Visual Studio before proceeding to the Compilation & Run Steps.

Opening a Solution

You have two options:

  • Option 1: Double click on the appropriate .sln file in Windows Explorer. Visual Studio will automatically start up and load the solution.

  • Option 2: Start up Visual Studio. Select File->Open Solution.

Caution

Make sure you open the .sln file and NOT any .vcproj file with a similar name. If you are following Option 2, make sure you choose the File->Open Solution and not File->Open.

Setting Compilation Mode

Visual Studio has two compilation modes : Debug and Release. If you compile in Debug mode, you can step through the code and examine the values of variables. Code step through support in Release mode sometimes does not work. A program compiled in Release mode might run faster as it does not have embedded debugging information.

The default mode is Debug. To change the mode to Release, select Release from the drop down box located in the top toolbar. You need to make sure that all three solutions are in the same mode as code from different modes are not compatible with each other.

Building a Solution

Once you have opened a solution, you can compile it by selecting Build->Build Solution.

Caution

Make sure you choose Build->Build Solution and NOT Build->Build ≤some specific project>. We need to build all the projects; i.e. the entire Solution.

Wait till the solution compiles. There might be many warnings. They are harmless (hopefully :-). If you get a message like the following, you are done.

------------------ Done --------------------
    Build: N succeeded, 0 failed, 0 skipped

Compilation & Run Steps

Now that you are familiar with Visual Studio, let us go through all the steps required to compile, run and test OCALA.

Note

The OCDs are compiled into DLLs in separate projects. For example, the i3OCD can be found in OCALA_src_x_y/i3/visual_studio/i3/i3OCD. The OCALA_proxy must be told which DLL to load for a particular OCD through the libFileName_windows attribute in the proxy-config.xml configuration file.

  • STEP 1: Build the OCALA_windows solution.

  • STEP 2: Build the i3 and SampleOCD solutions.

  • STEP 3: Copy the necessary libraries to the directory where OCALA_proxy.exe was created by STEP 1. For this purpose, use the OCALA/visual_studio/copyLibs2Debug.bat if you are using Debug mode; use OCALA/visual_studio/copyLibs2Release.bat if you are using Release mode.

  • STEP 4: Copy the required icons using the copyIcons2Debug.bat (or copyIcons2Release.bat) script.

  • STEP 5: If this is the first time you are running the OCALA on this machine, you need install the tun device. Run the command: addtap.bat located in OCALA/visual_studio/tun.

  • STEP 6: Set the working directory and command line arguments for OCALA_proxy.

    1. Right click on OCALA_proxy in the Solution Explorer pane of the OCALA_windows.sln window.

    2. Choose Properties. In the OCALA_proxy Property pages dialog box, choose Configuration Properties->Debugging.

    3. Set Working Directory to $(OutDir).

    4. Set Command Arguments to -c

  • STEP 7: Configure OCALA_proxy. You need to set an i3 name for your machine. The easiest way to configure OCALA is to use the graphical configuration utility. You can also manually edit the xml configuration files.

    • OPTION A: Graphical Configuration Utility

      1. Go to visual_studio/Debug (Release if you are in Release mode).

      2. Execute the command java -cp . -jar ..\..\config_gui\ProxyConfig.jar

      3. Follow the instructions on screen.

    • OPTION B: If you do not have java 1.4.2 or higher installed, you will not see the configuration GUI. Please refer the section on "Manually Configuring OCALA" for instructions on how you can manually configure OCALA. The configuration GUI has been only tested to work with Sun Java.

  • STEP 8: Run OCALA_proxy by pressing F5.

  • STEP 9: Check if OCALA is working:

    1. If you are running ProxyMonitorApp, you can see OCALA related information in the Windows task bar.

    2. If not, try pinging some known i3 machine (for example, the name you set in STEP 6 above.). Most windows firewalls block pings by default. So you need to enable pings for this step to work. You may need to wait upto 30 seconds for i3 to initialize and the triggers to be inserted.

    3. If OCALA is not working, please send the debug_*.txt files located in the OCALA/visual_studio/Debug or Release directories to . We will help you fix the problem.