Base App: NSIS
Category: Development
About:
NSIS is the scripting language used to write all of the launchers for the applications on this site, NSIS Portable includes the full NSIS package so beginning users will have examples, tutorials and help files to work from. It it highly recommended to download another application from this site and use those scripts as samples for creating your own portable apps.
Download NSIS Portable 2.38 Dev Test 2
Release Notes:
2008-07-23
Updated to use latest PortableApps.comInstaller
Added the new TextReplace plugin
2008-07-14
Updated NSIS to 2.38
2008-05-08
Development Test 3 - Fixed Patrick's suggestions
2008-05-06
Bug Fixes
2008-05-05
Updated NSIS to 2.37
2008-04-22
Added more Includes.
2008-04-18
Added more Includes. Please let me know what other Includes required for compiling PortableApps.com apps are missing, and I will add them in.
2008-04-14 Please delete previous install and start fresh
PortableApps.com required plugins and includes are now kept in /Data/Plugins or /Data/Include (thanks wraithdu for the tip)
nsisconf.nsh is now moved between the app dir and /Data/settings
2008-04-11
Updated to NSIS 2.36
The non-default NSIS plugins and includes that are required to compile PortableApps.com apps are now stored in DefaultData and moved in on first run. This eases the update process when upgrading the internal version of NSIS
Hint: Thanks to rayven01 for discovering this
If you use the NSISPortable.ini file to control which exe is loaded, you can launch the NSIS menu, the compiler or the zip2exe converter. the following sections are for each setup respectively.
Menu
[NSISPortable] NSISDirectory=App\NSIS SettingsDirectory=Data\settings NSISExecutable=NSIS.exe AdditionalParameters= DisableSplashScreen=false
Compiler
[NSISPortable] NSISDirectory=App\NSIS SettingsDirectory=Data\settings NSISExecutable=makensisw.exe AdditionalParameters= DisableSplashScreen=false
Zip Converter
[NSISPortable] NSISDirectory=App\NSIS SettingsDirectory=Data\settings NSISExecutable=bin\zip2exe.exe AdditionalParameters= DisableSplashScreen=false
High Res Logo:
Old NSIS logo
This one is a good candidate for actually using the ini file. The following makes it skip the "quicklaunch" window and open the compiler directly:
formerly rayven01
cool find. I actually want the quicklaunch to load so beginning users can see the documentation and stuff too.
The developer formerly known as ZGitRDun8705
That makes sense. And with the ini file we don't have to have two launchers, etc.. best of both worlds.
formerly rayven01
*sings* 'You've made me so... very happy'.
Anywho, I think this is Simeon's job, but my registry is all good on an admin account.
Now the Very Pick PAF Stuff.
All else looks good, great work, and thanks.
1. will do
2. oops, can you tell i copied the 7-zip installer, maybe i should double check all my apps lol
3. will do
4. will change
5. will fix
Thanks for being picky, it keeps quality up.
Edit: I made the changes, but before I upload, I wanted to do this. Can I get some help on that?
The developer formerly known as ZGitRDun8705
I like the full package but I use the ini to launch makensis.exe cause I'm used to it
It leaves nothing if I make a clean install. But if I upgrade from Smithtech's version, it leaves HKEY_CURRENT_USER\Software\NSIS behind. I dunno why. Win XP - restricted account.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
Updated to development test 2. I fixed the issues Patrick found, and added a feature, see the main post for details.
The developer formerly known as ZGitRDun8705
that it leaves HKCU/Software/NSIS behind and Zach said :"I took care of that".
At first I though that would be due to my updating from Smithtechs version but then I figured out that it wasn't because of that.
I closed the main program and only kept the makensis.exe open because I only needed the makensis. But closing the main program resulted in the launcher closing and cleaning everything. But the makensis.exe is still open and able to write to the registry. So I think that's the problem for the left keys.
So I think it would be good if the launcher would only close if al the programs that can be started by the main program (makensis.exe and the converter) are closed. Should be easy in NSIS.
Looking forward to DevTest3
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
Good find Simeon!
Now I get to have fun trying to fix this lol. I'll try to have something up tonight, but possibly not until the weekend.
The developer formerly known as ZGitRDun8705
It was a find with a journey. Took me a while to figure it out
I'll be happy to help with the code if you need it or with the testing if you're done.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
Development Test 3 is up, and should fix the issue.
The developer formerly known as ZGitRDun8705
I got my website blocked by my school.
FTP it is.
That's good.
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
Good job slick....how'd that one happen?
The developer formerly known as ZGitRDun8705
I'm gonna say they're very good, and caught the few times I used the proxy I had up there.
lol oops
back to the issue at hand tho, how's the dev test look, and does it work as expected? I know i'm part of the beta testing team too, but it's a lot easier for person x to break my work than it is for me to break my work.
The developer formerly known as ZGitRDun8705
All seems good, it continues running when NSIS is closed, and Zip2Exe is running. Registry still seems clean.
Cool, thanks for testing.
The developer formerly known as ZGitRDun8705
All good. You did a good job on shortening my code
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
lol thanks...what code did I shorten?
The developer formerly known as ZGitRDun8705
"check for multiple exes running"-code I posted in the other thread. Mine was like 20 lines long and yours is something like 8 so I was impressed and wondered why I only came up with the "long version"
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
oh lol ok....i didn't even see your post show up in the other thread lol, i'll go double check that, but yeah, shorter is probably better.
The developer formerly known as ZGitRDun8705
Time to start learning to code in NSIS I guess
good release
Lol yeah it is, get to work
Thanks.
The developer formerly known as ZGitRDun8705
thx a lot ... works fine ... finally i can delete my old 2.25
thanks for testing.
The developer formerly known as ZGitRDun8705
Now I have no excuse not to switch from crappy Inno Setup to NSIS. One issue I noticed, though, almost right away... if the compiler is open and you run NSISPortable.exe to get the menu back (I tend to close stuff out of habit and then realize I need it back), you get a blank menu window. Might want to fix that...
Fixed. Dev Test 4 is uploaded now.
The developer formerly known as ZGitRDun8705
Thanks!
Just had to add 1 line....cause it was an issue that I had in the past. The current working directory gets hijacked, so I had to reset it for the SECONDARYLAUNCH setup as well as the standard LAUNCH
The developer formerly known as ZGitRDun8705
Only one thing that I can wish for:
In SmithTech's, I can link it to files with CafeMOD, but now it makes the menu rather than the compiler. Could it be possible to make a minilauncher so that it launches the compiler?
Insert original signature here with Greasemonkey Script.
in the main post. It does what I think you want.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
I also want to use the menu
Insert original signature here with Greasemonkey Script.
If you want both opened, just launch the compiler from the menu
The developer formerly known as ZGitRDun8705
No, I know what he's asking. He wants it so that files associated with NSIS Portable via CafeMOD open directly into the compiler, but launching NSIS Portable normally launches the menu.
Ah...i get it now....I think that means command line support lol....i'll have to figure out how to add that in...and pray that CAFEMod accepts the command line in the association.
The developer formerly known as ZGitRDun8705
Updated to NSIS version 2.35 Development Test 1
The developer formerly known as ZGitRDun8705
I upgraded from your previous version on a limited xp account and it left the HKCU/Software/NSIS branch behind. It also seemed that the backup of the existing branch wasn't working. Can you confirm that on a limited account? Unfortunately I don't have the time atm to go deeper but maybe I can do it later this week.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
I fixed it. Somehow Dev Test 4 of the old NSIS version lost some code to check for each separate process. It's been added back in, and all should work fine now.
The developer formerly known as ZGitRDun8705
for the quick fix. DevTest2 works ok in Win XP limited.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
It you run NSISPortable, the menu pops up. If you then close the menu, it reappears again. Closing it a second time makes it go away for good. Why do I have to close it twice, though? OS is Vista Ultimate, if it matters.
It seem it's automatically going to LaunchAndExit, and there's nothing to skip to TheEnd when needed.
I had noticed that behavior before, but I thought I fixed it. Maybe that was another fix that was somehow lost between DT3 and DT4
The developer formerly known as ZGitRDun8705
A better fix would be to leave the menu launch untouched (it doesn't need a wrapper) and place the wrapper around the compiler. Then edit the menu to launcher the wrapper around the compiler instead of the compiler itself. That would eliminate the issue entirely and make coding easier.
You could probably ditch the splash entirely and we could just add the red bar from the splash to the bottom of the menu screen.
To edit the menu, just open the menu directory and edit index.html. I was doing this on the 1/2 finished version I didn't get around to releasing. Might as well learn from what I played with for this
Sometimes, the impossible can become possible, if you're awesome!
Does this include all plugins needed to compile portable apps launchers and installers also?
Yea.
so far so good, but some registry is left behind. they r left at HKEY_CURRENT_USER\Software\NSIS and within that it leaves HKEY_CURRENT_USER\Software\NSIS\MRU i do not think anything else is left behind but that, but i will test this on a clean computer to find out. Also just because i know someone will post something that says "did u close the app and see if they got deleted?" the answer is yes i closed it and the keys never got deleted.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Which operating system is this on?
im using Windows Xp. i think its confirmed that it leaves thos registry keys. It left them on another computer i used it on also. They are both Windows Xp.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
i just noticed something, it seems to only make that registry key when u compile a script but not when u launch the program. or maybe its just me. here ill download a fresh copy and see what happens, maybe something got messed up.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
i tried a fresh copy and it still makes the same key but now they r being deleted. Its weird how previously they werent being removed. I will do more testing to make sure nothing else is left behind.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
For re-trying. Maybe you were looking at local keys still or something.
Jee, NSIS Portable just happened to stick a splash in front of me. When I terminate it, it just restarts :(.
Insert original signature here with Greasemonkey Script.
We know it restarts, it's mentioned above.
I uploaded a new version that should have fixed that. Download the latest and try again?
The developer formerly known as ZGitRDun8705
has anyone gotten this when scanning with clamwin?
"PortableApps\NSISPortable\App\NSIS\Stubs\zlib_solid: Trojan.Zlob-2395 FOUND"
I uploaded it to virustotal.com and got the following results. It might be a false positive but just wanted to point it out.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Sounds like a false positive. I just scanned the whole NSIS Portable folder in ClamWin with the latest definitions and got nothing.
Updated internal version of NSIS to 2.36
The developer formerly known as ZGitRDun8705
2.36 Dev Test 1 works flawlessly in my use. No apparent bugs and no registry entries or other traces left behind. I think this is ready for pre-release...
Thanks Bruce I just thought of some changes I wanna make for the PortableApps required plugins and how that gets implemented, DT2 will be posted tomorrow nite. I wanna make it check to see if the specific plugin already exists in the /App/NSIS/Plugins dir, and if it doesn't, then move it, instead of only moving them from /App/DefaultData on the first launch. With this implemented, users (and myself) can add plugins as they become necessary, and keep them in DefaultData so that the plugins aren't lost on an update then.
The developer formerly known as ZGitRDun8705
It's my understanding that DefaultData is supposed to be for first-run stuff only... the launcher is supposed to copy its contents into Data if Data is empty.
What you could do is put the PA-required plugins into DefaultData\plugins, this way on first run they get copied into Data\plugins, and then as part of the launch you copy whatever is in Data\plugins into App\NSIS\Plugins. The reason? This way if the user adds plugins, they get backed up with all the user's other data. DefaultData doesn't get backed up in a data-only backup as it's considered part of the app.
I have a good solution to this...one that I may use for my default install as well. There are two compiler commands
!addincludedir
!addplugindir
These give the compiler additional search locations for for includes and plugins. If these commands are placed in the 'nsisconf.nsh' file located in the NSIS root directory, then they are compiled with every script. Relative paths are funny with this file, so use fully qualified paths relative to the NSIS base directory -
This should keep everything nice and separate, and intact during upgrades
thanks for the tip, that works great
The developer formerly known as ZGitRDun8705
Updated to 2.36 Dev Test 2
The developer formerly known as ZGitRDun8705
Though I have some home made includes, and I don't want to get into the prog folder (My new drive is rather slow). Any way to add that moving of the includes/plugins into the pre-install code?
Insert original signature here with Greasemonkey Script.
plugins aren't moved at all, they sit in /Data/Plugins or /Data/Include....wraithdu pointed out a compiler option that adds their path to a list of paths the compiler looks in
The developer formerly known as ZGitRDun8705
move it from App from Dev Test 1.
Insert original signature here with Greasemonkey Script.
oh u mean to upgrade the previous install...Well seeing as I don't know what custom plugins you have, I can't really do that. Not all of the plugins and includes are in the /Data subdirectories, only the non-default files that are required to compile PortableApps.com apps. Plus, I tried doing something similar for another app of mine, and was told that in Dev Test stage we shouldn't worry about making in-place upgrades work. If you want your custom includes, just copy them over. They're just small txt files so it shouldn't take too long.
The developer formerly known as ZGitRDun8705
Would you consider adding a context menu for NSIS portable?? It's fairly easier I could post the regkey's that will do it. Example: While the menu is running instead of launching a new window you could just right click on your .nsi file and click compile and it would do it. The only other thing I noticed is that we should make it so the launcher remembers to change the drive letter in past file locations. That's really handy when your constantly on the go and developing in your spare time.
Release Team Member
Updated to Dev Test 3, see main post for details.
The developer formerly known as ZGitRDun8705
Small update, added another include file. I didn't change the version number.
The developer formerly known as ZGitRDun8705
Everything's clean, as found by previous testers.
There's a topic about nsExec in this post. It would be handy if your script would use ExecDos and if the installer would include it in DefaultData\plugins. Also, the Apps\NSIS\Menu\index.html can replace the nsExec line with:
(in alphabetical order, of course. :-))
You could also consider an INI option
ItemsToLaunch=N
, where N is a combination of: 1=menu, 2=compiler, 4=zip2exe, 8=manual, etc. (e.g., compiler + manual = 2 + 8 = 10).I compiled and tested this code with various values of
ItemsToLaunch
(including none at all), and they all worked. N.B.AdditionalParameters
entry is ignored (which item would you apply them to?). Note that theSaveRegKey
label isn't used, so it should be commented out likeLaunchItem8
above. Also,CopyDefaultIndlucdes
has an interesting spelling.And, this topic addresses the buggy-yet-it's-always-been-that-way-so-it's-not-a-bug INI file handling in current launchers. With the suggested changes, a user's NSISPortable.ini could look like this:
Overall, an excellent project almost ready for release.
-hea
Thanks, i'll give this a look over Sunday night, i'm busy all weekend.
The developer formerly known as ZGitRDun8705
If you're going to replace nsexec w/ execdos, replace advsplash, too, etc. etc. with the common PortableApps plugins.
Maybe make a PortableApps edition NSIS.
Also, I'm starting to think this really deserves to be official, since we portableize using NSIS, it would be respectful to Portableize NSIS.
Insert original signature here with Greasemonkey Script.
NSIS Is Made Portable By NSIS COOL!
Na na na, come on!
That is quite ironic.
largely expanding brain can't handle the capacity :P, let me explain it to you :P:
The local install of NSIS was tracked, copied, and portableized/compiled using the local install. I know, it's cool! But it leaves me wondering, why NSIS over AHK? The splash???
Insert original signature here with Greasemonkey Script.
And i quote
" The local install of NSIS was tracked, copied, and portableized/compiled using the local install. "
HUH?????????????
i think u made it worse
Na na na, come on!
That explanation makes no sense at all lol. And where did the AHK mention come from?
The developer formerly known as ZGitRDun8705
First, He made a copy of the regular NSIS from his hard drive. Then, he opens his local installed version of NSIS, to alter the copied NSIS.
Simplifying daily life through technology
Yes, that is what I did to make NSIS portable. I was just stating that digitxp's explanation made no sense.
The developer formerly known as ZGitRDun8705
I was clarifying for the guy who was confused
Simplifying daily life through technology
based on all the smilies he used, I don't think he's really confused, he just finds it funny that NSIS was used to make NSIS Portable. Also, if your response was to him, it should have been a reply to him, not to myself.
The developer formerly known as ZGitRDun8705
u found it out. i was just trying to be funny
but my sis was confused as ever
Na na na, come on!
Once there's a working NSIS Portable [alpha, beta, pre-release, etc.], you don't need a local NSIS install at all.
Zach's Portable releases are the first and only NSIS version I've ever used.
If you keep two copies, you can make arbitrary changes to NSIS Portable all day long, recompiling the new NSIS Portable with the old one. Can't beat that with a stick.
It's self-hosting.
-hea
I can make PortableApps easily thanks to NSIS Portable, but it has a kind of bug.
It works perfect on my desktop (Pentium IV 1,7GHz, 768MB RAM, 80GB HDD), but it stuck every time I trying to build PortableInstaller on my laptop (AMD Sempron 3200+ 2GHz, 512MB RAM, 80GB HDD).
This is weird, because it works on my desktop, but on laptop it doesn't. It take about 100% CPU usage and block hole computer. PortableInstaller is growing up about 1MB per 30min. All in all I have to kill NSIS processes cause it blocks my computer. Sometime changing 'lzma' compression to zip helps.
Does anyone experience such problems?
Using lzma compression is a bit slower, but that sounds like an odd situation. I've had NSIS slow my computer down while compiling PortableApps.comInstaller, but never used up 100% CPU. How large are the folders that you are compiling the installer for? As folders/files get bigger, compiling the installer takes longer.
The developer formerly known as ZGitRDun8705
It depend on App I'm making portable. Usually about 20MB, only OpenOffice is an exception (it's about 150~200MB).
NSIS getting well for about first 5MB of PortableApps.comInstaller, after that it stuck. After a few minutes CPU usage back to normal (less than 8~20%), but process of creation Portable Installer is running, but never ending.
I have no idea what is the reason and how to fix it? If I use nonportable NSIS (specially without plugins form NSIS 2.36 Portable Development Test 3, it is working).
P.S. There is new version --> NSIS 2.37 http://nsis.sourceforge.net/Download
Thanks for pointing me to the update. I'll try to get that out soon. As for your issue, I'm not sure what to say, I have not had these issues and cannot reproduce the situation.
The developer formerly known as ZGitRDun8705
I have had this happen to me a lot when I have to recompile Celestia, it will do good for a while then it will just stop and my cpu usage goes to 100 percent and I cant do anything for about 20-30min. This happens when I use NSIS Portable idk about just a regular install.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Pages