Jump to content


Photo

BGT in Linux (Successfully I think)


  • Please log in to reply
129 replies to this topic

#101 Turambar

Turambar
  • Modder
  • 935 posts

Posted 22 November 2011 - 01:53 AM

Or BATs should be converted to tp2 to make install cross platform.


Exactly what i meant. But i don't suppose all of the tools needed compile in linux do they (there is always wine...)?

And it would be best if weidu itself set the paths. So that modders don't have to distribute the executables (and then need a "linux version" afterall).

The only download with a "linux" or "osx" version would be WeiDU.

I prefer not to use windows executables under wine if that's possible. Wine is not the only windows emulator for linux, and things could change in the future too, so it's always better not to use any package, but to only use standard unix commands or scripts and binaries I provide myself inside the mod.
Moreover, there's always the risk of regressions with wine, and wine itself could be somehow modified.




Exactly what i meant. But i don't suppose all of the tools needed compile in linux do they (there is always wine...)?
And it would be best if weidu itself set the paths. So that modders don't have to distribute the executables (and then need a "linux version" afterall).
The only download with a "linux" or "osx" version would be WeiDU.


All necessary tools (tispack/tisunpack, mospack/mosunpack, tis2bg2, weidu, sox, oggdec) already exist for linux.
Maybe also wavc, snd2acm, acm2wav are used but i could not find recent mod which uses these at install time.
If installed system wide in /usr/bin, paths are unnecessary in linux too.
When i installed megamod in linux for myself, i dropped included ones anyway for consistency reason.


I would not call 'user friendly' a mod which requires packages to be put manually inside your PATH, and so on.

Or BATs should be converted to tp2 to make install cross platform.

That's IMO the best thing to do.

What I'm trying to achieve is a mod that installs regardless of the emulator you are using for BG2, regardless on the type of partition you have installed the game on (chmod does not work on Windows file systems), does not require that you lowercase BG1, and so on. In general, it won't modify, nor require that you modify, anything outside the game folder (a part from the /tmp folder, but that's what it is meant for), and will work on every unix-like system, regardless of distributions, packages installed and so on.

Apparently, it is working very well on my Kubuntu, but more testing is needed before it will be released.

In particular, it would be great if anyone could test it on a non-debian based distribution (or even on other unix-like systems such as BSD or similar), just to be sure that I didn't use debian-specific items.

If anyone is interested, please PM me.

Edited by Turambar, 22 November 2011 - 01:55 AM.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#102 neird

neird
  • Member
  • 19 posts

Posted 22 November 2011 - 03:15 AM


Or BATs should be converted to tp2 to make install cross platform.


Exactly what i meant. But i don't suppose all of the tools needed compile in linux do they (there is always wine...)?

And it would be best if weidu itself set the paths. So that modders don't have to distribute the executables (and then need a "linux version" afterall).

The only download with a "linux" or "osx" version would be WeiDU.

I prefer not to use windows executables under wine if that's possible. Wine is not the only windows emulator for linux, and things could change in the future too, so it's always better not to use any package, but to only use standard unix commands or scripts and binaries I provide myself inside the mod.
Moreover, there's always the risk of regressions with wine, and wine itself could be somehow modified.




Exactly what i meant. But i don't suppose all of the tools needed compile in linux do they (there is always wine...)?
And it would be best if weidu itself set the paths. So that modders don't have to distribute the executables (and then need a "linux version" afterall).
The only download with a "linux" or "osx" version would be WeiDU.


All necessary tools (tispack/tisunpack, mospack/mosunpack, tis2bg2, weidu, sox, oggdec) already exist for linux.
Maybe also wavc, snd2acm, acm2wav are used but i could not find recent mod which uses these at install time.
If installed system wide in /usr/bin, paths are unnecessary in linux too.
When i installed megamod in linux for myself, i dropped included ones anyway for consistency reason.


I would not call 'user friendly' a mod which requires packages to be put manually inside your PATH, and so on.

Or BATs should be converted to tp2 to make install cross platform.

That's IMO the best thing to do.

What I'm trying to achieve is a mod that installs regardless of the emulator you are using for BG2, regardless on the type of partition you have installed the game on (chmod does not work on Windows file systems), does not require that you lowercase BG1, and so on. In general, it won't modify, nor require that you modify, anything outside the game folder (a part from the /tmp folder, but that's what it is meant for), and will work on every unix-like system, regardless of distributions, packages installed and so on.

Apparently, it is working very well on my Kubuntu, but more testing is needed before it will be released.

In particular, it would be great if anyone could test it on a non-debian based distribution (or even on other unix-like systems such as BSD or similar), just to be sure that I didn't use debian-specific items.

If anyone is interested, please PM me.


As for 'user friendly' mods, i count mods which contains any executables (tispack/tisunpack, mospack/mosunpack, tis2bg2, weidu, sox, oggdec) for any platform as 'unfriendly'. For personal install i always remove local versions of tools and use system-wide installed ones.

#103 i30817

i30817
  • Member
  • 611 posts

Posted 22 November 2011 - 01:54 PM

As i said, it makes more sense to have the tools distributed with WeiDU itself. Otherwise, there is still a need for "linux versions" or "macos versions" - they wouldn't work without the user sudo apt-get-ing them. Besides the tp2 code needs to be invariant - the linux version using PATH, and the windows one using .\tools\bla.exe wouldn't work out too well.

Granted, people would bitch that it's not "selfcontained" anyway, but they don't when mods require TobEx, why not for this too?

Edited by i30817, 22 November 2011 - 08:07 PM.


#104 Turambar

Turambar
  • Modder
  • 935 posts

Posted 23 November 2011 - 01:34 AM

As i said, it makes more sense to have the tools distributed with WeiDU itself. Otherwise, there is still a need for "linux versions" or "macos versions"

Why? It's enough to put all binaries in the mod folder (it's just some more kBs), and to use one or the other with ACTION_IFs and the %WEIDU_OS% variable.
Moreover, how could weidu exactly guess which binaries any mod could need? There are particular mods which could need a specific binary for particular operations (such as tis2bg2 for bgt), and noone could guess what and when will be needed.

The new vesrion which is currently being tested does not require the user anything but to run the installer however he wants, on whatever OS, without needing any privileges (of course, provided he can Write in the whole game folder, and Read the bg1 folder). The installer itself (ie, what's been coded inside the tp2) will take care of the rest.

Edited by Turambar, 23 November 2011 - 01:39 AM.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#105 i30817

i30817
  • Member
  • 611 posts

Posted 23 November 2011 - 01:45 AM

Because how would you know which exec to use in each OS? Since you'd need something like that ANYWAY, when invoking the OS-specific executable, it's better that it's done in weidu once and well, than in every mod that needs it and broken (and that would prob require mod "linux versions" again).

And what would happen when you want to install in a newfangled OS? Update&compile weidu&utilities once or update dozens of mods?

Weidu wouldn't guess anything. It would store a canonical path to all of the utilities used (say, the same dir as the weidu exec, or the game dir). Then the mods would request to exec with %EXE_VARS%

I'm probably simplifying horribly the requirements for true independent cmd line invocation (\ versus / and the "current directory" come to mind). Maybe it's a dead end without more code than the bigg is willing to support.


I'd also ask you not to have a "additional installation stage" where you must use your specialized extractor/installer to decide the mod's executables to extract... because that ruins mass extraction, which is more or less the only thing that makes installing BGT by hand not take forever (besides BWP of course).

Maybe "linux versions" is the path of least resistance.

Edited by i30817, 23 November 2011 - 02:18 AM.


#106 i30817

i30817
  • Member
  • 611 posts

Posted 23 November 2011 - 02:21 AM

Mmmm. You can do it (avoid name clashes from different OS execs on cmd execution) with prefixes & suffixes.

"linux_86_"+blabhablah+".so"
"linux_86x64_"+blabhablah+".so"
"windows_"+blabhablah+".exe"
"macosx_"+blabhablah+".whatevermacuses"

The duplication of code (choosing which exe is right)/upgrade "problem" remains though.

Edited by i30817, 23 November 2011 - 02:49 AM.


#107 neird

neird
  • Member
  • 19 posts

Posted 23 November 2011 - 08:41 AM

Have a few questions after looking at bgt-alpha.
Am i right that the reason for existence of most bat/shell scripts is that weidu do not implement DELETE command?
Wouldn't it be better to use AT_NOW ~%del% ...~ , AT_NOW ~%deldir% ...~ and define del, deldir for linux, windows and macos?

#108 Turambar

Turambar
  • Modder
  • 935 posts

Posted 23 November 2011 - 12:48 PM

Have a few questions after looking at bgt-alpha.
Am i right that the reason for existence of most bat/shell scripts is that weidu do not implement DELETE command?
Wouldn't it be better to use AT_NOW ~%del% ...~ , AT_NOW ~%deldir% ...~ and define del, deldir for linux, windows and macos?

You're right. That's one of the issues with weidu, and that kind of scripts is much used in bgt.
We could use a sort of
ACTION_FOR_EACH file IN ~list~ BEGIN
~%del% [folder]%slash%file~
END
But the main issue with bgt is the number of files involved. I think that each AT_ command is quite demanding, since weidu has to launch a new program each time. I think that's the reason why it's done like that.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#109 neird

neird
  • Member
  • 19 posts

Posted 03 December 2011 - 02:49 PM

BGT 1.13 should be installable. Just change content of ie-mod-bgt/debian and rebuild or use ie-linux-tools/ie-dev.sh directly to patch bats into bash scripts.
All other mods except Vecna and Aurora's Shoes and Boots should be installable too. You can even install Vecna and Aurora's Shoes and Boots if you know how to fix Linux WeiDU to work with cp1252 encoding (I don't).

Managed to install Vecna mod with some 'hacks'. Runs fine.
As for 'hacks', it seems Linux version of WeiDU uses String.lowercase in OCaml code which is not unicode aware.
Therefore all mods which use non-latin characters (Infinity animations, Vecna and Aurora's Shoes and Boots) in filenames will not install correctly.

#110 Turambar

Turambar
  • Modder
  • 935 posts

Posted 03 December 2011 - 03:12 PM

Managed to install Vecna mod with some 'hacks'. Runs fine.
As for 'hacks', it seems Linux version of WeiDU uses String.lowercase in OCaml code which is not unicode aware.
Therefore all mods which use non-latin characters (Infinity animations, Vecna and Aurora's Shoes and Boots) in filenames will not install correctly.

I tried to install IA on linux, and I had problems for that reason, but I managed to install it by changing the charset of the tp2 to utf-8 (so that it matches the charset of the file names).

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#111 neird

neird
  • Member
  • 19 posts

Posted 03 December 2011 - 10:14 PM


Managed to install Vecna mod with some 'hacks'. Runs fine.
As for 'hacks', it seems Linux version of WeiDU uses String.lowercase in OCaml code which is not unicode aware.
Therefore all mods which use non-latin characters (Infinity animations, Vecna and Aurora's Shoes and Boots) in filenames will not install correctly.

I tried to install IA on linux, and I had problems for that reason, but I managed to install it by changing the charset of the tp2 to utf-8 (so that it matches the charset of the file names).

For Vecna the problem is in code similar to
COPY_LARGE ~vecna/ia/DeathTyrant~ ~override~
which leads in WeiDU to String.lowercase for vecna/ia/DeathTyrant/µjw.2da
which gives garbage for µ and fails on copy

#112 FlameWing

FlameWing
  • Member
  • 41 posts

Posted 05 December 2011 - 04:21 AM

For now, using Wine to install IA and similar work on Lunix; ideally, WeiDU itself should me made utf-8-aware in Linux.

Edited by FlameWing, 05 December 2011 - 04:22 AM.


#113 FlameWing

FlameWing
  • Member
  • 41 posts

Posted 05 December 2011 - 04:21 AM

Edit: double-post; delete, please.

Edited by FlameWing, 05 December 2011 - 04:22 AM.


#114 neird

neird
  • Member
  • 19 posts

Posted 05 December 2011 - 02:35 PM

For now, using Wine to install IA and similar work on Lunix; ideally, WeiDU itself should me made utf-8-aware in Linux.

Patched WeiDU source instead (to lowercase only latin characters) as it is simpler for me. Vecna installs fine.

#115 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 21 January 2012 - 02:54 PM

BGT 1.13 should now install on Linux systems out-of-the-box. Any problems, please create a new topic. Unpinning this topic.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#116 -_doz-

-_doz-
  • Guest

Posted 25 January 2012 - 08:08 AM

Well, since the problem isn't related to the BGT, but rather is a problem of the toolset that's used under linux, I'll report it here.

Need help, guys.
I'm trying to build elkhound with gcc 4.5.3 under the 64bit system and this is what I'm getting when gcc is trying to compile the ast subfolder:

Spoiler


I'm not a programmer, so I can't even imagin what does this mean.
Source files are from here: http://github.com/dsw/oink-stack.git

gcc -v output:
Spoiler



CFLAGS="-O2 -march=native"
CXXFLAGS="${CFLAGS}"

Do I necessarilly need elkhound to make a linux version of weidu work?

#117 neird

neird
  • Member
  • 19 posts

Posted 25 January 2012 - 09:00 AM

If you are using Debian derivatives such as Ubuntu you can just use packages from attachement.

Edit: It seems binary attachement files is garbled at upload for Linux version of Firefox (can't check for Windows).
Reuploaded to mediafire

Edited by neird, 25 January 2012 - 09:52 AM.


#118 -_doz-

-_doz-
  • Guest

Posted 25 January 2012 - 09:29 AM

No, I'm using gentoo. And seems, your archive is somehow demaged, I've tried to download it several times with different browsers, but have had no luck. Would you mind to reupload it to another site? Mediafire.com, for example.

# tar -xzf linux-tools.tar.gz -C linux-tools
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors


#119 -_doz-

-_doz-
  • Guest

Posted 25 January 2012 - 10:26 AM

Reuploaded to mediafire



Thanks, but I don't see any binaries in it, only build instructions and since the sources are from the same repository
Spoiler
they just wouldn't work because my gcc simply can't compile targeted files.

#120 neird

neird
  • Member
  • 19 posts

Posted 25 January 2012 - 10:41 AM


Reuploaded to mediafire


Thanks, but I don't see any binaries in it, only build instructions and since the sources are from the same repository
they just wouldn't work because my gcc simply can't compile targeted files.


Was smbase and ast configured and builded before elkhound?
I think errors you have is related to missing stuff, not a bad compiler.
It was builded by me with at least 4.3, 4.4, 4.5, 4.6 versions (as they emerged in Debian testing)

Edit: Retested with Debian version for g++ 4.5.3, builds file.
PS: For whose folks who wonder what is discussed here, elkhound is required to build weidu from source.

Edited by neird, 25 January 2012 - 10:57 AM.