The Joy of ROX - Wrappers and Resources

Site: Home | LnBlog | The Joy of ROX | LinLog

The Joy of ROX: Main | News | Software | Wrappers and Resources | Contact

This page collects AppDir wrappers I've made and some resources I've put together for making ROX application directories. Hopefully, they'll help you get your AppDirs up and running faster and make them more powerful and flexible than before.


Here are some application wrappers that I wrote. These are really more than just simple application wrappers such as you would get from the ROX-Wrappers project. Those are mostly just simple "exec prog" type wrappers, whereas these are a bit more complex. They have features like custom AppMenus, intelligent handling of commandline arguments, and even simple GUI front-ends. I like to think of them more as ROX front-ends than wrappers, but that's a different story.


Extended AppRun Script

Most of the AppDirs that are written in C or some other compiled language use AppRun scripts that are copied more or less exactly from AppRun script of ROX-Filer or ROX-Session. There's nothing really wrong with these scripts; they do their job and work on pretty much any UNIX around. However, they were written with a definite prejudice toward AppDirs of single graphical programs. While this is understandable (how many ROX projects aren't single, graphical programs?), it makes things difficult when you wish to write or repackage a program that has multiple executables or that is used from the command line.

To address this, I've made some extensions to the stock AppRun script. These extensions include:

I have placed a copy of this extended AppRun script in the AppDir template below. The documentation that comes with the template includes a description of the AppRun.

AppDir Template

This is a sample AppDir that I put together. It contains a copy of the extended AppRun script described above, an AppInfo.xml file with blank fields to fill in, and a Help directory with a copy of the GNU GPL and a description of the AppDir template itself. I recommend this as a starting point for repackaging programs as AppDirs or writing your own AppDirs.

Tips and Tricks

I've written a paper on how to repackage an existing program as an AppDir. It's not a step-by-step tutorial or anything, just some tips, tricks, and things you should aim for. It's still a work in progress, but it is becoming pretty substantial and should (hopefully) be helpful. I also wrote up a few random thoughts on creating AppDirs, if you're interested. This one is much shorter and includes some details on dealing with repackaging programs that need to be run at the command line.

Quick and Dirty AppDir GUI

I've written a small Python program called PyMessage that is very useful for making AppDirs. It pops up a small window with a message, some buttons, and, optionally, a text entry box or a combo box. You run it from the command line and can access the button pressed via the exit code (or standard output, if you specify the --print option) and the text of the entry box/combo box via standard output. It's great for when you need the user to make a choice or give you some quick input. It's the perfect replacement for xmessage, which is ugly, or gxmessage, which is unavailable on many systems. It requires only ROX-Lib2 and Python, so it should work on any system that can run a 1.9.x version of Archive. If you want some examples of it's use, look at the Secure Shell and CD-Burning wrappers listed above.

AppDirs from the Command-Line

I have put together a small package that I call ROX-CLI. It is a group of programs, written mostly in Python, designed to make it easier to deal with AppDirs from the command line. It contains scripts for things like running an AppDir, getting to its Help directory, finding its Choices directory, and so forth. The scripts use case-insensitive searches and environment variable to find AppDirs. The effect is similar to the search paths used by the shell.
This project is still in the early stages and there are a lot of directions it could go. Any feedback on it, including bug reports and feature requests, would be welcome.