CDkey prompting...

Ryan C. Gordon icculus at clutteredmind.org
Mon Mar 1 23:35:12 EST 2004


...Greg added a "please enter your CD key" dialog to carbon_ui at my
request when we shipped ut2003. I've just checked in code for gtk,
console, and dialog that does something equivalent.

To use it, add a "cdkey" attribute to your "install" tag:

   cdkey="System/cdkey.txt"

When you finalize your installation options and click the install button
(or whatever), you're prompted for a CD key. The installer will then run
a program called "vcdk-ARCH" that you supply and pass the entered key as
the only argument. If vcdk returns non-zero, it's a legit key,
otherwise, it should block for a few seconds (to prevent brute-forcing
of cdkeys) and return zero, in which case loki_setup prompts again.

Implementing vcdk is an exercise for the reader. It has to be this way,
because I can't link the CDkey validation routines with GPL'd code.

If you specify the cdkey attribute and don't include the vcdk program,
it's a fatal error. If you're installing to multiple architectures, you
should include multiple vcdk programs (vcdk-x86, vcdk-amd64, vcdk-ppc,
etc...this is based on the info->arch field).

The string of the entered cdkey is uppercased and written to the
filename you specified in the attribute if vcdk gives the go-ahead, and
then installation continues as normal.

--ryan.







More information about the Lokisetup mailing list