Jump to content


Photo

Multiple Install Notes


  • Please log in to reply
28 replies to this topic

#1 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 18 February 2004 - 06:39 PM

Here are some notes for anyone who wants to make small multiple installs. As luck would have it, you can make additional BG2 install dirs that weigh in at about 205Meg. But there's a trick to doing this.

The first trick everyone knows about is that you shouldn't copy over the CD? directories and you only change the HD0 path in the baldur.ini file to point to the new game directory.

What's less obvious is that with a little hacking you can also avoid copying the "data" dir (almost 1Gig). To do this, you need to go into the original game directory and hack the chitin.key so that any BIF locations with the bit 0x01 set also have the bit 0x04 set (I made a C hack to do this). Then you need to create the directories "CD1\" and "CD1\data\" and move all the files under "data\" to "CD1\data\". One exception to this is "data\25Dialog.bif" which should probably be left in the original location as mods test for it's existance to see if ToB is installed.

The reason I bring this up is that I'm wondering if it makes sense to create a general utility to do all this, and to use the WeiDU sources to do it (the other option is a C utility which I could throw together). In order for it to work, the original game directory should probably be "pristine" with only the bioware patches (and baldurdash patches) applied. The utility would need to modify the original chitin.key and move the "data\" files (unless that had already been done) and then copy the appropriate files over to the new directory.

Anyway, I'd be interested to know what people think of this idea.
I gotta get rid of this friggin idiotic signature...

#2 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 18 February 2004 - 09:31 PM

I had a few requests for a utility to do multiple installs when fishing for tweak pack ideas. Being able to cut down on secondary install sizes even further is gravy. Whether based on WeiDU or C, I think you'll find an audience for it. ;)

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#3 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 19 February 2004 - 07:44 AM

Well, I'll start throwing one together. It'll work "with caveats". That is, it will copy everything in the original "source" game directory over to the new "destination" game directory with a few caveats: it won't copy the CD? dirs. I might have it create a "log" file that shouldn't be deleted. This'll be used so that it can figure out whether it's already updated the "chitin.key" and so forth (to save a Gig).

One reason to use the WeiDU sources is that WeiDU has proven portability. I'm not sure if my MinGW binaries will work on every Windows platform or not. I'd like to see if it's possible to update WeiDU's file copying feature so that it preserves file stats and is a little faster (it'd be nice if it worked like unix "cp -a").
I gotta get rid of this friggin idiotic signature...

#4 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 19 February 2004 - 09:01 AM

That seriously kicks arse!
"You alone can make my song take flight..."

#5 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 19 February 2004 - 02:16 PM

Having some more hard drive space would be nice. :)
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#6 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 24 February 2004 - 12:26 PM

I have a binary that works, but all it does is modifies the chitin.key file. So basically the process is manual. I'd be happy to spell out the steps for doing this, but what's the best way to distribute a binary?

Unfortunately I'm no where near being a decent bat file scripter. I could try to get the binary to do more steps though. I'll post the "multiple install process" here in a short bit.
I gotta get rid of this friggin idiotic signature...

#7 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 24 February 2004 - 04:32 PM

Scripting .bat files is really easy. All they are is a text file with DOS commands in order.

Distribution? First compress the binary and then maybe throw it into a .zip file with documentation?
Home of Kitanya, Improved Asylum, more...

Posted Image

#8 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 24 February 2004 - 04:39 PM

If it helps any, I've written a lengthy guide on multiple installs if you wish to borrow from it and save yourself some work.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#9 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 24 February 2004 - 04:58 PM

If it helps any, I've written a lengthy guide on multiple installs if you wish to borrow from it and save yourself some work.

That'd be great. I need to find a place I can post a small binary (20K). Any suggestions?
I gotta get rid of this friggin idiotic signature...

#10 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 24 February 2004 - 05:58 PM

I'll send you a PM with my email address. I think I can handle the bandwidth for a 20K file. :)

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#11 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 24 February 2004 - 08:25 PM

I'll send you a PM with my email address. I think I can handle the bandwidth for a 20K file. :)

Ok, I sent it to you with a brief set of instructions.
I gotta get rid of this friggin idiotic signature...

#12 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 25 February 2004 - 08:37 AM

And here we go. I'll incorporate this into the larger tutorial once I get the chance, but I wanted to at least provide a link and a copy of Fred's instructions for the folks that are waiting for this:

Fred's Multi-Install Tool - 6 kb, RAR file
(you may need to right-click and "save link target as...")

From Fred:

Here's how you'd use this binary (after you un-rar it):

  > cd "C:\Program Files\Black Isle\BGII - SoA"
  > rename chitin.key chitin.key.bak
  > .\chitinHD02CD1.exe .\chitin.key.bak .\chitin.key
  > mkdir CD1
  > move data CD1\
  > mkdir data

Now if you already have other install directories, you need to run the .\chitinHD02CD1.exe command to create new chitin.key files for each one and delete all the files under the data\ directory (i.e. "del data\*").


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#13 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 25 February 2004 - 10:20 AM

I forgot to add a few important bits:

[1] After you're done, you'll want to copy the file CD1\data\25Dialog.bif to the now empty data\ directory. You'll want to make sure you do this for each of your multiple install directories. This file is used by many WeiDU mods to see if you have ToB installed. Actually, if you don't have ToB, this file won't exist.

[2] Now here's a general point. The way I recommend doing all this is to have one "pristine" installation you use to copy to your multiple install areas. I usually use the initial install directory for the game (e.g. C:\Program Files\Black Isle\BGII - SoA). The pristine copy should have some minimal set of patches. For me this was the Bioware official patches and the Baldurdash FixPack (some people might not want the FixPack, this is up to you). Whenever you need a new game to play around with you just copy from this "pristene" game to the new game area and install your mods/patches in the new game area. The important point is that you don't want to copy the CD1, CD2, CD3, CD4 or CD5 directories, and you want to modify the "HD0:=" line in the new baldur.ini file so that it uses the new directory. Most of the disk space this game uses is in those CD? directories (and now includes what was in the data directory as well).

One thing I'm not sure about is how this scheme will handle mods that add bifs to the game and update the chitin key. These will fail unless the bifs are stored in the data/ directory since the new multiple install areas points to all the CD?\ directories in the original "pristine" area. I have no experience with any mods that do this so I'd be interested to hear how this works for other people.
I gotta get rid of this friggin idiotic signature...

#14 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 25 February 2004 - 10:26 AM

And here we go. I'll incorporate this into the larger tutorial once I get the chance, but I wanted to at least provide a link and a copy of Fred's instructions for the folks that are waiting for this:

Fred's Multi-Install Tool - 6 kb, RAR file
(you may need to right-click and "save link target as...")

From Fred:

Here's how you'd use this binary (after you un-rar it):

  > cd "C:\Program Files\Black Isle\BGII - SoA"
  > rename chitin.key chitin.key.bak
  > .\chitinHD02CD1.exe .\chitin.key.bak .\chitin.key
  > mkdir CD1
  > move data CD1\
  > mkdir data

Now if you already have other install directories, you need to run the .\chitinHD02CD1.exe command to create new chitin.key files for each one and delete all the files under the data\ directory (i.e. "del data\*").

If those are just commands into a DOS prompt then I imagine you could just do a .bat with those commands in it.

Also, if you have your default BG2 install as the pristine one then surely thats the version that will be run by the autorun etc, correct?
"You alone can make my song take flight..."

#15 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 25 February 2004 - 01:00 PM

If those are just commands into a DOS prompt then I imagine you could just do a .bat with those commands in it.

My problem with bat files is that you have to be very careful. The bat scripts that run on my XP Home system may well not run on Win98 or WinME (though they probably will run on XP Pro, Win2K and WinNT systems). Writing cross platform bat files is a serious pain that I'd rather no get into. I've run into problems with this before (the problem is that the bat scripting language went through some radical changes between certain Windows versions).

If someone else out there is a bat scripting god and wants to write a script to do this (that will run on all or most versions of Windows), then I'd be very grateful.

Also, if you have your default BG2 install as the pristine one then surely thats the version that will be run by the autorun etc, correct?


Not sure what you mean by Autorun, but let me know if this helps. To make sure you're running one of your multi-install games (and not the original "pristine" game), you need to execute the binary "BGMain.exe" in one of the multi-install directories. What I do is something like this:

[1] Create a multi install dir that lives somwhere like C:\Program Files\Black Isle\BG1Tutu
[2] Creat a shortcut to the BGMain.exe binary in that directory to my desktop.
[3] Modifiy the properties of the new shortcut so that it has a short name like "BG1Tutu" and a nice icon (I browse the game directory for one)

Now when you double click on the new shortcut it will launch the game in the new multi install directory.
I gotta get rid of this friggin idiotic signature...

#16 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 25 February 2004 - 01:03 PM

Yeah I know about BGMain.exe. But when you insert the ToB CD into the drive then that annoying window will appear with Play ToB or whatever it says. if you click that one then you are gonna get into your pristine install right?
"You alone can make my song take flight..."

#17 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 25 February 2004 - 01:24 PM

You're going to get the installation that is at your original installation path, since the Autorun programs reads the registry keys. If you keep your original one as pristine then yes, the autorun will run the 'pristine' installation.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#18 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 25 February 2004 - 05:29 PM

Oh yes, you're right. The auto-run thingy looks at the registry key's for your game directory. If you want to set these to some other area (permanently) you can hack the registry keys - but, uh, you're on you're own if you do this :P

I got so frusterated with the CD that I finally hacked my game so that it doesn't require it. I'm not sure how legal the hack is, but since I bought the game I'm not worried about that issue. For me it's a matter of convenience, not piracy.

The NOCD hack essentially tells you to modify some bytes that occur after some other bytes using a hex editor (so, no, you're not downloading a copy of the game executable which would be much more dubious). I won't post any more about it here as I don't want to get FWS into trouble. (To anyone who's tempted, please don't PM me, use Google).
I gotta get rid of this friggin idiotic signature...

#19 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 25 February 2004 - 05:45 PM

My problem with bat files is that you have to be very careful. The bat scripts that run on my XP Home system may well not run on Win98 or WinME (though they probably will run on XP Pro, Win2K and WinNT systems). Writing cross platform bat files is a serious pain that I'd rather no get into. I've run into problems with this before (the problem is that the bat scripting language went through some radical changes between certain Windows versions).

If someone else out there is a bat scripting god and wants to write a script to do this (that will run on all or most versions of Windows), then I'd be very grateful.


Send me a complete set of documentation as to how to use the program and I'll do it.

What I really need is the arguments list and directory structure that the program uses.
Home of Kitanya, Improved Asylum, more...

Posted Image

#20 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 25 February 2004 - 07:48 PM

Send me a complete set of documentation as to how to use the program and I'll do it.

What I really need is the arguments list and directory structure that the program uses.

Thanks for offering to do this :)

I think the bat script would have the following usage:

multi-bg2-install.bat <orig-bg2-game-dir> <new-bg2-game-dir>

Then the script has to do this:
  • Change directory to orig-bg2-game-dir
  • If chitin.key.multi-install doesn't exist, then move chitin.key to chitin.key.multi-install and run:
    chitinHD02CD1.exe chitin.key.multi-install chitin.key
  • If the directory CD1 doesn't exist, then create CD1, move the directory data\ to CD1\data\, and create a new directory data\
  • If the file data\25Dialog.bif doesn't exist, then copy the CD1\data\25Dialog.bif to data\25Dialog.bif
  • Create the directory new-bg2-game-dir
  • Copy all the files under orig-bg2-game-dir to new-bg2-game-dir except CD1, CD2, CD3, CD4 and CD5.
  • Modify the file baldur.ini under the directory new-bg2-game-dir so that the line starting with "HD0:=" uses the new full path to new-bg2-game-dir (we could use sed to do this).
  • Optionally, create a link on the desktop with a bg2 icon and the base name of the new-bg2-game-dir path (this is very optional, and may not even be feasible).

I gotta get rid of this friggin idiotic signature...