created: 2003-05-09
modified: 2003-10-19

Stefan.Huberdoc.at

This is obsolete information! if you're looking for more recent information, go to the newer document.

Yes, you're reading right. I have installed the webbrowser on my digital camera (Fuji FinePix A303).

General

Prerequisite: It is necessary, that your digital camera announces itself as USB mass storage. This way, you can use it just like a harddisk. My father's Canon Ixus v3 does not provide a drive letter and prohibits writing to the memory card.

The procedure I followed is simple:

  1. I took an single user installation of Opera 7 and copied the directory to the memory card
  2. Patched the INI files
  3. wrote a script that changes the patched ini files (the USB mass storage can get different drive letters on different computers)

I found it very cool when I found out, that I can use my digicam as external hard disk. So if you don't want to buy a USB stick, have a look at your digital camera :) The same procedure works with mice, watches, USB sticks, …

I have a collection of tools that I like to have at hand anywhere. These went on the xD card as well. They're mostly UnxUtils, which you'll need when you want to use the script I used (zsh is much more comfortable to program than CMD.EXE).

Opera

Preparations: Download the UnxUtils package and copy sed.exe, sh.exe and pwd.exe to \Progs\bin on your USB device (You have to create these directories)!

1. Copy

When you have your single user installation, just copy the complete Opera directory to the root directory of your USB device. Name it Opera (not Opera6 or Opera7 or whatever).

2. Patch

Opera has two INI files that it uses when you have a single user installation: OperaDef6.ini and profile\opera6.ini. You must make copies of these two files and patch those copies for they are being used as templates to create the actual configuration files for Opera. I called them OperaDef6.ini.in and profile\opera6.ini.in

Replace any absolute paths in these files with the string ##BASE##. So if your original installation resided in C:\Program Files\Opera\, replace every ocurrence of this string.

For instance, in OperaDef6.ini, there's an option for Opera's main directory or button set: it should look similar to the following lines:

MAINDIR=##BASE##
BUTTON SET=##BASE##skin\Standard.zip

3. Scripts

I have written two scripts. The more important one is \Progs\batch\start_opera.sh (on your USB device). It is a zsh-script for which sh.exe from UnxUtils is needed. It is used to adapt the INI files to the drive letter of your USB device. It is called from the second script:

# change this to the relative location of your sh.exe, sed.exe and pwd.exe
PROGS=Progs/bin

OPERA=`pwd | sed -e "s/\\\\//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/gi"`
# 32 backslashes. Several shells and I need four of them for sed.exe.
OPERA="$OPERA\\\\Opera"

case "$1" in
  start)
  echo -e "  $OPERA"
  ${PROGS}/sed -e "s/##BASE##/${OPERA}\\\\/gi"  \
               < ${OPERA}/OperaDef6.ini.in      \
               > ${OPERA}/OperaDef6.ini
  ${PROGS}/sed -e "s/##BASE##/${OPERA}\\\\/gi"  \
               < ${OPERA}/profile/opera6.ini.in \
               > ${OPERA}/profile/opera6.ini
  ;;
  stop)
  ${PROGS}/sed -e "s/${OPERA}\\\\/##BASE##/gi"  \
               < ${OPERA}/OperaDef6.ini         \
               > ${OPERA}/OperaDef6.ini.in
  ${PROGS}/sed -e "s/${OPERA}\\\\/##BASE##/gi"  \
               < ${OPERA}/profile/opera6.ini    \
               > ${OPERA}/profile/opera6.ini.in
  ;;
esac

The script assumes, that Opera resides in the directory \Opera and sed, pwd and sh in \Progs\bin on your USB card, as already mentioned above.

When you call it with the parameter "start", it will create the proper INI files for Opera. When you call it with "stop", it will take the INI files and replace the paths with ##BASE## again. This mechanism is needed because you won't get the same drive letter for your USB card on each system. You need not call this script manually. This is done from the second script:

The other script is \start_opera.bat. It calls the zsh-script first, launches Opera and executes the zsh script again.

@ECHO off
ECHO Generating INI file...
Progs\bin\sh Progs\batch\start_opera.sh start
ECHO If the base directory is correct then...
pause
Opera\opera.exe
ECHO Writing back INI files...
Progs\bin\sh Progs\batch\start_opera.sh stop

Notes

Originally, I had a multi user setup. If you use a multi user installation with this method, it will most likely cause troubles on any computer that you use it on. In this case just set the parameter Multi User=0 in the section [System] of OperaDef6.ini and therefore change it to a single user installation.

To save space on the memory card, I turned off disk cache in Opera. I also removed the directory UnInst from the Opera installation, since I only need to delete it from the xD card.

The Last Word: The whole installation sums up to about 5MB for a single user installation of Opera on my digital camera.

Thanks to René Stach for helping me make a better document! Another bunch of thanks goes to Torsten Keil for exchanging experiences.

Contact & ImprintKontakt & Impressum
Created: 2003-05-09 — last modified: 2003-10-19 — last update of web site: 2012-01-25
Follow me: RSS Follow StefanMHuber on Twitter