|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2007
Posts: 3
|
NSIS with main() function and no others or sections or pages?
Is there a stripped down version of NSIS that doesn't require sections, pages, or other built in functions.
In other words, a generalized scripting system supporting all the NSIS great functions and plugins, but doesn't require the install domain specific sections, pages, or install specific callback functions. The only required function would be main() That'd be hot... |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
no, but then you can make a very minimal installer of the type you describe with just this:
code: Put the code you want in .onInit. The 'Abort' at the end will make the installer exit immediately, without any UI being loaded, etc. At the top you might still want to specify a compressor, but for the sake of minimalism.. the above is it. |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
Or even shorter,
OutFile file.exe SilentInstall silent Section ... SectionEnd Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Afrow's solution also generates a smaller executable.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
fancy
|
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Silent installers get stripped of their resources and some language strings are also not included so the overhead is smaller.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
And if you want it even smaller, you can use UPX to pack the overhead and then you can remove the icon with Resource Hacker, both by using !packhdr. You can't use !packhdr more than once so you need to use batch scripts.
Just to share with everyone, the batches I use in every installer I make: NSIS\packhdr\upx.bat code: NSIS\packhdr\noicon.bat code: NSIS\packhdr\noicon+upx.bat code: Example NSIS code to compress overhead and remove icon: code: You need to extract Resource Hacker and UPX to NSIS\packhdr as well of course. http://angusj.com/resourcehacker/ http://upx.sourceforge.net/ Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|