DMDircthe intelligent IRC client

Even more supported operating systems

Filed under: BSD, Installer, Linux, OSX, Plugins, Solaris, Windows — Shane on July 25, 2008 @ 10:46 pm — Permalink

With the upcoming version 0.6 of DMDirc (we know that it’s been a while since the last big release, we’ll blog about that soon) we have added support for even more operating systems.

As you probably know, DMDirc is written in Java which gives us a huge advantage as far as cross-platform compatibility is concerned. Java runs on all the major operating systems so most of the hard work has been done for us.

Up to DMDirc 0.5.6 we only supported Windows and Linux and provided a separate jar-only download for other platforms. For 0.6 the supported list of operating systems has more than doubled; we now package DMDirc for:

  1. Linux
  2. Windows
  3. OS X
  4. Open Solaris (and normal Solaris)
  5. BSD (tested on PC-BSD, which is FreeBSD at the core)

This pretty much covers all major non-server operating systems, which we are quite pleased about.

The Installer for DMDirc runs on all of the above systems (apart from OS X, which has its own installation method) and where possible can download and install Java automatically. Currently the only exception to this is BSD, where users will need to compile the jdk16 port manually — unfortunately Sun’s licensing prevents redistribution of the modified JRE used on BSD.

The nightly builds have been working on all of the above operating systems for a while now, and you can browse and download the installers from our nightly builds page.

OS X Support: Part 2

Filed under: Installer, OSX, Tech — Shane on June 13, 2008 @ 7:33 pm — Permalink

As previously mentioned, once Apple released Java6 for OS X I set about updating the scripts we use for building the installers and nightlies so that we could support OS X officially for DMDirc 0.6.

To do this we needed to be able to create a DMG file to distribute it in, and we wanted this to be done by our current build scripts. As you may be aware, we do all of our development on Ubuntu Linux (which we also use on the DMDirc build/web server) so our current build scripts are a bunch of bash scripts that build the various installers (.run files for Linux, and .exes for Windows).

Other projects exist which distribute their cross-platform releases on Linux, OS X and Windows, so I looked at the build processes for both Firefox and Inkscape which both have apple releases. Unfortunately both of these projects appear to use an Apple machine to create the releases. This roughly translated to the following:

	# DMDirc-dmg contains the files we want to put in the dmg
	hdiutil create -volname "DMDirc" -fs HFS+ -srcfolder DMDirc-dmg -format UDRW DMDirc.RW.dmg
	hdiutil attach DMDirc.RW.dmg
	bless -openfolder /Volumes/DMDirc
	hdiutil detach /Volumes/DMDirc
	hdiutil convert DMDirc.RW.dmg -format UDZO -imagekey zlib-level=9 -o DMDirc.dmg

Which, while it does work (and is what we use if the installer is being built on OS X), wasn’t an acceptable solution as it relied on an OS X install.

I then discovered a wiki page which describes a method that works under Linux. After compiling a Linux-compatible version of Apple’s mkhfs program we could now do something along the lines of:

	# DMDirc-dmg contains the files we want to put in the dmg
	SIZE=$((`du -sb DMDirc-dmg | awk '{print $1}'`  + 10))
	if [ ${SIZE} -lt 4194304 ]; then
		echo "Size is less than 4MB"
		SIZE=4194304;
	fi;
	dd if=/dev/zero of=DMDirc.img bs=${SIZE} count=1
	mkfs.hfsplus -v 'DMDirc' DMDirc.img

	mkdir DMDirc.img-mounted
	mount DMDirc.img-mounted
	MOUNTRES=${?}
	if [ ${MOUNTRES} -ne 0 ]; then
		# Try using full parameters - could be running as root.
		mount -t hfsplus -o loop DMDirc.img DMDirc.img-mounted
		MOUNTRES=${?}
	fi;
	if [ ${MOUNTRES} -ne 0 ]; then
		echo "Unable to mount, need root access or an fstab entry like:"
		echo "${PWD}/DMDirc.img ${PWD}/DMDirc.img-mounted auto users,noauto,loop 0 0"
		exit 1;
	fi;
	mv -fv $DMDirc-dmg/* DMDirc.img-mounted
	mv -fv DMDirc-dmg/.[A-Za-z]* DMDirc.img-mounted
	umount DMDirc.img-mounted
	mv DMDirc.img DMDirc.dmg

This was an improvement, as images could now be created under Linux, however it still also had lots of problems:

  • images have to be at least 4MB (compared to 1.3mb when created using the OS X method),
  • they’re created read-write (compared to read-only when created using the OS X method), and
  • they do not auto-open when mounted (the OS X method can “bless” the image).

After a short while, I discovered the gentoo wiki had a page on hfsplus, which had a version of diskdev-cmds that allowed for images that were as small as 512kb. Using this, I was able to edit the first part of above code to something like:

	# DMDirc-dmg contains the files we want to put in the dmg
	SIZE=$((`du -sb DMDirc-dmg | awk '{print $1}'`  + 10))
	if [ ${SIZE} -lt 524288 ]; then
		echo "Size is less than 512kb"
		SIZE=524288;
	fi;
	dd if=/dev/zero of=DMDirc.img bs=${SIZE} count=1
	mkfs.hfsplus -v 'DMDirc' DMDirc.img
	# however older versions of mkfs.hfs will only create 4mb+ sized images :/
	if [ $? -eq 1 ]; then
		if [ ${SIZE} -lt 4194304 ]; then
			echo "Size is less than 4MB"
			SIZE=4194304;
		fi;
		dd if=/dev/zero of=DMDirc.img bs=${SIZE} count=1
		mkfs.hfsplus -v 'DMDirc' DMDirc.img
	fi;

This still produced 3.8mb images, so basically had all the same problems as the old method. The actual code we used was also a lot less tidy as sometimes the size returned by du was too small, so the code looped increasing the size until it got a successful image.

However I recently discovered a much tidier method, which we now use. mkisofs has the ability to create and bless hfs images:

	# DMDirc-dmg contains the files we want to put in the dmg
	mkisofs -V 'DMDirc' -no-pad -r -apple -o "DMDirc-dmg" -hfs-bless "/Volumes/DMDirc" DMDirc.dmg

This code has the advantages of:

  • being much tidier than the old code,
  • not requiring a loop to get a correctly-sized image,
  • being able to bless the image,
  • creating a read-only image, and
  • not requiring a patched version of Apple’s diskdev-cmds

All that was left now was to fix the file size (which was still 3.8 mb). To do this, I found a new project (libdmg-hfsplus) which is a DMG manipulation library for Linux capable of producing compressed DMG files. I jumped at this, downloaded and compiled it, and came up with:

	# DMDirc-dmg contains the files we want to put in the dmg
	mkisofs -V 'DMDirc' -no-pad -r -apple -o "DMDirc-dmg" -hfs-bless "/Volumes/DMDirc" DMDirc.dmg.pre
	./dmg dmg DMDirc.dmg.pre DMDirc.dmg

I copied this image to an OS X machine and tried to open it and was greeted by a “CRC Mismatch” error. After digging around a little I found the cause of this (The code generates a “Master Checksum” which always seems to generate the same for converting DMGs using the code above, but OS X doesn’t like it), and produced a patched version of libdmg, which can be found on my personal website: http://shanemcc.co.uk/libdmg/, along with a script that will patch it for you if you want to compile your own.

With this newly patched version of the DMG binary from libdmg-hfsplus we are now able to produce DMDirc.dmg on both OS X and Linux with similar results (read-only, blessed and compressed).

It is also worth pointing out that Java 6 for OS X is no longer a “developer preview” only, and can be obtained by anyone with a 64-bit Intel-based Mac running 10.5.2 or later from the Apple website. I would imagine that it is also available using the software update facility in the Apple menu.

OS X nightly builds of DMDirc are available on the nightly builds page of the website.

Installer Updates

Filed under: Installer, Linux, Windows — Shane on December 24, 2007 @ 2:22 pm — Permalink

Since DMDirc 0.5.1, the Linux and Windows installers have received several major updates.

Firstly, the Linux installer was overhauled to show all of its messages in GUI dialog boxes where possible (using kdialog under KDE or zenity under gnome). This means that users don’t need to be running the installer from a console to see what went wrong. (The messages are still also relayed to the console). This update is part of the DMDirc 0.5.5 release, which should be available soon.

The next major change is that both the Windows and Linux installers are now capable of installing Java, either by using a JRE bundled with the installer or by downloading one from java.com. This is a major positive step as it means that it is possible for people who don’t have Java (or have an outdated version) to use DMDirc.

This new functionality is in all the nightly installers from December 24th onwards, comments/bug reports etc are welcome here and on the issue tracker.

New to 0.5: Cross-Platform Installer

Filed under: Installer, Linux, Tech, Windows — Shane on September 13, 2007 @ 1:51 am — Permalink

As part of our aim to make DMDirc into a good, cross-platform IRC Client, it was decided early on that it required an actual installer to make packaging/distributing/installing the client much easier.

Originally this was scheduled for 0.7, but just prior to the release of DMDirc 0.4 we rescheduled it to 0.5 and it was assigned to me (as I had the least other tasks to do - the main bulk of the parser is complete).

So since we released 0.4, I have been working almost entirely on this, and can happily say the first revision of the installer is completed.

One of the key requirements for the installer is that it should run on all the (desktop) platforms that DMDirc runs on, which right now are Windows (2000, XP, 2003, Vista) and Linux.

Below are a few screen shots showing the installer running on XP (using both Classic and Normal themes), and Windows Vista:
Installer running on XP Pro - Normal Theme Installer running on XP Pro - Classic Theme Installer running on Vista

Linux screenshots coming soon.

Mac users may note that there is no Mac Version of the installer. This is due to the lack of availability of a Mac to test on, and the lack of a proper release of Java 6 for OS X. I am hoping to have the installer running on the Mac for the first release after Java 6 becomes available properly (although the lack of a Mac for testing could make this awkward - donations welcome!)

At the moment the installer requires Java 6 to be installed on the machine already. If the installer is ran on a machine without Java, or with a version that is too old, it will notify (via console in Linux, or a dialog box on Windows) the user that they need to install or update Java first. One of our goals for DMDirc 0.6 is to produce a version of the installer that bundles Java 6, or can download it for the user.

To allow for pre-release testing of the installer, you will find here two copies of the installer (one for Linux, one for Windows), and their MD5 hashes. These are pre-release, possibly unstable and/or broken versions of DMDirc, compiled against SVN revision 2030, and as such the installers or the client they install may not function, suddenly burst into flames, or sacrifice your first born child. These should, therefore, be used at your own risk. However, if the installers (or the client) actually do something they shouldn’t, or don’t do something they should please feel free to submit an issue report or reply to this post.

Now the files:

Clicking on “more” will go into more depth on how the installer(s) work.
(more…)

Powered by WordPress