diff --git a/.gitignore b/.gitignore index 00cfb8ae4..582de14f3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ # Compiled Dynamic libraries *.so +*.dylib # Windows Dynamic-link libraries *.[dD][lL][lL] diff --git a/CMakeLists.txt b/CMakeLists.txt index ca041dc54..d9d9c71f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -247,10 +247,16 @@ elseif(WIN32) "nanosvg") endif() -# Temporary solution until the VLC find module has been updated to work properly on macOS. if (APPLE) + # See es-app/CMakeLists.txt for an explation for why an extra 'Resources' directory + # has been added to the install prefix. + set(CMAKE_INSTALL_PREFIX "/Applications/EmulationStation-DE.app/Contents/Resources") + + # Temporary solution until the VLC find module has been updated to work properly on macOS. set(COMMON_LIBRARIES ${COMMON_LIBRARIES} "/Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib") + set(CMAKE_INSTALL_RPATH @executable_path) +# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) endif() # Add libCEC libraries. diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index 0e8f9c906..3ab2dcea1 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -129,16 +129,40 @@ if(WIN32) install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION .) install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources DESTINATION .) elseif(APPLE) + # For completely unknown reasons, when generating a Bundle using cpack, an extra 'Resources' + # directory is added to the target path. Simply adding the two dots as a prefix fixes the + # problem, but doing so would break 'make install' which was actually behaving correctly. + # So an extra 'Resources' directory was added to the CMAKE_INSTALL_PREFIX variable as well + # to compensate for this. It's a bad solution to the problem and there must surely be a + # better way to fix this. install(TARGETS EmulationStation RUNTIME - DESTINATION EmulationStation.app/Contents/MacOS) + DESTINATION ../MacOS) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns + DESTINATION ../Resources) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_Info.plist + DESTINATION .. RENAME Info.plist) + install(FILES ${CMAKE_SOURCE_DIR}/libcurl.4.dylib + DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libfreeimage.dylib + DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libfreetype.6.dylib + DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libSDL2-2.0.0.dylib + DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libvlc.dylib + DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libvlccore.dylib + DESTINATION ../MacOS) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/plugins + DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/LICENSE - DESTINATION EmulationStation.app/Contents/Resources) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources - DESTINATION EmulationStation.app/Contents/Resources) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes - DESTINATION EmulationStation.app/Contents/Resources) + DESTINATION ../Resources) +# install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources +# DESTINATION ../Resources) +# install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes +# DESTINATION ../Resources) install(DIRECTORY ${CMAKE_SOURCE_DIR}/licenses - DESTINATION EmulationStation.app/Contents/Resources) + DESTINATION ../Resources) else() install(TARGETS emulationstation RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) @@ -173,14 +197,17 @@ set(CPACK_PACKAGE_VERSION "1.0.0-beta") # Settings per operating system and generator type. if(APPLE) - set(CPACK_GENERATOR "DragNDrop") + set(CPACK_GENERATOR "Bundle") set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}") - set(CPACK_DMG_VOLUME_NAME "EmulationStation-DE ${CPACK_PACKAGE_VERSION}") - set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation.icns") - set(CPACK_DMG_DS_STORE "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation_DS_Store") + set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns") + set(CPACK_DMG_VOLUME_NAME "EmulationStation Desktop Edition ${CPACK_PACKAGE_VERSION}") + set(CPACK_DMG_DS_STORE "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_DS_Store") + set(CPACK_BUNDLE_NAME "EmulationStation-DE") + set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns") + set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_Info.plist") elseif(WIN32) set(CPACK_GENERATOR "NSIS") - set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}-win64") + set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}") set(CPACK_PACKAGE_INSTALL_DIRECTORY "EmulationStation") set(CPACK_PACKAGE_EXECUTABLES "EmulationStation" "EmulationStation") set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") diff --git a/es-app/assets/EmulationStation.icns b/es-app/assets/EmulationStation-DE.icns similarity index 100% rename from es-app/assets/EmulationStation.icns rename to es-app/assets/EmulationStation-DE.icns diff --git a/es-app/assets/EmulationStation_DS_Store b/es-app/assets/EmulationStation-DE_DS_Store similarity index 92% rename from es-app/assets/EmulationStation_DS_Store rename to es-app/assets/EmulationStation-DE_DS_Store index 6b891340d..3a109eec2 100644 Binary files a/es-app/assets/EmulationStation_DS_Store and b/es-app/assets/EmulationStation-DE_DS_Store differ diff --git a/es-app/assets/EmulationStation-DE_Info.plist b/es-app/assets/EmulationStation-DE_Info.plist new file mode 100644 index 000000000..2548671cf --- /dev/null +++ b/es-app/assets/EmulationStation-DE_Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleIdentifier + EmulationStation-DE + CFBundleDevelopmentRegion + English + CFBundleDisplayName + EmulationStation Desktop Edition + CFBundleExecutable + EmulationStation + CFBundleGetInfoString + EmulationStation Desktop Edition 1.0.0 + CFBundleIconFile + EmulationStation-DE.icns + CFBundleName + EmulationStation Desktop Edition + CFBundlePackageType + APPL + CFBundleVersion + 1.0.0-beta + NSHighResolutionCapable + true + NSPrincipalClass + NSApplication + NSMainNibFile + EmulationStation + NSHumanReadableCopyright + Original work Copyright (c) 2014 Alec Lofquist +Modified work Copyright (c) 2020 Leon Styhre +Licensed under the MIT license + +