Archive: License Agreement Add Print Button


License Agreement Add Print Button
Hello,

i'm novice :(
How can put a print button in the license page with EXPERIENCEUI .

Thx all.


You'll have to add your own button to the license page with Resource Hacker (modify UIs\modern.exe).
You will then have to use the ButtonEvent plug-in to execute a function with the code at the bottom of this page:

http://forums.winamp.com/showthread.php?threadid=228334

Stu


Hi,

i am new to NSIS. and trying to add a Print button on the license page, but i am not able to identify the License page.

http://forums.winamp.com/showthread.php?threadid=228334

referring to the above link, says that :
[Field 5]
Type=Button
Flags=NOTIFY
Text=&Print License
Left=240
Right=-10
Top=123
Bottom=137

has to be added but where to add ....:confused: ??

code snippet from setup.nsi is as below:
...
...
Page custom InstallTypePageCreate InstallTypePageLeave
!insertmacro MUI_PAGE_LICENSE "$(license_txt)"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
...
...

i could also locate License.nsh which actually has MUI_PAGE_LICENSE defined, but nothing like the Button field code. i believe that Button field should be added in a License.ini file but this file non-existing at the moment.

pls let me know in case you need any other info.
kindly advise/help.

many thanks
Manu:up:


The license page isn't made with InstallOptions! You need to add a button using Resource Hacker and then you can use the ButtonEvent plugin to assign a function to it. In there you would need to extract the license file and then ExecShell print file.rtf to print it.

Stu


Stu... sorry for coming back to you so late.
forgive my ignorance, but how do i do add a button using resource hacker and use a ButtonEvent plugin thereafter ?
could you please be more elaborate?

many thanks
Manohar


Go download Resource Hacker, open up Contrib\UIs\modern.exe and add your button to either dialog 108 or 109 (you should be able to work that one out). Make sure you give it an Id unique to the dialog. Save as a new file in your installer script's folder and add !define MUI_UI file.exe to the script.

The ButtonEvent plugin has a readme.

Stu


i have tried making the change using resource hacker to the NSIS-src\Examples\Modern UI\Basic.exe, added a button in there and compiled, saved as Basic_new.exe
However, when i tried opening Basic_new.exe, popped up a error: "Installer integrity check has failed. Common...Blah Blah"

clues?

thanks for helping.
ManU


No you don't modify the built installer executable. Read my post again!

Stu


I have done exactly the way explained above, this time changed \NSIS\Contrib\UIs\modern.exe and added button.
The resulting .exe was saved as new.exe in the folder where setup.nsi is present. Below is the extract of setup.nsi:

...
...
Page custom InstallTypePageCreate InstallTypePageLeave
!define MUI_UI new.exe
!define MUI_LICENSEPAGE_RADIOBUTTONS
!define MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT "I Agree to the license agreement."
!define MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE "I do not Agree to the license agreement."
!insertmacro MUI_PAGE_LICENSE "$(license_txt)"
...
...

but with the above code, building it fails with message:
!define: "MUI_UI" already defined!
Error in script "winst\setup.nsi" on line 60 -- aborting creation process
Done Adding Additional Store
SignTool Error: ISignedCode::Sign returned error: 0x80070008
Not enough storage is available to process this command.
SignTool Error: An error occurred while attempting to sign: setup.exe

pls help.
thanks.


Well what does the error say?

!define: "MUI_UI" already defined!
Error in script "winst\setup.nsi" on line 60 -- aborting creation process

Stu


correct, that's the exact error message...


Hi Stu, any luck with this problem? could you offer any expert advice ?

cheers
Manu..