Jump to content

Proper way to install on linux?


corvias

Recommended Posts

After some fiddling, the attempt with WINE completed, but with no different results. Bear in mind that WINE fakes a windows environment, so weidu runs all the Windows parts of the tp2 script instead of unix, which also means it used the windows exe's for tileconv, ffmpeg, etc. Game starts, but with no title music. No UI logos, and still crashes after pressing the "Venture forth" button.

 

To get around the fact that weidu running through WINE would not patch the linux baldursgateii executable, I just copied a patched one from the last attempt. Made no difference anyway.

 

On the upside, I managed to figure out how to get "strace" (a debugging tool) to work with steam games on linux: Here's what happened right after I clicked the "venture forth" button:

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

Link to comment

this test should be done on clean BG2:EE (without EET). All it does is biffing START3EE.MOS. Please install the mod attached to this post and start the game. Let me know if you will be able to see art on the first screen after doing so. Case sensitivity shouldn't matter here since START3EE is already in chitin.key and I used the same casing but just to be sure do it on case insensitive partition.

test.zip

Link to comment

No Graphics. Clean install, case-insensitive mode.

 

Log:

WeiDU v 24000 Log

 weidu --log setup-test.debug test/test.tp2
[./chitin.key] loaded, 875812 bytes
[./chitin.key] 187 BIFFs, 62160 resources
[./engine.lua] loaded, 104 bytes
[./lang/de_de/dialog.tlk] claims to be writeable.
[./lang/de_de/dialog.tlk] claims to be a regular file.
[./lang/de_de/dialogf.tlk] claims to be writeable.
[./lang/de_de/dialogf.tlk] claims to be a regular file.
[./lang/en_us/dialog.tlk] claims to be writeable.
[./lang/en_us/dialog.tlk] claims to be a regular file.
[./lang/es_es/dialog.tlk] claims to be writeable.
[./lang/es_es/dialog.tlk] claims to be a regular file.
[./lang/es_es/dialogf.tlk] claims to be writeable.
[./lang/es_es/dialogf.tlk] claims to be a regular file.
[./lang/it_it/dialog.tlk] claims to be writeable.
[./lang/it_it/dialog.tlk] claims to be a regular file.
[./lang/it_it/dialogf.tlk] claims to be writeable.
[./lang/it_it/dialogf.tlk] claims to be a regular file.
WARNING: parsing log [WeiDU.log]: Sys_error("weidu.log: No such file or directory")

Please choose the language in which you wish to play the game.
If you later wish to play the game in a different language you will need to edit the file weidu.conf and reinstall your mods.
 0 [German]
 1 [English]
 2 [Spanish]
 3 [Italian]
[./lang/en_us/dialog.tlk] loaded, 11622812 bytes
[./lang/en_us/dialog.tlk] 103214 string entries

Using ./lang/en_us/dialog.tlk

Install Component [test]?
[I]nstall, or [N]ot Install or [Q]uit? 
Installing [test] [beta 0.1]
[data/testBiff.bif] will contain 1 resources totalling 628538 bytes
[data/testBiff.bif] incorporating [TEST/BIF/START3EE.MOS]
KEY: Duplicate: START3EE.3ec
CHITIN.KEY copied to test/backup/0/CHITIN.KEY, 875812 bytes
KEY saved (188 biffs, 62160 resources)
[chitin.key] loaded, 875838 bytes
[chitin.key] 188 BIFFs, 62160 resources


Saving This Log:
TEST/TEST.TP2  0  0 Installed ~test~

SUCCESSFULLY INSTALLED      test

		WeiDU Timings
OUTER_INNER_PATCH_SAVE           0.000
<<<<<<<<                         0.000
load TLK                         0.000
DEFINE_PATCH_FUNCTION            0.000
DEFINE_ACTION_FUNCTION           0.000
OUTER_SET                        0.000
INCLUDE                          0.000
process_patch2                   0.000
eval_pe                          0.000
DEFINE_ACTION_MACRO              0.000
OUTER_INNER_PATCH                0.000
READ_*                           0.000
DEFINE_PATCH_MACRO               0.000
saving files                     0.004
marshal KEY                      0.008
Parsing TP2 files                0.012
loading files                    0.012
BIFF                             0.040
stuff not covered elsewhere      0.044
Parsing TPA files                0.048
unmarshal TLK                    0.064
unmarshal KEY                    0.080
TOTAL                            0.312
Link to comment

Understood. Thanks for putting in the effort to support us non-Windows weirdos! The thing that gets me, though, is why it also doesn't work in WINE? that's using all the windows versions of the tools. I wonder if it's the non-windows game executable that's the problem, not the OS. I may try installing the windows version of the game itself in WINE and running your test mod to see if we get the same thing.

Link to comment

Understood. Thanks for putting in the effort to support us non-Windows weirdos! The thing that gets me, though, is why it also doesn't work in WINE? that's using all the windows versions of the tools. I wonder if it's the non-windows game executable that's the problem, not the OS. I may try installing the windows version of the game itself in WINE and running your test mod to see if we get the same thing.

that's weird, indeed. My guess is that osx/linux version of BG2:EE uses slightly different biff format compared to windows build (or maybe some additional data is needed in chitin.key regarding biffs on these systems).

 

Biff files produced by mac and linux weidu seems to be fine (Near Infinity don't have problem reading them so they are not corrupted). So if you install that test mod using Wine and than start the game main menu art should be still missing even though you used windows weidu during installation - let me know if this isn't the case.

 

If Wisp won't be able to figure out how to solve this problem I can change EET code to not biff files at all. But it's still problematic situation for mac and linux users considering there are many mods that biff files.

Link to comment

Argent77 may have a solution in the osx thread. The biffs are fine. It's the backslashes weidu uses for file paths in chitin.key. The strace I posted above backs it up. It's obvious now after a good nights sleep!

 

Maybe we can use his workaround (with permission) and package it as a separate mod, eg unix_chitin_fix.tp2

Link to comment

yep, this must be it. So on case insensitive systems EET should work now (you can test it out by downloading EET from master branch). What's left is the damn case sensitivity. I will try to make this mod to always use lower casing - I will let you know when update is finished.

Link to comment

I will test on linux when I get home tonight. K4thos, does the master branch contain all the changes from the linux.zip you posted the other day? When I was testing last night, I tried using the latest master, but it was giving me errors and looked like some bits were still missing conditionals for unix that had them previously (I didn't grab a debug log, sorry). I just went back to using the master archive I had from our first linux test a few days ago+linux.zip+renaming bin/linux to bin/unix.

 

EDIT: Crap, wrong thread, sorry.

Link to comment

I will test on linux when I get home tonight. K4thos, does the master branch contain all the changes from the linux.zip you posted the other day? When I was testing last night, I tried using the latest master, but it was giving me errors and looked like some bits were still missing conditionals for unix that had them previously (I didn't grab a debug log, sorry). I just went back to using the master archive I had from our first linux test a few days ago+linux.zip+renaming bin/linux to bin/unix.

yes, it should have everything linux related (I've just compared all files in WinMerge). What has been changed since then (other than above mentioned fix) is "EXACT" added to AT_NOW lines for tileconv conversion (GUI stuff). Without it mtee.exe log saving doesn't work correctly on windows. Please upload the log if you will encounter this problem in latest build.

 

edit: also I think in order to make the mod work natively on linux we will need to use upper rather than lower case considering weidu BASH_FOR_FILE / SOURCE_FILE etc. variables always use uppercase characters, regardless of the file name casing.

Link to comment

Assuming the chitin.key issue is solved, it should be easier to determine the extent of the case issue. One BIG fix would be to lowercase all the mod files and directories. Weinstall automatically lowercases whatever it feeds to weidu, so in a normal case-sensitive environment, entering "weinstall EET" results in it not finding a .tp2 file, because it thinks its looking for "eet". Uppercase is used in the unix world to define environmental variables, so its frowned upon to use uppercase for files. I've seen other mods with specific linux support going all lowercase. I'd recommend looking at some to see what they are doing.

 

There's only so much you'll be able to do about case sensitivity. The "standard" for linux EE users who want to install mods is to use a script to log the starting filenames, lowercase them and then run a different script to revert them back using the previously created log. Part of the problem is weidu and part of it is some choices Beamdog made. Here's a great thread on Pocket Plane that covers the issue. Wisp goes on a great rant! The thread ends with a post which describes the way I've been working around the case issues, which is so much better than fighting with case issues.

 

If worse comes to worst, I've been thinking about typing up a guide or writing a shell script so other linux users can have a similar setup as what I put together for this test. That's still "native" on linux. Just requires an additional step.

Link to comment

Weidu's tolower isn't a solution for linux EE versions of the game because after lowercasing and installing mods, the EE binaries can't find dialog.tlk. tolower isn't reversible, so many of us have been rolling our own solutions, like reversible tolower bash scripts (I think there's better scripts than this one out there), symlinking all over the place (currently broken I think), and putting the game on a case-insensitive filesystem.

Link to comment

Archived

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

×
×
  • Create New...