1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-30 02:50:05 +00:00

Projucer: Define current version when saving projects and check for outdated projects

This commit is contained in:
ed 2019-08-15 11:23:34 +01:00
parent a522312b47
commit a45fd2657c

View file

@ -458,7 +458,9 @@ private:
<< newLine
<< "// END SECTION A" << newLine
<< newLine
<< "#define JUCE_USE_DARK_SPLASH_SCREEN " << (project.getSplashScreenColourString() == "Dark" ? "1" : "0") << newLine;
<< "#define JUCE_USE_DARK_SPLASH_SCREEN " << (project.getSplashScreenColourString() == "Dark" ? "1" : "0") << newLine
<< newLine
<< "#define JUCE_PROJUCER_VERSION 0x" << String::toHexString (ProjectInfo::versionNumber) << newLine;
out << newLine
<< "//==============================================================================" << newLine;
@ -556,6 +558,15 @@ private:
out << CodeHelpers::createIncludeStatement (project.getBinaryDataHeaderFile(), appConfigFile) << newLine;
out << newLine
<< "#if defined (JUCE_PROJUCER_VERSION) && JUCE_PROJUCER_VERSION < JUCE_VERSION" << newLine
<< " /** If you've hit this error then the version of the Projucer that was used to generate this project is" << newLine
<< " older than the version of the JUCE modules being included. To fix this error, re-save your project" << newLine
<< " using the latest version of the Projucer or, if you aren't using the Projucer to manage your project," << newLine
<< " remove the JUCE_PROJUCER_VERSION define from the AppConfig.h file." << newLine
<< " */" << newLine
<< " #error \"This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error.\"" << newLine
<< "#endif" << newLine
<< newLine
<< "#if ! DONT_SET_USING_JUCE_NAMESPACE" << newLine
<< " // If your code uses a lot of JUCE classes, then this will obviously save you" << newLine
<< " // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE." << newLine