Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Commit

Permalink
Merge pull request #40 from ThePacielloGroup/matatk-versioning
Browse files Browse the repository at this point in the history
DRY Versioning
  • Loading branch information
menovak committed Dec 4, 2014
2 parents efc6812 + 7ea9d9c commit ef58b6e
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 168 deletions.
81 changes: 61 additions & 20 deletions README.md
@@ -1,52 +1,93 @@
Web Accessibility Toolbar
==========================
=========================

This repo contains the [Web Accessibility Toolbar (WAT)](http://www.paciellogroup.com/resources/wat) including an [Inno Setup](http://www.jrsoftware.org/isinfo.php) file for creating a "setup.exe"-style installer.
This repo contains the [Web Accessibility Toolbar
(WAT)](http://www.paciellogroup.com/resources/wat) including an [Inno
Setup](http://www.jrsoftware.org/isinfo.php) file for creating a
"setup.exe"-style installer.

There's [reference documentation](documentation.md) that explains what you can do with the toolbar and includes keyboard shortcuts.
There's [reference documentation](documentation.md) that explains what
you can do with the toolbar and includes keyboard shortcuts.

Currently this repo does not contain the source for the toolbar DLL, but this is only the "shell" for the code; you can change virtually anything by editing the scripts and then building the setup program with Inno Setup.
Currently this repo does not contain the source for the toolbar DLL, but
this is only the "shell" for the code; you can change virtually anything
by editing the scripts and then building the setup program with Inno
Setup.

Editable Files
---------------
--------------

These are the files that you can edit to modify the WAT.

### Accessibility_Toolbar.xml
### Accessibility\_Toolbar.xml

This is an xml file which creates the menu's and menu items in the WAT UI. You can add/remove/modify the UI via this file. The text labels for the UI controls are provided via variable (res_id) references to the Translation.ini
This is an xml file which creates the menu's and menu items in the WAT
UI. You can add/remove/modify the UI via this file. The text labels for
the UI controls are provided via variable (res\_id) references to the
Translation.ini

**For example:**
The WAT > Structure > headings feature is represented as this in the XML file:
**For example:** The WAT \> Structure \> headings feature is represented
as this in the XML file:

```xml
``` {.xml}
<item resid="head1_struc" image="-1" />
```

### Translation.ini

Contains all the text strings provided in the UI and the functions. Also includes mappings to invoke the scripts and inbuilt features via the UI.
Contains all the text strings provided in the UI and the functions. Also
includes mappings to invoke the scripts and inbuilt features via the UI.

### Scripts directory

The majority of the WAT functionality is powered by JS or WS files. (WS just being a windows scripting host version -- but written in JS). You can think of the features as bookmarklets, as this is how most of them started life. You can modify an exsiting feature by changing its corresponding script file.
The majority of the WAT functionality is powered by JS or WS files. (WS
just being a windows scripting host version -- but written in JS). You
can think of the features as bookmarklets, as this is how most of them
started life. You can modify an exsiting feature by changing its
corresponding script file.

**For example:**
The WAT > Structure > headings
is powered by Headings.js, so you hack on that script to change the behaviour of the feature.
**For example:** The WAT \> Structure \> headings is powered by
Headings.js, so you hack on that script to change the behaviour of the
feature.

### Icons directory

Icons can be added to menus/menu buttons/menu items.

**For example:**
The Structure menu button (from the XML file Accessibility_Toolbar.xml)
**For example:** The Structure menu button (from the XML file
Accessibility\_Toolbar.xml)

```xml
``` {.xml}
<button type="button" resid="Structure" accesskey="6" image="structure.bmp">
```

Building
---------
--------

Open `Web-Accessibility-Toolbar.iss` with [Inno
Setup](http://www.jrsoftware.org/isinfo.php). You can build a setup file
for 32-bit machines, or one for 64-bit machines (which also includes the
32-bit binaries, so you can use IE in 32- or 64-bit mode). The comments
in the ISS file explain how (you only need to change one line of the
file).

Development Info
----------------

The file `wat/Translation.ini` is in UTF-16, which Git can't cope with.
However, you can use an external diff tool, such as vimdiff (or mvimdiff
if you have MacVim).

- To use vimdiff:

git config --global diff.tool vimdiff

- To use mvimdiff takes a little extra work:

git config --global diff.tool gvimdiff
git config --global difftool.gvimdiff.path `which mvimdiff`

The use of `--global` changes the setting in your home directory, rather
than just the current repository; if you only want to change this
setting for the WAT repository, drop the `--global` part.

Open `Web-Accessibility-Toolbar.iss` with [Inno Setup](http://www.jrsoftware.org/isinfo.php). You can build a setup file for 32-bit machines, or one for 64-bit machines (which also includes the 32-bit binaries, so you can use IE in 32- or 64-bit mode). The comments in the ISS file explain how (you only need to change one line of the file).
7 changes: 3 additions & 4 deletions Web-Accessibility-Toolbar.iss
Expand Up @@ -8,12 +8,12 @@
; Please *do not* save changes if you only edit the above two lines :-).

; Vital Stats
#define ReleaseYear 2014
#define TPG "The Paciello Group"
#define AppNameFull "Web Accessibility Toolbar"
#define AppNameShort "WAT"
#define FirstYear 2004
#define ReleaseYear 2014
#define TheVersion "2.0.0.0"
#define TheVersion ReadIni(SourcePath + "\wat\Translation.ini", "Captions", "Version", ">>>UNKOWN<<<")
#define DestinationDirectory "Web-Accessibility-Toolbar"

; Output filename arch part
Expand All @@ -32,7 +32,7 @@ uninstallfilesdir={app}
UninstallDisplayName={#AppNameFull} (Uninstall only)
sourcedir=wat
OutputDir=..
outputbasefilename=WAT-{#ReleaseYear}-{#OutputArchName}
outputbasefilename=WAT-{#TheVersion}-{#OutputArchName}
defaultdirname={pf}\{#DestinationDirectory}
appvername={#AppNameFull}
Appname={#AppNameFull}
Expand All @@ -42,7 +42,6 @@ DisableFinishedPage=no
DisableProgramGroupPage=yes
VersionInfoCompany={#TPG}
VersionInfoCopyright=Copyright (C) {#FirstYear}-{#ReleaseYear} {#TPG}
VersionInfoVersion={#TheVersion}
VersionInfoDescription={#AppNameFull} {#ReleaseYear}
AppPublisher={#TPG}
AppPublisherURL=http://www.paciellogroup.com
Expand Down

0 comments on commit ef58b6e

Please sign in to comment.