Archive: LicenseData x 2


LicenseData x 2
Hey all :) Our legal department just finished with the license agreement and its huge :( The .txt file is about 47k which is over the 32k limit for the LicenseData attribute.

The reason the license is so big is because the project is a joint venture between ourselves and another company, so there is basically 2 license agreements in the one .txt file.

Is there anyway I can either: -
a) Use a .txt file over 32k
b) Display the two agreements seperately
c) Any other suggestions? Have read about Install Options, is
that any use to me?

Thanks everybody :)


Sack the lawyers and start over...??? :D :D


Yeah thats #($*ing helpful :mad: Anybody got any 'practical' solutions?


you could develop your own plugin that will display the license file over 32kb use use it instead of normal license window !:D


no can do, my c isnt good enough :(


From script.cpp starting with line 551

case TOK_LICENSEDATA:
if (build_header.licensedata_ptr != -1)
{
warning("LicenseData: specified multiple times, wasting space (%s:%d)",curfilename,linecnt);
}
#ifdef NSIS_CONFIG_SILENT_SUPPORT
if (build_header.common.silent_install)
{
warning("LicenseData: SilentInstall enabled, wasting space (%s:%d)",curfilename,linecnt);
}
#endif
{
char data[32768];
FILE *fp;
int datalen;
fp=fopen(line.gettoken_str(1),"rb");
if (!fp)
{
ERROR_MSG("LicenseData: open failed \"%s\"\n",line.gettoken_str(1));
PRINTHELP()
}
datalen=fread(data,1,32767,fp);
if (!feof(fp))
{
ERROR_MSG("LicenseData: license must be < 32 kilobytes.\n");
fclose(fp);
return PS_ERROR;
}
fclose(fp);
data[datalen]=0;
build_header.licensedata_ptr=add_string_main(data,0);
SCRIPT_MSG("LicenseData: \"%s\" \n",line.gettoken_str(1));
}
return make_sure_not_in_secorfunc(line.gettoken_str(0));





Change 32768 to whatever size you want and recompile the source. I think that's all you'd need to change.


Oh and note that in the fread line...

datalen=fread(data,1,32767,fp);

You should make that datalen=fread(data,1,(YOUR_SIZE - 1),fp);


As far as I know, you can't use that solution because you are limited to 32k in the textbox.


You could use installoptions to display the second and/or third pages...

-Justin


how would i go about that? the textfield is only for input and the label isnt big enough and doesnt scroll :(


Originally posted by rainwater
As far as I know, you can't use that solution because you are limited to 32k in the textbox.
Thats right (AFAIK).
I would prefer NSIS using the RichEditCtrl - not only because there is no size limit but for things like making URLs look like those (blue and underlined, mouse becomes hand when upon the link).

For the "installer size maniacs": both the EditCtrl and the RichEditCtrl are used directly from windows, so using .rtf would not increase the size of the installers.

Compatibility to existing .nsi projects is also given, since the RichEditCtrl can of cause load .txt files.

Well SmartyMan it is opensource so do you think you could knock something together?


Another idea, not the nice solution of putting it in the lisense textbox but it works already without modifications:

create an exe that displays the thing nicely. Then execwait this exe and check the return code: 0 if not accepted and 1 if accepted...

Just an idea...

-Hendri.


A rich text box would be a very nice feature :) Maybe for 2.0


Originally posted by Cyric
Well SmartyMan it is opensource so do you think you could knock something together?
...and do all the work again with the next update?
No way.
I would eventually work on these sources, if there where a guarantee that my workwill be taken over in the next official release.

Another option would be to NOT have the license info in the installer. Instead display the license agreement in an opening dialog of the app. User has to agree to it or exit. Since the license info is obviously important to the company (47k worth of important!) they could also display it in the About dialog or something.

Just a thought.

-mmullikin

:( Sorry about the "sack the lawyers" line in my first reply - I was just trying to bring a little levity to an otherwise bad situation.


bad idea
who reads a license agreement bigger than 32k ??????


Gombok,

reading is up to the user! For legal reasons, you have to display all of the agreement the user is about to sign with or without reading!

-Hendri.


Nope.

Originally posted by rainwater
As far as I know, you can't use that solution because you are limited to 32k in the textbox.
That's only for user input, you can throw just about as much data as you want into the box in the program. The problem I was running into then was running out of stack space, so I changed the compiler's settings to reserve 4 mb of virtual memory and 2 mb of physical memory for stack space. I then was able to use a license data file of 913 kb without any problems. Sure it's quite excessive as to the memory allocation, but it does allow you to use about as large a license file as you want.