Jump to content


Photo

BiG World Project for Macs


  • Please log in to reply
38 replies to this topic

#21 Steve

Steve
  • Member
  • 142 posts

Posted 16 September 2010 - 08:23 AM

A new version of Install-tools is available that's compatible with BiG World Project v9.3 as well as the upcoming v9.4. It's also able to extract more mod archives. Download from the usual place: http://home.comcast....stall-tools.zip

#22 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 18 September 2010 - 07:19 AM

A new version of Install-tools is available that's compatible with BiG World Project v9.3 as well as the upcoming v9.4. It's also able to extract more mod archives. Download from the usual place: http://home.comcast....stall-tools.zip


We can still get by with the previous version, too, though, right? After my experiences with updates to this package recently, I'm extremely reluctant to update it again.

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#23 Leonardo Watson

Leonardo Watson
  • Modder
  • 531 posts

Posted 28 October 2010 - 02:26 AM

I make another attempt to add the installation procedure on a Mac to my guide and installed as a first test only BGT and a few mods.

First I noticed a malfunction when running the batch file: The messages from the folder /BWPmods/BiG World Installpack/temp are not read. Instead I got messages like this:
/tmp/87448-bs.sh: line 8: /BiG World Installpack/temp/@81: No such file or directory
However the files named @1, @2, @3 and so on are existing in the provided folder. I assume it is because of its name. How to read them during the installation?

I also noticed I have to do some adaptations to my install.bat for installation on a Mac. That regards the checks at the beginning and the pathnames for Baldur?s Gate. Please let me know if there are more changes to do.

I shortly played BGI for the first time on a Mac OSX! It takes a long time (about one minute) before ?Baldur's Gate II? or ?Baldur's Gate II Lev 1? starts. I thought already, the installation failed. Is this normal?
Also saving and loading a savegame takes a long time. Beside this, the progress bar round the BG icon doesn?t close (it goes only three-quarters if it shows at all)
The walking speed of the avatar is a little slower than on a PC (It is the same machine, except that I started the PC in BootCamp before.

Is this a normal behavior?

#24 dabus

dabus
  • Member
  • 1982 posts

Posted 28 October 2010 - 02:55 AM

@ is a bad character for a unix - file-name. You have to add a backslash in front of the file-name in the shell-script, so it looks like \@81. Then the shell knows that it does not have to interpret the next character. Same issue with spaces.
So something like
cat /BiG World Installpack/temp/@81
should be
cat /BiG\ World\ Installpack/temp/\@81
in a script -- at least under linux. Don't know about mac and don't know much about bash, either, so there may be some other solutions.

Alternatively, you could just get rid of the @ in the name and adjust the batch-script, that'd solve that problem, too.
THINK! - It's not illegal.

#25 Steve

Steve
  • Member
  • 142 posts

Posted 28 October 2010 - 01:30 PM

...
First I noticed a malfunction when running the batch file: The messages from the folder /BWPmods/BiG World Installpack/temp are not read. Instead I got messages like this:
/tmp/87448-bs.sh: line 8: /BiG World Installpack/temp/@81: No such file or directory
However the files named @1, @2, @3 and so on are existing in the provided folder. I assume it is because of its name. How to read them during the installation?

The definition of variable TXT changed in BWInstallpack 9.5, with a %CD%\ added to the front of the file. There is no variable CD defined so when translated the filename has a / prepended, which looks for the file in the root directory instead of the current working directory. What does %CD% mean?

I also noticed I have to do some adaptations to my install.bat for installation on a Mac. That regards the checks at the beginning and the pathnames for Baldur?s Gate. Please let me know if there are more changes to do.

You probably want to SET MAC=%IFN% "Baldur's Gate II" since I create a null-filled BGMain.exe so some mods will load, BGT for example.

I shortly played BGI for the first time on a Mac OSX! It takes a long time (about one minute) before ?Baldur's Gate II? or ?Baldur's Gate II Lev 1? starts. I thought already, the installation failed. Is this normal?

Yep. I assume you have an Intel Mac; Mac BG2 is Power-PC only. MacOSX automatically translates it using Rosetta into x86 code first.

Also saving and loading a savegame takes a long time. Beside this, the progress bar round the BG icon doesn?t close (it goes only three-quarters if it shows at all)

It's probably byte-swapping since all the data files except Chitin.key are in x86 order. And then Rosetta has to add code that swaps it back.

The walking speed of the avatar is a little slower than on a PC (It is the same machine, except that I started the PC in BootCamp before.

Is this a normal behavior?

I don't know, but it's safe to assume the PC version executes faster than the Mac version.

#26 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 28 October 2010 - 01:50 PM

The definition of variable TXT changed in BWInstallpack 9.5, with a %CD%\ added to the front of the file. There is no variable CD defined so when translated the filename has a / prepended, which looks for the file in the root directory instead of the current working directory. What does %CD% mean?

This might be a bit off... but the "cd xyz" is old Dos -command that moves into the xyz -directory if it exists, the "cd..." counters that, so it moves to the level under that and then there's more of those command...
For example you can move from "C:\Program Files\Mozilla Firefox\chrome\" to "C:\Pelit\BioShock\Builds\" with these command lines:
cd..
cd..
cd..
cd pelit
cd bioshock
cd builds
There is faster/less command lines consuming commands, but I have forgotten them. :P

Deactivated account. The user today is known as The Imp.


#27 dabus

dabus
  • Member
  • 1982 posts

Posted 28 October 2010 - 02:25 PM

The variable %CD% contains the current path, so it returns the same value as pwd.

Edited by dabus, 28 October 2010 - 02:25 PM.

THINK! - It's not illegal.

#28 Leonardo Watson

Leonardo Watson
  • Modder
  • 531 posts

Posted 31 October 2010 - 09:55 AM

I just made several tests with the Mac OSX installer. However, for now it does not work as it should:

1. The messages from the folder /BWPmods/BiG World Installpack/temp are not read. I get messages like this: /tmp/2141-bs.sh: line 8: /BiG World Installpack/temp/@1: No such file or directory
I thought this is because of its file name (see also posts before). I tried to rename the files to get rid of the @ but the result is the same. But now I noticed that there must be another reason because the files @20 and @21 out from the folder /BiG World Installpack v9.5/BiG World Installpack/English are displayed like this:



_____________________________________________________________________
     |                                                                   |
     |      Welcome to Leonardo's BiG World Mod-Installation v9.4        |
     |      Willkommen bei Leonardos BiG World Mod-Installation v9.4     |
     |      Bienvenido a BiG World Mod-Installation v9.4 de Leonardo.    |
     |   >1@> ?>60;>20BL 2 Leonardo's BiG World Mod-Installation v9.4   |
     |                                                                   |
     |___________________________________________________________________|


                           Please choose your language.

                           W?hlt bitte Eure Sprache.

                           Por favor, elige tu idioma.

                           >60;C9AB0, 2K15@8B5 20H O7K:.




                (E)nglish,  (G)erman,  (H)ispanic,  (RU)@CAA:89 . . .


Then after the player had chosen his language, the respective files are copied into the folder /BiG World Installpack v9.5/BiG World Installpack/temp. These are the files that cause the "No such file or directory" messages

2. As you see in the message above, the cyrillic characters are wrongly displayed. Instead of ">1@> ?>60;>20BL 2 Leonardo's BiG World Mod-Installation v9.4" it should be "Добро пожаловать в Leonardo's BiG World Mod-Installation v9.4" The messages are saved in Unicode for correct displaying. It seems, the translation file ignores it accidentally.


3. I tried to add some lines specific for Mac, however, it fails:

SET MAC=%IF% "Baldur's Gate II"
SET NMAC=%IFN% "Baldur's Gate II"
SET MACIE="..\Tales of the Swordcoast
SET MACIG="..\Legenden der Schwertküste

I got this error message instead:

RETURN to run BiG World Install
/BGII - SoA/BGII - SvA/BWPmods/BiG World Install.sh: line 420: syntax error near unexpected token `;'
/BGII - SoA/BGII - SvA/BWPmods/BiG World Install.sh: line 420: `  if [[ -e Baldur\'s\ Gate\ II && ! -e %MAC!G%\ GOTO\ :TOBCHECK ]]; then ; fi'

The idea was to add the differing path names and file checks (for the BGII ToB 2.1.2 patch for example) for Mac to the install.bat. Or checks the Mac installer already for the patch?

By the way: As you suggested I changed SET MAC=%IFN% "Baldur's Gate II"


4. The point "M O D S D E S E L E C T I O N" is accidentally skipped by the Mac installer. However, it is displayed quite at the end of the installation after the "Clean-Up" message


At the end: The installation itself works. That's a good piece of work.
Drop of bitterness: On an Intel Mac it takes a long time to load the game (about one minute) and even more time to save.

#29 Steve

Steve
  • Member
  • 142 posts

Posted 31 October 2010 - 05:07 PM

...
1. The messages from the folder /BWPmods/BiG World Installpack/temp are not read. I get messages like this: /tmp/2141-bs.sh: line 8: /BiG World Installpack/temp/@1: No such file or directory

This is as I noted in my previous post: the added %CD% to the file name in 9.5. I'll fix it.

...
2. As you see in the message above, the cyrillic characters are wrongly displayed. Instead of ">1@> ?>60;>20BL 2 Leonardo's BiG World Mod-Installation v9.4" it should be "Добро пожаловать в Leonardo's BiG World Mod-Installation v9.4" The messages are saved in Unicode for correct displaying. It seems, the translation file ignores it accidentally.

The message files are in 16-bit Unicode chars, and my scripts run only with 8-bit chars (LANG=C). The message files are translated to 8-bit; the gibberish is the chars that can't be translated.

3. I tried to add some lines specific for Mac, however, it fails:

SET MAC=%IF% "Baldur's Gate II"
SET NMAC=%IFN% "Baldur's Gate II"
SET MACIE="..\Tales of the Swordcoast
SET MACIG="..\Legenden der Schwertküste

I got this error message instead:

RETURN to run BiG World Install
/BGII - SoA/BGII - SvA/BWPmods/BiG World Install.sh: line 420: syntax error near unexpected token `;'
/BGII - SoA/BGII - SvA/BWPmods/BiG World Install.sh: line 420: `  if [[ -e Baldur\'s\ Gate\ II && ! -e %MAC!G%\ GOTO\ :TOBCHECK ]]; then ; fi'

The error is correct. You mistyped %MACIG% as %MAC!G%. Also %MACIE% should be "..\Tales of the Sword Coast
and I think you need a terminating ". Actually, BWInstaller.sh works as is; it sets everything up so there's no need to do any special checking.

The idea was to add the differing path names and file checks (for the BGII ToB 2.1.2 patch for example) for Mac to the install.bat.

On the Mac the directories can be anywhere, and you can have more than one (I have four). BWInstaller.sh will ask where they are when it needs them. You'll find this humorous: I set them up as symbolic links in C:/Program Files/Black Isle/BGII - SoA

Or checks the Mac installer already for the patch?

There are no patches for Mac TotSC. BWInstaller.sh will complain if you're not running ToB 2.1.2.

4. The point "M O D S D E S E L E C T I O N" is accidentally skipped by the Mac installer. However, it is displayed quite at the end of the installation after the "Clean-Up" message

I'll check it out.

Drop of bitterness: On an Intel Mac it takes a long time to load the game (about one minute) and even more time to save.

Alternatively, you could run the Windows version of BG2 in Crossover Games. It emulates Windows library calls but basically runs native. You'd then also be able to use mods that modify the executable like TobEx and IA (but not the Widescreen mod).

#30 Leonardo Watson

Leonardo Watson
  • Modder
  • 531 posts

Posted 01 November 2010 - 03:11 AM

I did some more testing. After selection of the game type the installer goes to "version selection" as intended. But then it skips:
"mods deselection"
"kits selection"
"AI selection"
"rule system"
and goes directly to the "mods check" instead.

I tried to skip the folder checks by adding a line "%MAC% GOTO :SKIPMAC" to the batch because they are only relevant for Windows, however this is ignored completely. The installer forces to start the game instead. This is confusing because of the unsuitable messages @7 about the Name Check and the warning @5 because of failed Name Check.
I assumed you have intended so and it's no bad idea. In this case I should add some specific messages for the Mac instead. However it's a little confusing that one must choose the BG folders again while restarting the installer.

With my batch file the installation runs on Windows from the beginning to the end without any interruption. Therefore the pathnames are stored in the batch file. Until now I could not manage the same on Mac. When installing BGT the installation stops and asks for the pathname despite that I had chosen the BG folder at the beginning. Any idea how to solve this?

#31 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 01 November 2010 - 03:46 AM

I'm curious (now when you've done the work and everything), is there a reason for why you decided to first use one platform-dependent language for Windows and then recreate that work for non-Windows in another platform-dependent language? I mean, presumably a platform-independent language could have been used, which could then have been compiled into executables for Windows and something executable-like for OSX (assuming you want to avoid having the user install support for the language before being able to use your product). Having two instances of what is functionally the same code seems to me like twice the upkeep (plus overhead), without offering any advantages.

#32 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 01 November 2010 - 04:27 AM

I'm curious (now when you've done the work and everything), is there a reason for why you decided to first use one platform-dependent language for Windows and then recreate that work for non-Windows in another platform-dependent language? I mean, presumably a platform-independent language could have been used...

Well, that's nice idea and all, but learning those languages to begin with becomes the problem... and then when one platform does a thing one way, as it cannot do it in any other way, the exceptions begin to amount on a install that can and is freely able to choose about 1000 different components. If you have ever seen a large number, then that might just be one of them.
Realistically it might be actually be better to have 1 version that actually works, than 5 of which none actually work... and as this is still in the process of making that final one, as most of the big mods are still under some work.

Edited by Jarno Mikkola, 01 November 2010 - 06:04 AM.

Deactivated account. The user today is known as The Imp.


#33 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 01 November 2010 - 05:23 AM

Well, that's nice idea and all, but learning those languages to begin with becomes the problem...

Compared to the work involved of maintaining and developing two separate but functionally equivalent instances, learning a high-level language like Perl (or maybe Ruby) seems like a wise investment to me (I mean, it's not like they're ancient Greek).

and then when one platform does a thing one way, as it cannot do it in any other way, the exceptions begin to amount on a install that can and is freely able to choose about 1000 different components.

I was under the impression that was handled by the language itself. You tell it to communicate something to the underlying system and let it worry about the particulars. But even if it's not quite that easy, aren't you communicating with the system is a rather repetitive way (by telling it to run setup file after setup file)? You could conceivably automate this in some fashion and only do the system-specific stuff once (and/or have some subroutine/macro that does it for you, or something). But I'm no programmer, nor do I have any experience with OSX, so maybe I'm unaware of some complicating factor.

#34 dabus

dabus
  • Member
  • 1982 posts

Posted 01 November 2010 - 05:50 AM

I guess porting bat to sh makes some sense since both have the same approach.

As said, Leonardo can write basic batch-files, so he started with that and continued to use then.
There were some guys who made suggestions or started to write some test-builds, but if I'm not mistaken, most ran out of gas before they really started.

Speaking only for myself, I'm fine with only providing windows-installations.
Yes, that's not an open approach. But if you see it realistic, you've got over 90% PCs running windows, 5 with mac and 1 with Linux. Mac and Linux have some sort of API conversions/integrations like parallels, crossover, wine, win4linux and virtual PCs approaches like vmware player, virtualbox, qemu and so on.
So I'd guess that 96% of all PC users could do an installation on their machines.

I think it's a better idea to provide a work installation to those majorities if you don't know better.
Getting to know java(script), python, perl... would take some or a lot of time.
If you (someone) wants to do that coding: Go ahead. I don't think that Leonardo or Steve would mind.

Edited by dabus, 01 November 2010 - 06:14 AM.

THINK! - It's not illegal.

#35 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 01 November 2010 - 07:22 AM

I guess porting bat to sh makes some sense since both have the same approach.

I was mainly thinking about the work that comes after writing the batch file/shell script itself. But maybe they don't need a lot of work once they're written, in which case I guess it'd be no big deal needing to do it twice.

#36 Steve

Steve
  • Member
  • 142 posts

Posted 01 November 2010 - 11:59 AM

I did some more testing....Any idea how to solve this?


***EDIT: New version; fixes a problem with running the Fixpack.

Attached Files


Edited by Steve, 01 November 2010 - 03:59 PM.


#37 Steve

Steve
  • Member
  • 142 posts

Posted 01 November 2010 - 01:54 PM


I guess porting bat to sh makes some sense since both have the same approach.

I was mainly thinking about the work that comes after writing the batch file/shell script itself. But maybe they don't need a lot of work once they're written, in which case I guess it'd be no big deal needing to do it twice.

My program is a translator, taking .BAT files as input and creating (hopefully) corresponding Bash scripts. It's written in Bash because it's based on Loriel's TuMac, and I just kept extending it to handle more and more complex scripts.

****Note that I updated the attachment in the previous post.****

Edited by Steve, 01 November 2010 - 04:01 PM.


#38 -matt-

-matt-
  • Guest

Posted 18 June 2012 - 02:49 AM

today i tried to do this on my mac... i installed baldurs gate 1 and 2 again then opened install-mod.sh . then it asks me to choose the directory i have them installed in.. the folder is there but i cant select it. its grey out with other apps. (though i can select folders...). it's the type of mac app where you have to right click to show package contents... how do i get the SH file to realise that it is a folder and not an application lol?

#39 Leonardo Watson

Leonardo Watson
  • Modder
  • 531 posts

Posted 21 June 2012 - 12:18 PM

Steve's program is a translator which worked very well with my Installpack v9.5. However, it was never adjusted to the improvements I added with later versions and so unfortunately it no longer works with my Install.bat