- NSIS Discussion
- determine license file on runtime?
Archive: determine license file on runtime?
Yathosho
18th September 2006 23:47 UTC
determine license file on runtime?
is there a way to determine the text-file on runtime? i thought i could include a dummy-text which gets overwritten by a file the installer reads in the onGUIInit function, but i didn't manage to do so. where to does the license get extracted to? is it possible?
Joel
19th September 2006 19:09 UTC
Do you mean read a license file from external? o.O
Yathosho
7th October 2006 18:00 UTC
any way to make the external license script work using the classic ui?
Yathosho
9th October 2006 21:36 UTC
i guess i just have to change this line
FindWindow $0 "#32770" "" $HWNDPARENT
what was that handy little tool that gives me handles (?) of windows?
JasonFriday13
10th October 2006 02:00 UTC
Try my CustomLicense plug-in. It is virtually a plugin version of the 'External License file' wiki page you found.
Yathosho
16th October 2006 17:16 UTC
hm, no examples on the wiki? is an io page necessary for this?
JasonFriday13
18th October 2006 02:10 UTC
You could use
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1000
CustomLicense::LoadFile "$PLUGINSDIR\yourlicensefile.txt" $0
in the show function of the license page (if it works). The CustomLicense plugin is identical to the external license file wiki example, but in plugin form (thus removing the need for the system plugin).
Yathosho
19th October 2006 21:13 UTC
cheers
Yathosho
2nd December 2006 20:22 UTC
so i'm using this code snippet now..
Page License "" PreLicense
Function PreLicense
ReadINIStr $1 "$PLUGINSDIR\pimp.ini" "Installer" "LicenseType"
IfFileExists "$PLUGINSDIR\license.$1" 0 +2
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1000
CustomLicense::LoadFile "$PLUGINSDIR\license.$1" $0
FunctionEnd
problem is that it doesn't display the whole license. any ideas?
Yathosho
2nd December 2006 21:22 UTC
alright, i found the problem: the it only displays as many characters as my dummy license. could you fix your plugin?
onad
4th December 2006 18:11 UTC
Fixing would be good, in the meantime use a bigger dummy file a helpful hint?
Takhir
4th December 2006 19:43 UTC
External License Script
Attached is script for 'basic' GUI.
kichik
5th December 2006 17:26 UTC
The plug-in needs to send EM_EXLIMITTEXT to the rich edit control to fix this problem.