Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 1st August 2002, 12:06   #121
mlbl
Junior Member
 
Join Date: Jul 2002
Posts: 42
I've made a small UI. This is simply a modified version by moving around some of the buttons and text around so that it looks different.
Attached Files
File Type: zip newui.zip (913 Bytes, 159 views)
mlbl is offline   Reply With Quote
Old 1st August 2002, 12:18   #122
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Thanks mlbl, it will be included in the next version.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 1st August 2002, 14:15   #123
mlbl
Junior Member
 
Join Date: Jul 2002
Posts: 42
Minor Update.
Attached Files
File Type: zip newui2.zip (912 Bytes, 169 views)
mlbl is offline   Reply With Quote
Old 1st August 2002, 18:12   #124
RIV@NVX
Senior Member
 
RIV@NVX's Avatar
 
Join Date: Feb 2002
Location: Rijeka, Croatia
Posts: 396
Send a message via ICQ to RIV@NVX Send a message via AIM to RIV@NVX Send a message via Yahoo to RIV@NVX
I just can't add branding image to installer. Can someone write that part of code for me for NSIS 2.0a2 and post it in the forum? Tried macros, every suggestion, but image just doesn't show up.
RIV@NVX is offline   Reply With Quote
Old 1st August 2002, 18:55   #125
rainwater
Senior Member
 
Join Date: Aug 2000
Posts: 397
Send a message via ICQ to rainwater
I noticed using reshacker that nsis does not respect the size you give the 1018 control. You should document the minimum height/width so people understand they can't make that control too small.
rainwater is offline   Reply With Quote
Old 1st August 2002, 22:03   #126
SmartyMan
Member
 
Join Date: Jan 2002
Location: Germany
Posts: 79
Quote:
Originally posted by kichik
I have finished merging 1.99 with 2.0a1
Great, Ive downloaded and tested it a bit, here are some notes:

I really love the new license page using a RichEditCtrl and clickable URLs, great work

-------------

You said that I will get "my style" of branding images with the next update using ChangeUI and ResHacker, so here is what I have tried:

1. ChangeUI "...ui.exe", No AddBrandingImage, SetBrandingImage in .onNextPage
--> Height is adjusted correct, Width is adjusted incorrect, other controls are not moved out of the way (see branding1.png)

2. ChangeUI "...ui.exe", AddBrandingImage top 65, SetBrandingImage in .onNextPage
--> Selfmade control will not be used (you can see it on bottom of the branding image in branding2.png)

So how will I get the desired result (no margins, sunken border)?
Do I really have to create an own hand-sized ui.exe for every installer?

-------------

The strings "Extract", "Output directory" etc in the details-view cant be changed (e.g. for a german translation); I really would like to see some commands for that in one of your next updates.
BTW: if you need assistance for a build in german text collection, just ask me

-------------

At my first atempt to use the new SetCompressor command I got this:

Error: can't change compressor after data already got compressed or header already changed!
Error in script "G:\Programme\NSIS\NSISplus\NSISplus.nsi" on line 1 -- aborting creation process

The reason was the file nsisconf.nsi (included automatically by makeNSIS) because I had some definitions there that are the same for all my installers (checkbox icons etc).
I like the idea of having only one compiler exe, but maybe you should add a command line option for choosing the compressor, because otherwise the nsisconf.nsi is nearly useless.

-------------

When you published the V1.99, makensis.htm contained documentation of all the new features you builded in; the one that came with V2.0a2 doesnt, but you will update the docs soon, wont you?
Attached Files
File Type: zip screenshots.zip (17.9 KB, 152 views)
SmartyMan is offline   Reply With Quote
Old 2nd August 2002, 08:27   #127
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
RIV@NVX, please send in your code so I can look at it and see what's wrong.

rainwater, like I have said in one of my earlier posts: "It is recommended that you don't resize the middle rect."

SmartyMan, if you use your own UI you should move the controls your self using Resource Hacker. ChangeUI doesn't move them for you. To set the branding image for other than the default image control you need to specify the /IMGID= switch for SetBrandingImage.

I am working on the multilingual option for NSIS, and every string (log included? please give your opinion here) will be changable.

A command line switch to compile using bzip2 is /X"SetCompressor bzip2".

The documents are updated, I don't understand what you are talking about.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 2nd August 2002, 09:38   #128
RIV@NVX
Senior Member
 
RIV@NVX's Avatar
 
Join Date: Feb 2002
Location: Rijeka, Croatia
Posts: 396
Send a message via ICQ to RIV@NVX Send a message via AIM to RIV@NVX Send a message via Yahoo to RIV@NVX
XPStyle On
SetFont "Tahoma" 8
AddBrandingImage "Top" 167
!packhdr "DMX.dat" "C:\UPX\upx.exe --best --force --crp-ms=100000 DMX.dat"
!include "C:\Program Files\NSIS\Examples\branding.nsh"

;BGGradient Format ColorUp ColorDown InstallTitle (RRGGBB) Hex
;InstallColors Format Foreground Background (RRGGBB) Hex
BGGradient 00FF00 0000FF 505050
InstallColors 00FF00 000000
InstProgressFlags smooth colored

Function .onInit
SetOutPath "$TEMP"
File /oname=spltmp.bmp "splash.bmp"
File /oname=spltmp.exe "C:\Program Files\NSIS\Bin\splash.exe"
ExecWait '$TEMP\spltmp.exe 5000 $HWNDPARENT $TEMP\spltmp'
Delete "$TEMP\spltmp.exe"
Delete "$TEMP\spltmp.bmp"
!insertmacro BI_INIT $2
FunctionEnd

!insertmacro BI_LIST
!insertmacro BI_LIST_ADD "splash.bmp"
!insertmacro BI_LIST_END

Function .onNextPage
!insertmacro BI_NEXT
FunctionEnd

Function .onPrevPage
!insertmacro BI_PREV
FunctionEnd


Function BrandImage
GetTempFileName $1
SetOverwrite On
File /oname=$1 "splash.bmp"
SetOverwrite Off
SetBrandingImage "/IMGID=0" "/RESIZETOFIT" $1
SectionEnd

I tried everything, i do not want to switch images, but I thought that it could work...
RIV@NVX is offline   Reply With Quote
Old 2nd August 2002, 09:46   #129
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
If you want just one image you don't need any macro, all you need is:

PHP Code:
Function .onNextPage
   StrCmp $R0 1 image_already_set
Don't use $R0 anywhere else!
      GetTempFileName $1
      SetOverwrite on
      File /oname=$1
      SetOverwrite off ; or what ever it was before
      SetBrandingImage /RESIZETOFIT $1
      Delete $1
   image_already_set:
FunctionEnd 
Also /IMGID=0 doesn't mean use default, it means use control ID 0, and it doesn't exist if you created the image control with AddBrandingImage.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 2nd August 2002, 13:23   #130
RIV@NVX
Senior Member
 
RIV@NVX's Avatar
 
Join Date: Feb 2002
Location: Rijeka, Croatia
Posts: 396
Send a message via ICQ to RIV@NVX Send a message via AIM to RIV@NVX Send a message via Yahoo to RIV@NVX
It works (finally). Thanks a lot!!!
RIV@NVX is offline   Reply With Quote
Old 2nd August 2002, 14:31   #131
RIV@NVX
Senior Member
 
RIV@NVX's Avatar
 
Join Date: Feb 2002
Location: Rijeka, Croatia
Posts: 396
Send a message via ICQ to RIV@NVX Send a message via AIM to RIV@NVX Send a message via Yahoo to RIV@NVX
I just noticed a bug, not sure if anyone mentioned it exactly. If I use ChangeUI command with BZIP2 compression, makensis.exe crashes.
I use WinXP, no service packs.
RIV@NVX is offline   Reply With Quote
Old 2nd August 2002, 15:08   #132
mlbl
Junior Member
 
Join Date: Jul 2002
Posts: 42
Agreed. It does crash, but only if you use the command line to set the compressor as opposed to adding "SetCompressor bzip2" into your .nsi file.
mlbl is offline   Reply With Quote
Old 2nd August 2002, 15:30   #133
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Thanks RIV@NVX, it was indeed a bug (forgot an equality sign in DialogTemplate.cpp). The crash occours if you change to a UI without a branding image. I have uploaded a fixed version to the CVS.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 2nd August 2002, 17:41   #134
RIV@NVX
Senior Member
 
RIV@NVX's Avatar
 
Join Date: Feb 2002
Location: Rijeka, Croatia
Posts: 396
Send a message via ICQ to RIV@NVX Send a message via AIM to RIV@NVX Send a message via Yahoo to RIV@NVX
Can I add image to uninstaller? Can I use the same code like before and what switches should I change?
RIV@NVX is offline   Reply With Quote
Old 2nd August 2002, 17:57   #135
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Because the installer and the uninstaller use the same UI, if you add an image to the installer the uninstaller will have one too. To set the image just add un before .onNextPage in the code I gave you above.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 2nd August 2002, 19:40   #136
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
Wink

mmh, was just wondering if that works with nsis2 already =)
Yathosho 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