How to make an application non-executable?
How to make an application non-executable?
- Subject: How to make an application non-executable?
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 16 Jul 2004 15:15:05 -0400
I'm looking for an easy way to make an application non-executable, for
example, by compressing or encrypting it. Any ideas?
Here's the scenario: I plan to distribute a "master" application inside a
"setup" application's bundle, to make one-file drag-installation possible.
The "setup" app will be run frequently because it isn't just an installer;
it serves other purposes, too. After drag-installing the "setup" app, the
user will run it, and it will make a copy of the "master" application and
install the copy in an appropriate location where third-party scripts or
applications will expect to find and launch it. The "setup" app will install
another copy of the "master" app any time it runs and finds that the
previous copy is missing. Sort of like Microsoft's "first run" self-healing
installation routine.
But I want to be sure that the "master" app remaining inside the "setup" app
is never executed, no matter what means is used to run the copy.
I'm worried that Cocoa's launch-by-filename methods might accidentally run
the "master" app; or, if I change the file name, that Cocoa's new
launch-by-identifier methods might launch the "master"; or that an
AppleScript 'tell' statement might launch the "master"; or, worst of all,
that some method I don't even know about might launch the "master."
One technique would be to make sure that the modification date of the copy
is always newer than the modification date of the "master" -- if I can
really count on the documentation, which seems to say that a newer
application is always run in preference to an older clone. Another technique
would be to change the file extension from ".app" to something else, but I'm
worried that launch-by-name or other routines might nevertheless launch it,
perhaps based on creator information inside its bundle or whatever. A
draconian technique would be to compress or encrypt the "master" -- but I
don't see any easy Cocoa (or Carbon, for that matter) compression or
encryption methods, and I don't want to have to learn how to write routines
to compress or encrypt it using a command-line tool (unless that is really
easy).
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.