Jump to content

Proper way to install on linux?


corvias

Recommended Posts

how much of it do you want to have in weidu? Because you basically just run what you want to be able to run and check that the return status isn't 127 (command not found). Example with error reporting:

ffmpeg
if [ $? -eq 127 ]; then
  echo "install ffmpeg first"
else
  echo "found ffmpeg"
fi

It's trivial to add interactivity if you need it.

(which is not available by default and not all distros use bash [so no hash])

Link to comment

I'm back. Going to finish the test in a few.

 

There's a whole bunch of ways you could detect if a unix-type system has a particular binary. Here's an easy one:

command -v ffmpeg || echo "ffmpeg is not installed or not in your PATH"
command -v lua || echo "lua is not installed or not in your PATH"

If the command exists of the system, it will return the path to it. If it isn't, it returns whatever is in the quotes after "echo". The '||' is an "Or" operator.

Link to comment

how much of it do you want to have in weidu? Because you basically just run what you want to be able to run and check that the return status isn't 127 (command not found). Example with error reporting:

ffmpeg
if [ $? -eq 127 ]; then
  echo "install ffmpeg first"
else
  echo "found ffmpeg"
fi

It's trivial to add interactivity if you need it.

(which is not available by default and not all distros use bash [so no hash])

 

I'm back. Going to finish the test in a few.

 

There's a whole bunch of ways you could detect if a unix-type system has a particular binary. Here's an easy one:

command -v ffmpeg || echo "ffmpeg is not installed or not in your PATH"
command -v lua || echo "lua is not installed or not in your PATH"

If the command exists of the system, it will return the path to it. If it isn't, it returns whatever is in the quotes after "echo". The '||' is an "Or" operator.

 

I've been thinking about automatically installing tool if not present. Found this ubuntu code:

sudo add-apt-repository [repository name here]

will something like this work with other distros? (not sure if these are correct repository names and if they can be different in different distros):

command -v ffmpeg || sudo add-apt-repository ffmpeg
command -v lua || sudo add-apt-repository lua

edit: on the other hand forcing auto tool installation may be a little excessive considering:

- I think I would be annoyed if some mod would start installing stuff on my computer not related to the mod itself

- requirement of these tools presence can be mentioned in the readme as previously suggested

- or they could be distributed in the package considering the size of them is not really an issue in this day and age

Link to comment

Ok, the results are in. Here are the logs. It didn't go great, but better than I expected:

  • After finishing the install, I started the game from Steam and it started!
  • Intro movie came up
  • The main interface was missing graphics. Had the UI graphics but not the logos. I assume that's similar to what's been going on with macOS?
  • The campaign selector came up, but no graphics behind it. Just text.
  • The game crashed after rolling up a character for BG1
  • SoA was able to start.

For the hell of it, I took my IE game partition out of case-insensitive mode and the game wouldn't start at all.

 

Regarding lua and ffmpeg: Respectfully, you are over-thinking this and you are going to create unnecessary work for yourself. It's completely reasonable to ask a linux user to install these very common packages on their own.

Link to comment

from what I see:

- no warnings during installation so weidu code works fine
- LUA regexp patching finished successfully
- tileconv conversion works
- ffmpeg conversion works (there is different movie with English dubbing for each campaign chosen, right?)

 

So the only suspect for missing art would be either weidu code that installs PVRZ based MOS/TIS files or some biffing problem (far more likely).
1. Please install first component of the mod attached to this post (on case insensitive partition) on top of EET and check if you can see art. Make a copy of SETUP-TEST.DEBUG
2. If first one didn't fix the issue in main menu than uninstall it and install second component

If there is no menu art after testing both components than please upload both SETUP-TEST.DEBUG files for further investigation.

test.zip

Link to comment

Progress! Here are the logs.

  • Installed test 1 and tried the game
  • Logo graphics came up and so did the campaign selector!
  • The right videos come up for the right campaigns. Video's audio works, too. (I think they were working previously anyway)
  • Game still crashes right after clicking "Venture Forth."
  • Uninstalled test 1 and verified the old behavior was still occurring (it was).
  • Installed test 2 and tried the game
  • Exact same results as test 1 including the crashes.

I need to drop off for awhile for sleep and work tomorrow (I'm on eastern US time). I'll peek in during my lunch if you have more questions and I'll do some more testing after I get home.

 

Do you know if there's a way to get the game to spit out a log? Sometimes games will spit out something useful when you start Steam for linux from the terminal, but sadly not in this case.

Link to comment

the result of your test means that for some reason biffed files don't work properly on osx/unix. The first component does exactly the same thing as EET but I moved menu art to override directory rather than biffing them (second component does the same but with different code). That's odd considering your debug file states that files were properly biffed and MAKE_BIFF weidu command is used for this so no chance for platform related mistake.

 

Please download Near Infinity, run it with this parameter:

pathToJava -Xmx1024M -jar NearInfinity.jar

ARE -> BG2600 -> View Area.

 

Is the area viewable or some error/corrupted mess shows up? What about other BGxxxx and BDxxxx areas? (check at least few of them). I suspect biffing for some reason corrupted these files. If this will be the case I will prepare a standalone test biffing code - if it corrupts the file again than it will need to be reported on weidu forum.

 

edit: hmm, this post states that the map shows up in NI for subtledoctor on osx. No idea why biffed files would not work in game then... Perhaps there is some difference in biff format between platforms. But please test it with NI anyway.

Link to comment

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?

As others have said, you can check if the executable exists by trying to execute it and output a message like "You do not have X installed, please make sure all of the followings are available in your bin before going any further :

  1. " then exit weidu and the user will launch weidu again once it is done.

 

I'm not very familiar with Linux either tbh, I think that weidu can be run without the su rights and adding a sudo command would force to execute weidu itself in su mode and I don't think it's a good idea.

Installing a few programs really shouldn't be a problem for Linux users.

 

Accounting pre emptively for every Linux distro would be a hassle though.

Link to comment

I'll play with NI tonight when I get home. I'll also see if I can do another rebuild from scratch as well to rule out human error on my part (which is entirely possible). I still wan to see what happens if I install it by running the windows version of weidu through WINE, but I might not get to that tonight.

 

@lynx: I'm using a case-insensitive filesystem to hopefully rule out problems due to case-sensitivity for now. Modded game won't even start if I put the fs back in case-sensitive mode.

Link to comment

Did a quick check before heading out. NI does not list ANY ARE's starting with BG. They are all AR or OH. Tried with fs in both case-sensitive and insensitive modes. Like I said, let me do a full rebuild tonight and we'll see what happens.

Options -> Show Override Files -> In ??? Folders (CRE, SPL ...)

 

or simply check Override tab.

Link to comment

Archived

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

×
×
  • Create New...