This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Blizzard Installer Customisation  (Read 16798 times)

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #15 on: March 27, 2013, 02:33:22 pm »
Quote from: "schlumpf"
The addresses would be closer together. Also, it would not be logical at all, to display the address of anything: It is a void* = NULL. There is no more address than the position of the variable itself (on the stack) and the value NULL.

Okay. However I don't understand why it would have a value, if that is the case.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #16 on: March 27, 2013, 03:01:27 pm »
Try printf("zalloc:: %pn", stream.zalloc); instead of that debugger.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #17 on: March 27, 2013, 03:06:07 pm »
Quote from: "schlumpf"
Try printf("zalloc:: %pn", stream.zalloc); instead of that debugger.

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #18 on: March 27, 2013, 03:24:07 pm »
Well, I guess all values are wrong then.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #19 on: March 27, 2013, 03:33:03 pm »
Quote from: "schlumpf"
Well, I guess all values are wrong then.

The pointers for all the variables set in the stream, not that it is particularly useful other than proving they have been set:



Still no idea why it does not work.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #20 on: March 28, 2013, 01:10:45 pm »
Attempted with a few different patches, they all produce the same results. I can see why -5 is being returned (because the other value becomes 0 after the first inflation) but I have no idea why this is happening or how you would go about debugging and fixing this.

Any suggestions?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #21 on: March 28, 2013, 01:58:18 pm »
Avoiding the extractor for now, the assembler appears to work.

Using the example_base I extracted for contents of the 3.3.5 to 3.3.5a patch and create a new MPQ from that.

I then am trying to assemble a new executable using this data and the example base, but the arguments required confuse me.
Code: [Select]
(arguments: <base> <output> <mpq> <exe> [<files...>])

Base    = example_base.exe
Output  = A new file? (I put test.exe)
MPQ     = the MPQ to be attached
exe     = ??? I put the original installer in here
<Files> = ??? Additional optional files to be included not in the MPQ?

Either way, the executable being produced (after no errors) does not run and throws a Windows error about it not being a valid windows application. So I assume I am getting the arguments wrong.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #22 on: March 28, 2013, 02:08:35 pm »
example_base.exe output.exe patch.mpq exe_extracted_from_original_installer.exe dlls_extracted_from_original_installer.dll
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #23 on: March 28, 2013, 02:12:12 pm »
Quote from: "schlumpf"
example_base.exe output.exe patch.mpq exe_extracted_from_original_installer.exe dlls_extracted_from_original_installer.dll

Ah, so the extractor needs to be functioning correctly first.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #24 on: March 28, 2013, 02:40:41 pm »
I don't see any reason, why it would not work, anyway. oO
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #25 on: March 28, 2013, 03:32:15 pm »
Updated zlib to 1.2.7 and converted project to visual studio 2011/12 for a more up to date debugger.

Before inflation:


After inflation:


Key things to note is how inflateResult goes from uninitialised to -5. avail_out goes from a large value to 0.

The returned value of -5 signals a error, usually caused by avail_out or avail_in becoming 0, as it has in this case.

As to why it happens, I have had no idea.

I do remember when you posted in the shoutbox about it before you finding a typo. Has that been fixed in this version? I do not remember what it was.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #26 on: March 28, 2013, 03:40:08 pm »
Quote
Has that been fixed in this version?
How would I know which "version" you're using?!
Try doubling the size allocated for output.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #27 on: March 28, 2013, 03:44:50 pm »
Quote from: "schlumpf"
Quote
Has that been fixed in this version?
How would I know which "version" you're using?!
Try doubling the size allocated for output.

I am using whatever version you gave me when I requested to start again a while ago. :P So I dunno'.

Avail_out starts at 6052592 and goes to 3026284.
Avail_in starts at 1499174 and goes to 0.

So now -5 is still being returned, but this time because avail_in is 0 rather than avail_out.

6052592 / 2 =
3026296 which is just bigger than the original value if not / 2:
3026284
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #28 on: March 28, 2013, 03:46:09 pm »
If avail_in is 0, it worked?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #29 on: March 28, 2013, 03:47:35 pm »
Quote from: "schlumpf"
If avail_in is 0, it worked?

No, because -5 is being returned it throws an error that inflation failed.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »