Hello,
I'm attempting to come up with a general and consistent way for GfW to find the icon files used for the registering app and the notifications. In particular, a way that will allow a mix of 32-bit and 64-bit Windows PCs to run GfW on the same LAN, and allow the icons to be found in the case where GfW is not installed on drive C: on each PC on the LAN. I'm looking for flexibility.
I know that I can specify "x-growl-resource://<uniquevalue>" and embed the binary graphic when sending a REGISTER and NOTIFY packet, however, this is impractical for the environment I'm developing for: The source machine sending the notifications to GfW will often be low-powered Linux devices such as a TiVo or a RaspberryPi with WiFi. I've created a bash script to do the REGISTER and NOTIFY, however, it is important that the size of the packets be small to keep the network footprint low and to allow the notifications to be sent as quickly as possible. (The notifications will be caller ID name/number, occurring in real time.) It's also important that the size of the bash script be kept as small as possible so that it will load/run as quickly as possible.
The REGISTER and NOTIFY will be sent in the same script. I already thought about converting the icon binary data into hexadecimal strings (since bash scripts are just text files and are not binary friendly), but of course this requires the script to have variables with hexadecimal strings twice the binary size of the icon file, multiplied by the number of "Notifications-Count:"'s. Upon transmitting to GfW, the hex strings must be converted to binary for the "Identifier:" lines, and the length also determined. I'm attempting to keep things simple by using one, small, lean script.
In addition, the script will be configured to have the GfW hosts listed as multiple IP addresses in a simple bash array, with the script simply looping through each element to send the REGISTER/NOTIFY using netcat.
So I'd like to specify the icon files with the file:/// URL and have the icons installed on the PC running GfW.
What would be great is if GfW could handle:
1) Relative paths, in particular using the default search path as the directory where GfW is installed. So instead of having to specify two separate full paths:
file:///C:/Program Files (x86)/Growl for Windows/gntp-images/app-icon.png <-64 bit Windows
file:///C:/Program Files/Growl for Windows/gntp-images/app-icon.png <-32 bit Windows
Instead I could tell users to simply paste the gntp-images folder within the folder where GfW is installed. Then in REGISTER/NOTIFY I can use:
file:///./gntp-images/app-icon.png
When I tested the above the image was not found. I don't know whether GfW just doesn't recognize relative paths, or if I just don't know what GfW thinks is the current directory.
2) Resolution of Windows environment variables within the file:/// URL:
file:///%HOMEDRIVE%%HOMEPATH%/gntp-images/app-icon.png
or
file:///USERPROFILE/gntp-images/app-icon.png
-----
I would prefer method #1 (relative paths to the GfW installation folder) so that icon images don't have to be copied for each user on a multi-user Windows PC.
MY QUESTION FOR NOW: Does GfW 2.0.9 allow for relative icon paths? If so, this would eliminate the need to modify GfW for this feature request. If relative paths are allowed, what is the default directory where I would need to paste my gntp-images folder?