• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Solved Improve Installer

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
I see a lot of downloads which went wrong lately ... might it be an idea to split the archive in a few parts and/or add a checksum to the archive (I dont know how it is done but I believe its possible). So people can see if the download is okay, and if it's not they only need to redownload a part of the archive instead of everything?
 
I haven't the foggiest how to do that. Originally, we had the download content IN the installer EXE, but that is impossible now that we skipped past the 2GB mark.
Had a hard time figuring out a new method at all, but unfortunately the 7-Zip file use is primitive at best. :(
 
The problem though is that the NSIS plugin I used for the installation wizard is VERY primitive.
I couldn't even specify an "extract" folder, which is why the installer now extracts everything to the folder with the installer in it and then moves everything afterwards.
I'd much rather not have to do that, but when I was looking into ways of making a simple multi-part installation process,
most of the "solutions" appeared more than a little bit complicated for someone who is not exactly an expert.

Perhaps you would care to have a look at the installer script I've got, as well as the plugin stuff I used?
 
I could take a look at it. as soon as I know something I will let you know.
 
See attached.

b14_beta3_installer.nsi is the latest installer code
b14_beta3_installer_TEST.nsi is an older test version where I was experimenting with using a 7-Zip archive for the update as well
MoveFileFolder.nsh is something I downloaded from the Internet and contains the code I use to move the installation files to the correct folder
nsis7z.dll is the plugin for the 7-Zip extracting. I think the source code is available somewhere on the Internet

If you can make any sense of this, please do. :cheers
 

Attachments

  • Installer Files.zip
    247.5 KB · Views: 174
Thread split from original thread.

I took a look at the code and I see how it works. I think it can be done more efficiently. I will take a look at it later.
 
Currently making the following changes to the Installer EXE:

- Rename b14_beta3_full.7z to b14_beta3_full.potc so that people will not SEE it is an ordinary 7-Zip archive
- Check for presence of ENGINE.exe and readme.txt to ensure they DO have the 2003 PotC game installed first

Anyone got any other suggestions? Now is the time! :cheeky

Some other time I'll experiment with an alternate method of unzipping that will hopefully make the process faster and include some error-checking.
We'll see if I can manage that.
 
What instructions do you want in the installer? Once you got to running the EXE, you can't go far wrong.
It'll give error messages when you try to:
- Install it to a folder that doesn't contain the game
- Have the Installer EXE already in the game folder
- Do not have the required "b14_beta3_full.potc" file present
- Are trying to install the update without installing the Main Files first

What other mistakes do we know that people tend to make and that we should therefore explain/prevent in the Installer EXE?
 
For clarity's sake, I know of the following common issues:

0. People install with the Installer EXE only: Installer already detects this and gives a clear error message.

1. People try to extract the 7-Zip file manually: Should be fixed now that I renamed it to .potc so that you can't tell it is a regular 7-Zip archive
Installer does still accept the old file as well, for backward compatibility.

2. People install on top of the wrong game: Fixed now that I check for the presence of readme.txt and ENGINE.exe .
PotC and AoP both have an ENGINE.exe, but only PotC also has a readme.txt, so this should finally cover all bases.

3. People get an incomplete "b14_beta3_full.potc" file: Installer EXE does not detect this.
I am not exactly sure how to avoid this. Maybe I can solve that by experimenting with an alternate extraction method.
But I don't have time for that today.

4. People install to Program Files: There is already a warning about this in the installer itself:
Code:
_  _  ______ _____  ___ ______  _____ _  _  _  _
| | | |  | ___ \  ___|/ _ \|  _  \  |  _  | \ | |  | | | |
| | | |  | |_/ / |__ / /_\ \ | | |  | | | |  \| |  | | | |
| | | |  |  /|  __||  _  | | | |  | | | | . ` |  | | | |
|_| |_|  | |\ \| |___| | | | |/ /  \ \_/ / |\  |  |_| |_|
(_) (_)  \_| \_\____/\_| |_/___/  \___/\_| \_/  (_) (_)

  >>>USEFUL<<<  installation information below!
  -- We're pirates! Would we LIE to you? --

=====================================================
CRUCIAL INSTALLATION TIPS:
=====================================================

1. You MUST install this on top of the unmodified stock game
  Pirates of the Caribbean, released in 2003 by Akella.
  The mod is NOT a standalone game!

- DON'T install the game to Program Files,
  otherwise Windows prevents it from installing correctly
  Install to, for example, C:\Games\Pirates of the Caribbean
Not sure how we can prevent people from doing it though.
Ideally it should actually be possible, but despite my best efforts, I just can't win against Windows Security Stupidity.

What am I missing out on?
 
Last edited:
All of that is internal things that cause people to post asking for directions because there are no external directions at all. I tried to add external directions yesterday but could not.
 
I fixed your ModDB rights yesterday, so you can change it now. Try this link:
http://www.moddb.com/mods/new-horizons/downloads/edit/build-14-beta-3-full

And if people ask questions BECAUSE of the error messages, then there is something seriously wrong with them.
I made those messages deliberately quite clear to avoid that. But please check if my wording needs some further work:

"Please place the installation files OUTSIDE your game folder."
"Original game not found. Make sure you install the 2003 Pirates of the Caribbean game by Akella first!"
"Main Files archive file not present. Place 'b14_beta3_full.potc' in this folder to continue."
"Main Files archive not found. Skipping section."
"Build 14 Beta 3 Main Files not found. Make sure to install those first!"
 
That sounds very useful indeed! Would save a lot of potential issues. How would that work?

I also still have to experiment with using 7za.exe to handle the .7z/.potc file instead to avoid extracting it locally and THEN moving all the relevant files.
Because that process is a bit... STUPID!!!!!!!
 
Back
Top