mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 17:58:53 +01:00
Build 0.7.3:
Added version number support in Version.cpp; this file should be updated for each new build. Added -version command line option so people can print the version of RetroFE without running the actual front-end.
This commit is contained in:
parent
9c15295a26
commit
3e62adcadd
@ -31,6 +31,32 @@ static bool StartLogging();
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
// check to see if version or help was requested
|
||||
if(argc > 1)
|
||||
{
|
||||
std::string program = argv[0];
|
||||
std::string param = argv[1];
|
||||
|
||||
if(argc == 3 && param == "-createcollection")
|
||||
{
|
||||
// Do nothing; we handle that later
|
||||
}
|
||||
else if(param == "-version")
|
||||
{
|
||||
std::cout << "RetroFE version " << Version::getString( ) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Usage:" << std::endl;
|
||||
std::cout << program << " Run RetroFE" << std::endl;
|
||||
std::cout << program << " -version Print the version of RetroFE." << std::endl;
|
||||
std::cout << program << " -createcollection <collection name> Create a collection directory structure." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize random seed
|
||||
srand(static_cast<unsigned int>(time(0)));
|
||||
|
||||
|
||||
@ -15,36 +15,16 @@
|
||||
*/
|
||||
|
||||
#include "Version.h"
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#ifndef RETROFE_VERSION_MAJOR
|
||||
#define RETROFE_VERSION_MAJOR 0
|
||||
#endif
|
||||
|
||||
#ifndef RETROFE_VERSION_MINOR
|
||||
#define RETROFE_VERSION_MINOR 0
|
||||
#endif
|
||||
std::string retrofe_version_major = "0";
|
||||
std::string retrofe_version_minor = "7";
|
||||
std::string retrofe_version_build = "3";
|
||||
|
||||
#ifndef RETROFE_VERSION_BUILD
|
||||
#define RETROFE_VERSION_BUILD 0
|
||||
#endif
|
||||
|
||||
#ifndef RETROFE_VERSION_PROD
|
||||
#define RETROFE_VERSION_BETA
|
||||
#endif
|
||||
|
||||
std::string Version::getString()
|
||||
{
|
||||
std::stringstream version;
|
||||
version << RETROFE_VERSION_MAJOR;
|
||||
version << ".";
|
||||
version << RETROFE_VERSION_MINOR;
|
||||
version << ".";
|
||||
version << RETROFE_VERSION_BUILD;
|
||||
|
||||
#ifdef RETROFE_VERSION_BETA
|
||||
version << "-beta";
|
||||
#endif
|
||||
|
||||
return version.str();
|
||||
std::string return_string = retrofe_version_major + "." + retrofe_version_minor + "." + retrofe_version_build;
|
||||
return return_string;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user