Archive: determine license file on runtime?


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?


Do you mean read a license file from external? o.O


forum search? :) http://forums.winamp.com/showthread....77#post2005177


any way to make the external license script work using the classic ui?


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?


Try my CustomLicense plug-in. It is virtually a plugin version of the 'External License file' wiki page you found.


hm, no examples on the wiki? is an io page necessary for this?


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).

cheers


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?

alright, i found the problem: the it only displays as many characters as my dummy license. could you fix your plugin?


Fixing would be good, in the meantime use a bigger dummy file a helpful hint?


External License Script
Attached is script for 'basic' GUI.


The plug-in needs to send EM_EXLIMITTEXT to the rich edit control to fix this problem.