![]() |
#1 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
![]()
NSIS 3.0b1 is released with lots of build fixes, revival of nightly builds, automatic execution of our test suite along with the nightly build to make sure releases are always up to snuff, and lots of patches from our loyal users.
If you find any new issues, report them in this thread and/or on the SF bug tracker and please include compiler error messages and sample code if possible... Fixed in trunk:
Known issues:
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#2 |
Senior Member
|
![]()
I been using the latest nsis2 for the longest time, but had to replace makensis from the nsis-2.46-strlen_8192.zip file found elsewhere within the forums. I had issues when I updated the path environment variable it cropped it and just pushed my path and erased the rest. Since the latest dells these days give you so much crap the limit of the string is a concern.
So, is the latest beta have this issue resolved. The release notes were ambiguous on strlen issues as the one mentioned I didn't know if it applied to me or not. thanks |
![]() |
![]() |
![]() |
#3 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
I don't think the string limit changed in v3. Updating %path% is still dangerous and should be avoided IMHO...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#4 |
Senior Member
|
anders,
i use the updatepath plugin found in the wiki. what makes it dangerous? do you propose an alternate solution that is less dangerous? if the strlen hasn't been changed, and if i need to use it still, is it recommended i stay with the previous version of nsis compiler? |
![]() |
![]() |
![]() |
#5 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Quote:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#6 |
Senior Member
|
It was AddToPath, it was a while ago it may been deappreciated already.
Call AddToPath was how it was used. My clean machine I use for building is off right now but I can't recall how it worked. I was included as an nsh file. do you know what that replacement makensis.exe did? i forgot where i found it originally i probably googled for it or someone told me about it elsewhere in the forums. The software that is being installed has functionality that is installed within its own directory that doesnt get copied into sys32 so it needs to have its own directory in the path. i see the current path manipulation page has a red warning. |
![]() |
![]() |
![]() |
#7 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 923
|
http://nsis.sourceforge.net/Path_Manipulation
Judging from the history it's quite an old page. Anders actually added that warning in February 2014. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#8 |
Senior Member
|
That being said, is there any modern way to add the program's path into the environmental path? What is the safe way of doing so? I think these scripts just holds the new path into a variable, and then copies itself with the new variable ( foo += bar) rather than pushing it onto the stack foo.push(bar) or something? I haven't looked at that part in ages and now I am getting nervous with a major release version coming out soon.
|
![]() |
![]() |
![]() |
#9 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Why do you need to be in %path%? It is a limited resource and I personally don't like it when apps add themselves there. It is possible to customize it on a per .exe basis in "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths" but the better solution IMHO is just to fix the app (unless we are talking java?, in that case, use a launcher).
A plugin would be required to do it safely from NSIS... IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#10 |
Moderator
|
@Anders
Please check this strange behavior of NSIS 3.0b1. When you try to save log text it is cutted (not all text is saved). Run MakeNSISW. Choose File -> Save Output You will see that NSIS saved this: Usage: - File | Load Script... - Drag the .nsi file into this instead of this Usage: - File | Load Script... - Drag the .nsi file into this window - Right click the .nsi file and choose "Compile NSIS Script" The same when you compile some script with more output... Log text is cutted... To small buffer or something... -Pawel PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
![]() |
![]() |
![]() |
#11 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Quote:
This bug has probably been there since the Unicode merge. It called WriteFile with the character count and not the byte size. The good news is that it has already been fixed shortly after beta 1. It now uses EM_STREAMOUT and Windows has to deal with most of the buffering internally. It will also write a BOM now... IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#12 | |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 923
|
I know 64 bit isn't officially supported yet, but there is a text buffer problem in makensisw when using the 'Best Compressor' option (not present in 3.0b1). I would say it's similar to the heartbleed bug which surfaced earlier this year.
Example output (example1.nsi): Quote:
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
![]() |
![]() |
![]() |
#13 |
Moderator
|
@JasonFriday13
I also noticed this in my own NSIS test builds (for Polish users). When I translate for example this: "EXE header size:" and translation is longer it happens the same, like buffer is to short... So, maybe this is a good idea to increase the buffer or rewrite it. PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
![]() |
![]() |
![]() |
#14 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Fixed. (The person that wrote the stats parser never checked MSDN because EM_GETLINE is rather special and does not zero terminate the buffer in most cases)
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#15 |
Senior Member
Join Date: Feb 2005
Location: London
Posts: 218
|
I have a compiler warning message for a custom MUI2 uninstaller welcome/finish page:
My script does not call the macro.code: If I remove the image entirely, compiling still produces the same warning.code: |
![]() |
![]() |
![]() |
#16 | ||
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 923
|
Quote:
Quote:
How are you creating this page? Pasting up the page function would help. (Post isn't really relevant to 3.0b1 as I don't think the MUI2 code has changed much at all since 3.0a0). "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
||
![]() |
![]() |
![]() |
#17 |
Moderator
|
To remove this warning message, try to add this line:
PHP Code:
However, you should not see that for custom page... PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
![]() |
![]() |
![]() |
#18 |
Senior Member
Join Date: Feb 2005
Location: London
Posts: 218
|
I have not tested installers with standard MUI2 welcome/finish pages. I usually use custom pages in the installers and the uninstallers, for instance: !insertmacro PAGE_FINISH
Interestingly the warning appears only once, even though there are four images (welcome + finish; installer + uninstaller), but that said, it is unlikely the warning stems from my script, because not embedding the images does not remove the warning.code: The script in its entirety is posted online. I'll send you the link in a pm, if you can't reproduce the warning. The above code is actually an installer finish page, but the uninstaller is the same. |
![]() |
![]() |
![]() |
#19 |
Senior Member
Join Date: Feb 2005
Location: London
Posts: 218
|
Thanks, Pawel.
Adding the !define line to the unpage welcome function got rid of the warning message. I have two questions. Why is a warning necessary, if the behavior defaults to FitControl anyway? And, does NsDialog have one setting for stretching or can the !define also define the other new bitmap stretch mode settings?code: |
![]() |
![]() |
![]() |
#20 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Please post a minimal example that I can actually compile. If custom pages/nsDialogs is required to reproduce, don't include references to things that are not required like ShowControls etc. To be clear, I want you to start with a empty text file and add things until you get the warning...
MUI_HEADERIMAGE_[UN]BITMAP[RTL]_STRETCH is new and might not have been tested in every possible configuration. It applies to every page that uses the "small header image" (Not the welcome and finish pages). It should have no effect at all unless MUI_HEADERIMAGE is defined. It replaces the _NOSTRETCH define in older MUI versions. You are supposed to use it like this: Quote:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#21 |
Senior Member
Join Date: Feb 2005
Location: London
Posts: 218
|
Chunk of code.
I stripped out everything I could in an existing script. The warning message is not displayed when you take out this macro line: !insertmacro MUI_UNPAGE_CONFIRM.code: In another uninstaller script I'm using the warning message is still displayed after removing MUI_UNPAGE_CONFIRM. |
![]() |
![]() |
![]() |
#22 | |
Senior Member
Join Date: Feb 2005
Location: London
Posts: 218
|
Quote:
|
|
![]() |
![]() |
![]() |
#24 |
Senior Member
Join Date: Feb 2005
Location: London
Posts: 218
|
There is still the warning. The confusing part is that it warns about the unbitmap and for the installer bitmap it does not warn.
"!define MUI_HEADERIMAGE_UNBITMAP_STRETCH FitControl" produces no warning. Edit: Oops. No. That was a mistake. Anders, I copied your patch to the wrong folder. It works now. Excellent. 10 out of 10! ![]() |
![]() |
![]() |
![]() |
#25 |
Junior Member
Join Date: Nov 2014
Posts: 7
|
most of programs that use NSIS are still being detected as a false positive by few AVs. I created an empty installer and here is the result
https://www.virustotal.com/en/file/7...748b/analysis/ |
![]() |
![]() |
![]() |
#26 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 923
|
I use AVG and I have never had a false positive from them. False positives are an ongoing battle, and as long as software is being developed there is no outright winning.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#27 |
Junior Member
Join Date: Nov 2014
Posts: 7
|
Ok could you please check your software using virustotal and see how many AVs detect it as a threat ?
|
![]() |
![]() |
![]() |
#28 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 923
|
About the only installer I actually distribute is for my InstallSpider User Interface, every other installer I've made is for personal use and doesn't leave my computer (or it's for programming or testing).
An older version passed all tests: https://www.virustotal.com/en/file/0...is/1415360022/ And the current version passed all tests except for McAfee-GW-Edition: https://www.virustotal.com/en/file/c...is/1415360371/ I'm not a professional so false positives don't really concern me. Maybe if I was working in programming then I might be concerned and do something about it. I tend to change brands if something breaks down, so I've come to rely on brands such as Asus, Corsair, Kingston, Western Digital and LG optical drives (out of 5 drives, one is 9 years old and still hasn't broken yet, and it's in my main machine with an ide->sata converter). This isn't relevant to the thread, so I'm not going to say anything more about it in this thread. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#29 |
Senior Member
Join Date: Feb 2005
Location: London
Posts: 218
|
I second not relevant to the thread, but it is reassuring nonetheless. I expected false positives, after what’s been said here. I got a perfect score too. NSIS must be doing something right. https://www.virustotal.com/en/file/1...9e7b/analysis/
Again, maybe it would be better to post this in another thread, ie, the only thing that flags up is under behaviourial information: System.dll (failed) |
![]() |
![]() |
![]() |
#30 |
Junior Member
Join Date: May 2014
Posts: 22
|
Commit [r6568] breaks x86 plugins, without .reloc they not works.
Example: code: Last edited by simplix; 3rd December 2014 at 15:56. |
![]() |
![]() |
![]() |
#31 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Thanks, VS2010+ only applies /FIXED to the stubs now.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#32 |
Junior Member
Join Date: May 2014
Posts: 22
|
Hello and Happy New Year!
I can't understand - the error in System plugin or WinAPI. When I use the function OpenProcessToken like this, for example: code: Then in 32-bit NSIS it's works (return 1), but not works in 64-bit NSIS (return 0). If you have the opportunity, please take a look. |
![]() |
![]() |
![]() |
#33 | ||
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Quote:
Quote:
IntOp $PostCount $PostCount + 1 |
||
![]() |
![]() |
![]() |
#34 |
Junior Member
Join Date: May 2014
Posts: 22
|
Anders, thank you very much!
|
![]() |
![]() |
![]() |
#35 |
Junior Member
Join Date: May 2014
Posts: 22
|
Fix for Armenian.nsh
|
![]() |
![]() |
![]() |
#36 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#37 |
Moderator
|
@Anders
Delphi source file for NSIS (\NSIS\Examples\Plugin\nsis.pas) had some bugs for unicode support. Here is the fixed version: http://www.meggamusic.co.uk/shup/1422914824/nsis.pas Here are the differencies (compared to nsis.pas from NSIS 3.0b1): 1. line 56: removed unnecessary comma 2. line 131: added a condition 3. line 159: changed PAnsiChar(msg)-> Pchar(Msg) Ps: Fixed by Artem (http://aimp.ru). -Pawel PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
![]() |
![]() |
![]() |
#38 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
1: Unnecessary maybe, but unless it fails to compile I don't seen the need to change it.
2: I don't understand why the code needs a duplicate extrap_t in the extrap global in the first place. The code should be rewritten to only use g_extraparameters. (When using a copy, if you call exec_code_segment and that ends up changing a flag you now have a out of sync exec_flags_t in extrap). Checking g_extraparameters against nil might not be necessary, it depends on the minimum supported NSIS version. Most plugins assume it is non-nil AFAIK. 3: Yes, PAnsiChar is probably a bug there. It has been so long since I coded in Delphi/Pascal so I don't really remember the language anymore but the code does not really make sense to me as is: Call() checks (g_extraparameters <> nil) but then uses extrap.exec_code_segment so who called Init() to fill in extrap? IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#39 | ||
Moderator
|
Quote:
However, you can not compile "exdll_with_unit.dpr" example project - it uses nsis.pas that has mentioned issues (need to delete comma (line 56) and change incorrect PAnsiChar type(line 159) to create a dll). Quote:
Yes. It will not compile (tested on Delphi XE7) -Pawel PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
||
![]() |
![]() |
![]() |
#40 | ||
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
I have made some changes now but I could not get RegisterPluginCallback to work 100% correctly, not sure if it is because I was using Free Pascal or a problem with my code but it crashes in a call to FreeLibrary. If anyone has Delphi installed and are able to try that would really help (Grab exdll_with_unit.dpr and nsis.pas from here).
This is how I'm compiling: Quote:
It might just be a threading bug in Free Pascal. Calling exdll_with_unit::registerplugincallback in .onGuiInit instead of a section does not crash... Edit2: The bug is still there in 2017 with: Quote:
IntOp $PostCount $PostCount + 1 |
||
![]() |
![]() |
![]() |
|
Tags |
nsis beta, release |
Thread Tools | Search this Thread |
Display Modes | |
|
|