mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
[HOTFIX] Python Interpreter
- added native RPi docker image instruction to CompileHowto.md - version channel is received from JsonAPI instead of reading from the configuration file Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
parent
e0e0a84d0f
commit
e6c2e7ebf9
@ -7,33 +7,36 @@ set(CMAKE_AUTOMOC ON)
|
||||
# auto prepare .qrc files
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
IF ( POLICY CMP0026 )
|
||||
if ( POLICY CMP0026 )
|
||||
CMAKE_POLICY( SET CMP0026 OLD )
|
||||
ENDIF()
|
||||
endif()
|
||||
|
||||
# Configure CCache if available
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
if ( CCACHE_FOUND )
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
endif(CCACHE_FOUND)
|
||||
|
||||
find_package( PythonInterp 3.5 REQUIRED )
|
||||
|
||||
# Read version from version.json
|
||||
EXECUTE_PROCESS (
|
||||
COMMAND python test/jsonchecks/version.py ${PROJECT_SOURCE_DIR}/version.json
|
||||
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/version.py version.json
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
RESULT_VARIABLE error_code
|
||||
OUTPUT_VARIABLE RETURN_VERSION
|
||||
)
|
||||
|
||||
SET( VERSION_REGEX "[0-9]+\\.[0-9]+\\.[0-9]+(-[a-zA-Z0-9_]+)?" )
|
||||
IF( ${RETURN_VERSION} MATCHES ${VERSION_REGEX})
|
||||
if ( ${RETURN_VERSION} MATCHES ${VERSION_REGEX} )
|
||||
STRING(REGEX MATCHALL "[0-9]+|-([A-Za-z0-9_]+)" VERSION_PARTS ${RETURN_VERSION} )
|
||||
LIST( GET VERSION_PARTS 0 VERSION_MAJOR )
|
||||
LIST( GET VERSION_PARTS 1 VERSION_MINOR )
|
||||
LIST( GET VERSION_PARTS 2 VERSION_PATCH )
|
||||
ELSE( ${RETURN_VERSION} MATCHES ${VERSION_REGEX} )
|
||||
message( FATAL_ERROR "Failed to parse version.json string properly. Expect X.Y.Z.")
|
||||
ENDIF()
|
||||
else ( ${RETURN_VERSION} MATCHES ${VERSION_REGEX} )
|
||||
message( FATAL_ERROR "Failed to parse version.json string properly. ${error_code}" )
|
||||
endif()
|
||||
|
||||
SET( HYPERION_VERSION_MAJOR ${VERSION_MAJOR} )
|
||||
SET( HYPERION_VERSION_MINOR ${VERSION_MINOR} )
|
||||
@ -41,11 +44,16 @@ SET( HYPERION_VERSION_PATCH ${VERSION_PATCH} )
|
||||
|
||||
# Read channel from version.json
|
||||
EXECUTE_PROCESS (
|
||||
COMMAND python test/jsonchecks/version.py ${PROJECT_SOURCE_DIR}/version.json "channel"
|
||||
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/version.py version.json "channel"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
RESULT_VARIABLE error_code
|
||||
OUTPUT_VARIABLE RETURN_CHANNEL
|
||||
)
|
||||
|
||||
if ( error_code )
|
||||
message( FATAL_ERROR "Failed to parse version.json string properly. ${error_code}" )
|
||||
endif()
|
||||
|
||||
SET ( HYPERION_VERSION_CHANNEL ${RETURN_CHANNEL} )
|
||||
|
||||
# Set build variables
|
||||
@ -147,10 +155,9 @@ if ( "${PLATFORM}" MATCHES "-dev" )
|
||||
SET ( DEFAULT_TESTS ON )
|
||||
endif()
|
||||
|
||||
# is this necessary?
|
||||
# STRING( TOUPPER "-DPLATFORM_${PLATFORM}" PLATFORM_DEFINE)
|
||||
# STRING( REPLACE "-DEV" "" PLATFORM_DEFINE "${PLATFORM_DEFINE}" )
|
||||
# ADD_DEFINITIONS( ${PLATFORM_DEFINE} )
|
||||
STRING( TOUPPER "-DPLATFORM_${PLATFORM}" PLATFORM_DEFINE)
|
||||
STRING( REPLACE "-DEV" "" PLATFORM_DEFINE "${PLATFORM_DEFINE}" )
|
||||
ADD_DEFINITIONS( ${PLATFORM_DEFINE} )
|
||||
|
||||
# set the build options
|
||||
option(ENABLE_AMLOGIC "Enable the AMLOGIC video grabber" ${DEFAULT_AMLOGIC} )
|
||||
@ -209,7 +216,7 @@ SET( JSON_FILES
|
||||
${HYPERION_SCHEMAS}
|
||||
)
|
||||
EXECUTE_PROCESS (
|
||||
COMMAND python test/jsonchecks/checkjson.py ${JSON_FILES}
|
||||
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/checkjson.py ${JSON_FILES}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
RESULT_VARIABLE CHECK_JSON_FAILED
|
||||
)
|
||||
@ -218,7 +225,7 @@ IF ( ${CHECK_JSON_FAILED} )
|
||||
ENDIF ()
|
||||
|
||||
EXECUTE_PROCESS (
|
||||
COMMAND python test/jsonchecks/checkeffects.py effects effects/schema
|
||||
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/checkeffects.py effects effects/schema
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
RESULT_VARIABLE CHECK_EFFECTS_FAILED
|
||||
)
|
||||
@ -226,6 +233,7 @@ IF ( ${CHECK_EFFECTS_FAILED} )
|
||||
MESSAGE (FATAL_ERROR "check of json effect files failed" )
|
||||
ENDIF ()
|
||||
|
||||
# for python 3 the checkschema.py file must be rewritten
|
||||
EXECUTE_PROCESS (
|
||||
COMMAND python test/jsonchecks/checkschema.py config/hyperion.config.json.default libsrc/hyperion/hyperion.schema.json
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
@ -367,3 +375,4 @@ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_D
|
||||
|
||||
# enable make package - no code after this line !
|
||||
include (${CMAKE_CURRENT_SOURCE_DIR}/cmake/packages.cmake)
|
||||
|
||||
|
@ -1,24 +1,33 @@
|
||||
# With Docker
|
||||
If you are using [Docker](https://www.docker.com/), you can compile Hyperion inside a docker container. This keeps your system clean and with a simple script it's easy to use. Supported is also cross compilation for Raspberry Pi (Debian Stretch)
|
||||
If you are using [Docker](https://www.docker.com/), you can compile Hyperion inside a docker container. This keeps your system clean and with a simple script it's easy to use. Supported is also cross compiling for Raspberry Pi (Debian Stretch or higher). To compile Hyperion just execute one of the following commands.
|
||||
|
||||
To compile Hyperion for Debain Stretch (x64 architecture) or higher just execute the following command
|
||||
The compiled binaries and packages will be available at the deploy folder next to the script
|
||||
Note: call the script with `./docker-compile.sh -h` for more options
|
||||
|
||||
## Native compiling on Raspberry Pi
|
||||
|
||||
```
|
||||
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -t rpi-raspbian
|
||||
```
|
||||
|
||||
## Cross compiling on X64_86 for:
|
||||
|
||||
**X64:**
|
||||
```
|
||||
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh
|
||||
```
|
||||
To compile Hyperion for i386 architecture
|
||||
**i386:**
|
||||
```
|
||||
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -t i386
|
||||
```
|
||||
To compile Hyperion for Raspberry Pi v1 & ZERO
|
||||
**Raspberry Pi v1 & ZERO**
|
||||
```
|
||||
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -t armv6hf
|
||||
```
|
||||
To compile Hyperion for Raspberry Pi 2 & 3
|
||||
**Raspberry Pi 2 & 3**
|
||||
```
|
||||
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -t armv7hf
|
||||
```
|
||||
The compiled binaries and packages will be available at the deploy folder next to the script
|
||||
Note: call the script with `./docker-compile.sh -h` for more options
|
||||
|
||||
# The usual way
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#define HYPERION_VERSION_MAJOR "${HYPERION_VERSION_MAJOR}"
|
||||
#define HYPERION_VERSION_MINOR "${HYPERION_VERSION_MINOR}"
|
||||
#define HYPERION_VERSION_PATCH "${HYPERION_VERSION_PATCH}"
|
||||
#define HYPERION_VERSION "${HYPERION_VERSION_CHANNEL}.${HYPERION_VERSION_MAJOR}.${HYPERION_VERSION_MINOR}.${HYPERION_VERSION_PATCH}"
|
||||
#define HYPERION_VERSION "${HYPERION_VERSION_MAJOR}.${HYPERION_VERSION_MINOR}.${HYPERION_VERSION_PATCH}"
|
||||
#define HYPERION_VERSION_CHANNEL "${HYPERION_VERSION_CHANNEL}"
|
||||
|
||||
#define HYPERION_JSON_VERSION "1.0.0"
|
||||
|
@ -78,7 +78,7 @@ $(document).ready( function() {
|
||||
$('#dash_currv').html(window.currentVersion);
|
||||
$('#dash_instance').html(window.serverConfig.general.name);
|
||||
$('#dash_ports').html(window.serverConfig.flatbufServer.port+' | '+window.serverConfig.protoServer.port);
|
||||
$('#dash_versionbranch').html(window.serverConfig.general.versionBranch);
|
||||
$('#dash_versionbranch').html(window.currentChannel);
|
||||
|
||||
getReleases(function(callback){
|
||||
if(callback)
|
||||
|
@ -39,6 +39,7 @@ $(document).ready( function() {
|
||||
window.sysInfo = event.response.info;
|
||||
|
||||
window.currentVersion = window.sysInfo.hyperion.version;
|
||||
window.currentChannel = window.sysInfo.hyperion.channel;
|
||||
});
|
||||
|
||||
$(window.hyperion).one("cmd-config-getschema", function(event) {
|
||||
|
@ -3,6 +3,7 @@ window.webPrio = 1;
|
||||
window.webOrigin = "Web Configuration";
|
||||
window.showOptHelp = true;
|
||||
window.gitHubReleaseApiUrl = "https://api.github.com/repos/hyperion-project/hyperion.ng/releases";
|
||||
window.currentChannel = null;
|
||||
window.currentVersion = null;
|
||||
window.latestVersion = null;
|
||||
window.latestStableVersion = null;
|
||||
|
@ -2,7 +2,6 @@
|
||||
"general" :
|
||||
{
|
||||
"name" : "My Hyperion Config",
|
||||
"versionBranch" : "Stable",
|
||||
"showOptHelp" : true
|
||||
},
|
||||
"logger" :
|
||||
|
@ -248,6 +248,7 @@ void JsonAPI::handleSysInfoCommand(const QJsonObject&, const QString& command, c
|
||||
QJsonObject hyperion;
|
||||
hyperion["jsonrpc_version" ] = QString(HYPERION_JSON_VERSION);
|
||||
hyperion["version" ] = QString(HYPERION_VERSION);
|
||||
hyperion["channel" ] = QString(HYPERION_VERSION_CHANNEL);
|
||||
hyperion["build" ] = QString(HYPERION_BUILD_ID);
|
||||
hyperion["time" ] = QString(__DATE__ " " __TIME__);
|
||||
hyperion["id" ] = _hyperion->getId();
|
||||
|
@ -14,19 +14,6 @@
|
||||
"required" : true,
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"versionBranch" :
|
||||
{
|
||||
"type" : "string",
|
||||
"title" : "edt_conf_gen_versionBranch_title",
|
||||
"enum" : ["Stable", "Beta"],
|
||||
"required" : true,
|
||||
"access" : "expert",
|
||||
"default" : "Stable",
|
||||
"options" : {
|
||||
"enum_titles" : ["Stable", "Beta"]
|
||||
},
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"showOptHelp" :
|
||||
{
|
||||
"type" : "boolean",
|
||||
|
Loading…
Reference in New Issue
Block a user