Skip to content

Commit

Permalink
Fix building of IDL and move it into a separate script. (LinuxA11y#10)
Browse files Browse the repository at this point in the history
Fix the ordering of the idl so that symbols are defined when they need to be
Fix the capitalization of AccessibleEventID.idl in the build script, which used AccessibleEventId.idl
Create separate script for concatenating the idl which can be used separately. The resulting concatidl.sh script can be used on non-Windows desktops, without Doxygen or Cygwin
Update docs

Signed-off-by: Aaron Leventhal <[email protected]>
  • Loading branch information
aleventhal authored and jcsteh committed Feb 4, 2019
1 parent e62544a commit 59ef180
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 24 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ large mainstream applications.
# Useful links
* [Object attributes](https://wiki.linuxfoundation.org/accessibility/iaccessible2/objectattributes) former references
* [Text attributes](https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes) former references

# Build ia2_api_all.idl for your project
Run ```concatidl.sh```
30 changes: 11 additions & 19 deletions buildapi.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# run build.sh from the IA2 directory
# run buildapi.sh from the IA2 directory

# make sure we have Cygwin
if [ ! -d /cygdrive/c ]; then
Expand All @@ -18,40 +18,32 @@ if [ ! -x /cygdrive/c/program\ files/doxygen/bin/doxygen.exe ]; then
exit 1
fi

cd api

# make sure we have a Doxygen configuration file
if [ ! -f ../doxygen.conf ]; then
if [ ! -f doxygen.conf ]; then
echo 'Expected to find doxygen.conf'
exit 1
fi

# clean up test dir
if [ -f ../IDL-Test/dlldata.c ]; then
rm ../IDL-Test/*.c
rm ../IDL-Test/*.h
if [ -f IDL-Test/dlldata.c ]; then
rm IDL-Test/*.c
rm IDL-Test/*.h
fi

cp ../IDL-Test/StdAfxSave/*.* ../IDL-Test
cp IDL-Test/StdAfxSave/*.* IDL-Test

# remove previous autogenerated Doxygen files
if [ -d ../docs ]; then
rm -rf ../docs
if [ -d docs ]; then
rm -rf docs
fi

# generate IDL documentation with Doxygen
cd api
/cygdrive/c/program\ files/doxygen/bin/doxygen ../doxygen.conf

# remove any previous autogenerated merged IDL file
if [ -f ../ia2_api_all.idl ]; then
rm ../ia2_api_all.idl
fi

# generate merged IDL file - IA2TypeLibrary.idl must be at the end
cat Accessible2.idl Accessible2_2.idl Accessible2_3.idl AccessibleAction.idl AccessibleApplication.idl AccessibleComponent.idl AccessibleDocument.idl AccessibleEditableText.idl AccessibleEventId.idl AccessibleHyperlink.idl AccessibleHypertext.idl AccessibleHypertext2.idl AccessibleImage.idl AccessibleRelation.idl AccessibleRole.idl AccessibleStates.idl AccessibleTable.idl AccessibleTable2.idl AccessibleTableCell.idl AccessibleText.idl AccessibleText2.idl AccessibleValue.idl IA2CommonTypes.idl IA2TypeLibrary.idl | sed -e 's/import "[A-Za-z0-9].*$//g' - | cat api_all_headers.idl - > ../ia2_api_all.idl

cd ..

./concatidl.sh

# remove previous autogenerated zip file
if [ -f ia2-api-`date +%Y%m%d`.zip ]; then
rm ia2-api-`date +%Y%m%d`.zip
Expand Down
16 changes: 16 additions & 0 deletions concatidl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
# run concatidl.sh from the IA2 directory
cd api

# remove any previous autogenerated merged IDL file
if [ -f ../ia2_api_all.idl ]; then
rm ../ia2_api_all.idl
fi

# generate merged IDL file:
# The order is important.
# - AccessibleRelation must be before Accessible2
# - IA2TypeLibrary.idl must be at the end
cat IA2CommonTypes.idl AccessibleRelation.idl AccessibleAction.idl AccessibleRole.idl AccessibleStates.idl Accessible2.idl Accessible2_2.idl Accessible2_3.idl AccessibleComponent.idl AccessibleValue.idl AccessibleText.idl AccessibleText2.idl AccessibleEditableText.idl AccessibleHyperlink.idl AccessibleHypertext.idl AccessibleHypertext2.idl AccessibleTable.idl AccessibleTable2.idl AccessibleTableCell.idl AccessibleImage.idl AccessibleEventID.idl AccessibleApplication.idl AccessibleDocument.idl IA2TypeLibrary.idl | sed -e 's/import "[A-Za-z0-9].*$//g' - | cat api_all_headers.idl - > ../ia2_api_all.idl

cd ..
11 changes: 6 additions & 5 deletions how-to-build-ia2-idl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ After cygwin install had to
mkpasswd -l > /etc/passwd
Note: On a later install on another machine I didn't have to do this

Had to update my doxygen.conf from 1.5.8 to 1.8.2 (to be compatible with the latest version) using
Had to update my doxygen.conf from 1.5.8 to 1.8.2 (to be compatible with the latest version) using
doxygen -s -u doxygen.conf (-s = no comments, -u = update)
Note: If the config file spec hasn't changed this won't be necessary

If you only need the merged IDL file for your project:
- Just run concatidl.sh -- there is no need for Doxygen in this case

How to build the IA2 docs, a merged IDL file, a zip file containing the docs and IDL files.
- The directory tree...
Expand All @@ -19,10 +21,10 @@ How to build the IA2 docs, a merged IDL file, a zip file containing the docs and
- buildapi.sh: the build script (need cygwin bash shell interpreter installed)
- doxygen.conf: the doxygen config file (tweaked from the doxygen distribution)
- doxygen.css: the doxygen css file (tweaked from the doxygen distribution)
- header.html: contains metadata
- header.html: contains metadata
- footer.html: contains the footer seen on each page
- ia2-<version>-errata.html: info about changes and bug reporting
- changelog.txt: lists changes made since the last release
- changelog.txt: lists changes made since the last release
- a merged IDL file with all the IDL concatenated together
- a zip file containing IDL and doxygen output
- an api directory which contains the IDL
Expand Down Expand Up @@ -59,7 +61,7 @@ How to build the IA2 docs, a merged IDL file, a zip file containing the docs and
- You will have to point resedit at the windows.h file from a Windows SDK
- I used the SDK for v7.1A
- Use Visual Sudio 2012 Express Edition to build the solution.
- Put the project files on the web site:
- Put the project files on the web site:
- IAccessible2Proxy.def
- IAccessible2Proxy.rc
- IAccessible2Proxy.sln
Expand All @@ -68,4 +70,3 @@ How to build the IA2 docs, a merged IDL file, a zip file containing the docs and
- Put the generated DLL on the web site:
- IAccessible2Proxy.dll


0 comments on commit 59ef180

Please sign in to comment.