Old 30th June 2004, 17:30   #1
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Post NSIS Self-Extractor kit

Hello, it's me again!

After creating a lot of product installations for various games, mod's etc, I decided to write this kit for creating basic Self-Installers like that of WinZip and WinRAR (but more beautiful of course )

Screenshot:


[Download]
Archive page
Afrow UK is offline   Reply With Quote
Old 30th June 2004, 20:37   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Nice

Cool


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 1st July 2004, 23:14   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I've just uploaded v0.02, which is at the same download location. The screenshot above is also of the new self-extractor.

-Stu
Afrow UK is offline   Reply With Quote
Old 2nd July 2004, 01:45   #4
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
I think the combination of Zip2Exe (and Tga2Exe), this UI design and your easy script manipulation (but I think need some improvements, as I'll say below), and the Context Menu shortcut would be excellent!

Just some things though:

1) I think the command names should be in Title Caps and w/o "_" (underscore) characters (like ${SE_FILE} -> ${SEFile}). This will make it more like the NSIS style command names (i.e. SetOutPath).

2) I didn't understand why put "=>" everytime you insert a File into the list of files to be extracted:
Quote:
${SE_FILE} "local_path_to\file.ext" => "output_file"
As I said before, try to make it like the NSIS command names and parameters styles. It will make the script more compact and easier to produce by hand.

3) The extractor attributes are mostly in !define style, I suggest to change those into !insertmacro or even normal command styles. And change the position of the !include "SE.nsh" to the beggining of the script.

(Uhhuuuu! My Internet conection is flying at speed of light now!)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 2nd July 2004, 16:56   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Thanks for the suggestions!

I am still working on adding other bits and bobs. I've allowed for the install details to pop-up over the top.

Now, I can't find a way to change the style of the first line in the listview. Is it possible? Again I don't have access to a list of defines, and the internet never shows anything that I want!

Edit: When I place the !include at the top of the script, the header doesn't see the defines below it (because it goes from the top of the nsi script and down, not the other way round). How does MUI fix this?
Edit#2: Ohh I see, it uses macro's not defines!

-Stu
Afrow UK is offline   Reply With Quote
Old 3rd July 2004, 00:51   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I've done everything you suggested, and I must admit that it looks a lot cleaner now (the Example script that is!)

I just want to embolden the first line of the details window, where it says "Extraction details", because that is for the heading (I want it to stand out).
Is it possible?

-Stu
Afrow UK is offline   Reply With Quote
Old 3rd July 2004, 05:49   #7
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
PHP Code:
!define WM_SETFONT                      0x0030

CreateFont 
$"$(^Font)" "$(^FontSize)" "700"
SendMessage $hCtrl ${WM_SETFONT} $0 0 

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 3rd July 2004, 08:33   #8
bholliger
Senior Member
 
Join Date: Jul 2004
Location: Switzerland
Posts: 223
Lightbulb Cool thing!

This is a great addon! Thanks!

One suggestion: It would be nice if there's another checkbox "Open Folder after Compression" or something like that on the extract-dialog.

Have a nice day.

-Bruno.
bholliger is offline   Reply With Quote
Old 3rd July 2004, 11:57   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Quote:
Originally posted by deguix
PHP Code:
!define WM_SETFONT                      0x0030

CreateFont 
$"$(^Font)" "$(^FontSize)" "700"
SendMessage $hCtrl ${WM_SETFONT} $0 0 
I'm aware of that code, but I don't know how to get the hCtrl of the first line of the details view.

-Stu
Afrow UK is offline   Reply With Quote
Old 3rd July 2004, 19:04   #10
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
first line of the details view
Is this a Label or a ListBox? If it's a ListBox, you can't put a line with different font from the else. It's ListBox rule.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 3rd July 2004, 22:57   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Uploaded a new (perhaps final) build.

This one includes all the new code, and the "When done, open extraction directory" check-box which replaces the readme check-box if specified. Note that you cannot have both the readme check-box and opendir check-box (that would be anoying for the user if both opened at the same time!)

Download from same URL's above.

-Stu
Afrow UK is offline   Reply With Quote
Old 4th July 2004, 07:49   #12
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
Uploaded a new (perhaps final) build.
Oh oh, I've done small tests and I found some more room for improvement:

Script:

1) Major Bug:
Quote:
This one includes ... the "When done, open extraction directory" check-box which replaces the readme check-box if specified
Strange. I don't see it.

2) Minor Bug:
Quote:
unknown variable/constant "SE_OVERWRITE_STATE" detected, ignoring (macro:SE_FILE:1)
When I use the command ${SE-NoOverwrite}.

3) Minor bug: When I set ${SE-Font} to a font, it doesn't set the font before the installation to Extract Progress: label control (see on the left of progress bar), but when I start the installation it changes to the correct font.

4) Suggestion: Default of ${SE-Product} should be set to the executable file name without its extention.

5) Suggestion: Default of ${SE-OutFile} should be set to the script file name changing only the extention.

6) Minor Suggestion: In the example script, try to use indentation on the code between ${SE-FilesStart} and ${SE-FilesEnd}.

Readme:

General: You should make some corrections for the changes you've done:

- ${SE-NoOverwritePrompt} is wrong, the correct is ${SE-NoOverwrite}.
- ${SE-File} parameters are from a previous version.
- If undefined term used for all the old version defines that were changed into commands on this version, change to If not used.
- {SE-NoOpenDir} doesn't exist (because of a checkbox that doesn't exist either).
- And some others that I don't have patience to look for (at this time in the morning - 4:00 AM - what are you expecting me to do?).

General:

1) Major Suggestion: An option to create a Start Menu shortcut folder for the files to be extracted.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 4th July 2004, 22:01   #13
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Okies fixed a lot of the stuff. The reason that you don't have an open-dir check-box is because you cannot have that and a readme check-box. Comment out the readme code and the open-dir check-box will appear. Use ${SE-NoOpenDir} to hide that check-box as well.

Added new code for shortcuts. No new check-box though, just an optional message box w/ Yes/No.

How would one get the executable/script file names w/o file extensions on compile time? Remember the Name and Caption are set on compile time.

-Stu
Afrow UK is offline   Reply With Quote
Old 5th July 2004, 06:25   #14
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
The reason that you don't have an open-dir check-box is because you cannot have that and a readme check-box.
Are you sure it's working correctly on version 0.3? Did you try to comment ${SE-Readme} line in your example script?

Quote:
How would one get the executable/script file names w/o file extensions on compile time? Remember the Name and Caption are set on compile time.
Hmmm... just ignore that.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 5th July 2004, 10:34   #15
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Mmm, it worked here... maybe it didn't get into the extractor that I uploaded (don't know why).

I will upload 0.04 now...

-Stu
Afrow UK is offline   Reply With Quote
Old 5th July 2004, 11:12   #16
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Uploaded new version.

Added setting for install window and extraction progress font. Default is Verdana (because it is smaller than Ms Shell Dlg at 7pt allowing 2 lines to fit in the extraction progress label)

-Stu
Afrow UK is offline   Reply With Quote
Old 5th July 2004, 19:31   #17
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Oh oh, again:

Script:

1) Minor Bug: ${SE-ExtractListFont} doesn't support multiword font names, like "Times New Roman".

2) Minor Bug: ${SE-NoShortcutsMessage} doesn't hide the MessageBox as it should do.

3) Persistant Bug:
Quote:
unknown variable/constant "SE_OVERWRITE_STATE" detected, ignoring (macro:SE_FILE:1)
When I use the command ${SE-NoOverwritePrompt}.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 5th July 2004, 19:52   #18
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Thanks for searching for the bugs! I should be more thorough myself, but this is just one of my spair time projects (I'm currently working on a map database website for a Half-Life mod.)

They should all be fixed now.
The first bug was because I didn't use quotes around the define value.
The second and third bugs were from using !ifdef and !ifndef outside the macro's.

Uploaded again (still v0.04).

Edit: Just fixed the small bug where the SE-ExtractListFont wouldn't be set for the extraction details label.

-Stu
Afrow UK is offline   Reply With Quote
Old 14th July 2004, 21:18   #19
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
New version uploaded (definately final) which comes with a DHTML Step-by-step Script Generator plus a few additions to the Self-Extractor itself (About button).

Uploaded to same URL (v0.05)

-Stu
Afrow UK is offline   Reply With Quote
Old 15th July 2004, 11:37   #20
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Using MS Shell Dlg the font is automatically set to the system shell font. I think this should be the default font.

When I look at the screenshots the user interface looks a bit "compressed", remember that having a smaller window is not always better. Usually some space between controls makes it more user friendly.
Joost Verburg is offline   Reply With Quote
Old 19th July 2004, 23:12   #21
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Uploaded 0.06 (definately final)
Fixed a few errors in the NSH and script-gen JS

-Stu
Afrow UK is offline   Reply With Quote
Old 20th July 2004, 10:35   #22
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
The version number does say that it is a beta and not completed version. So changes are not over yet (however you can see that the list of bugs is much smaller than the older lists):

1) Bug: The readme page is not creating another Internet Explorer window but instead it uses an already existant window. Use an empty string instead of open to use the really default action which is opennew for me.

2) Script Typo: You doubled the same line ${SE-OutFile} "NSIS Self-Extractor.exe" in the example script.

3) Minor Bug: When you use a font name with ${SE-ExtractListFont} it appears that the font size becomes smaller. Make sure it looks like the same when not using the command and when using the command w/ "Verdana" (if you can).

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 20th July 2004, 15:40   #23
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Thanks for that, really
Fixed em' all. Btw, what do you htink of the script-gen?

-Stu
Afrow UK is offline   Reply With Quote
Old 20th July 2004, 16:03   #24
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Oh, I didn't see that before (I only saw it when I opened the Documentation folder, that means I was looking on an older Readme version).

It's marvelously excellent! I should borrow some of your codes in Javascript and ActiveX. You've done a lot of work to get there. Very good job, man. But just one thing though, why did you put Skip This Step button enabled on Step 3? You can't skip that part because it's essential!

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 20th July 2004, 21:18   #25
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
That's a good point. If you do skip it at the moment, the finish button is disabled (if you do not include a readme as well.)

I just thought though... I should include the readme with the SE-File macro so that the overwrite prompt (if enabled) shows up.

-Stu
Afrow UK is offline   Reply With Quote
Old 20th July 2004, 22:47   #26
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Ok, uploaded new build.
Added a new SE-ForceExec to execute a file once the extraction process has finished. This will be useful for zip's that have been placed in the self-extractor.

-Stu
Afrow UK is offline   Reply With Quote
Old 24th July 2004, 19:30   #27
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Argh, a new build!

Added a setting to store the extraction dir in the registry.
Added settings for searching for a readily existing directory to extract files to.

Fixed a number of bugs, plus added 'Save to File' in the script generator (ActiveX)

-Stu
Afrow UK is offline   Reply With Quote
Old 26th July 2004, 08:15   #28
dRaakje
Junior Member
 
Join Date: Oct 2003
Location: Netherlands
Posts: 23
Send a message via ICQ to dRaakje
Hi, nice work, but, as you can see in the screenshot, on XP with the classical theme the description text is displayed on two lines, causing the bottomhalf to fall off.

Perhaps you should force a specific, smaller font for that text? Hmmm, I don't suppose it's easy to have the path changed into using dots in the middle of the string to compact it when it's too long. (like "D:\...\installdir")

Remco

dRaakje is offline   Reply With Quote
Old 26th July 2004, 10:08   #29
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
omg. Afrow UK very nice job bro. my compliments

and that dhtml script maker stuff. ...... really great ..

NICE!!!
VegetaSan is offline   Reply With Quote
Old 26th July 2004, 11:57   #30
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Quote:
Originally posted by dRaakje
Hi, nice work, but, as you can see in the screenshot, on XP with the classical theme the description text is displayed on two lines, causing the bottomhalf to fall off.

Perhaps you should force a specific, smaller font for that text? Hmmm, I don't suppose it's easy to have the path changed into using dots in the middle of the string to compact it when it's too long. (like "D:\...\installdir")

Remco

[Image]
I think I will have to make the dialogue larger.
It's just a bit cramped at the moment!

-Stu
Afrow UK is offline   Reply With Quote
Old 26th July 2004, 13:05   #31
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Ok, uploaded a new build. Try and see if it's ok now..

-Stu
Afrow UK is offline   Reply With Quote
Old 27th July 2004, 10:46   #32
dRaakje
Junior Member
 
Join Date: Oct 2003
Location: Netherlands
Posts: 23
Send a message via ICQ to dRaakje
Still the same. I've updated my screenshot, look for your self... You can't force a smaller font? Or compact the folder string with dots in the middle?

Still, this is nitpicking, it looks great!

dRaakje is offline   Reply With Quote
Old 27th July 2004, 11:02   #33
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Hmmf. It's because I made the kit on Windows XP... the font used there is Verdana size 7. On Windows XP, it's much much smaller (if you look at my screenshot) but for some reason it is larger for you.

I will see what I can do. And don't worry it's not nit-picking. User input is exactly what I like to see!

-Stu
Afrow UK is offline   Reply With Quote
Old 27th July 2004, 11:25   #34
dRaakje
Junior Member
 
Join Date: Oct 2003
Location: Netherlands
Posts: 23
Send a message via ICQ to dRaakje
Actually, I'm using Xp also, but the first thing I do after I install Xp is turn of that f***ing teletubby theme and go back to classic windows.

<RANT>That XP theme has larger controls, meaning less space left for the really important stuff (such as the source windows when I'm programming)</RANT>

So, if you want to test yourself, go to your desktop properties and change from windows xp theme to windows classic theme, then you can see for your self (Might be a good idea to save your current theme first, so you can restore it later on)

Oh, and since it's Windows Classic, it'll probably be using MS Sans Serif, 8 pts for the text. That's what windows usually uses everywhere else.

Remco
dRaakje is offline   Reply With Quote
Old 27th July 2004, 12:21   #35
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I actually found an error in my code which was causing the extraction text label font to be bigger on the instfiles page than the directory page.

I've fixed it. The font is now Verdana size 7 again for that label.

I've also added some new stuff under the "Extended settings" category (in readme and script generator).

-Stu
Afrow UK is offline   Reply With Quote
Old 1st August 2004, 22:34   #36
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I've added some more features (mainly for registry support). I also fixed a few bugs in the Script-Generator.

I may write a small NSIS-based program to convert Zip's to NSIS Self-Extractor's too, as I'm opening a Half-Life mod map database soon, and I will be using my Self-Extractor as an extra download option for maps.

-Stu
Afrow UK is offline   Reply With Quote
Old 2nd August 2004, 01:35   #37
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
I may write a small NSIS-based program to convert Zip's to NSIS Self-Extractor's too
Are you going to use the ZipDLL plugin, or another program in combination with yours?

Quote:
I'm opening a Half-Life mod map database soon
How many databases and programs do you have for games?

I only have 1 program with a database and both are being redone from scratch now. But this program is not just a updater for the game, it makes several changes in game interface, besides of making easier for the user to select game patchs.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 2nd August 2004, 12:00   #38
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I'm not going to use ZipDLL, because last time I tried using it for my 'D-Day Zip Extractor' about 10% of the Zip's wouldn't extract. They weren't corrupt either (as WinZip and Windows Explorer could open them.)

I'm using 7-zip's command-line program, but it's a bit on the large side (500kb!)... so does anybody know of a small Zip decompressor program (which only does Zip.)
I've got pkunzip, but it only allows for short file names/paths which really won't do (program was written over 10 years ago!)

Cheers

-Stu
Afrow UK is offline   Reply With Quote
Old 2nd August 2004, 12:08   #39
flizebogen
Senior Member
 
Join Date: Jan 2002
Location: Berlin
Posts: 171
The unziper from the info-zip distro ist only 160 kb.

You can find it here as a whole package. http://sunsite.cnlab-switch.ch/ftp/m...2/unz551xN.exe

And i guess it's capable of LFN
flizebogen is offline   Reply With Quote
Old 2nd August 2004, 12:26   #40
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Thanks. I will try it out (W00T only 160kb!)

-Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump