vtazt Posted December 12, 2016 Share Posted December 12, 2016 Hello, I'd like to battle some nonstupid mages, so it looks like SCS is just what I need. However I can't seem to install with BG2EE on Linux. Here are my steps: Unpack WeiDU-Linux-240.zip; put binaries in path. Unpack lin-stratagems-v30.zip into <install directory>/game. All SCS data resides in <install directory>/game/stratagems. Run tolower in game directory. In the stratagems directory, run "weinstall setup-stratagems.tp2" (note the readme says "weinstall SCS" which doesn't work, failing with a "no tp2 file" error). The location of the SCS directory looks OK because, as shown below, it finds the dialog.tlk file. If I don't run tolower, weinstall gives an error for not finding chitin.key. After tolower is run, the error is gone. So it seems to check out. Just to cover all bases, I tried with SCS dumped into the game directory, and the result was the same. The is what happens from the console. I have clipped the last 600 lines or so which consist of errors much like the ones at the bottom. Full debug log is attached. $ weinstall setup-stratagems.tp2 weidu --log setup-setup-stratagems.debug setup-stratagems.tp2 [weidu] WeiDU version 24000 Choose your language: 0 [English] 1 [Espanol (www.clandlan.net)] 2 [Polski (Yarpen)] 3 [Deutsch (Leonardo Watson)] 4 [Francais (Mornagest/Isaya)] 5 [Italiano (Stoneangel)] 6 [Russian (Prowler/Silent)] 7 [Korean (Menocu)] 0 Using Language [English] 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] 1 Using ../lang/en_us/dialog.tlk Couldn't open the readme: file not found. ERROR: No translation provided for @2 Continuing despite error. Would you like to display the components from [UNDEFINED STRING: @2]? [Y]es, [N]o? y ERROR: No translation provided for @3 Continuing despite error. Would you like to display the components from [UNDEFINED STRING: @3]? [Y]es, [N]o? n ERROR: No translation provided for @4 Continuing despite error. Would you like to display the components from [UNDEFINED STRING: @4]? [Y]es, [N]o? n ERROR: No translation provided for @5 Continuing despite error. Would you like to display the components from [UNDEFINED STRING: @5]? [Y]es, [N]o? n ERROR: No translation provided for @6 Continuing despite error. Would you like to display the components from [UNDEFINED STRING: @6]? [Y]es, [N]o? n ERROR: No translation provided for @16040 Continuing despite error. Would you like to display the components from [UNDEFINED STRING: @16040]? [Y]es, [N]o? n ERROR: No translation provided for @16041 Continuing despite error. Would you like to display the components from [UNDEFINED STRING: @16041]? [Y]es, [N]o? n ERROR: No translation provided for @3393 Continuing despite error. Install Component [UNDEFINED STRING: @3393]? [I]nstall, or [N]ot Install or [Q]uit? i Installing [UNDEFINED STRING: @3393] [v30] Stopping installation because of error. ERROR Installing [UNDEFINED STRING: @3393], rolling back to previous state Will uninstall 0 files for [setup-stratagems.tp2] component 1000. Uninstalled 0 files for [setup-stratagems.tp2] component 1000. ERROR: Sys_error("stratagems/lib/always.tph: No such file or directory") PLEASE email the file setup-setup-stratagems.debug to For help troubleshooting installation problems, go to the Sword Coast Stratagems forum at forums.gibberlings3.net. Using Language [English] Install Component [UNDEFINED STRING: @3393]? [I]nstall, or [N]ot Install or [Q]uit? i Installing [UNDEFINED STRING: @3393] [v30] Stopping installation because of error. ERROR Installing [UNDEFINED STRING: @3393], rolling back to previous state Will uninstall 0 files for [setup-stratagems.tp2] component 1000. Uninstalled 0 files for [setup-stratagems.tp2] component 1000. ERROR: Sys_error("stratagems/lib/always.tph: No such file or directory") PLEASE email the file setup-setup-stratagems.debug to For help troubleshooting installation problems, go to the Sword Coast Stratagems forum at forums.gibberlings3.net. Using Language [English] Install Component [UNDEFINED STRING: @3393]? [I]nstall, or [N]ot Install or [Q]uit? n Skipping [UNDEFINED STRING: @3393] ERROR: No translation provided for @20074 Continuing despite error. ERROR: No translation provided for @8 Continuing despite error. ERROR: No translation provided for @20076 Continuing despite error. SKIPPING: [UNDEFINED STRING: @20076 -> UNDEFINED STRING: @20074] UNDEFINED STRING: @8 ERROR: No translation provided for @20076 Continuing despite error. ERROR: No translation provided for @20077 Continuing despite error. ERROR: No translation provided for @20076 Continuing despite error. ERROR: No translation provided for @20076 Continuing despite error. ERROR: No translation provided for @16004 Continuing despite error. ERROR: No translation provided for @8 Continuing despite error. [...etc...] setup-setup-stratagems.debug Link to comment
agb1 Posted December 12, 2016 Share Posted December 12, 2016 The paths in the tp2 file for all of the mod contents are defined relative to the game folder. Therefore, try running the weinstall command from the game directory, not inside the stratagems folder. weinstall stratagems\setup-stratagems.tp2 Also, before doing that, I suggest you download, extract and "install" (run the script for) the BiG World Fixpack in your game folder to patch the SCS v30 files with the latest community fixes. The Fixpack overwrites certain files in the SCS (stratagems) folder to change how what will happen when you actually run the installer, so apply the Fixpack first, then install SCS. https://github.com/BiGWorldProject/BiG-World-Fixpack#readme Link to comment
vtazt Posted December 13, 2016 Author Share Posted December 13, 2016 Hi, thanks for the quick reply! I downloaded BiG-World-Fixpack-master.zip, unpacked, and ran, but I don't see an indication that it worked. WeiDU v 24000 Log weidu --log big.debug BiG-World-Fixpack-master/_ApplyPatches.tp2 [./chitin.key] loaded, 875630 bytes [./chitin.key] 187 BIFFs, 62147 resources [./linux.ini] loaded, 0 bytes [./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") WeiDU Timings loading files 0.000 stuff not covered elsewhere 0.000 unmarshal KEY 0.040 TOTAL 0.040 There is no WeiDU.log or weidu.log in the root game directory or in the BiG-World-Fixpack-master directory (or anywhere else). Invoking from the BiG directory has the same effect. Maybe it doesn't make sense to continue after that apparent failure, but in any case, moving on, "weinstall stratagems/setup-stratagems.tp2" is the right invocation, thanks. There are many errors, however, which didn't get recorded at first because that invocation tries to log to the setup-stratagems directory which doesn't exist. I wiped the whole bg2 game directory and began again, just in case. Attached is the log. By the way, tolower gets upset when it walks into the BiG fixpack directory, presumably due to spaces in filenames. Fatal error: exception Unix.Unix_error(Unix.ENOTEMPTY, "rename", "./big world fixpack/Divine_Remix")tolower also asks me about baldur.ini, which AFAICT was supplanted by baldur.lua and doesn't exist in that directory on Linux anyway, but in a ~/.local subdirectory.scs.debug.zip Link to comment
agb1 Posted December 13, 2016 Share Posted December 13, 2016 You can rename the Fixpack directory to something without spaces, run tolower on it, then rename it back. Running the Fixpack to patch SCS should take care of the SCS install errors. Try creating a blank empty text file named weidu.log if 'weinstall _ApplyPatches.tp2' (or lowercase version thereof) still doesn't work. When unpacking the fixpack, the tp2 file should be in your game folder, and the Big World Fixpack folder should also be in your game folder. The containing "master" folder is not needed. Link to comment
vtazt Posted December 13, 2016 Author Share Posted December 13, 2016 Thanks, I'm not there yet but I'm definitely closer! It appears the BiG patch installed correctly when I used the right directory setup you described. Unfortunately there's some errors with the SCS installation. The first couple look case-related. Then it's looking for "lib_macro.tpa.tpa" which doesn't exist. Then an unknown "check_ini" function. big.log scs.log Link to comment
agb1 Posted December 13, 2016 Share Posted December 13, 2016 Always focus on the first error only. Following errors may be false positives caused by the first error. I am away from my computer now so I can't check the files. Try "grep -r lib_macro.tpa *" without the quotes, in the stratagems folder. The double tpa might be a glitch in WeiDU's debug output, but if there is really a file that is looking for .tpa.tpa, that is obviously wrong and easily corrected. Link to comment
vtazt Posted December 13, 2016 Author Share Posted December 13, 2016 I meant to include my custom tool. Since there were many files with spaces in them, I wrote a quick and dirty ruby version of tolower. I tested it on various cases and it seems to work well. #!/usr/bin/env ruby require 'find' require 'fileutils' def another_pass acted = false Find.find "." do |path| new_path = path.downcase unless path == new_path FileUtils.mv path, new_path acted = true end end return acted end def to_lower # We must re-walk the tree after renaming a directory. while another_pass end end puts "Recursively lowercase all files! Are you sure? [y/n]" if gets =~ /^y/i to_lower else puts "Aborting." end Link to comment
vtazt Posted December 13, 2016 Author Share Posted December 13, 2016 Alright I redid the process to double-check the results, and they're the same. The big.log doesn't indicate any failure, but this time I scrolled up in the console and saw "FAILED" messages from patch. Indeed there are a bunch of .rej files. $ find . -iname "*.rej" ./tactical_bg1/c2end.tpa.rej ./tactical_bg1/demoncult.tpa.rej ./genai/genai.tpa.rej ./lib/install.tph.rej ./lib/stratagems_shared.tph.rej ./lib/always.tph.rej ./caster_shared/caster_shared.tph.rej ./gameplay/npc_proficiencies.tpa.rej ./gameplay/npc_separate.tpa.rej ./gameplay/wk_early.tpa.rej ./setup-stratagems_autoinstall.tp2.rej ./initial/initial.tpa.rej ./tactical_bg2/spawn.tpa.rej ./sfo/install_sfo.tpa.rej ./sfo/general/lib_macro.tpa.rej ./sfo/general/lib_iterate.tpa.rej ./spell/ironskins.tpa.rej ./sarevok/sarevok.tpa.rej ./setup-stratagems.tp2.rej ./werewolf/werewolf.tpa.rej ./item/elemental_arrows.tpa.rej ./item/dispelling_arrows.tpa.rej ./help/baf/shout.baf.rej The only mention of lib_macro.tpa (I did case-insensitive "grep -ri lib_macro.tpa ." for good measure) is in the first two lines of ./sfo/general/lib_macro.tpa.rej. --- stratagems/sfo/general/lib_macro.tpa 2014-12-28 17:55:28.000000000 -0500 +++ Fixpack/stratagems/sfo/general/lib_macro.tpa 2016-12-03 13:41:41.335225900 -0500 Maybe a -pN flag to patch is missing, or another tool got confused by spaces, or something. This forum software won't allow me to upload a .rej file so I zipped it.lib_macro.tpa.rej.zip Link to comment
agb1 Posted December 13, 2016 Share Posted December 13, 2016 You re-applied the fixpack? The patching done by the fixpack makes line-edits to specific target files in the stratagems folder, so attempting to reapply the fixpack (make the same changes again) will naturally fail (the expected "before patching" lines are no longer there, having been changed by the patches already applied before). Hence, rejected patches and .rej files generated saying "I didn't find the expected line in the target file so I did not apply this change." In short: fixpack is a do-once, per mod folder. Is there not a lib_macro.tpa file in stratagems/sfo/general/lib? SCS might reference the tpa file using variable substitution, like %file%.tpa - so try searching for just .tpa.tpa and for just lib_macro, separately. Link to comment
vtazt Posted December 13, 2016 Author Share Posted December 13, 2016 I didn't reapply the fixpack. Earlier I mentioned wiping the whole bg2 directory and starting again, and that's what I meant when I said redoing the process. As I said, the patches fail but the failures are not recorded in the log. I did this a third time (fresh wipe again), and I overlooked the most important part of the patch error: "different line endings". It may be just a dos/unix ending thing. I'll investigate further using that .rej list. Note that not every patch failed. There's no tpa.tpa anywhere, and the .rej file is the only thing containing lib_macro. Link to comment
vtazt Posted December 13, 2016 Author Share Posted December 13, 2016 Well maybe the line endings are a red herring. For instance werewolf.tpa from SCS and werewolf.tpa.patch from the fixpack are both 100% DOS line endings. Here's the console output from weidu. console.log Link to comment
agb1 Posted December 13, 2016 Share Posted December 13, 2016 Aha. The patch files have CRLF (Windows style) line endings. Linux uses LF line endings only. I thought the patch utility would handle that line ending conversion automatically, but evidently not. You can run dos2unix on all of the files in the fixpack folder to remove the CR line endings, apparently. http://stackoverflow.com/questions/11929461/how-can-i-run-dos2unix-on-an-entire-directory Link to comment
agb1 Posted December 13, 2016 Share Posted December 13, 2016 On further review - I hadn't realized that the distribution of SCS v30 for Linux is actually a separate package. The Fixpack patches were created using the Windows SCS v30 package. It is possible (though baffling) that the Linux package omitted some files like that lib_macro file. It may be necessary to review any remaining rej files individually after dealing with the line endings. Link to comment
vtazt Posted December 13, 2016 Author Share Posted December 13, 2016 Yes I have dos2unix, but I also have a tool that tells me what percentage DOS line endings. That says 100% DOS so I didn't bother with dos2unix. But after running dos2unix the werewolf patch works, so go figure. I'm close now! [Edit: Usually the problem is a mixture, but yes like you I thought it'd be OK if it was 100% one or the other.] [Edit: And for cryin' out loud, patch says "Stripping trailing CRs from patch", implying it's OK. Bastards.] Link to comment
vtazt Posted December 13, 2016 Author Share Posted December 13, 2016 Yay, it seems the SCS install worked. Thanks for your help. Well I didn't wait around to install every single thing, but it succeeded for a whole bunch of the options anyway. [Edit: Here are the dos2unix changes. The key to understanding patch is that it will gladly strip CR from patch files but it won't touch target files. Run the following in the stratagems directory.] dos2unix ./tactical_bg1/c2end.tpa dos2unix ./tactical_bg1/demoncult.tpa dos2unix ./genai/genai.tpa dos2unix ./lib/install.tph dos2unix ./lib/stratagems_shared.tph dos2unix ./lib/always.tph dos2unix ./caster_shared/caster_shared.tph dos2unix ./gameplay/npc_proficiencies.tpa dos2unix ./gameplay/npc_separate.tpa dos2unix ./gameplay/wk_early.tpa dos2unix ./setup-stratagems_autoinstall.tp2 dos2unix ./initial/initial.tpa dos2unix ./tactical_bg2/spawn.tpa dos2unix ./sfo/install_sfo.tpa dos2unix ./sfo/general/lib_macro.tpa dos2unix ./sfo/general/lib_iterate.tpa dos2unix ./spell/ironskins.tpa dos2unix ./sarevok/sarevok.tpa dos2unix ./setup-stratagems.tp2 dos2unix ./werewolf/werewolf.tpa dos2unix ./item/elemental_arrows.tpa dos2unix ./item/dispelling_arrows.tpa dos2unix ./help/baf/shout.baf Now the final problem: running tolower causes the game to crash. This isn't mod-related per se. When I take a fresh unmodded bg2 install, run tolower on the game directory, make a trivial edit to start.sh lowercasing the executable to baldursgateii, then run start.sh, the result is: $ ./start.sh Running Baldur's Gate 2 Enhanced Edition INFO: status: 0 INFO: Creating DPWrapper INFO: Steam not found INFO: scanning:(0) /home/me/usr/stow/bg2ee/game/override INFO: scanning:(1) /home/me/usr/stow/bg2ee/game/scripts INFO: scanning:(2) /home/me/usr/stow/bg2ee/game/sounds INFO: scanning:(3) /home/me/usr/stow/bg2ee/game/lang/en_US/sounds INFO: scanning:(4) /home/me/usr/stow/bg2ee/game/portraits INFO: scanning:(5) /home/me/usr/stow/bg2ee/game/characters INFO: scanning:(6) /home/me/usr/stow/bg2ee/game/movies INFO: scanning:(7) /home/me/usr/stow/bg2ee/game/lang/en_US/movies INFO: scanning:(8) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/override INFO: scanning:(9) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/scripts INFO: scanning:(10) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/sounds INFO: scanning:(11) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/portraits INFO: scanning:(12) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/characters INFO: scanning:(13) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/movies INFO: scanning:(0) /home/me/usr/stow/bg2ee/game/override INFO: scanning:(1) /home/me/usr/stow/bg2ee/game/scripts INFO: scanning:(2) /home/me/usr/stow/bg2ee/game/sounds INFO: scanning:(3) /home/me/usr/stow/bg2ee/game/lang/en_US/sounds INFO: scanning:(4) /home/me/usr/stow/bg2ee/game/portraits INFO: scanning:(5) /home/me/usr/stow/bg2ee/game/characters INFO: scanning:(6) /home/me/usr/stow/bg2ee/game/movies INFO: scanning:(7) /home/me/usr/stow/bg2ee/game/lang/en_US/movies INFO: scanning:(8) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/override INFO: scanning:(9) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/scripts INFO: scanning:(10) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/sounds INFO: scanning:(11) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/portraits INFO: scanning:(12) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/characters INFO: scanning:(13) /home/me/.local/share/Baldur's Gate II - Enhanced Edition/movies support/gog_com.shlib: line 94: 25529 Segmentation fault (core dumped) ./"${bin_64}" I gdb'd the core but that's not very helpful because there aren't any symbols included. I can guess at a potential solution, but it'll require a small tool. I record every filename in the original install in its original case, and after installing SCS I restore the original casing. Do you think that'll work? But is it really the case that nobody has tried SCS with BG2EE Linux until now? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.