Jump to content

Proper way to install on linux?


corvias

Recommended Posts

I have the Steam EE versions. My normal workflow for installing mods goes like this:

  • Copy the mod folder to the game folder
  • Run a script that lowers the case of all the files in the game directory. It generates another script to reset them after I'm done.
  • Run the linux native Weidu (240) on the mod.
  • Run the script to restore filenames.
  • Play the game.

That workflow doesn't seem to work for EET. When I run "weinstall eet", the install starts, asks me if I want to see the readme, brings it up in my browser, but after that I get:

ERROR: No translation provided for @900000
Continuing despite error.
Install Component [UNDEFINED STRING: @900000]? [I]nstall, or [N]ot Install or [Q]uit? [1471:1471:0115/223041:ERROR:broker_posix.cc(41)] Invalid node channel message

I assume that the windows exe "setup-EET" has some special sauce that has to do its thing first? Before I attempt this with WINE, what (if any) is the expected way of getting this paragon of modding ingenuity installed on linux?

 

Probably not what's wrong, but FYI: My BG:EE has SoD extracted with the "modmerge" tool someone from Beamdog released awhile back. The only other mod installed on it is the BG1NPC mod.

 

Incidentally, if you need any linux testers for this mod, I'd be happy to assist.

Link to comment

I wasn't even aware that all EE games works on linux. There are many changes needed to make it work natively there:

1. Linux version of following tools (not sure if all of these even exist for this system):

- ffmpeg

- mtee (on osx there is built in "tee" so if it also exists on linux than additional tool is not needed)

- tile2ee

- tileconv

- lua (here is source code. I don't have Visual Studio installed so someone else would need to compile it)

2. I would need to know the folder structure of linux release in order to patch executable (on osx the file that starts the game is hidden under several subdirectories for some reason, so I assume same may be true for linux)

3. Linux is case sensitive, so I would need to check all instances of COPY / COPY_EXISTING stuff in EET code to ensure that there are no problems with file name casing.

4. Is there any difference between osx terminal and linux one? If yes than several AT_NOW command line stuff would need to be written with linux in mind.

5. And there would be installation testing needed which I assume would be a mess considering there are even problems with osx support for now

 

In other words as it is you won't be able to install it natively on linux with just tolower. I can look into it in future but unfortunately don't have access to linux EE games and system, so don't expect it soon, unless someone else would be interested in doing the work.

 

If you're going to use Wine than use the master branch from Github ("clone or download" rather than "releases" tab) since it implements LUA regexp patching which is much faster than the method used in "RC 7.2b" release.

Link to comment

OS X is based on BSD, which is based on UNIX, so there are many similarities.

 

1. Tools

2. Linux is a lot less "sneaky" than OSX. The default location for your Steam library is in your home folder (/home/[username]). The default path is /home/[user]/.local/share/Steam/steamapps/common/[name_of_game], however you can put a Steam Library anywhere. The root of any steam library starts at steamapps. The executable name is "BaldursGateII" (no file extension).

 

3. Yes, since my previous post, I got sick of dealing with the myriad of things that can go wrong here. So I set up a small partition to be mounted with lowntfs-3g' "ignore_case" option. as I saw in a thread on Pocket Plane. That actually got me past my original issue, but now I'm seeing a different issue, which I'll go into later.

 

4. I need more detail. Are you referring to the actual program used to enter CLI commands, or the shell environment (e.g. bash)? If anything, I would expect linux to do things in a way less surprising than macOS.

 

5. I'm your guy. Just let me know. I'm not an IE modder, but I know a decent amount about linux and I putter around with other code related things. Not afraid to get my hands dirty.

 

As to my original issue, as I mentioned, after I moved my EE games to a case insensitive partition, the original issue went away. After doing "weinstall eet" I actually get asked for the path to bgee, it detects the bgee files, and the bg1npc mod components, but then I get:

Install Component [Initialise EET (first mod in install order)]?
[I]nstall, or [N]ot Install or [Q]uit? i

Installing [Initialise EET (first mod in install order)] [1.0 RC7]
Copying and patching 1 file ...

LANGUAGE_BG2 = en_US
Creating 1 directory
Copying and patching 1 file ...

/home/corvias/iemodding/bgee directory assigned via EET/bgee_dir.txt
Copying and patching 1 file ...
Copying and patching 1 file ...

LANGUAGE_BG1 = en_US
Copying and patching 1 file ...

21 BG:EE mods detected. Checking compatibility with EET...

BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected
BG1NPC BG:EE component detected

TLK merging...
Copying 1 file ...
Copying 1 file ...
Appending to files ...
[weidu] WeiDU version 24000
[weidu] WeiDU version 24000
[weidu] WeiDU version 24000

FATAL ERROR: Sys_error("eet/temp/result.tra: No such file or directory")
Copying 2 files ...
ERROR: error loading [weidu]
Stopping installation because of error.

ERROR Installing [Initialise EET (first mod in install order)], rolling back to previous state
Will uninstall   0 files for [eet/eet.tp2] component 0.
Uninstalled      0 files for [eet/eet.tp2] component 0.
ERROR: Unix.Unix_error(Unix.ENOENT, "stat", "weidu")
PLEASE email the file setup-eet.debug to K4thos (swit)
Using Language [English]

Install Component [Initialise EET (first mod in install order)]?
[I]nstall, or [N]ot Install or [Q]uit? q

Link to comment

I think I might have located the problem. The error I was getting was from the lack of eet/temp/result.tra. Looking at the eet.tp2 I see:

	//merge all TRA files, including pre-generated blank.tra
	ACTION_IF ~%WEIDU_OS%~ STR_EQ ~win32~ BEGIN
		AT_NOW ~copy "EET\temp\bg2ee.tra"+"EET\temp\append.tra"+"EET\base\blank.tra"+"EET\temp\bgee.tra" "EET\temp\result.tra"~ EXACT
	END ELSE ACTION_IF ~%WEIDU_OS%~ STR_EQ ~osx~ BEGIN
		AT_NOW ~cat EET/temp/bg2ee.tra EET/temp/append.tra EET/base/blank.tra EET/temp/bgee.tra > EET/temp/result.tra~ EXACT
	END
	//make final dialog.tlk / dialogF.tlk
	AT_NOW ~%WEIDU_EXECUTABLE% --noautoupdate --no-auto-tp2 --logapp --log "EET/temp/bash.debug" --make-tlk "EET/temp/result.tra"~
END

This must be what you were referring to with the AT_NOW statements. There's a condition for Windows and macOS, but not for linux, so naturally it isn't going create the required file (result.tra). This seems pretty straightforward. It would be pretty much the same as the OSX line. It's just using the unix "cat" command to merge the tlk files. Easy stuff. Do you mind if I hack around with this to get it working on linux? I'll take it as far as I can and I'll be sure to share my changes with you.

Link to comment
5. I'm your guy. Just let me know. I'm not an IE modder, but I know a decent amount about linux and I putter around with other code related things. Not afraid to get my hands dirty.

ok, let's do it. Thanks.

 

1. Tools

  • ffmpeg exists. Standard on most systems, and if it isn't, is easy to get
  • tee exists. Standard GNU tool I think.
  • tile2ee has a linux version.Installed it to my PATH like weidu Found here: http://www.shsforums...d-tis-converter
  • tileconv comes with the linux version of weidu.
  • lua is standard on most linux boxes.

we can't risk that some of these will be missed in some distribution.

- ffmpeg - which one of these distributions works for ALL linux systems?

- tile2ee, tileconv got them. This code will be used to check if system is 64bit (based on argent's code) since they come in 2 variants:

        AT_NOW ~echo $(uname -m) >EET/temp/arch_var.txt~
        ACTION_IF (FILE_CONTAINS_EVALUATED (~EET/temp/arch_var.txt~ ~AMD64~)) BEGIN
            OUTER_SPRINT arch_var ~x86_64/~
            PRINT ~arch_var = %arch_var%~
        END

- lua as mentioned needs to be compiled by someone (for both 32 and 64 bits). Most systems by default is not good enough.

 

2. Linux is a lot less "sneaky" than OSX. The default location for your Steam library is in your home folder (/home/[username]). The default path is /home/[user]/.local/share/Steam/steamapps/common/[name_of_game], however you can put a Steam Library anywhere. The root of any steam library starts at steamapps. The executable name is "BaldursGateII" (no file extension).

what is needed is the executable placement in relation to root game directory (which weidu defaults to when we call commands). From your description I assume it will be:

./BaldursGateII

right?

 

3. Yes, since my previous post, I got sick of dealing with the myriad of things that can go wrong here. So I set up a small partition to be mounted with lowntfs-3g' "ignore_case" option. as I saw in a thread on Pocket Plane. That actually got me past my original issue, but now I'm seeing a different issue, which I'll go into later.

no need for this if we're going to add native linux support since I doubt many people know how to make such partition. But it will be useful for testing. When the mod will work on case insensitive partion than I will try to make the casing work for default linux (without need to use tolover tool).

 

4. I need more detail. Are you referring to the actual program used to enter CLI commands, or the shell environment (e.g. bash)? If anything, I would expect linux to do things in a way less surprising than macOS.

Windows command line equivalent. On OSX it's called terminal from what I heard. No idea what shell, bash or CLI is, so don't know which one of them is called by weidu AT_NOW command.

 

Here are external commands currently used for osx:

1. chmod +x called for each tool that comes with the package (needed to grant admin access if I remember correctly), for example:

chmod +x EET/bin/osx/tileconv

2. directory + all files within it deletion, no confirmation:

rm -rf EET/temp

3. examples of external tools usage (of course in case of linux the path would point to different directory):

./bin/osx/lua EET/lib/main.lua

4. Code for shortcut creation (executed during installation via .sh file temporary placed in game's root directory):

#!/bin/sh
cat > $HOME/EET.desktop << TEETEE
[Desktop Entry]
Encoding=UTF-8
Value=1.0
Type=Application
Name=Enhanced Edition Trilogy
GenericName=Enhanced Edition Trilogy
Comment=Enhanced Edition Trilogy (EET)
Icon=$PWD/EET/docs/images/EET.ico
Exec="$PWD/start.sh" ""
Categories=Game;
Path=$PWD
TEETEE

It doesn't seem to work on osx either (which is not surprising when I now think about it considering it doesn't point to game executable but some start.sh file). If you're familiar with sh syntax please adjust this code.

 

5. Deletion of a single file without confirmation (USER_DIRECTORY is a weidu variable so don't worry about it):

rm -f %USER_DIRECTORY%/save/saves.tra

6. Saving output into a file via system tee tool

someToolRelatedCommand 2>>EET/temp/bash.debug | tee -a EET/temp/bash.debug

7. Merging text files

cat EET/temp/bg2ee.tra EET/temp/append.tra EET/base/blank.tra EET/temp/bgee.tra > EET/temp/result.tra

Let me know if any of these needs to be adjusted due to syntax differences between osx and unix.

 

----------------------

 

As for your error, the reson it happens is due to this:

END ELSE ACTION_IF ~%WEIDU_OS%~ STR_EQ ~osx~ BEGIN

if you change it to:

END ELSE BEGIN //osx, unix

than you should go past that step. But don't do it yet - no point since there are more places like this that needs adjustments and without tools it won't be usable either way. Once all tools are in place and you confirm above mentioned commands syntax than I will upload a version with all required changes.

Link to comment

Linux users will know how to get the missing dependencies if they don't have them. It'd be much easier to just run a test script to check the prereqs if you insist.

 

All the commands you quoted are fine.

 

the start.sh is a wrapper from the gog version — I don't know if the bd one has it or not.

Link to comment

  • ffmpeg & lua: It makes sense to distribute these for windows and macOS, but most linux distros come with a much more complete command line environment "out of the box". In the install instructions, just put in a bulletpoint for linux that says "This installation depends on ffmpeg and lua. Install it from your distribution's package manager, or compile it from source." That's a very normal thing to ask a linux user to do. Once it's on their system, it should be in the user's $PATH and can be called like you would any other bash command (like cd, rm, ls, cat, etc.).

If you are dead-set on distributing these with the mod, there are static builds of ffmpeg here, and static builds of lua here. There's always exceptions, but I can't think of a distro that DOESN'T come with them by default or at least have them in their package repository. Anyone using one of those exceptions is going to know what to do as long as you tell them they need ffmpeg and lua on their machine. That said, I don't know how EET is using these yet, so there may be a case for distributing the static binaries with the mod.

./BaldursGateII would indeed be correct!

Case-Sensitivity: That's good to hear, because I've discovered some unfortunate side effects to my "fix", and wouldn't represent the average linux user's setup anyway.

chmod, rm, tee, etc: Those are all standard bash shell commands and arguments. Should be the same on linux as in macOS. I'm kind of pumped about weidu now, so I'll go through the scripts and see if I can find stuff that isn't going to work.

The .desktop file might need some tweaks. Not an issue for Steam users, I think, but I'll need to look at that start.sh script if its written for macOS.

You're using my BGT logo for the icon! I made that eons ago. I might still have the .psd for it somewhere. If I can find it, I'll do up an EET version.

Link to comment
ffmpeg & lua: It makes sense to distribute these for windows and macOS, but most linux distros come with a much more complete command line environment "out of the box". In the install instructions, just put in a bulletpoint for linux that says "This installation depends on ffmpeg and lua. Install it from your distribution's package manager, or compile it from source." That's a very normal thing to ask a linux user to do. Once it's on their system, it should be in the user's $PATH and can be called like you would any other bash command (like cd, rm, ls, cat, etc.).

 

people usually don't read readme files (well, at least windows users), so I think providing tools with a package is not a bad approach. But if it's really not an issue there than how the command that calls them should look like? Will this call system lua executable or does it need some system path?

lua EET/lib/main.lua
You're using my BGT logo for the icon! I made that eons ago. I might still have the .psd for it somewhere. If I can find it, I'll do up an EET version.

I stole it from BGT, indeed :blush: Unique icon would be very nice. How do you want to be credited in the readme file - as corvias?

Link to comment

lua EET/lib/main.lua is correct. Just like how you are calling the other bash commands like cat and rm.

 

Corvias is fine. I released that logo under a Creative Commons license, so there's no such thing as stealing in this case. Just tickled to see it still kicking around!

Link to comment

ok, let's try it. Please use that case insensitive partition for now so we can check if the mod installs correctly without worrying about casing problems. Don't use tolower.

Download EET from GitHub master branch, extract it and than extract archive attached to this post in your game root directory overwriting old files. Let us know the results (upload your SETUP-EET_CORE.DEBUG)

linux.zip

Link to comment

Got through the first setup part!. Managed to change bin/linux to bin/unix in time, I think. Do I run the "end" tp2 next? I might not be able to get back to you for a couple hours. The log file is too big to attach to this forum, even compressed. I'll upload it someplace and send along a link as soon as I can.

 

FYI, I also tried it on my case-sensitive file set. I think the "EET" name of the directory may be a problem. If I run "weinstall EET/EET.tp2", weidu claims it can't find a .tp2 file and quits. Even with a full, absolute path. But if I run a script to lowercase all the filenames, it starts.

Link to comment

Got through the first setup part!. Managed to change bin/linux to bin/unix in time, I think. Do I run the "end" tp2 next? I might not be able to get back to you for a couple hours. The log file is too big to attach to this forum, even compressed. I'll upload it someplace and send along a link as soon as I can.

 

FYI, I also tried it on my case-sensitive file set. I think the "EET" name of the directory may be a problem. If I run "weinstall EET/EET.tp2", weidu claims it can't find a .tp2 file and quits. Even with a full, absolute path. But if I run a script to lowercase all the filenames, it starts.

 

use for example https://www.sendspace.com/ to upload files.

 

Indeed setup-EET_end needs to be installled at the end of whole installation (after all mods installed on top of EET) but we are testing for now so just run the game - see if it starts or if you will encounter the same issue with missing art as subtledoctor on osx

Is there BG1 intro after starting the game? Can you see a notification that the installation is not finished yet? Can you switch between campaigns? If everything will be alright than please test out setup-EET_end installation.

 

edit:

 

Honestly though, Linux users are generally fairly proficient with their terminal and can install the stuff they need and put it straight into their path so it'd probably be much easier to just test for it straight away and return a list of dependencies if need be.

Weidu waits for external command to finish executing before moving further when AT_NOW is used, so this could be implemented if such a thing is possible Can you please write such terminal code? Will it work universally for all linux distros?

Link to comment

Archived

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

×
×
  • Create New...