Jump to content

Help needed on OSX for SSL


DavidW

Recommended Posts

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 by DavidW
Link to post

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 by subtledoctor
Link to post

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 by StefanO
Link to post

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 by Jarno Mikkola
Link to post

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?

Link to post

[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 by DavidW
Link to post
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.

Link to post

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 by DavidW
Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...