This guide will help you create an extension with a wbar icon and/or menu entry for a command.  As an example, I will use an extension I created for an icon and menu entry to mount my networked mp3 directory. The extension is named zzzmymount.tcz

==== Create a temporary dir to work from ====
<code>tc@box:~$ mkdir /tmp/extension && cd /tmp/extension</code>

==== Write the script ====
Use your favorite editor (for me its nano)
<code>
tc@box:/tmp/extension$ mkdir -p usr/local/bin
tc@box:/tmp/extension$ nano usr/local/bin/mountmp3s
</code>

<code>
#!/bin/sh
[ -d /home/tc/mnt/mp3s ] || mkdir /home/tc/mnt/mp3s
sudo mount -t cifs //192.168.1.100/mp3s /home/tc/mnt/mp3s -o uid=1001,gid=50,username=tc,password=xxxx
</code>

Dont forget to make it executable
<code>
tc@box:~$ chmod +x usr/local/bin/mountmp3s
</code>

==== Create the menu entry ====
(note: even if you do not wish to have a menu entry, you must have a menu file to trigger the setup)
<code>
tc@box:/tmp/extension$ mkdir usr/local/tce.menu
</code>
If you do not want a menu entry:
<code>
tc@box:/tmp/extension$ touch usr/local/tce.menu/zzzmymount
</code>
If you do:
<code>
tc@box:/tmp/extension$ nano usr/local/tce.menu/zzzmymount
</code>
<code>
<JWM>
<Program label="Mount MP3s">/usr/local/bin/mountmp3s</Program>
</JWM>
</code>
(note: capitalization is important in the tags)

==== Create icon entry ====
<code>
tc@box:/tmp/extension$ mkdir usr/local/tce.icons
tc@box:/tmp/extension$ nano usr/local/tce.icons/zzzmymount
</code>
<code>
i: /usr/local/tce.icons/mountmp3s.png
t: Mount MP3s
c: /usr/local/bin/mountmp3s
</code>
(note: make sure this file end in a newline. most editors do this automatically)

==== Add the icon ====
Search around the web for an icon you like. A good place to look is:
[[http://www.iconspedia.com|www.iconspedia.com]] Remember to use the name you specified in the icon file above.
<code>
tc@box:/tmp/extension$ wget -O usr/local/tce.icons/mountmp3s.png http://www.iconspedia.com/dload.php?up_id=16386
</code>

==== Check permissions and ownership ====<
<code>
tc@box:/tmp/extension$ cd usr/local
tc@box:/tmp/extension/usr/local$ sudo chown -R root.staff tce*
tc@box:/tmp/extension/usr/local$ sudo chmod 775 tce*
</code>

==== Create the exension  ====
(note: this requires squashfs-tools-4.x.tcz)
<code>
tc@box:/tmp/extension$ mksquashfs . ../zzzmymount.tcz
</code>
The extension will be in /tmp. You can now load it to test it out:
<code>
tc@box:/tmp/extension$ tce-load -i /tmp/zzzmymount.tcz
</code>
The icon and menu should now be visible and usable.
Finally move the new extension into your personal repo:
<code>
tc@box:/tmp/extension$ cp ../zzzmymount.tcz $(cat /opt/.tce_dir)
</code>

==== Troubleshooting ====
If you are creating icons for a package, pre-existing freedesktop configuration files may conflict with custom wbar icon files and settings. Check for a pre-existing freedesktop configuration at: /usr/local/share/applications/PACKAGENAME.desktop 
For details on how to configure that file for Tiny Core, read [[iconmenuinfo]].