Merge with lowercase directories

This commit is contained in:
emb 2015-02-25 22:49:58 -06:00
commit cae0198bf9
103 changed files with 75 additions and 53 deletions

View File

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 185 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -41,14 +41,13 @@ exitOnFirstPageBack = yes
# enter 0 attract mode, otherwise enter the number of seconds to wait before enabling attract mode
attractModeTime = 45
#######################################
# Debugging
#######################################
# do not set to "yes" unless you want your hard drive to quickly fill up
debug.logfps = no
#######################################
# Base folders of media and ROM files
#######################################
baseMediaPath=../Media
baseItemPath=../ROMs
# Override if you choose to have your media stored outside of RetroFE.
# If this is commented out your artwork will be searched in collections/<collectionname>/<imagetype>
# baseMediaPath=d:/media
# Override if you choose to have your ROMs stored outside of RetroFE.
# If this is commented out your roms will be searched in collections/<collectionname>/roms
# baseItemPath=d:/roms

View File

@ -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()

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -198,8 +198,8 @@ bool Configuration::GetProperty(std::string key, std::string &value)
{
bool retVal = GetRawProperty(key, value);
std::string baseMediaPath;
std::string baseItemPath;
std::string baseMediaPath = GetAbsolutePath();
std::string baseItemPath = GetAbsolutePath();
std::string collectionName;
GetRawProperty("baseMediaPath", baseMediaPath);
@ -340,26 +340,40 @@ bool Configuration::GetPropertyAbsolutePath(std::string key, std::string &value)
}
void Configuration::GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, std::string &value)
{
return GetMediaPropertyAbsolutePath(collectionName, mediaType, false, value);
}
void Configuration::GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, bool system, std::string &value)
{
std::string key = "media." + collectionName + "." + mediaType;
// use user-overridden setting if it exists
if(GetPropertyAbsolutePath(key, value))
{
return;
}
// use user-overridden base media path if it was specified
std::string baseMediaPath;
if(!GetPropertyAbsolutePath("baseMediaPath", baseMediaPath))
{
baseMediaPath = "Media";
// base media path was not specified, assume media files are in the collection
baseMediaPath = GetAbsolutePath() + "/collections";
}
if(mediaType == "manufacturer")
{
value = baseMediaPath + "/_Manufacturer";
value = baseMediaPath + "/_manufacturer";
}
else if(system)
{
value = baseMediaPath + "/" + collectionName + "/system_artwork";
}
else
{
value = baseMediaPath + "/" + collectionName + "/" + Utils::UppercaseFirst(Utils::ToLower(mediaType));
value = baseMediaPath + "/" + collectionName + "/medium_artwork/" + mediaType;
}
}
@ -373,12 +387,14 @@ void Configuration::GetCollectionAbsolutePath(std::string collectionName, std::s
}
std::string baseItemPath;
if(!GetPropertyAbsolutePath("baseItemPath", baseItemPath))
if(GetPropertyAbsolutePath("baseItemPath", baseItemPath))
{
baseItemPath = "Assets";
value = baseItemPath + "/" + collectionName;
return;
}
value = baseItemPath + "/" + collectionName;
value = GetAbsolutePath() + "/collections/" + collectionName + "/roms";
}

View File

@ -43,6 +43,7 @@ public:
bool PropertyPrefixExists(std::string key);
bool GetPropertyAbsolutePath(std::string key, std::string &value);
void GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, std::string &value);
void GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, bool system, std::string &value);
void GetCollectionAbsolutePath(std::string collectionName, std::string &value);
bool IsVerbose() const;
void SetVerbose(bool verbose);

View File

@ -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;
}

View File

@ -200,18 +200,25 @@ void ReloadableMedia::ReloadTexture()
if(!LoadedComponent)
{
std::string imagePath;
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), Type, imagePath);
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), Type, false, imagePath);
ImageBuilder imageBuild;
LoadedComponent = imageBuild.CreateImage(imagePath, imageBasename, ScaleX, ScaleY);
if(!LoadedComponent)
{
Config.GetMediaPropertyAbsolutePath(imageBasename, Type, true, imagePath);
LoadedComponent = imageBuild.CreateImage(imagePath, Type, ScaleX, ScaleY);
}
if (LoadedComponent != NULL)
{
LoadedComponent->AllocateGraphicsMemory();
GetBaseViewInfo()->SetImageWidth(LoadedComponent->GetBaseViewInfo()->GetImageWidth());
GetBaseViewInfo()->SetImageHeight(LoadedComponent->GetBaseViewInfo()->GetImageHeight());
}
}
if(!LoadedComponent && TextFallback)

View File

@ -686,9 +686,15 @@ bool ScrollingList::AllocateTexture(ComponentItemBinding *s)
Component *t = NULL;
ImageBuilder imageBuild;
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), ImageType, imagePath);
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), ImageType, false, imagePath);
t = imageBuild.CreateImage(imagePath, item->GetName(), ScaleX, ScaleY);
if(!t)
{
Config.GetMediaPropertyAbsolutePath(item->GetName(), ImageType, true, imagePath);
t = imageBuild.CreateImage(imagePath, ImageType, ScaleX, ScaleY);
}
if(!t && item->GetTitle() != item->GetFullTitle())
{
t = imageBuild.CreateImage(imagePath, item->GetFullTitle(), ScaleX, ScaleY);

Some files were not shown because too many files have changed in this diff Show More