DropNuke and DropUnlock were created solely to solve an odd hiccup in the early days of OS X, a problem that was fixed years ago. Since discontinuing DropNuke, however, I’ve received a handful of mails, replies and messages from people who used DropNuke beyond its original purpose. These have increased since Lion was released because, as PowerPC applications, neither DropNuke nor DropUnlock run under Lion.
Upgrading these applications, however, is not just a matter of recompiling them as Intel apps, because DropNuke and DropUnlock were not created in a traditional way. Creation of these applications took less than an hour, most of which was spent designing the icons. The actual “coding” took less time than it took to write this post. This rapid development time isn’t because I’m a fast coder; it’s because the apps are the output of Wilfredo Sánchez’s utility DropScript. What this application did is take Unix shell scripts (as well as Perl, Python, etc.) and wrap a Mac application around them that, when a file was dropped on the application, would execute the script passing the file as a parameter. Here is the complete code for DropNuke (which has been downloadable from the link at the top of this post since the apps were created):
#!/bin/sh
# EXTENSIONS : "*"
# OSTYPES : "****"
for file; do
location=$(dirname "$file")
cd "${location}"
chflags -R nouchg "${file}"
rm -Rf "${file}"
done
The DropUnlock code is even simpler, eliminating the last
rm
call. Looking at the script now, I’m not even sure the
first two lines in the loop even need to be there. In any case, you can
see there isn’t much to these scripts. The real work is done by
DropScript.
Alas, DropScript is a PowerPC application that produces PowerPC applications. Someone hell-bent on building Lion-compatible versions of DropNuke and DropUnlock would need to do the following:
- Download the source of the scripts.
- Do one of the following:
- Wait for Wilfredo Sánchez to update DropScript to support Intel applications.
- Download the source code to DropScript and get it working on Intel machines yourself. This might be a simple matter of just getting it to compile and rebuilding it, but I suspect not. It is likely that creating Intel apps from code is quite different than creating PowerPC apps was, back in the day.
- Run the resulting Intel-enabled version of DropScript and use it to build DropNuke and DropUnlock.
- Optionally, extract the icons from the original apps and apply them to the newly created versions.
Since I consider DropNuke too dangerous to release in the wild again (no more email about stray alias resolution accidentally deleting several terabytes of server data, thank you), and DropUnlock no longer really serves a purpose, I won’t be doing any of the above. All this code is available to you though. If you get it working, please drop me a line.