mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
create debian packages / multiple configs (#650)
* implement make install set CMAKE_INSTALL_PREFIX e.g. to /opt to install to /opt/hyperion set ENABLE_SYSTEM_INSTALL to ON to activate installation after compiling use make install or make install/strip (for performance/size optimized binaries - compile in Release to get best performance) * cleanup cmake files use cmake -DINSTALL_PREFIX=/opt/hyperion .. to install all files to hyperion or cmake -DINSTALL_PREFIX=/usr/ to install to usr. install folders are linux standard. bin go to bin folder and additionals (effects) go to share/hyperion * add uninstall target - be patient with that, this will remove files from your system install service files to share/hyperion - if you want to use them you have to make a symlink to your location of service files * optimize build release script install service files into hyperion share folder (services not activated, this must be done by distribution package script) initial support of cmake option -DPLATFORM= option. This selects platform specific cmake flags. no need for -DENABLE_... options (unless you want some special things) automatic detect for apple build * update submodule * fix cmake error when no platform is given * initial support for deb,rpm and tgz packages - no usefull content atm! * make packeages contain usefull stuff * add license make packes more functional. package specific install missing yet * implement debian postinstall * disable rpm generation until it has a working state * add hypercon compat * add posibility for multiple config files. first one found is taken Former-commit-id: 1c2669961da98fd05a97359e75f1d6d68e126715
This commit is contained in:
@@ -61,7 +61,4 @@ else()
|
||||
qt4_use_modules(${PROJECT_NAME} Core Gui Network )
|
||||
endif()
|
||||
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" )
|
||||
if (ENABLE_SYSTEM_INSTALL)
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" )
|
||||
endif()
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
|
||||
|
@@ -60,8 +60,4 @@ else()
|
||||
qt4_use_modules(${PROJECT_NAME} Core Gui Network )
|
||||
endif()
|
||||
|
||||
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" )
|
||||
if (ENABLE_SYSTEM_INSTALL)
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" )
|
||||
endif()
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
|
||||
|
@@ -56,7 +56,4 @@ else()
|
||||
qt4_use_modules(${PROJECT_NAME} Core Gui Network )
|
||||
endif()
|
||||
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" )
|
||||
if (ENABLE_SYSTEM_INSTALL)
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" )
|
||||
endif()
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
|
||||
|
@@ -56,5 +56,5 @@ else()
|
||||
qt4_use_modules(${PROJECT_NAME} Core Gui Network )
|
||||
endif()
|
||||
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" )
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
|
||||
|
||||
|
@@ -42,8 +42,5 @@ else()
|
||||
qt4_use_modules(${PROJECT_NAME} Core Gui Network )
|
||||
endif()
|
||||
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" )
|
||||
if (ENABLE_SYSTEM_INSTALL)
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" )
|
||||
endif()
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
|
||||
|
||||
|
@@ -60,7 +60,4 @@ else()
|
||||
qt4_use_modules(${PROJECT_NAME} Core Gui Network )
|
||||
endif()
|
||||
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" )
|
||||
if (ENABLE_SYSTEM_INSTALL)
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" )
|
||||
endif()
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
|
||||
|
@@ -62,7 +62,4 @@ else()
|
||||
qt4_use_modules(${PROJECT_NAME} Core Gui Network )
|
||||
endif()
|
||||
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" )
|
||||
if (ENABLE_SYSTEM_INSTALL)
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" )
|
||||
endif()
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
|
||||
|
@@ -34,12 +34,9 @@ if (ENABLE_PROTOBUF)
|
||||
target_link_libraries(hyperiond protoserver)
|
||||
endif ()
|
||||
|
||||
install ( TARGETS hyperiond DESTINATION "${DEPLOY_DIR}/bin" )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "${DEPLOY_DIR}/share/hyperion/" )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "${DEPLOY_DIR}/share/hyperion/" )
|
||||
install ( TARGETS hyperiond DESTINATION "bin" COMPONENT ambilight )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "share/hyperion/" COMPONENT ambilight )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" COMPONENT ambilight )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/config DESTINATION "share/hyperion/" COMPONENT ambilight )
|
||||
|
||||
|
||||
if (ENABLE_SYSTEM_INSTALL)
|
||||
install ( TARGETS hyperiond DESTINATION "bin" )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "share/hyperion/" )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" )
|
||||
endif()
|
||||
|
@@ -7,6 +7,7 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QResource>
|
||||
#include <QLocale>
|
||||
#include <QFile>
|
||||
|
||||
// config includes
|
||||
#include "HyperionConfig.h"
|
||||
@@ -114,7 +115,17 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
const std::string configFile = argv[1];
|
||||
int argvId = 1;
|
||||
for ( int i=1; i<argc;i++)
|
||||
{
|
||||
if ( QFile::exists(argv[i]) )
|
||||
{
|
||||
argvId = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const std::string configFile = argv[argvId];
|
||||
std::cout << "INFO: Selected configuration file: " << configFile.c_str() << std::endl;
|
||||
const Json::Value config = loadConfig(configFile);
|
||||
|
||||
|
Reference in New Issue
Block a user