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 # enter 0 attract mode, otherwise enter the number of seconds to wait before enabling attract mode
attractModeTime = 45 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 # Base folders of media and ROM files
####################################### #######################################
baseMediaPath=../Media # Override if you choose to have your media stored outside of RetroFE.
baseItemPath=../ROMs # 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) cmake_minimum_required (VERSION 2.8)
project (RetroFE) project (retrofe)
set(RETROFE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) set(RETROFE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
set(RETROFE_THIRD_PARTY_DIR "${RETROFE_DIR}/ThirdParty") set(RETROFE_THIRD_PARTY_DIR "${RETROFE_DIR}/ThirdParty")
@ -35,7 +35,7 @@ if(WIN32)
find_package(SDL2_ttf REQUIRED) find_package(SDL2_ttf REQUIRED)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
else() else()
include(FindPkgConfig) include(FindPkgConfig)
pkg_search_module(SDL2 REQUIRED sdl2) pkg_search_module(SDL2 REQUIRED sdl2)
pkg_search_module(SDL2_IMAGE REQUIRED SDL2_image) pkg_search_module(SDL2_IMAGE REQUIRED SDL2_image)
pkg_search_module(SDL2_MIXER REQUIRED SDL2_mixer) pkg_search_module(SDL2_MIXER REQUIRED SDL2_mixer)
@ -171,9 +171,9 @@ set(LIBRARY_OUTPUT_PATH "${RETROFE_DIR}/Build" CACHE PATH "Build directory" FORC
include_directories(${RETROFE_INCLUDE_DIRS}) include_directories(${RETROFE_INCLUDE_DIRS})
add_executable(RetroFE ${RETROFE_SOURCES} ${RETROFE_HEADERS}) add_executable(retrofe ${RETROFE_SOURCES} ${RETROFE_HEADERS})
target_link_libraries(RetroFE ${RETROFE_LIBRARIES}) target_link_libraries(retrofe ${RETROFE_LIBRARIES})
set_target_properties(RetroFE PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(retrofe PROPERTIES LINKER_LANGUAGE CXX)
if(MINGW) if(MINGW)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -mwindows") set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -mwindows")
endif() endif()
@ -189,10 +189,9 @@ if(MSVC)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /WX /MD") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /WX /MD")
set(CMAKE_C_FLAGS "${CMAKE_C_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() else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif() endif()

View File

@ -51,7 +51,7 @@ std::string CollectionInfo::GetName() const
std::string CollectionInfo::GetSettingsPath() const std::string CollectionInfo::GetSettingsPath() const
{ {
return Configuration::GetAbsolutePath() + "/Collections/" + GetName(); return Configuration::GetAbsolutePath() + "/collections/" + GetName();
} }
std::string CollectionInfo::GetListPath() const std::string CollectionInfo::GetListPath() const
@ -98,6 +98,3 @@ void CollectionInfo::SortItems()
{ {
std::sort(Items.begin(), Items.end(), ItemIsLess); std::sort(Items.begin(), Items.end(), ItemIsLess);
} }

View File

@ -115,8 +115,8 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info)
std::string path = info->GetListPath(); std::string path = info->GetListPath();
std::map<std::string, Item *> includeFilter; std::map<std::string, Item *> includeFilter;
std::map<std::string, Item *> excludeFilter; std::map<std::string, Item *> excludeFilter;
std::string includeFile = Configuration::GetAbsolutePath() + "/Collections/" + info->GetName() + "/Include.txt"; std::string includeFile = Configuration::GetAbsolutePath() + "/collections/" + info->GetName() + "/include.txt";
std::string excludeFile = Configuration::GetAbsolutePath() + "/Collections/" + info->GetName() + "/Exclude.txt"; std::string excludeFile = Configuration::GetAbsolutePath() + "/collections/" + info->GetName() + "/exclude.txt";
std::string launcher; std::string launcher;

View File

@ -43,7 +43,7 @@ bool MenuParser::GetMenuItems(CollectionInfo *collection)
{ {
bool retVal = false; bool retVal = false;
//todo: magic string //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_document<> doc;
rapidxml::xml_node<> * rootNode; rapidxml::xml_node<> * rootNode;

View File

@ -198,8 +198,8 @@ bool Configuration::GetProperty(std::string key, std::string &value)
{ {
bool retVal = GetRawProperty(key, value); bool retVal = GetRawProperty(key, value);
std::string baseMediaPath; std::string baseMediaPath = GetAbsolutePath();
std::string baseItemPath; std::string baseItemPath = GetAbsolutePath();
std::string collectionName; std::string collectionName;
GetRawProperty("baseMediaPath", baseMediaPath); 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) 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; std::string key = "media." + collectionName + "." + mediaType;
// use user-overridden setting if it exists
if(GetPropertyAbsolutePath(key, value)) if(GetPropertyAbsolutePath(key, value))
{ {
return; return;
} }
// use user-overridden base media path if it was specified
std::string baseMediaPath; std::string baseMediaPath;
if(!GetPropertyAbsolutePath("baseMediaPath", 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") if(mediaType == "manufacturer")
{ {
value = baseMediaPath + "/_Manufacturer"; value = baseMediaPath + "/_manufacturer";
}
else if(system)
{
value = baseMediaPath + "/" + collectionName + "/system_artwork";
} }
else 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; 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 PropertyPrefixExists(std::string key);
bool GetPropertyAbsolutePath(std::string key, std::string &value); 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, std::string &value);
void GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, bool system, std::string &value);
void GetCollectionAbsolutePath(std::string collectionName, std::string &value); void GetCollectionAbsolutePath(std::string collectionName, std::string &value);
bool IsVerbose() const; bool IsVerbose() const;
void SetVerbose(bool verbose); void SetVerbose(bool verbose);

View File

@ -109,8 +109,8 @@ bool MetadataDatabase::ImportDirectory()
{ {
DIR *dp; DIR *dp;
struct dirent *dirp; struct dirent *dirp;
std::string hyperListPath = Configuration::GetAbsolutePath() + "/Meta/Hyperlist"; std::string hyperListPath = Configuration::GetAbsolutePath() + "/meta/hyperlist";
std::string mameListPath = Configuration::GetAbsolutePath() + "/Meta/Mamelist"; std::string mameListPath = Configuration::GetAbsolutePath() + "/meta/Mamelist";
dp = opendir(hyperListPath.c_str()); dp = opendir(hyperListPath.c_str());
@ -476,5 +476,3 @@ bool MetadataDatabase::ImportMameList(std::string filename, std::string collecti
return true; return true;
} }

View File

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

View File

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

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