Added .dmg package generator setup for macOS.

Also cleaned up and updated the CMakeLists.txt files and moved the non-source files to a separate assets directory.
This commit is contained in:
Leon Styhre 2020-08-19 22:30:10 +02:00
parent 541f7202d8
commit 7f31c1bbb4
16 changed files with 364 additions and 327 deletions

9
.gitignore vendored
View file

@ -19,7 +19,8 @@
# Compiled executable # Compiled executable
emulationstation emulationstation
emulationstation.exe EmulationStation
EmulationStation.exe
# build directory # build directory
build build
@ -39,11 +40,15 @@ install_manifest.txt
_CPack_Packages _CPack_Packages
emulationstation-de*.deb emulationstation-de*.deb
emulationstation-de*.rpm emulationstation-de*.rpm
emulationstation-de*.exe EmulationStation-DE*.dmg
EmulationStation-DE*.exe
# TODO # TODO
TODO.md TODO.md
# macOS
.DS_Store
# Eclipse # Eclipse
.cproject .cproject
.project .project

View file

@ -8,7 +8,7 @@ Table of contents:
## Development Environment ## Development Environment
EmulationStation-DE is developed and compiled using both Clang/LLVM and GCC on Unix, Clang/LLVM on macoOS and GCC (MinGW) on Windows. I'm intending to get Clang/LLVM working on Windows as well. EmulationStation-DE is developed and compiled using both Clang/LLVM and GCC on Unix, Clang/LLVM on macOS and GCC (MinGW) on Windows. I'm intending to get Clang/LLVM working on Windows as well.
There are much more details regarding compilers later in this document, so read on! There are much more details regarding compilers later in this document, so read on!
@ -172,7 +172,7 @@ CPack: - Run preinstall target for: emulationstation-de
CPack: - Install project: emulationstation-de [] CPack: - Install project: emulationstation-de []
CPack: Create package CPack: Create package
CPackDeb: - Generating dependency list CPackDeb: - Generating dependency list
CPack: - package: /home/user/emulationstation-de/emulationstation-de-1.0.0.deb generated. CPack: - package: /home/myusername/emulationstation-de/emulationstation-de-1.0.0.deb generated.
``` ```
The package can now be installed using a package manager, for example `dpkg`. The package can now be installed using a package manager, for example `dpkg`.
@ -269,6 +269,20 @@ Keep in mind though that a debug version will be much slower due to all compiler
Running `make -j6` (or whatever number of parallel jobs you prefer) speeds up the compilation time if you have cores to spare. Running `make -j6` (or whatever number of parallel jobs you prefer) speeds up the compilation time if you have cores to spare.
**Creating .dmg DragNDrop installer:**
Simply run `cpack` to build the .dmg installer:
```
user@computer:~/emulationstation-de$ cpack
CPack: Create package using DragNDrop
CPack: Install projects
CPack: - Run preinstall target for: emulationstation-de
CPack: - Install project: emulationstation-de []
CPack: Create package
CPack: - package: /Users/myusername/emulationstation-de/EmulationStation-DE-1.0.0.dmg generated.
```
## Building on Windows ## Building on Windows
@ -606,7 +620,7 @@ Here is such an example:
**~/.emulationstation/es_input.cfg:** **~/.emulationstation/es_input.cfg:**
You normally don't need to modify this file manually as it's created by the built-in input configuration step. This procedure is detailed in the [User Guide](USERGUIDE.md#Input device configuration). You normally don't need to modify this file manually as it's created by the built-in input configuration step. This procedure is detailed in the [User Guide](USERGUIDE.md#input-device-configuration).
If your controller and keyboard stop working, you can delete the `~/.emulationstation/es_input.cfg` file to make the input configuration screen re-appear on the next run. If your controller and keyboard stop working, you can delete the `~/.emulationstation/es_input.cfg` file to make the input configuration screen re-appear on the next run.

View file

@ -54,7 +54,7 @@ Many bugs have been fixed, and numerous features that were only partially implem
* Refactoring, cleanup and documentation of the source code, removal of deprecated files etc. * Refactoring, cleanup and documentation of the source code, removal of deprecated files etc.
* All required fonts bundled with the application, no dependencies on the OS to provide them any longer * All required fonts bundled with the application, no dependencies on the OS to provide them any longer
* Made pugixml an external dependency instead of bundling it * Made pugixml an external dependency instead of bundling it
* Updated the CMake/CPack install and package build script to work as expected (it can now generate .deb, .rpm and NSIS installation packages) * Updated the CMake/CPack install and package build script to work as expected (it can now generate .deb, .rpm, .dmg and NSIS installation packages)
* Added support for Clang/LLVM, made the application build with no errors or warnings using this compiler (Unix only) * Added support for Clang/LLVM, made the application build with no errors or warnings using this compiler (Unix only)
* License files included for all the libraries and resources that are bundled with the application * License files included for all the libraries and resources that are bundled with the application
* Greatly expanded the application documentation (which is hosted with the source repository on GitLab) * Greatly expanded the application documentation (which is hosted with the source repository on GitLab)

View file

@ -977,7 +977,7 @@ On Windows, ES can be installed to and run from a removable media device such as
## Command line arguments ## Command line arguments
Please refer to the [INSTALL.md](INSTALL.md#Command line arguments) document for a list of the command line arguments per operating system. Please refer to the [INSTALL.md](INSTALL.md#command-line-arguments) document for a list of the command line arguments per operating system.
## Supported game systems ## Supported game systems

View file

@ -103,15 +103,21 @@ set(ES_SOURCES
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
# Define OS specific sources and headers. # Define OS specific sources and headers.
if(WIN32) if(WIN32)
LIST(APPEND ES_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.rc) LIST(APPEND ES_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation.rc)
endif() endif()
# Define target. # Define target.
if(APPLE OR WIN32)
include_directories(${COMMON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src)
add_executable(EmulationStation ${ES_SOURCES} ${ES_HEADERS})
target_link_libraries(EmulationStation ${COMMON_LIBRARIES} es-core)
else()
include_directories(${COMMON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src) include_directories(${COMMON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src)
add_executable(emulationstation ${ES_SOURCES} ${ES_HEADERS}) add_executable(emulationstation ${ES_SOURCES} ${ES_HEADERS})
target_link_libraries(emulationstation ${COMMON_LIBRARIES} es-core) target_link_libraries(emulationstation ${COMMON_LIBRARIES} es-core)
endif()
# Set up CPack for installation and package generation. # Setup for installation and package generation.
if(WIN32) if(WIN32)
install(TARGETS emulationstation RUNTIME DESTINATION .) install(TARGETS emulationstation RUNTIME DESTINATION .)
install(FILES ../FreeImage.dll ../libcrypto-1_1-x64.dll ../libcurl-x64.dll ../libfreetype.dll install(FILES ../FreeImage.dll ../libcrypto-1_1-x64.dll ../libcurl-x64.dll ../libfreetype.dll
@ -122,16 +128,27 @@ if(WIN32)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/LICENSES DESTINATION .) install(DIRECTORY ${CMAKE_SOURCE_DIR}/LICENSES DESTINATION .)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION .) install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION .)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources DESTINATION .) install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources DESTINATION .)
elseif(APPLE)
install(TARGETS EmulationStation RUNTIME
DESTINATION EmulationStation.app/Contents/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)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/LICENSES
DESTINATION EmulationStation.app/Contents/Resources)
else() else()
install(TARGETS emulationstation RUNTIME install(TARGETS emulationstation RUNTIME
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/emulationstation.6.gz install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/emulationstation.6.gz
DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man6) DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man6)
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE install(FILES ${CMAKE_SOURCE_DIR}/LICENSE
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/emulationstation.desktop install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/emulationstation.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/emulationstation.svg install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/emulationstation.svg
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps) DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/LICENSES install(DIRECTORY ${CMAKE_SOURCE_DIR}/LICENSES
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation)
@ -144,12 +161,43 @@ endif()
include(InstallRequiredSystemLibraries) include(InstallRequiredSystemLibraries)
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
# CPack settings. # General CPack settings.
set(CPACK_PACKAGE_NAME "emulationstation-de") set(CPACK_PACKAGE_NAME "emulationstation-de")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An emulator front-end with controller navigation and theming support.") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An emulator front-end with controller navigation and theming support.")
set(CPACK_PACKAGE_DESCRIPTION "EmulationStation Desktop Edition is a fast and flexible front-end for browsing and launching games from your multi-platform retro game collection. It's intended to be used in conjunction with emulators such as the RetroArch cores.") set(CPACK_PACKAGE_DESCRIPTION "EmulationStation Desktop Edition is a fast and flexible front-end for browsing and launching games from your multi-platform retro game collection. It's intended to be used in conjunction with emulators such as the RetroArch cores.")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VENDOR "Leon Styhre")
# Update this when there has been a new release.
set(CPACK_PACKAGE_VERSION "1.0.0-beta")
# Settings per operating system and generator type.
if(APPLE)
set(CPACK_GENERATOR "DragNDrop")
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")
elseif(WIN32)
set(CPACK_GENERATOR "NSIS")
set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}-win64")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "EmulationStation")
set(CPACK_PACKAGE_EXECUTABLES "EmulationStation" "EmulationStation")
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation.ico")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set(CPACK_NSIS_DISPLAY_NAME "EmulationStation Desktop Edition")
set(CPACK_NSIS_INSTALLED_ICON_NAME
"${CMAKE_CURRENT_SOURCE_DIR}/es-app/assets/EmulationStation.ico")
set(CPACK_NSIS_WELCOME_TITLE "EmulationStation Desktop Edition Installer")
set(CPACK_NSIS_FINISH_TITLE "EmulationStation Desktop Edition Installation Completed")
set(CPACK_NSIS_MANIFEST_DPI_AWARE ON)
else()
set(CPACK_PACKAGE_INSTALL_DIRECTORY "emulationstation_${CMAKE_PACKAGE_VERSION}")
set(CPACK_PACKAGE_EXECUTABLES "emulationstation" "emulationstation")
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_FILE_NAME "emulationstation-de-${CPACK_PACKAGE_VERSION}.deb")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Leon Styhre <leon@leonstyhre.com>") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Leon Styhre <leon@leonstyhre.com>")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://gitlab.com/leonstyhre/emulationstation-de") set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://gitlab.com/leonstyhre/emulationstation-de")
set(CPACK_DEBIAN_PACKAGE_SECTION "misc") set(CPACK_DEBIAN_PACKAGE_SECTION "misc")
@ -158,42 +206,12 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libsdl2-2.0-0, libfreeimage3, libfreetype6, libvlc5, libcurl4, libpugixml1v5, libasound2") #set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libsdl2-2.0-0, libfreeimage3, libfreetype6, libvlc5, libcurl4, libpugixml1v5, libasound2")
set(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS "debhelper (>= 8.0.0), cmake, g++ (>= 4.8), libsdl2-dev, libfreeimage-dev, libfreetype6-dev, libcurl4-openssl-dev, libpugixml-dev, rapidjson-dev, libasound2-dev, libvlc-dev, libgl1-mesa-dev") set(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS "debhelper (>= 8.0.0), cmake, g++ (>= 4.8), libsdl2-dev, libfreeimage-dev, libfreetype6-dev, libcurl4-openssl-dev, libpugixml-dev, rapidjson-dev, libasound2-dev, libvlc-dev, libgl1-mesa-dev")
# Uncomment the next line to generate .rpm packages.
#set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_FILE_NAME "emulationstation-de-${CPACK_PACKAGE_VERSION}.rpm")
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION}) set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_RPM_PACKAGE_REQUIRES "libc6, libsdl2-2.0-0, libfreeimage3, libfreetype6, libvlc5, libcurl4, libpugixml1v5, libasound2") set(CPACK_RPM_PACKAGE_REQUIRES "libc6, libsdl2-2.0-0, libfreeimage3, libfreetype6, libvlc5, libcurl4, libpugixml1v5, libasound2")
set(CPACK_RPM_PACKAGE_LICENSE "MIT") set(CPACK_RPM_PACKAGE_LICENSE "MIT")
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/src/es_icon.ico")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set(CPACK_NSIS_DISPLAY_NAME "EmulationStation Desktop Edition")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_CURRENT_SOURCE_DIR}/es-app/src/es_icon.ico")
set(CPACK_NSIS_WELCOME_TITLE "EmulationStation Desktop Edition Installer")
set(CPACK_NSIS_FINISH_TITLE "EmulationStation Desktop Edition Installation Completed")
set(CPACK_NSIS_MANIFEST_DPI_AWARE ON)
set(CPACK_PACKAGE_VENDOR "Leon Styhre")
set(CPACK_PACKAGE_VERSION "1.0.0")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "0")
if(WIN32)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "EmulationStation")
set(CPACK_PACKAGE_EXECUTABLES "EmulationStation" "EmulationStation")
else()
set(CPACK_PACKAGE_INSTALL_DIRECTORY "emulationstation_${CMAKE_PACKAGE_VERSION}")
set(CPACK_PACKAGE_EXECUTABLES "emulationstation" "emulationstation")
endif()
set(CPACK_RPM_FILE_NAME "emulationstation-de-${CPACK_PACKAGE_VERSION}.rpm")
set(CPACK_DEBIAN_FILE_NAME "emulationstation-de-${CPACK_PACKAGE_VERSION}.deb")
if(WIN32)
set(CPACK_GENERATOR "NSIS")
else()
#set(CPACK_GENERATOR "RPM")
set(CPACK_GENERATOR "DEB")
endif() endif()
include(CPack) include(CPack)

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 272 KiB

View file

@ -6,10 +6,10 @@ VS_VERSION_INFO VERSIONINFO
FILEVERSION RESOURCE_VERSION FILEVERSION RESOURCE_VERSION
PRODUCTVERSION RESOURCE_VERSION PRODUCTVERSION RESOURCE_VERSION
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef NDEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L FILEFLAGS 0x0L
#else
FILEFLAGS 0x1L
#endif #endif
FILEOS VOS_NT_WINDOWS32 FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP FILETYPE VFT_APP
@ -36,4 +36,4 @@ BEGIN
END END
END END
IDI_ES_LOGO ICON DISCARDABLE "es_icon.ico" IDI_ES_LOGO ICON DISCARDABLE "EmulationStation.ico"

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.