DavidW Posted November 13, 2018 Posted November 13, 2018 (edited) I have a report that the latest version of SCS doesn't install on Mac-OSX. As I have no OSX testing environment, and virtually no familiarity with the system, I'm going to need to ask for help here. The underlying problem is that "SSL", SCS's scripting metalanguage, compiles scripts through a call to an external Perl script shipped with SCS (Wheels of Prophecy, aTweaks and Item Randomizer also use SSL". On Windows installs, I distribute an executable, and that works fine. On OSX, I assume native Perl support, and just call the script. Specifically, it's called by an AT_NOW command in stratagems/sfo/general/lib_general.tpa on lines 56-57. The relevant code is ACTION_IF ~%WEIDU_OS%~ STRING_COMPARE_CASE ~WIN32~ THEN BEGIN AT_NOW ~chmod 755 %scsroot%/%ssl_loc%/ssl.pl~ AT_NOW ~/usr/bin/perl %scsroot%/%ssl_loc%/ssl.pl "%full_loc%\%script% %sslvariables% -o %workspace%/ssl_out -l %ssllibrary% %workspace%/autolib %booleanstring%"~ EXACT END ELSE BEGIN AT_NOW ~%scsroot%\%ssl_loc%\ssl.exe %full_loc%\%script% "%sslvariables%" -o %workspace%/ssl_out -l %ssllibrary% %workspace%\autolib %booleanstring%~ END The windows bit works fine. The OSX bit is black magic to me, and apparently has stopped working. (The version of SSL distributed with SCS v32 has been updated, so that may have something to do with it.) I'd welcome any help (without which, I'll have to stop supporting non-Windows installs). You will need to test your suggestions yourself, as I don't have an OSX environment. Probably the quickest way to get an SSL call in SCS v32 as-is is to try to install component 5000. Quicker still, edit setup-stratagems.tp2 to uncomment component 0, and then edit stratagems/test/test.tpa to read DEFINE_ACTION_FUNCTION test BEGIN LAF ssl_to_bcs STR_VAR script=ogremasu locbase="iwdspells/resource" END END Edited November 13, 2018 by DavidW Quote
subtledoctor Posted November 14, 2018 Posted November 14, 2018 (edited) I answered this in the other thread, should be a simple fix. Replace AT_NOW ~/usr/bin/perl %scsroot%/%ssl_loc%/ssl.pl with AT_NOW /usr/bin/perl %scsroot%/%ssl_loc%/ssl.pl I.e. omit that leading tilde. EDIT - oh I see, you didn't mistakenly think Perl is in the user directory, that tilde is a quote encompassing the overall command. But unfortunately, the system is reading it as a reference to the user directory. So you need to disentangle them. EDIT2 - does AT_NOW even need the quotes? As usual the Weidu documentation is clear as mud. Just says it is used so: AT_NOW [ variable ] commandToRun [ EXACT ] Edited November 14, 2018 by subtledoctor Quote
Mike1072 Posted November 14, 2018 Posted November 14, 2018 AT_NOW expects a string, so wrapping the command in tildes shouldn't be a problem. Quote
StefanO Posted November 14, 2018 Posted November 14, 2018 (edited) I tried WeiDU "STRATAGEMS/SETUP-STRATAGEMS.TP2" --language 0 --force-install 5000 and got the error message This is Stratagems Scripting Language... FATAL ERROR (no input files have been specified and SSL cannot find file list) at stratagems/ssl/ssl.pl line 114. Copying and patching 1 file ... ERROR: error loading [weidu_external/workspace/ssl_out/bddefai.baf] This means: ssl.pl is called und executes line 114 die "FATAL ERROR (no input files have been specified and SSL cannot find file list)" So perl is installed and working because ssl.pl executes the die statement. The next error message ERROR Installing [Ease-of-use party AI], rolling back to previous state Will uninstall 133 files for [STRATAGEMS/SETUP-STRATAGEMS.TP2] component 5000. Uninstalled 133 files for [STRATAGEMS/SETUP-STRATAGEMS.TP2] component 5000. ERROR: Unix.Unix_error(Unix.ENOENT, "stat", "weidu_external/workspace/ssl_out/bddefai.baf") Automatically Skipping [Ease-of-use party AI] because of error. ENOENT means "No such file or directory". The directory "weidu_external/workspace/ssl_out" exists but doesn't contain the file "bddefai.baf". If anyone has a clue why the file doesn't exits, I'll gladly help any Mac specific trouble shooting. BTW, both randomiser and atweaks installs just fine. Edited November 14, 2018 by StefanO Quote
Jarno Mikkola Posted November 14, 2018 Posted November 14, 2018 (edited) The next error message... ...If anyone has a clue why the file doesn't exits.... That's just the regular uninstall debug message that has been there and wrong ever sinse it came to be in weidu... some 5 to 10 years ago. Don't mind that. The source is whatever prevents the component from installing, as it then needs "an uninstall", or rather a backwards reversal. Aka it's the "FATAL ERROR" above. So you only have one legit error. Which is for DavidW to sort out. Edited November 14, 2018 by Jarno Mikkola Quote
StefanO Posted November 14, 2018 Posted November 14, 2018 OK, but the first error message references the same file. Quote
DavidW Posted November 14, 2018 Author Posted November 14, 2018 Ignore Jarno. The file doesn’t exist because SSL failed to run. What’s supposed to happen is that (i) the external call to SSL creates bddefai.baf. (ii) Weidu compiles it to bddefai.bcs. Because the external call is failing, bddefai.baf isn’t there, so weidu throws an error. But I know all this. What I don’t know, and what I need, is how to fix the SSL call so that it runs properly. Subtledoctor@: your suggestion sounds plausible; have you tried implementing it? (I can’t: no OS X environment.) If you can’t yourself, can you spell it out more explicitly for someone else to try? Quote
subtledoctor Posted November 14, 2018 Posted November 14, 2018 (edited) I'll be able to test for real tonight, I think. I don't see why it won't be a strsightforward fix. I mean SCS v31 calls SSL and it works just fine... so it must only be a question of calling it in a way the OS approves. Edited November 14, 2018 by subtledoctor Quote
DavidW Posted November 14, 2018 Author Posted November 14, 2018 Well, indeed. But I can't see any obviously relevant difference between the v31 and v32 calls, and I can't test it myself to track down the non-obviously-relevant difference... Quote
hook71 Posted November 14, 2018 Posted November 14, 2018 (edited) Should probably use /bin/chmod instead of chmod to be sure it is found. And should %full_loc%\%script% be %full_loc%/%script% on macOS perhaps? Edited November 14, 2018 by hook71 Quote
DavidW Posted November 14, 2018 Author Posted November 14, 2018 Just to reiterate that I cant test on OSX, so there is only limited point making suggestions unless you implement them and see if they work. Quote
hook71 Posted November 14, 2018 Posted November 14, 2018 Yep, they didn't unfortunately so my suggestions can be safely ignored. Quote
DavidW Posted November 14, 2018 Author Posted November 14, 2018 (edited) [edit: accidentally deleted this suggestion. reconstructing for posterity] OK, I can reproduce this on Windows, running ssl.pl with my local install of perl rather than ssl.exe. Can someone on OSX try swapping line 58 of stratagems/sfo/general/lib_general.tpa to read AT_NOW ~/usr/bin/perl %scsroot%/%ssl_loc%/ssl.pl %full_loc%\%script% "%sslvariables%" -o %workspace%/ssl_out -l %ssllibrary% %workspace%/autolib %booleanstring%~ EXACT - i.e. bring the quotation marks in so as to frame only %sslvariables% - and see if stratagems component 5000 installs? Edited November 14, 2018 by DavidW Quote
hook71 Posted November 14, 2018 Posted November 14, 2018 Input file is stratagems/gameplay/resourcebddefai.ssl cannot find input file at stratagems/ssl/ssl.pl line 191. Copying and patching 1 file ... ERROR: error loading [weidu_external/workspace/ssl_out/bddefai.baf] Stopping installation because of error. Error on line 191 instead of 114 now. Quote
DavidW Posted November 14, 2018 Author Posted November 14, 2018 (edited) How about this? AT_NOW ~/usr/bin/perl %scsroot%/%ssl_loc%/ssl.pl %full_loc%/%script% "%sslvariables%" -o %workspace%/ssl_out -l %ssllibrary% %workspace%/autolib %booleanstring%~ EXACT (i.e., replace backslash with forward slash in %full_loc%/%script%) Edited November 14, 2018 by DavidW Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.