mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-28 02:30:05 +00:00
Projucer: add free-to-use license for the live-build engine
This commit is contained in:
parent
4aa0f311e0
commit
8d02f61622
4 changed files with 23 additions and 6 deletions
|
|
@ -286,6 +286,13 @@ private:
|
|||
{
|
||||
parentDialog->exitModalState (0);
|
||||
ProjucerApplication::getApp().updateAllBuildTabs();
|
||||
|
||||
if (ProjucerLicenses::getInstance()->hasFreeToUseLicense())
|
||||
{
|
||||
AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
|
||||
"Free to use license info",
|
||||
"The free-to-use license expires on 31st January 2017 Midnight GMT");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,11 @@ struct ProjucerLicenses : private DeletedAtShutdown
|
|||
return isDLLPresent() && dll.projucer_hasLiveCodingLicence();
|
||||
}
|
||||
|
||||
bool hasFreeToUseLicense() const
|
||||
{
|
||||
return isDLLPresent() && dll.projucer_hasLicense ("ProjucerFreeToUse");
|
||||
}
|
||||
|
||||
bool retryLoadDll()
|
||||
{
|
||||
dll.tryLoadDll();
|
||||
|
|
|
|||
|
|
@ -550,16 +550,21 @@ Component* ProjectContentComponent::createBuildTab (CompileEngineChildProcess* c
|
|||
|
||||
const auto& unlockStatus = *ProjucerLicenses::getInstance();
|
||||
|
||||
if (! unlockStatus.isLoggedIn())
|
||||
return createDisabledBuildTabSubscribe ("Sign in with your ROLI account",
|
||||
false, unlockStatus.isDLLPresent());
|
||||
|
||||
if (! unlockStatus.hasLiveCodingLicence())
|
||||
return createDisabledBuildTabSubscribe(unlockStatus.isLoggedIn(),
|
||||
unlockStatus.isDLLPresent());
|
||||
return createDisabledBuildTabSubscribe ("Subscribe to JUCE Pro or Indie",
|
||||
true, unlockStatus.isDLLPresent());
|
||||
|
||||
jassert (unlockStatus.isLoggedIn());
|
||||
jassert (unlockStatus.isDLLPresent());
|
||||
return new EnableBuildComp();
|
||||
};
|
||||
}
|
||||
|
||||
Component* ProjectContentComponent::createDisabledBuildTabSubscribe(bool loggedIn, bool dllPresent)
|
||||
Component* ProjectContentComponent::createDisabledBuildTabSubscribe(String textPrefix,
|
||||
bool loggedIn, bool dllPresent)
|
||||
{
|
||||
bool showSubscribeButton = true;
|
||||
bool showSignInButton = dllPresent && ! loggedIn;
|
||||
|
|
@ -567,7 +572,7 @@ Component* ProjectContentComponent::createDisabledBuildTabSubscribe(bool loggedI
|
|||
bool showDownloadButton = ! dllPresent;
|
||||
|
||||
return new ProjucerDisabledComp (
|
||||
"Subscribe to JUCE Pro or Indie to use the Projucer's live-build features:",
|
||||
textPrefix + " to use the Projucer's live-build features:",
|
||||
loggedIn, showSubscribeButton, showSignInButton, showSwitchAccountButton, showDownloadButton);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ private:
|
|||
void timerCallback() override;
|
||||
|
||||
Component* createBuildTab (CompileEngineChildProcess*);
|
||||
Component* createDisabledBuildTabSubscribe (bool loggedIn, bool dllPresent);
|
||||
Component* createDisabledBuildTabSubscribe (String textPrefix, bool loggedIn, bool dllPresent);
|
||||
Component* createDisabledBuildTabInfoOnly (const char* messsage);
|
||||
|
||||
bool isContinuousRebuildEnabled() { return getAppSettings().getGlobalProperties().getBoolValue ("continuousRebuild", true); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue