I really love the open source Idea, but I'm a noob when it comes to scripting and programming. So I'm playing with batch files atm. As per my post here. Also I've been trying to find an open source calculator to replace the MS calc.exe (from XP) that I have been using. Plenty of "freeware" no open source though. SpeedCrunch is too big for my needs.
The only small OS calculator I found was a firefox extension. So I planned to come here and ask you clever bods if someone could make it into a calculator. While checking it out ... I found that it could be run from a cmd prompt so that only the calc showed up ... this led to experimentation and a whole Saturday shot to hell... lol
The following is the results of the experiment. Ta Da ... FoxCalc. It's a batch file converted to an exe (so it shows up in the PAM) that loads the firefox extension Calculator in it's own window looking very much like calc.exe but better.
The following are my notes on how I did it (So I can do it again .. hehe) Thought I'd share and help anyone else who's on a steep learning curve.
Any advice, critisism, etc will be appreciated.
*Admins please delete/move/etc the post as you will. This was my best guess as to which forum to post in.
1) Get the Calculator, install, test it works
### FirefoxCalulator ### from https://addons.mozilla.org/en-US/firefox/addon/1194
Install on host + then copy across ... a la https://portableapps.com/support/firefox_portable
Copying Your Local Firefox Settings
If you're using a local copy of Firefox, you may wish to just copy your local Firefox settings right into Firefox Portable. Your local Firefox profile is usually installed in C:\Documents and Settings\[user]\Application Data\Mozilla\Firefox\Profiles\default.???\ Just copy the contents of that folder (except the cache directories) to the FirefoxPortable\Data\profile directory. Then, and this is important, delete the file FirefoxPortableSettings.ini within the FirefoxPortable\Data\settings directory, if there is one. When you start Firefox Portable for the first time, it's recommended that you turn off disk cache, password saving and history if you're using a flash-based portable device. You can set all of these within the Privacy tab of the Firefox Options window. Sometimes, certain profiles will cause the launcher to fail or hang. It's best to give it a few minutes to see if it's just checking compatiblity and adjusting the locations of the extensions before giving up on it. If it fails, it is usually due to an incompatible extension.
In this instance you only need to copy the calculator extension. With a little scratching around in "C:\Documents and Settings\[user]\Application Data\Mozilla\Firefox\Profiles\****.default\extensions" you can find which of the sub-directories is the calc one. You just need to copy this one across to "FirefoxPortable\Data\profile\extensions" and deleted the FirefoxPortableSettings.ini file.
Run Firefox and then the calculator via menu:Tools\Calculator if it works then move on.
2) Make to batch files as per below. Then create the folder and copy the files into *:\PortableApps\FoxCalc
Why 2 batch files: Because the bat to exe converter I used was old and I don't think it understood the %~d0 variable which I was keen to try out. So the .exe simple calls the .bat which has the problem variable in.
#### FoxCalc.exe ### .bat to .exe -> Ghost option + Icon (credit below)
#### FoxCalc.bat ### reference http://code.google.com/p/firefoxcalculator/
"%~d0\PortableApps\FirefoxPortable\App\firefox\firefox.exe" -chrome "chrome://calculator/content/calculator.xul"
The FoxCalc worked for me even when the local version of firefox was running! I thought it couldn't do that.
Discovered the above was using the local version of firefox (ie. I removed the extension on the PC and it failed). Left the above in as a reminder. Also the 2 batch files where clunky and unnecessary, and would fail on win98. As I discovered %~d0 wasn't around then. Ah well, it was fun to play with.
Using the command suggested http://code.google.com/p/firefoxcalculator/ and a bit of geusswork I eventually came up with ....
2) Make the following batch file. Use bat2exe to get the all important exe file (my settings = Ghost option + Icon (credit below))
REM #### FoxCalc.exe ### cd.. cd \PortableApps\FirefoxPortable\ FirefoxPortable.exe -chrome "chrome://calculator/content/calculator.xul" EXIT
Then create the folder *:\PortableApps\FoxCalc and copy the file into it.
3) All set ... refresh your app list and run your new FoxCalc
Next step is to try to get the extension installed without loading it on the host machine first. Any thoughts? No I haven't looked anywhere yet... I off to bed now. 14 hrs in front of the PC is way to much for one session.
Get the bits to put it together or get my one here:
get this calculator.png and put it through http://converticon.com/ to get an .ico file
Open Source Icon from:
Silk icon set 1.3 by Mark James