DavidW Posted August 30, 2007 Share Posted August 30, 2007 This is a long shot, but is there anyone out there who uses a Mac who knows how to compile a perl script into an executable? Background: SCS II (forthcoming imminently) uses a perl program called "SSL" to compile its BAF files (i.e., the files that are in turn compiled into scripts by WEIDU). I do this for two reasons: to make it easier and quicker to write and modify a large set of complex scripts, and to allow the mod to modify its scripts according to which mod-created items you've got on your install. To make the second function work, I need to distribute an executable version of the SSL program with the mod. I can do this just fine for Windows but I have no idea how to do it (much less test it) on a Mac, and I'd very much appreciate any help. It's not the end of the world if it can't be done - for the mac version I could always compile the scripts ahead of time and live with the fact that they won't be modified to include third-party items. But it would be nice to do it on both. Link to comment
the bigg Posted August 30, 2007 Share Posted August 30, 2007 Taking a wild guess, use this as your Perl code: #!/usr/bin/perl <insert code here> then run as: ACTION_IF ~%WEIDU_OS%~ STRING_COMPARE_CASE ~WIN32~ THEN BEGIN // not Windows AT_NOW ~chmod 755 path/to/file.pl~ AT_NOW ~./path/to/file.pl parameter1 parameter2 ...~ END ELSE BEGIN // code for Windows END This works for Linux, and I assume the same for Mac. Link to comment
DavidW Posted August 30, 2007 Author Share Posted August 30, 2007 Does that mean Perl is installed as standard on Macs, then? (Sorry, I know virtually nothing about anything except Windows). Link to comment
the bigg Posted August 30, 2007 Share Posted August 30, 2007 According to Apple, some version of Perl is usually installed in all OSX'es (and, obviously, in the /usr/bin directory). Really, only on Windows you have to assume that Perl/Python/GTK/whatever is missing. Link to comment
DavidW Posted August 30, 2007 Author Share Posted August 30, 2007 Great - thanks, that makes things much easier... Link to comment
devSin Posted August 30, 2007 Share Posted August 30, 2007 Yes. Perl 5.something is installed and configured by default, and you should be able to run most any generic perl script without any special magic. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.