Steps for building actf-msaa.dll/actf-ia2.dll
This componentry is no longer actively developed or supported.
Requirements
- MicroSoft Visual Studio 2005
- JDK (java5 or later)
- Windows environment
1. Creating a new Visual C++ win32 project
- Go to File Menu->New->Project->Visual C++->Win32->Win32 Project.
- Type in the project name and the location ( Eg: Project actf-msaa or actf-ia2 in location
C:\MyProjects) and clik OK.
- A Win32 Application wizard pops up, Press 'Next 'on the welcome screen.
- In Application settings screen, Choose 'DLL' for 'Application type' and check 'empty project' for 'Additional Options' and press 'Finish'.
A directory with the project name will be created in the chosen location. ( C:\MyProjects\actf-msaa or C:\MyProjects\actf-ia2).
2. Copying the required source files and idl file
The following are the Msaa source files (.h and .cpp) which can be obtained from the org.eclipse.actf.accservice.win32.msaa-fragment project in bin-src folder.
- Accessible.h
- org_eclipse_actf_accservice_core_win32_msaa_MsaaAccessible.h
- org_eclipse_actf_accservice_core_win32_msaa_MsaaAccessibilityEventService.h
- org_eclipse_actf_accservice_core_win32_msaa_MsaaWindowService.h
- Accessible.cpp
- org_eclipse_actf_accservice_core_win32_msaa_MsaaAccessible.cpp
- org_eclipse_actf_accservice_core_win32_msaa_MsaaAccessibilityEventService.cpp
- org_eclipse_actf_accservice_core_win32_msaa_MsaaWindowService.cpp
- ia2_api_all.idl ( http://accessibility.freestandards.org/a11yspecs/ia2/ia2_api_all.idl )
The following are the IA2 source files (.h and .cpp) which can be obtained from the org.eclipse.actf.accservice.win32.ia2-fragment project in bin-src folder.
- CAccessible2.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2Accessible.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleAction.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleApplication.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleComponent.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleEditableText.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleHyperlink.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleHypertext.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleImage.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleTable.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleText.h
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleValue.h
- CAccessible2.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2Accessible.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleAction.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleApplication.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleComponent.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleEditableText.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleHyperlink.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleHypertext.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleImage.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleTable.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleText.cpp
- org_eclipse_actf_accservice_core_win32_ia2_IA2AccessibleValue.cpp
- ia2_api_all.idl ( http://accessibility.freestandards.org/a11yspecs/ia2/ia2_api_all.idl )
Copy all of the above files into the project directory ( Eg: C:\MyProjects\actf-msaa or C:\MyProjects\actf-ia2).
In solution explorer, right click on Header files-> Add existing Item and
select all of the header files. Similarly, add all .cpp files to Source files
and ia2_api_all.idl to Resource files.
2. Setting the project properties
- If you've not chosen the project name as 'actf-msaa' or 'actf-ia2' in the step 1, right click on the project in solution explorer and rename it to 'actf-msaa' or 'actf-ia2' respectively.
The dll has the same name as the project by default and we want the dll names to be 'actf-msaa.dll' and 'actf-ia2.dll'.
- Choose the desired build configuration, Release or Debug. You can choose this on Build Menu-> Configuration Manager.
- Right click on project->Properties. In the properties window, make sure you select the desired configuration, Release or Debug.
- In Configuration properties->C/C++->General->Additional Include directories:
Add the paths for include and include/win32 folders in jdk directory.
Eg: "C:\Java6\jdk\include";"C:\Java6\jdk\include\win32". If you have JDK directory setup as the JAVA_HOME environment variable, it is easier to use the following include path:
"$(JAVA_HOME)\include";"$(JAVA_HOME)\include\win32"
- For actf-ia2 project, also add the path of the actf-msaa source files.
(Eg: "C:\Java6\jdk\include";"C:\Java6\jdk\include\win32";"C:\My projects\actf-msaa").
- For 'actf-msaa' project, In Configuration properties->C/C++->Proprocessor->Preprocessor definitions: Add CACCESSIBLE_EXPORTS
- In Linker-> Input->Additional Dependencies: Type in oleacc.lib gdiplus.lib for actf-msaa project and
oleacc.lib actf-msaa.lib for actf-ia2 project.
- For Actf-ia2 project, In Linker-> General->Additional library directories, add the path of the actf-msaa.lib. For debug configuration, it would be 'C:\MyProjects\Actf-msaa\Debug'
and for Release, 'C:\MyProjects\Actf-msaa\Release'.
- In MIDL-> Output->Header file, change $(InputName)_h.h to $(InputName).h.
This step is to ensure that when ia2_api_all.idl is compiled, the header file is generated as ia2_api_all.h instead of ia2_api_all_h.h.
4. Adding the MIDL generated files to the project
Right click on ia2_api_all.idl and choose Compile.
If ia2_api_all.idl is compiled successfully, the
following files are generated in the project folder: ia2_api_all.h, ia2_api_all_i.c and ia2_api_all_p.c.
Add ia2_api_all.h to header files and ia2_api_all_i.c to source files.
This completes all the project settings and we're ready to build.
5. Build the project
In Build Menu, Choose Build Solution. If the build is successful, actf-msaa.dll/actf-ia2.dll is
created in Debug or Release directory in the project folder.
(Eg: C:\MyProjects\actf-ia2\Release\actf-msaa.dll or
C:\MyProjects\actf-ia2\Debug\actf-ia2.dll)