Jump to content

EET RC 7.1 installation on MacOS (Mountain Lion & Sierra)


subtledoctor

Recommended Posts

Totally makes sense. strace gives me the following on linux upon clicking the "Venture Forth" button and crashing:

open("/win_data/iesteamlib/bg2ee/DATA\\EETBG26.BIF", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x938} ---
+++ killed by SIGSEGV +++
Segmentation fault

Notice the DATA\\? Backslash is an escape character in the POSIX world, so the system interprets this as "/win_data/iesteamlib/bg2ee/DATAEETBG26.BIF".

Link to comment

The problem is most likely due to WeiDU using backslashes for pathname separators in the chitin.key (DATA\EETTU00.BIF instead of DATA/EETTU00.BIF). I've encountered the same issue for my DlcBuilder mod which didn't work even on Windows if the chitin.key of the DLC archive contained backslashes (workaround).

nice, master branch now has argent77's fix included:

// Works around a bug in the game engine which fails to load KEY files containing backslashes as pathname separator
// Problem shows up after MAKE_BIFF is used on osx and linux games
ACTION_IF (NOT ~%WEIDU_OS%~ STR_EQ ~win32~) BEGIN
    COPY ~chitin.key~ ~chitin.key~
        READ_LONG 0x08 numBiffs
        READ_LONG 0x10 ofsBiffs
        FOR (idx = 0; idx < numBiffs; ++idx) BEGIN
            SET curOfs = ofsBiffs + idx*12
            READ_LONG (curOfs + 0x04) ofsBiffName
            READ_SHORT (curOfs + 0x08) lenBiffName
            READ_ASCII ofsBiffName biffName ELSE ~~ (lenBiffName) NULL
            PATCH_IF (NOT ~%biffName%~ STRING_EQUAL_CASE ~~) BEGIN
                INNER_PATCH_SAVE biffName ~%biffName%~ BEGIN
                    REPLACE_TEXTUALLY ~\\~ ~/~
                END
                WRITE_ASCIIE ofsBiffName ~%biffName%~
            END
        END
    BUT_ONLY
END

subtedoctor, new EET build should work on osx - please test it out.

Link to comment

subtledoctor, it looks like the issue you got here is due to weidu biffing which doesn't seem to work at all on osx. Same is true on linux. Could you please do the same test on vanilla BG2:EE that I posted here? Just to be sure that it isn't related to case sensitivity, before we bother Wisp about this bug.

OS X is not case-sensitive, so that will not be an issue.

 

It *IS* sensitive to the direction of folder slashes - it's based on Unix so directory paths look like

/Applications/Baldur's Gate II Enhanced Edition/contents/resources/0782/
Generally Weidu deals with slashes - I always use forward-slashes in my mods, and Weidu correctly interprets them as back-slashes when it runs in Windows. I *think* the reverse is also true but I'm not totally 100% sure, so I default to using forward-slashes.

 

EDIT - ninja'd by argent77.

Link to comment

 

subtledoctor, it looks like the issue you got here is due to weidu biffing which doesn't seem to work at all on osx. Same is true on linux. Could you please do the same test on vanilla BG2:EE that I posted here? Just to be sure that it isn't related to case sensitivity, before we bother Wisp about this bug.

OS X is not case-sensitive, so that will not be an issue.

 

It *IS* sensitive to the direction of folder slashes - it's based on Unix so directory paths look like

/Applications/Baldur's Gate II Enhanced Edition/contents/resources/0782/
Generally Weidu deals with slashes - I always use forward-slashes in my mods, and Weidu correctly interprets them as back-slashes when it runs in Windows. I *think* the reverse is also true but I'm not totally 100% sure, so I default to using forward-slashes.

 

EDIT - ninja'd by argent77.

 

yeah, I'm aware about slashes. For weidu commands EET always uses / and for AT_NOW (command line/terminal) different slashes depending on the system (evaluated from variable). But we don't have control over weidu MAKE_BIFF slahes (always \ regarding of the system), so the chitin.key had to be patched after using this command.

Link to comment

yeah, I'm aware about slashes. For weidu commands EET always uses / and for AT_NOW (command line/terminal) different slashes depending on the system (evaluated from variable). But we don't have control over weidu MAKE_BIFF slahes (always \ regarding of the system), so the chitin.key had to be patched after using this command.

Can you copy paste the code you used ? Cause the GenBiff could use the update too.
Link to comment

 

yeah, I'm aware about slashes. For weidu commands EET always uses / and for AT_NOW (command line/terminal) different slashes depending on the system (evaluated from variable). But we don't have control over weidu MAKE_BIFF slahes (always \ regarding of the system), so the chitin.key had to be patched after using this command.

Can you copy paste the code you used ? Cause the GenBiff could use the update too.

 

It's a little further up in post #33.

Link to comment

I have packed the chitin.key fixing code into a separate action function, so that anyone interested can easily use it in their own mods.

/**
 * Makes pathname separators in chitin.key platform compatible.
 * STR_VAR keyFile  The KEY file to fix. (Default: chitin.key) 
 */
DEFINE_ACTION_FUNCTION FIX_KEY
STR_VAR
  keyFile = "chitin.key"
BEGIN
  COPY ~%keyFile%~ ~%keyFile%~
    READ_ASCII 0x00 sig ELSE ~~ (8)
    PATCH_IF (~%sig%~ STRING_EQUAL ~KEY V1  ~) BEGIN
      READ_LONG 0x08 numBiffs
      READ_LONG 0x10 ofsBiffs
      SET maxSize = ofsBiffs + numBiffs * 12
      FOR (ofs = ofsBiffs; ofs < maxSize; ofs += 12) BEGIN
        READ_LONG (ofs + 4) ofsBiffName
        READ_SHORT (ofs + 8) lenBiffName
        READ_ASCII ofsBiffName biffName ELSE ~~ (lenBiffName) NULL
        PATCH_IF (NOT ~%biffName%~ STRING_EQUAL_CASE ~~) BEGIN
          INNER_PATCH_SAVE biffName ~%biffName%~ BEGIN
            REPLACE_TEXTUALLY ~\\~ ~/~
          END
          WRITE_ASCIIE ofsBiffName ~%biffName%~
        END
      END
    END
  BUT_ONLY IF_EXISTS
END

The function call is as simple as this:

LAF FIX_KEY END
Link to comment

This is only a workaround. It should be implemented into WeiDU's KEY manipulation code directly.

 

The reason for the currently used path separator is that original Infinity Engine games require backslashes as file separators while Enhanced Edition games can use both forward slashes and backslashes on Windows, but only forward slashes on non-Windows platforms and in DLC archives. So WeiDU must be able to detect the game correctly before it can apply the right file path syntax.

Link to comment

Success!! Hoorah! Everything seems to be working now with rc8.1. I installed the SoD GUI and that seems to work great as well. Yay!!

 

Now, my own to-do list is down to:

- get the next build of Faiths & Powers ready

- pester Beamdog to update their iOS apps to 2.4

- build a big mega install and put it on my iPad

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...