Add an additional nag screen: open the website whenever they start

the program, if it's unregistered and the trial period has expired.

[git-p4: depot-paths = "//depot/solvespace/": change = 2039]
This commit is contained in:
Jonathan Westhues 2009-09-29 04:47:48 -08:00
parent f7f73bc900
commit 308ef7e345

View File

@ -29,6 +29,13 @@ void SolveSpace::CheckLicenseFromRegistry(void) {
const int SECONDS_IN_DAY = 60*60*24;
license.trialDaysRemaining = 30 -
(int)(((now - license.firstUse))/SECONDS_IN_DAY);
if((!license.licensed) && (license.trialDaysRemaining < 0)) {
Message("The 30-day demo has expired. All exported content will "
"contain a message noting that it was generated by an "
"unregistered version of SolveSpace.");
OpenWebsite("http://solvespace.com/buyunreg");
}
}
void SolveSpace::Init(char *cmdLine) {