Aller au contenu

Photo

Universal installer?

- - - - -

  • Veuillez vous connecter pour répondre
12 réponses à ce sujet

#1
Ironhandjustice

Ironhandjustice
  • Members
  • 1 091 messages

Hi all

 

I've been thinking about all the mods we have here, and thinking about the idea of having an universal installer for all of them. That lies on Wavion's side, of course, but the principle is try to simplify his life. One installer for each version of each mod, is a nightmare

 

So, the idea is:

 

-One single installer, quite light, with the logic to install all the mods.

-Folders, empty at first, where the mods should go.

 

If I understood Wavion correctly in the past, the installer checks if you have stuff installed, then compares the files, and updates them, creating backups.

 

If the files compared are in folders on the same directory the exe installer is, we should be able to put new versions in those folders and the installer would do the same comparation, but checking each time the differences between folder files and game files. This will allow to do infinite updates for the mods without new installers.

 

For example:

 

Install MEHEM:

 

-Install the installer.

-Put Mehem manual files into MEHEM installation folder.

-Add a translation (french, for example) package.

-Install (The installer picks up MEHEM english, then french files you put on the same folder, and installs everything)

 

So, the principle is the installer has an option just for each mod (MEHEM, MEEM, CEM and JohnP's), and inside each mod's installation folder, you put as many addins as you need, downloading each one (Harbinger, translations, future releases).

 

What do you think?

 

@Wavion How this sounds to you?

 

Cheers!



#2
Deager

Deager
  • Members
  • 724 messages

Would be cool but yes, completely up to Wavion. Lots of moving parts with that one.



#3
Ironhandjustice

Ironhandjustice
  • Members
  • 1 091 messages

Yes, it has.

 

The idea is to do a big one and then don't have to do anymore. By the way, I can obviously give a hand as soon as I end the CEM translation :)

 

I'm not sure what kind of installator is Wavion using, but with few directives I can help him for sure.



#4
Ironhandjustice

Ironhandjustice
  • Members
  • 1 091 messages

A little update here.

 

Yesterday I used NSIS to "update a file". I had two files, "oldone" and "newone". I generated a patch file between them, and I gived NSIS the patch file. "oldone" had "a" inside, and "newone" had "aa".

 

So, after using one NSIS resource for patching, "oldone" contained "aa" as well. Seems poor, but extrapolating this, I think I can advance towards a possible universal installer =)

 

Each modder needs to have installed nsis, and a bat file. So, he puts the original game into the "origin" path, and then the updated game into "target" path. NSIS compares, creates the patch, and gives you the patch file.

 

Let's see, this is very time consuming :P



#5
Ironhandjustice

Ironhandjustice
  • Members
  • 1 091 messages

After a experimentation, I have reached a point where I can build "patches".

 

This means, that using a simple code (200 lines of code) we are able to build "on demand" new executables.

 

This code is easy modicable by us, so it allows to make incremental or scratch build versions of the patches. I've done the test with Harbinger Module. First test, success.

 

Second test: success!!!

 

Is not as advanced as Wavion's, but allows to release upgrades between real versions to publish them quicker, and without touching ME Explorer. Kudos to him because he discovered this technology.

 

IS AWESOME!

 

EDIT:

 

http://www.adrive.co...SAL_PATCHER.rar



#6
Deager

Deager
  • Members
  • 724 messages

That's pretty cool. I'm no programmer but is using the tool something I could maybe muster? I think Wavion is busy or otherwise unavailable right now and I'd like to get an installer of CEM v1 out for people who need the installer.



#7
Ironhandjustice

Ironhandjustice
  • Members
  • 1 091 messages

Is pretty easy to use, actually.

 

You only have to edit some files, and is just rename stuff. For example, open the file, and change "Original_files" for "MassEffect3", for example. Those are the instructions:

 

0) Make a copy of everything you are going to touch!!!!

1) Files
-Put all the files in the ME3 directory that contains an original version and a patched one.

2) NSI
-Open UniversalInstaller.nsi file. Notepad will work.
-Change Name variable for your mod's name.
-Change DirText in the same way.
-Change directory Original_Files for the patched version. <- In this case, ME3 directory (The one updated)
-Save UniversalInstaller.nsi

3) Bat file
-Open ConstructPatch.bat. Notepad will work.
-Change Destination_version and Original_files for your MEUnpatched directory and your MEPatched directory respectively. BEWARE: don't forget the structure MUST be %~dp0Folder. if you put something else between %~dp0 and folder name -> not going to work.

 

For example, you change Destination_version and Original_files for ME3 and ME3_CEM. ME3 will be updated to ME3_CEM.

4) Run
-Give administration authorisation if needed.

5) Check results. You should have a MyPatch.nsi file, a Patch folder, and a "MassEffect3_Mod_UniversalInstaller.exe" file.

6) Now, you can delete Patch folder, MyPatch.nsi.

7) The simple patcher will ask you for your unpatched folder. Select root folder (For example C:\Program Files\Mass Effect 3) and simply run. It should patch evething inside and give u a report.

 

The point is that this compares two mass effect installations (lets say 1.0 and 1.1) and makes an installer that patches 1.0 to 1.1

 

Is important to note that it will patch every file you changed, so if it a file is missing, it will say "you don't have a suitable version" to patch.

 

In this case, imagine we have changed 3 files. The installer will make a patch for A, B and C, and then compress them. When you execute the installer, it will search A B and C, and if one is missing, it interrupts.

 

Take a look, and if something does not work, I can correct it for you :)



#8
Ironhandjustice

Ironhandjustice
  • Members
  • 1 091 messages

Well, a step forward.

 

It was simplier that I though. The solution to make backups is include them into your backup directory.

 

I mean, imagine we are going to backup this:

 

DLC_CON_END\Default.sfar

 

We have to include in the target files (the result files, "after the patch" folder)

 

DLC_CON_END\backup\Default.sfar

 

resulting on:

 

DLC_CON_END\Default.sfar

DLC_CON_END\backup\Default.sfar

 

This way the patcher will make a copy of everything. I'm working in this way...



#9
Ironhandjustice

Ironhandjustice
  • Members
  • 1 091 messages

An update.

 

This is progressing. As I want the Harbinger addin up, I've being working on a more robust, unbreakeable installer. This is resulting on a new version that:

 

-Allows to uninstall

-Does not left garbage around.

-Makes an integrity check (This means, if you are going to update a 322k file and is 311k, it cancells and rolls-back itself to previous state)

-Has memory of its own version.

 

This will allow us to make two kinds of "installpachers" for each update. One "from scratch" to "current" and the second "from previous" to "current", with a minium effort. Just few parameters and 5 minutes waiting.

 

What is done:

-The bat. This guy is the director that triggers, compiles and does stuff. Obscure coding here.

-The Integrity checker. A NSIS based process compiled, executed and deleted by the bat, that creates a list of the patched versions' sizes. The JavaMutantPatcher (temporary name) will take this list.

-The Universal Installer basis file. This is the frame that will be modified by the Java in order to create the final patch (the one the gamers will use)

-The GiveMeTheSize basis file. This is the frame that will give the Java the list of file sizes. Java modifies it, giving the list of the stuff it must check.

 

What is left:

-The java itself! This guy will receive the two folders, and interacts with the other files to create custom installation frameworks. In this order: it reads the patch list, creates the integrity list, alters the GiVeMetheSize file, takes the size list, alters the UniversalInstaller.nsi with the integrity sizes (and rollback/backup, lol) and suicides.

-Java Config.Properties that will store your mod's name, you installation message, your mod version, and perhaps something else that does not come to my mind.

-The registry stuff on NSIS universal Installer...

-Perhaps ME3 Auto-detection. But as far as I know, you don't need to have your ME3 copy on the register to run it. So

 

How is it done.

 

With Cthulhu's help, a terrible headache, dark sorcery, and a bit of madness. Seriously, problably there's a better way to do it, but my head is killing me. So, is quite black even for me...

 

Includes three report/error temporary control files: LuzRoja.txt (RedLight), LuzAmbar.txt (YellowLight) and LuzVerde (GreenLight). Those are use as "traffic lights", between processes.

 

Source codes will be included. But you'll loose 10D6 mind dice if you open it.

 

Feel free to alter/improve it when is done.

 

The expected result:

 

You write two paths on the bat, a version and some parameters on the Config.Properties file and the bat gives you an Installer that is compatible with specific versions (of your choice).

 

Tadaaaa!

 

I'll keep informing ;)



#10
Ironhandjustice

Ironhandjustice
  • Members
  • 1 091 messages

Little update:

 

I've completed a prototype installator for MEHEM:Harbinger addin.

 

Once this prototype is tested, I can replicate the code in an universal format.

 

:)



#11
wavion

wavion
  • Members
  • 270 messages

So, hey, sorry I've been away so long guys.  It looks like you've been busy. :)

 

So, how has this thing turned out?  Are my installers no longer needed?

 

I can provide source code if you still want it for some reason.

For what it's worth, starting from scratch was probably better, as my installer(s) are not well-suited as a universal installer.  This is because they become exponentially more tedious the more options there are for modifying the same DLC file.

Right now there are only 2 options for the MEHEM one: you can do Vanilla -> MEHEM OST, or you can do Vanilla -> MEHEM Julia. If you added a third option, you would need MEHEM OST, Vanilla -> MEHEM Julia, MEHEM OST + Option 3, Vanilla -> MEHEM Julia + Option 3... and so on.  And each of these patches would be either be large, time consuming, or both.  I seem to recall someone mentioning that the newer ME3explorer unpacks the DLC into loose files (and allow the game to run that way). If that's true, it would simplify things as you could just overwrite individual small files as needed, instead of creating patches for them.

 

Regardless, let me know if you need anything from me.  And Deager/MrFob I'm still willing to make updates to your existing installers if you want.

 

EDIT: Just looked in one of the other threads.  Are all of you guys making your mods function as DLC now (no modification of original game files)?! That would be awesome.  And, it would pretty much negate the need for installers altogether (don't need an installer if manual installation is just "extract zip into your DLC folder).



#12
Deager

Deager
  • Members
  • 724 messages

I agree with you on installers not really being needed but then I realized there are people who are not real good with computers and the installer does make it a tad quicker. Just a tad though.

 

If you would supply your original MEHEM nsi file that would be really cool. I'd love to take a look at it for script stuff since I would like to make future installers as 1 installer for both lite/full stuff.

 

But yeah, JohnP nailing down the "act as DLC" trick was huge and makes life a ton simpler for everybody....now that we know to make byte 18 a 08 instead of a 09. ;)



#13
wavion

wavion
  • Members
  • 270 messages

Here is the source for the MEHEM v04 installer.  It's considerably more complex than the v03 code I released earlier, mostly due to the addition of a modern GUI.

 

http://www.wavion.in.../mehem04_nsi.7z