mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-15 11:18:53 +01:00
Porting to new directory structure format (lowercase convention).
This commit is contained in:
parent
17a3ecd97f
commit
1b18117658
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
project (RetroFE)
|
||||
project (retrofe)
|
||||
|
||||
set(RETROFE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
set(RETROFE_THIRD_PARTY_DIR "${RETROFE_DIR}/ThirdParty")
|
||||
@ -171,9 +171,9 @@ set(LIBRARY_OUTPUT_PATH "${RETROFE_DIR}/Build" CACHE PATH "Build directory" FORC
|
||||
|
||||
|
||||
include_directories(${RETROFE_INCLUDE_DIRS})
|
||||
add_executable(RetroFE ${RETROFE_SOURCES} ${RETROFE_HEADERS})
|
||||
target_link_libraries(RetroFE ${RETROFE_LIBRARIES})
|
||||
set_target_properties(RetroFE PROPERTIES LINKER_LANGUAGE CXX)
|
||||
add_executable(retrofe ${RETROFE_SOURCES} ${RETROFE_HEADERS})
|
||||
target_link_libraries(retrofe ${RETROFE_LIBRARIES})
|
||||
set_target_properties(retrofe PROPERTIES LINKER_LANGUAGE CXX)
|
||||
if(MINGW)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -mwindows")
|
||||
endif()
|
||||
@ -190,9 +190,8 @@ if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /WX /MD")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP /WX /MD")
|
||||
|
||||
set_target_properties(RetroFE PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
|
||||
set_target_properties(retrofe PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
endif()
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ std::string CollectionInfo::GetName() const
|
||||
|
||||
std::string CollectionInfo::GetSettingsPath() const
|
||||
{
|
||||
return Configuration::GetAbsolutePath() + "/Collections/" + GetName();
|
||||
return Configuration::GetAbsolutePath() + "/collections/" + GetName();
|
||||
}
|
||||
|
||||
std::string CollectionInfo::GetListPath() const
|
||||
@ -98,6 +98,3 @@ void CollectionInfo::SortItems()
|
||||
{
|
||||
std::sort(Items.begin(), Items.end(), ItemIsLess);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -115,8 +115,8 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info)
|
||||
std::string path = info->GetListPath();
|
||||
std::map<std::string, Item *> includeFilter;
|
||||
std::map<std::string, Item *> excludeFilter;
|
||||
std::string includeFile = Configuration::GetAbsolutePath() + "/Collections/" + info->GetName() + "/Include.txt";
|
||||
std::string excludeFile = Configuration::GetAbsolutePath() + "/Collections/" + info->GetName() + "/Exclude.txt";
|
||||
std::string includeFile = Configuration::GetAbsolutePath() + "/collections/" + info->GetName() + "/include.txt";
|
||||
std::string excludeFile = Configuration::GetAbsolutePath() + "/collections/" + info->GetName() + "/exclude.txt";
|
||||
std::string launcher;
|
||||
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ bool MenuParser::GetMenuItems(CollectionInfo *collection)
|
||||
{
|
||||
bool retVal = false;
|
||||
//todo: magic string
|
||||
std::string menuFilename = Configuration::GetAbsolutePath() + "/Collections/" + collection->GetName() + "/Menu.xml";
|
||||
std::string menuFilename = Configuration::GetAbsolutePath() + "/collections/" + collection->GetName() + "/Menu.xml";
|
||||
rapidxml::xml_document<> doc;
|
||||
rapidxml::xml_node<> * rootNode;
|
||||
|
||||
|
||||
@ -109,8 +109,8 @@ bool MetadataDatabase::ImportDirectory()
|
||||
{
|
||||
DIR *dp;
|
||||
struct dirent *dirp;
|
||||
std::string hyperListPath = Configuration::GetAbsolutePath() + "/Meta/Hyperlist";
|
||||
std::string mameListPath = Configuration::GetAbsolutePath() + "/Meta/Mamelist";
|
||||
std::string hyperListPath = Configuration::GetAbsolutePath() + "/meta/hyperlist";
|
||||
std::string mameListPath = Configuration::GetAbsolutePath() + "/meta/Mamelist";
|
||||
|
||||
dp = opendir(hyperListPath.c_str());
|
||||
|
||||
@ -476,5 +476,3 @@ bool MetadataDatabase::ImportMameList(std::string filename, std::string collecti
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ Page *PageBuilder::BuildPage()
|
||||
std::string layoutFile;
|
||||
std::string layoutName = LayoutKey;
|
||||
|
||||
LayoutPath = Configuration::GetAbsolutePath() + "/Layouts/" + layoutName;
|
||||
LayoutPath = Configuration::GetAbsolutePath() + "/layouts/" + layoutName;
|
||||
layoutFile = LayoutPath + "/" + LayoutPage + ".xml";
|
||||
|
||||
Logger::Write(Logger::ZONE_INFO, "Layout", "Initializing " + layoutFile);
|
||||
@ -127,7 +127,7 @@ Page *PageBuilder::BuildPage()
|
||||
Config.SetProperty(fontPropertyKey, fontXml->value());
|
||||
|
||||
Font = Config.ConvertToAbsolutePath(
|
||||
Config.GetAbsolutePath() + "/Layouts/" + LayoutKey + "/",
|
||||
Config.GetAbsolutePath() + "/layouts/" + LayoutKey + "/",
|
||||
fontXml->value());
|
||||
|
||||
Logger::Write(Logger::ZONE_DEBUG, "Layout", "Layout font set to " + Font);
|
||||
|
||||
@ -58,20 +58,20 @@ int main(int /* argc */, char ** /* argv */)
|
||||
bool ImportConfiguration(Configuration *c)
|
||||
{
|
||||
std::string configPath = Configuration::GetAbsolutePath();
|
||||
std::string launchersPath = Configuration::GetAbsolutePath() + "/Launchers";
|
||||
std::string collectionsPath = Configuration::GetAbsolutePath() + "/Collections";
|
||||
std::string launchersPath = Configuration::GetAbsolutePath() + "/launchers";
|
||||
std::string collectionsPath = Configuration::GetAbsolutePath() + "/collections";
|
||||
DIR *dp;
|
||||
struct dirent *dirp;
|
||||
|
||||
if(!c->Import("", configPath + "/Settings.conf"))
|
||||
if(!c->Import("", configPath + "/settings.conf"))
|
||||
{
|
||||
Logger::Write(Logger::ZONE_ERROR, "RetroFE", "Could not import \"" + configPath + "/Settings.conf\"");
|
||||
Logger::Write(Logger::ZONE_ERROR, "RetroFE", "Could not import \"" + configPath + "/settings.conf\"");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!c->Import("controls", configPath + "/Controls.conf"))
|
||||
if(!c->Import("controls", configPath + "/controls.conf"))
|
||||
{
|
||||
Logger::Write(Logger::ZONE_ERROR, "RetroFE", "Could not import \"" + configPath + "/Settings.conf\"");
|
||||
Logger::Write(Logger::ZONE_ERROR, "RetroFE", "Could not import \"" + configPath + "/settings.conf\"");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ bool ImportConfiguration(Configuration *c)
|
||||
{
|
||||
std::string prefix = "collections." + std::string(dirp->d_name);
|
||||
|
||||
std::string settingsFile = collectionsPath + "/" + dirp->d_name + "/Settings.conf";
|
||||
std::string settingsFile = collectionsPath + "/" + dirp->d_name + "/settings.conf";
|
||||
|
||||
if(!c->Import(prefix, settingsFile))
|
||||
{
|
||||
@ -147,7 +147,7 @@ bool ImportConfiguration(Configuration *c)
|
||||
|
||||
bool StartLogging()
|
||||
{
|
||||
std::string logFile = Configuration::GetAbsolutePath() + "/Log.txt";
|
||||
std::string logFile = Configuration::GetAbsolutePath() + "/log.txt";
|
||||
|
||||
if(!Logger::Initialize(logFile))
|
||||
{
|
||||
@ -167,4 +167,3 @@ bool StartLogging()
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ int RetroFE::Initialize(void *context)
|
||||
|
||||
if(!instance->Input.Initialize()) return -1;
|
||||
|
||||
instance->Db = new DB(Configuration::GetAbsolutePath() + "/Meta.db");
|
||||
instance->Db = new DB(Configuration::GetAbsolutePath() + "/meta.db");
|
||||
|
||||
if(!instance->Db->Initialize())
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user