This is two questions, basically, because this is pretty much done already.
Well, it's not "done" done, but it's close. Before I proceed, I have a couple of questions.
How much is it “done”? Well, it works. I can copy the executable and data files onto a PA USB stick in the PA directory, and it shows up on the menu, and it launches and runs. I haven't done the full-bore install and all that, and before I do, I need to know:
(1) how does the launched program know the drive letter it's running on?
(2) is there really any interest in this???
First, why am I even doing this?
Well, I've been approached by one of the few remaining clients for one of my old DOS packages about doing a portable version of some or all of our software he's still using. I turned him on to PA a couple of months ago, and he loves it - took awhile to wean him off of Outlook and IE, but he's been clean and sober for several weeks now.
He runs a kind of mini-Sam's Warehouse in the wilds of Alaska, so when a computer breaks, he now has to keep "hot" spares. Since he sells computers, too, he'd like to be able to just roll out a new PC, plug in a USB stick and be up and running in as much time as it takes to install the printer.
I've read the PortableApps.com Format doc and I don't think it's any problem to follow that pretty strictly.
It's a business package, which actually goes back to CP/M days before IBM finally snapped to the fact that microcomputers might actually be a commercially viable business. The "current" version (which is more or less untouched except for some minor stuff, for the last 4 or 5 years) is an xBase product using Clipper and FoxPro code, compiled and linked to DOS executables. There are actually a half-dozen main programs in the suite and numerous little utilities – I'll just call the whole thing “it” in this.
It runs just fine on Windows. Okay, not just fine - it takes some tweaking because Micro$oft's last couple of OS's insist on "owning" the peripherals, but it works on 98 and XP, and as far as I can tell (not owning it, but I've tested on a couple of computers) seems to work on Vista reasonably well. There's a Linux version that uses Harbour/xHarbour and is about 98% compatible with the DOS version, too, but I'm thinking of the Windows-compatible systems first.
The main program in the suite is Point of Sale, and what we're looking at is running it from a USB stick, with the idea in mind that you can plug it in on pretty much any computer, and you have an instant "cash" register (cash not necessary - besides multiple kinds of cash (dollars, pesos, euros, etc...) it supports all manner of cards and other media including store accounts, gift certificates, credit slips, etc) and there's a stub that can be adapted to paypal, barter, social credit, or whatever. It also sells fractional quantities, so you can sell 1.33 hours of consulting just as easily as you can sell one case of Heineken (but it would have to verify the buyer's birthdate to sell that. It's been fully networkable since before Novell Netware, so it can access a server or be a standalone, and we even have a version that uses an ssh server and needs nothing but an ssh client on the user's end.
I tested it just by copying the executable and data files to a PortableApps USB stick, and it already seems to work - that is, by copying the executable to :\PortableApps\exename directory, the program shows up on the PA menu and actually launches... so I'm thinking that the rest may be a whole lot easier than I thought. So far I've only tried the PS and Inventory Control, but they run perfectly.
What I know I need, is the USB's drive letter, so it can find the data files - the full-paths are in a data file, and if the drive letter matches, everything's cool right now, but for example, the USB stick ranges from E: to L: on various computers that I've tried, so it does need to be found. If the launcher provides it (or other info) as command line parameters, that would be sweet.
Also it occurs to me that anyone who's read this far and not fallen off a chair laughing about "DOS crap" might have some insight into the main problem (not that it's a PA issue) which is printing from DOS programs. USB printers are particularly a problem, although if the user's computer supports networking (and I haven't seen many that don't, any more) it's not too hard to connect a USB printer to a “port” that DOS knows about. And one of the little tweaks from the last few years was to add an option to print to file and kick off an external program to view/print it (which generally has meant Notepad or Wordpad)... but maybe there's a better way?
My ultimate goal in this is to open source it, but I want it working in compiled version first. Of course, open source implies (more or less) a compile/link mechanism that's either also open source or at least freely available – Harbour is, but Clipper and FoxPro are not, so I need to back-convert the Harbour/xHarbour version from Linux to Windows... but before I even think hard about that, I'll have to see if there's enough interest, which was my second question... what do you think? Is there?