Mozilla IM Client plug-in
AldarHawk wrote: sort of like GAIM or Trillian but in a FireFox browser…interesting idea That is exactly it. I wonder who would use it? I know in terminals where they have computers to pay to be on the net will be one place.. libraries..
TAoS wrote: How to code it though? I don't know the firefox as well as I should haha.
I guess if enough people are interesed in it.. some of us can download the SDK and get to work.
Any other ideas, comments?
willeH wrote: Id be interested in joining a developement team to implement the idea.
Yeah- that will be cool. Add me on MSN. sweft84@gmail.com
What program languages do you know? This will be a cool project. This is what I found:
Build your Firefox extension with Ant
You need to download 4 things:
* Ant, from http://ant.apache.org/.
* Gecko SDK, from
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.3/
or whichever is the latest version. Expand it to a directory, say C:\Tools\gecko-sdk.
* Netscape build tools, from
http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip.
Expand it to a directory, say C:\Tools\buildtools.
* Ant-contrib tasks (of which we want the "foreach" task), from
http://ant-contrib.sourceforge.net/.
You only need to extract the .jar file from the download and put it in the lib subdirectory of your Ant installation.
Structure your Firefox extension's source directory as follows:
* your-extension-dir/
o build.xml
o do.bat
o src/
+ install.rdf
+ chrome/
# content/
* contents.rdf
* *.xul, *.js,
# locale/
* en-US/
* ...
# skin/
* classic/
* ...
+ components/
# *.idl
# *.js
+ defaults/
o build/ (containing intermediate generated files)
o dist/ (containing the final distribution XPI file)
The build.xml file should look like this:
<?xml version="1.0" ?> <project name="your-project-name" default="createDistributionXPI"> <!– Tool directories : *** Make sure you fix these to match your own environment *** –> <property name="gecko_sdk_path" location="C:\Tools\gecko-sdk" /> <property name="buildtools_path" location="C:\Tools\buildtools" />
<!– Derived tool directories –> <property name="xpidl_exe" location="${gecko_sdk_path}/bin/xpidl.exe" /> <property name="IDLs_path" location="${gecko_sdk_path}/idl" /> <property name="libIDL_path" location="${buildtools_path}/windows/bin/x86" />
<!– Project directories –> <property name="src_dir" location="./src" /> <property name="build_dir" location="./build" /> <property name="dist_dir" location="./dist" /> <property name="components_dir" location="${src_dir}/components" />
<!– Custom tasks –> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<!– Targets –> <target name="createChromeJAR"> <zip destfile="${build_dir}/${ant.project.name}.jar" update="true" basedir="${src_dir}/chrome" includes="content/, locale/, skin/**" /> </target>
<target name="createComponentInterfaceXPTs"> <foreach target="compileIDL" param="idl_file"> <path> <fileset dir="${src_dir}/components" includes="*.idl" /> </path> </foreach> </target>
<target name="compileIDL"> <exec executable="${xpidl_exe}" dir="${build_dir}"> <env key="Path" path="${env.Path};${libIDL_path}" /> <arg line="-m typelib -w -v -I ${IDLs_path} -I ${components_dir} ${idl_file}" /> </exec> </target>
<target name="createDistributionXPI" depends="createChromeJAR, createComponentInterfaceXPTs"> <zip destfile="./dist/${ant.project.name}.xpi" update="true"> <zipfileset dir="${build_dir}" includes="${ant.project.name}.jar" prefix="chrome" /> <zipfileset dir="${src_dir}/components" includes=".js" prefix="components" /> <zipfileset dir="${build_dir}" includes=".xpt" prefix="components" /> <zipfileset dir="${src_dir}/defaults" includes="**" prefix="defaults" /> <zipfileset dir="${src_dir}" includes="install.rdf" /> </zip> <copy file="${dist_dir}/${ant.project.name}.xpi" tofile="${dist_dir}/${ant.project.name}.xpi.zip" /> </target> </project>
You need to change the 3 strings in blue toward the beginning of the file to match your project's name and your tool installations. Note that the dist/ directory will contain both an XPI file and a ZIP file. The ZIP file is just a copy of the XPI file with a .ZIP extension so that you can use WinZip to open it up and inspect its content.
Finally, you should create a batch file in your project's directory that looks something like this:
call c:\Tools\apache-ant-1.6.2\bin\ant "C:\Program Files\Mozilla Firefox\firefox.exe"
One more note: it's probably convenient to put a link to your project's XPI file on Firefox's toolbar because you will need to reinstall the extension many times:
* Navigate Firefox to the dist/ directory containing the XPI (not to the XPI itself)
* Drag the link to the XPI file to the toolbar
Oh, if you delete a file in your src directory, it might still be stuck on one of the generated zip files. Make sure to delete all files in the build and dist directory for a clean build.