Compare commits

...

5 commits

Author SHA1 Message Date
Justin Kinnaird
6720b542c3
Merge c930587250 into 81c62c97ee 2024-08-13 01:02:41 +09:00
pjft
81c62c97ee
Merge pull request #880 from o-p-a/help-fullscreen-borderless
help text for option --fullscreen-borderless
2024-07-15 11:00:12 +01:00
opa
75c01f73ab help text for option --fullscreen-borderless 2024-07-12 23:44:54 +09:00
Justin Kinnaird
c930587250 chore: Add "resources" to make install 2019-11-17 12:08:32 -06:00
Justin Kinnaird
d083efb4ab feat: do resource lookups in standard directories
For Linux, this includes the following directories:
* <HOME>/.local/share/<APPNAME>
* /usr/local/share/<APPNAME>
* /usr/share/<APPNAME>
2019-11-17 12:08:12 -06:00
4 changed files with 30 additions and 2 deletions

View file

@ -23,6 +23,11 @@ endif()
project(emulationstation-all)
# program name to be used as a reference when looking up resources
set(AppDataName "EmulationStation" CACHE STRING "Internal program name passed to compiler")
add_definitions(-DAPPDATANAME="${AppDataName}")
#-------------------------------------------------------------------------------
#add local find scripts to CMAKE path
LIST(APPEND CMAKE_MODULE_PATH
@ -277,6 +282,9 @@ set(dir ${CMAKE_CURRENT_SOURCE_DIR})
set(EXECUTABLE_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
set(LIBRARY_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
# install rules for resources
include(GNUInstallDirs)
install(DIRECTORY resources DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${AppDataName}/resources")
#-------------------------------------------------------------------------------
# add each component

View file

@ -144,10 +144,11 @@ endif()
#-------------------------------------------------------------------------------
# set up CPack install stuff so `make install` does something useful
include(GNUInstallDirs)
install(TARGETS emulationstation
RUNTIME
DESTINATION bin)
DESTINATION "${CMAKE_INSTALL_BINDIR}")
INCLUDE(InstallRequiredSystemLibraries)

View file

@ -180,6 +180,7 @@ bool parseArgs(int argc, char* argv[])
"--screensize WIDTH HEIGHT for a canvas smaller than the full resolution,\n"
" or if rotating into portrait mode\n"
"--screenoffset X Y move the canvas by x,y pixels\n"
"--fullscreen-borderless borderless fullscreen window\n"
"--windowed not fullscreen, should be used with --resolution\n"
"\nGame and settings visibility in ES and behaviour of ES:\n"
"--force-disable-filters force the UI to ignore applied filters on\n"

View file

@ -3,6 +3,10 @@
#include "utils/FileSystemUtil.h"
#include <fstream>
#ifndef APPDATANAME
#define APPDATANAME "EmulationStation"
#endif
auto array_deleter = [](unsigned char* p) { delete[] p; };
auto nop_deleter = [](unsigned char* /*p*/) { };
@ -27,6 +31,20 @@ std::string ResourceManager::getResourcePath(const std::string& path) const
{
std::string test;
// check in standard AppData locations
#if defined(__linux__)
test = Utils::FileSystem::getHomePath() + "/.local/share/" + APPDATANAME + "/resources/" + &path[2];
if (Utils::FileSystem::exists(test))
return test;
test = std::string("/usr/local/share/") + APPDATANAME + "/resources/" + &path[2];
if (Utils::FileSystem::exists(test))
return test;
test = std::string("/usr/share/") + APPDATANAME + "/resources/" + &path[2];
if (Utils::FileSystem::exists(test))
return test;
#endif
// check in homepath
test = Utils::FileSystem::getHomePath() + "/.emulationstation/resources/" + &path[2];
if(Utils::FileSystem::exists(test))