AppleScript: Download Latest Camino Nightly Build
I’ve always enjoyed toying around with different web browsers… Mac owners who are also web browser enthusiasts never had it better! There are several rock-solid browsers for Mac OS X now… in fact the selection on the Mac is even better than on Windows now, IMO.

It hasn’t always been that way. Back in early 2002 the Mac web browser scene was looking pretty bleak. A (somewhat rough) Carbon port of IE 5, which was already beginning to show its age compared to IE 6 on Windows, was the default Mac web browser.
There wasn’t much else… OmniWeb was actually first to market among the OS X browser makers with OmniWeb 4… but that was back before OmniWeb adopted the Safari WebKit rendering engine, and used its own (very spotty) proprietary rendering engine. OmniWeb was a slick Cocoa app, but its HTML, CSS and JavaScript support was quite weak compared to a browser like Mozilla or even IE 5.
Firefox was still in very early alpha stages and known as Phoenix. Definitely not ready for prime time.
There was really only one app that gave one hope for the future of web browsers on the Mac… Chimera. If I remember correctly, Chimera was originally so highly regarded, that it actually had been the inspiration for the Phoenix project and therefore Firefox. The idea behind Chimera was simple: remove the bloat of the Mozilla browser/editor/email application suite and provide a small, sleek browser based on the already industry-leading Gecko rendering engine. Add to that a Cocoa interface, and as the website says: Mozilla power, Mac style. Could it get any better?
That idea seems so obvious now, but remember, this was long before Firefox showed the average web user — or the open source community — it could be done.
Anyhow, once Safari was released, the wind went out of Chimera’s sails. The Mac now had a fast, standards-compliant, sleek Cocoa browser that was packaged as part of the OS by default. Many people didn’t see much point in contuing Chimera development.
The Chimera developers seemed to agree, and the project languished.
Then, last summer, the project resurfaced (perhaps spurred by Firefox’s success) as Camino. Although I really prefer Safari, I’ve been using Camino quite a bit lately, and recommend it to Mac users over Firefox. Camino feels much more at home on Mac OS X that Firefox due to it’s very-well-done Cocoa interface. Cocoa trumps XUL as far as UI toolkits on the Mac go…
Camino’s tabbed UI implemenation is better than Firefox’s IMO… the tabs have individual “close” buttons, take up less screen real estate, and just look better.
Anyway, so here’s the point of this whole post: an AppleScript that will download and launch the latest nightly build of Camino (average users will be better off with the latest stable build).
The script downloads the latest nightly Camino build, moves the file to your Applications folder, and renames the file to include today’s date (e.g. Camino 8/6/05.app).
To use the script: Windows users: buy a Mac. Mac users: click this link to open the script below in Script Editor.app. Save the script as a .scpt “script” file in ~/Library/Scripts so that it can be conveniently accessed from the Mac OS X script menu.
global caminoNightlyAppName
downloadDmg()
openDmg()
waitForDiskImageToMount()
dragCaminoToAppsFolder()
cleanUpDiskImageAndFiles()
launchNightlyApp()
on downloadDmg()
tell application "Terminal"
do script "cd
wget http://131.188.3.71/pub/mozilla.org/camino/nightly/latest/Camino.dmg"
set the size of window 1 to {400, 300}
set the position of window 1 to {100, 30}
repeat
delay 1
if (get busy of window 1) is equal to false then
close window 1
exit repeat
end if
end repeat
end tell
end downloadDmg
on openDmg()
tell application "Finder"
set homePath to path to home folder
set dmg to file "Camino.dmg" of folder homePath
open dmg
end tell
end openDmg
on waitForDiskImageToMount()
repeat
delay 1
tell application "Finder"
set allDisks to the name of every disk
repeat with aDisk in allDisks
if (aDisk as string) is equal to "Camino" then
return
end if
end repeat
end tell
end repeat
end waitForDiskImageToMount
on dragCaminoToAppsFolder()
global caminoNightlyAppName
tell application "Finder"
set homePath to path to home folder
set appsPath to path to applications folder
set camino to file "Camino.app" of disk "Camino"
move camino to homePath replacing yes
set camino to file "Camino.app" of folder homePath
set dateString to short date string of (get current date)
set caminoNightlyAppName to "Camino " & dateString & ".app"
set the name of camino to caminoNightlyAppName
set camino to file caminoNightlyAppName of homePath
move camino to appsPath replacing yes
end tell
end dragCaminoToAppsFolder
on cleanUpDiskImageAndFiles()
tell application "Finder"
eject disk "Camino"
move file "Camino.dmg" of folder (path to home folder) to trash
end tell
end cleanUpDiskImageAndFiles
on launchNightlyApp()
tell application "Finder"
global caminoNightlyAppName
try
tell application "Camino" to quit
end try
open file caminoNightlyAppName of folder (path to applications folder)
end tell
end launchNightlyApp
About this entry
You’re currently reading “AppleScript: Download Latest Camino Nightly Build,” an entry on Todd Ditchendorf’s Blog.
- Published:
- 08.05.05 / 9pm
- Category:
- AppleScript, Mac OS X
Comments are closed
Comments are currently closed on this entry.