Pull request: A better windows installer

Dirk Hohndel dirk at hohndel.org
Thu Sep 13 07:44:10 PDT 2012


Ivan Habunek <ivan.habunek at gmail.com> writes:

> Hi all,
>
> I created a nicer windows installer which uses the NSIS Modern UI, and
> offers some standard features such as choosing the target folder and
> whether to create shortcuts (full info in git log).

Excellent. What's in the tree right now was the my first ever attempt to
deal with NSIS - it sorta kinda worked, but that's all I can say about
it. I'm very happy if someone else wants to take over maintaining that
file - as long as it doesn't break my ability to create installers on
Fedora :-)

> I think it's an marked improvement over what we have now, however I
> still have a few issues with it.
>
> Firstly, the Subsurface version is hardcoded in the .nsi script
> ($VERSION). This means it has to be changed manually on each release.

That could easily be handled with a sed script. Of course the hard part
is making sure this works the same both on Linux and Windows. Are you
building natively on Windows or cross building?

> Secondly, the library versions change over time, but names of compiled
> DLL files which are packaged into the installer are hardcoded in the
> installer script (e.g. "libjpeg-62.dll"). So, if a lib version
> changes, the installer script must also be modified.

Yes, that's a major pain. The installer script in master actually has
incorrect version numbers for my current Fedora installation. I created
a patch but it seems like I forgot to push that...

Again, something we could fix with some scripting magic, I guess.

This pull request is incorrect. You just asked me to pull the last
commit (so it's not relative to master but to HEAD^). And of course
since you sent this you have added a third commit to it.

> The following changes since commit 79c2970f4857fdb7475a887cc143d038f23f0a9f:
>
>   Created a modern windows installer script (2012-09-13 12:33:37 +0200)
>
> are available in the git repository at:
>   https://github.com/ihabunek/subsurface.git installer
>
> Ivan Habunek (1):
>       Added version info to NSI installer script.
>
>  packaging/windows/subsurface.nsi |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)

The code is whitespace damaged (I cleaned all this up already, so don't
worry about this, but please pay attention to that in the future).

Finally, on Fedora 17, using makensis fails with this error:

Error: invalid VIProductVersion format, should be X.X.X.X

That's easily fixed with this patch, but I wonder if that's the right
fix (before I push this)

/D

diff --git a/packaging/windows/subsurface.nsi b/packaging/windows/subsurface.nsi
index c487477..526f7c8 100644
--- a/packaging/windows/subsurface.nsi
+++ b/packaging/windows/subsurface.nsi
@@ -17,7 +17,7 @@
 #--------------------------------
 # General
 
-    !define VERSION "1.2"
+    !define VERSION "1.2.0.0"
 
     # Installer name and filename
     Name "Subsurface"
[


More information about the subsurface mailing list