mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-24 11:55:28 -04:00
032a1af96b
git-svn-id: svn://localhost@1103 8062f311-0dae-4547-b526-b8ab9ac864a5
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
#include "CompilationChecker.h"
|
|
#include "GDCore/Tools/Version.h"
|
|
#include "GDCore/Tools/VersionWrapper.h"
|
|
#include "GDCore/CommonTools.h"
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
using namespace gd;
|
|
|
|
bool CompilationChecker::EnsureCorrectGDVersion()
|
|
{
|
|
string versionString = ToString(VersionWrapper::Major()) + ", " + ToString(VersionWrapper::Minor()) + ", " +
|
|
ToString(VersionWrapper::Build()) + ", " + ToString(VersionWrapper::Revision());
|
|
|
|
if (versionString != GDCore_RC_FILEVERSION_STRING)
|
|
{
|
|
char beep = 7;
|
|
cout << endl;
|
|
cout << "-- WARNING ! --" << beep << endl;
|
|
cout << "Compiled with a different version of GDCpp." << endl;
|
|
cout << "GDCpp DLL Version :" << versionString << endl;
|
|
cout << "Compiled with version :" << GDCore_RC_FILEVERSION_STRING << endl;
|
|
cout << "---------------" << endl;
|
|
|
|
return false;
|
|
}
|
|
|
|
if ( !VersionWrapper::CompiledForEdittime() )
|
|
{
|
|
char beep = 7;
|
|
std::cout << std::endl;
|
|
std::cout << "-- ERROR ! --" << beep << std::endl;
|
|
std::cout << "GDCpp build mismatch:" << std::endl;
|
|
std::cout << "IDE is using GDCpp without edittime support!" << std::endl;
|
|
std::cout << "---------------" << std::endl;
|
|
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|