Yep. It's finally here.
Get your download at the usual place:
Among many bug fixes and new features, the biggest one is probably Jim Park's Unicode. Wizou and Anders have merged it back to the main version and it's now available as an optional Unicode true command. So thank you Jim, thank you Wizou for merging it back in and thank you Anders for wrapping it all up and making sure NSIS 3 happens.
Next on plan is fixing whatever we broke (like linux build) and x64 by David Golub (partially already available in SVN and on David's BitBucket).
Please let us know of any broken parts of loose screws 🙂
P.S.
Check out our Twitter feed by Yathosho.
NSIS 3.0a0
66 posts
Absolutely awesome! Many thanks to the NSIS team for putting in so many hours, and congratulations for reaching this important milestone. I'm hoping to go play with it soon!
Awesoooooooooome!!!
Quick question for plug-ins: all old plug-ins are now automatically treated as x86, aren't they?
Second question: Is .chm manual working for you correctly?
Quick question for plug-ins: all old plug-ins are now automatically treated as x86, aren't they?
Second question: Is .chm manual working for you correctly?
I'm an eternal optimist but I admit I was worried we'd seen the last major build, as the project really seemed to be losing momentum. I love NSIS, this is frelling great news! Thank you devs for all your work! 👍
Cool, thanks! 🙂
I have just quickly tried 3.0a0, and a simple project compiled, but another, somewhat larger one wouldn't because !searchparse and !searchreplace failed. I then reinstalled 2.46, and then the project compiles just fine, so it would seem !searchparse and !searchreplace are broken.
!searchparse error:
I have just quickly tried 3.0a0, and a simple project compiled, but another, somewhat larger one wouldn't because !searchparse and !searchreplace failed. I then reinstalled 2.46, and then the project compiles just fine, so it would seem !searchparse and !searchreplace are broken.
!searchparse error:
Failing NSIS source code line:!searchparse: starting string "#define VERSIONINFO_VERSION " not found in file!
Relevant line from ../resource.h:!searchparse /file ../resource.h '#define VERSIONINFO_VERSION ' VER_MAJR ',' VER_MN ',' VER_BG ','
!searchreplace error:#define VERSIONINFO_VERSION 1,3,0,0 // 1.3.0
Failing NSIS source code line:Usage: !searchreplace [/ignorecase] output_name source_string substring replacestring
!searchreplace VER_FN "${VER_STR}" "." ""If you mean Ansi vs Unicode then yes, everything starts out as Ansi but NSIS\Plugins\*.dll is not searched anymore, you would have to move them into the correct subdirectory...Originally Posted by T.Slappy View PostQuick question for plug-ins: all old plug-ins are now automatically treated as x86, aren't they?
What do you mean?Originally Posted by T.Slappy View PostSecond question: Is .chm manual working for you correctly?
They are stricter in what they accept but it is of course possible that there is a bug in the new code.Originally Posted by TaleTN View PostI have just quickly tried 3.0a0, and a simple project compiled, but another, somewhat larger one wouldn't because !searchparse and !searchreplace failed. I then reinstalled 2.46, and then the project compiles just fine, so it would seem !searchparse and !searchreplace are broken.
Hmm I cannot edit my previous post so I am adding found issues here, most of them are from manual:
UnsafeStrCpy command is not documented (however I suppose the same behaviour as StrCpy)
The 'new' ReserveFile explanation is very vague:
Also plug-ins are now stored in ${NSISDIR}\Plugins\<architecture>-<Charset> so this may be confusing for users.
And again thanks for the great work!
UnsafeStrCpy command is not documented (however I suppose the same behaviour as StrCpy)
The 'new' ReserveFile explanation is very vague:
Plugins in ${NSISDIR}\Plugins have to be reserved with ReserveFile /pluginMaybe it is better to say "use /plugin switch anytime you use ReserveFile for reserving the .dll file".
Also plug-ins are now stored in ${NSISDIR}\Plugins\<architecture>-<Charset> so this may be confusing for users.
And again thanks for the great work!
Great work!
Maybe it is a good idea to copy already installed plugin's from a NSIS 2.x installation to the new plugin location (at least the ansi plugin's) in the NSIS installer?
jpderuiter
Maybe it is a good idea to copy already installed plugin's from a NSIS 2.x installation to the new plugin location (at least the ansi plugin's) in the NSIS installer?
jpderuiter
Then I guess there is a bug in the !searchparse code, because I have this very simple text file (meh.h):Originally Posted by Anders View PostThey are stricter in what they accept but it is of course possible that there is a bug in the new code.
Which I fails to parse correctly with this equally simple NSIS script:#define APP_VERSION 1,2,3
#define LONG_VERSION 1,2,3,4
!searchparse /file meh.h `#define APP_VERSION ` VER_MAJOR `,` VER_MINOR `,`
# Bug: Found "#define APP_VERSION 1,2,", so VER_MAJOR should be "1" and
# VER_MINOR "2". However, VER_MINOR is "2,3".
!searchparse /file meh.h `#define LONG_VERSION ` LONG_MAJOR `,` LONG_MINOR `,` LONG_BG `,`
# Bug: Should have found "#define LONG_VERSION 1,2,3,", but instead says
# "#define LONG_VERSION " not found.
Name "meh ${VER_MAJOR}.${VER_MINOR} (${LONG_MAJOR}.${LONG_MINOR}.${LONG_BG})"
OutFile "meh.exe"
Section
SectionEnd
didn't think i'd live to see this, good job everybody!
i'm glad that the anchors for commands in the html help finally changed from chapters to something more readable. would've been better though to use the literal command names - #StrCpy rather than #strcpy, #!ifdef rather than #if. i can think of several scenarios where this could be come useful, for instance a command lookup from an editor.
i'm glad that the anchors for commands in the html help finally changed from chapters to something more readable. would've been better though to use the literal command names - #StrCpy rather than #strcpy, #!ifdef rather than #if. i can think of several scenarios where this could be come useful, for instance a command lookup from an editor.
Great work!!!!!!!!!!!!!!!!
Maybe able to upgrade LZMA(LZMA2)?
Maybe able to upgrade LZMA(LZMA2)?
there has been a discussion about thatOriginally Posted by jiake View PostMaybe able to upgrade LZMA(LZMA2)?
Thank you.Originally Posted by Yathosho View Postthere has been a discussion about that
Compression code does look outdated.
I think I fixed searchparse
!define VER_STR a.b.c.d
!searchreplace VER_FN "${VER_STR}" "." ""
!warning "|${VER_FN}|"
gives me:
!searchreplace: "VER_FN"="abcd"
warning: !warning: |abcd| (test.nsi:22)
so you need to provide a full example that actually fails for me to fix this
Originally Posted by TaleTN View Post!searchreplace error:
Failing NSIS source code line:Usage: !searchreplace [/ignorecase] output_name source_string substring replacestring
!searchreplace VER_FN "${VER_STR}" "." ""
!define VER_STR a.b.c.d
!searchreplace VER_FN "${VER_STR}" "." ""
!warning "|${VER_FN}|"
gives me:
!searchreplace: "VER_FN"="abcd"
warning: !warning: |abcd| (test.nsi:22)
so you need to provide a full example that actually fails for me to fix this
Very much appreciated folks, keep up the good work!
Here you go:Originally Posted by Anders View Postso you need to provide a full example that actually fails for me to fix this
meh.h:
meh.nsi:#define VERSIONINFO_STR "1.3.0"
# Sets VER_STR to "1.3.0".
!searchparse /file meh.h '#define VERSIONINFO_STR "' VER_STR '"'
# VER_FN should be "130", but returns usage error instead.
!searchreplace VER_FN "${VER_STR}" "." ""
Name "meh"
OutFile "meh.exe"
Section
SectionEnd
After a short work with NSIS 3 I noticed my favourite feature is still not implemented:
I think this is often used: "initial value" could be optional parameter.
Var /GLOBAL myVariable "initial value"
I believe there is a feature request for Var Foo, Bar, Baz but I don't think we found a good syntax to express this, /GLOBAL makes things confusing etc.Originally Posted by T.Slappy View PostAfter a short work with NSIS 3 I noticed my favourite feature is still not implemented:I think this is often used: "initial value" could be optional parameter.Var /GLOBAL myVariable "initial value"
Setting an initial value is probably not going to happen, NSIS currently uses a PE section trick to allocate the variables with no code at runtime. If you want this feature so bad you can just use a macro in .onInit...
Congrats on finally moving up to version 3 alpha!
Very good to have it all in one place. I like also the streamlining since 2.46. Math.dll -- much smaller. Thanks. 🙂
I found a minor problem. (I hope minor.)
${NSIS_CHAR_SIZE} is always 1.
So,
I found a minor problem. (I hope minor.)
${NSIS_CHAR_SIZE} is always 1.
So,
!if "${NSIS_CHAR_SIZE}" = 2
Unicode true
!endif does not work.With !searchparse fixed I get 130 as the result...Originally Posted by TaleTN View PostHere you go:
This is by design, ${NSIS_CHAR_SIZE} is mainly for code that interacts with the system plugin. ${NSIS_CHAR_SIZE} changes after "Unicode true"...Originally Posted by bnicer View Post${NSIS_CHAR_SIZE} is always 1.
Yay, great! 👍 I guess there was nothing wrong with !searchreplace then, but it was also caused by a bug in !searchparse?Originally Posted by Anders View PostWith !searchparse fixed I get 130 as the result...
${NSIS_CHAR_SIZE} changes after "Unicode true"...I should have tried it first. It isn't a problem, only different. Thanks.
there's always a warning when a script contains ${NSIS_VERSION}, i guess it doesn't like the "a" in v3.0a0
Please post code examples and compiler warnings when reporting issues...Originally Posted by Yathosho View Postthere's always a warning when a script contains ${NSIS_VERSION}, i guess it doesn't like the "a" in v3.0a0
Originally Posted by Anders View PostPlease post code examples and compiler warnings when reporting issues...
!if ${NSIS_VERSION} < "v3.0"
!endifwill produce1 warning:
Invalid number: "v3.0a0" (C:\Users\jan\Desktop\test.nsi:1)
That warning is because it can't parse "v3.0a0" (or "v3.0") as an integer because it isn't.
Stu
Stu
Like Afrow UK said, it gives you a warning because it failed to parse the input as a number. The warning is new but it will fail to parse under 2.46 as well.Originally Posted by Yathosho View Post!if ${NSIS_VERSION} < "v3.0"
!endif
You probably want something like:Originally Posted by 2.46 fails this!undef NSIS_VERSION
!define NSIS_VERSION "v3.0" ;a0"
!if ${NSIS_VERSION} < v4.0
!warning "${NSIS_VERSION} <"
!else
!warning "${NSIS_VERSION} >="
!endif
!if "${NSIS_PACKEDVERSION}" > 0x2046000
Unicode True
!else
!if "${NSIS_CHAR_SIZE}" < 2 ; This takes care of the Unicode fork?
!warning "Unicode not supported, creating ANSI installer"
!endif
!endif
When comparing NSIS_PACKEDVERSION you should check against the last version that did not have the feature you are after, if you do it this way you should be compatible all the way back to v2.15. If you do it the other way with !if ${NSIS_PACKEDVERSION} >= 0x3000000 it will be parsed as 0 >= 0 (true) on older versions!
It is important to note that unofficial svn builds might not set NSIS_VERSION nor NSIS_PACKEDVERSION at all.
!if 0x2046000 >= "${NSIS_PACKEDVERSION}"I'm not sure what the fork will do in the future, you might even want to use !if ! "${NSIS_PACKEDVERSION}" > 0x2999999
!error "You need NSISv3+"
!endif
;Or
!if ! "${NSIS_PACKEDVERSION}" > 0x2046000
!error "You need NSISv3+"
!endif
- The ${NSIS_VERSION} constant was first introduced in 2.0b4
- !if was added in 2.15
- NSIS_PACKEDVERSION and hex number parsing (!if) was added after 2.46 IIRC
The format of NSIS_VERSION was never set in stone, v3.4.5 would be a legal version and there can be a letter or word suffix etc...
Respected developers!
Please, make possibility of translation of the text for "NSIS Error".
It always in English.... Add opportunity to change the text of this error.
thanks.

Please, make possibility of translation of the text for "NSIS Error".
It always in English.... Add opportunity to change the text of this error.
thanks.
