| 1 |
Index: railcontrol/CMakeLists.txt |
| 2 |
=================================================================== |
| 3 |
--- railcontrol.orig/CMakeLists.txt 2026-01-12 04:49:48.008520800 +0100 |
| 4 |
+++ railcontrol/CMakeLists.txt 2026-01-12 04:49:48.007556037 +0100 |
| 5 |
@@ -1,53 +1,5 @@ |
| 6 |
cmake_minimum_required(VERSION 3.5) |
| 7 |
- |
| 8 |
-if(EXISTS "${CMAKE_SOURCE_DIR}/.git") |
| 9 |
- find_package(Git QUIET) |
| 10 |
- if(NOT Git_FOUND) |
| 11 |
- message(WARNING "Git not found") |
| 12 |
- return() |
| 13 |
- endif() |
| 14 |
- |
| 15 |
- execute_process( |
| 16 |
- COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0 |
| 17 |
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
| 18 |
- OUTPUT_VARIABLE RAILCONTROL_VERSION |
| 19 |
- OUTPUT_STRIP_TRAILING_WHITESPACE |
| 20 |
- ) |
| 21 |
- execute_process( |
| 22 |
- COMMAND ${GIT_EXECUTABLE} log -1 --format=%H |
| 23 |
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
| 24 |
- OUTPUT_VARIABLE GIT_HASH |
| 25 |
- OUTPUT_STRIP_TRAILING_WHITESPACE |
| 26 |
- ) |
| 27 |
- execute_process( |
| 28 |
- COMMAND ${GIT_EXECUTABLE} log -1 --format=%at |
| 29 |
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
| 30 |
- OUTPUT_VARIABLE GIT_TIMESTAMP |
| 31 |
- OUTPUT_STRIP_TRAILING_WHITESPACE |
| 32 |
- ) |
| 33 |
- execute_process( |
| 34 |
- COMMAND ${GIT_EXECUTABLE} status -s |
| 35 |
- COMMAND wc -l |
| 36 |
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
| 37 |
- OUTPUT_VARIABLE GIT_DIRTY |
| 38 |
- OUTPUT_STRIP_TRAILING_WHITESPACE |
| 39 |
- ) |
| 40 |
-else() |
| 41 |
- file(READ VERSION RAILCONTROL_VERSION) |
| 42 |
- string(STRIP ${RAILCONTROL_VERSION} RAILCONTROL_VERSION) |
| 43 |
- file(READ VERSION_GIT_HASH GIT_HASH) |
| 44 |
- string(STRIP ${GIT_HASH} GIT_HASH) |
| 45 |
- file(READ VERSION_GIT_TIMESTAMP GIT_TIMESTAMP) |
| 46 |
- string(STRIP ${GIT_TIMESTAMP} GIT_TIMESTAMP) |
| 47 |
- set(GIT_DIRTY 0) |
| 48 |
-endif() |
| 49 |
- |
| 50 |
-# Version starts with v |
| 51 |
-string(REGEX REPLACE "^v" "" RAILCONTROL_VERSION "${RAILCONTROL_VERSION}") |
| 52 |
- |
| 53 |
-project(railcontrol VERSION ${RAILCONTROL_VERSION}) |
| 54 |
- |
| 55 |
-STRING(TIMESTAMP COMPILE_TIMESTAMP "%s" UTC) |
| 56 |
+project(railcontrol) |
| 57 |
|
| 58 |
add_executable(${PROJECT_NAME} |
| 59 |
Manager.cpp |
| 60 |
@@ -312,8 +264,6 @@ |
| 61 |
Utils/ThreadSafeQueue.h |
| 62 |
Utils/Utils.cpp |
| 63 |
Utils/Utils.h |
| 64 |
-${CMAKE_CURRENT_BINARY_DIR}/Version.cpp |
| 65 |
-Version.h |
| 66 |
) |
| 67 |
|
| 68 |
option(USE_SYSTEM_LIBRARIES "Build with system libraries" OFF) |
| 69 |
@@ -379,8 +329,6 @@ |
| 70 |
|
| 71 |
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}) |
| 72 |
|
| 73 |
-configure_file(Version.cpp.in Version.cpp @ONLY) |
| 74 |
- |
| 75 |
set(CMAKE_INSTALL_BINDIR ".") |
| 76 |
set(DATADIR ".") |
| 77 |
|
| 78 |
Index: railcontrol/RailControl.cpp |
| 79 |
=================================================================== |
| 80 |
--- railcontrol.orig/RailControl.cpp 2026-01-12 04:49:48.008520800 +0100 |
| 81 |
+++ railcontrol/RailControl.cpp 2026-01-12 04:49:48.007788218 +0100 |
| 82 |
@@ -34,7 +34,6 @@ |
| 83 |
#include "Manager.h" |
| 84 |
#include "Network/Select.h" |
| 85 |
#include "RailControl.h" |
| 86 |
-#include "Version.h" |
| 87 |
#include "Utils/Utils.h" |
| 88 |
|
| 89 |
using std::vector; |
| 90 |
@@ -122,16 +121,6 @@ |
| 91 |
} |
| 92 |
|
| 93 |
logger->Info(Languages::TextStarting, RailControl); |
| 94 |
- logger->Info(Languages::TextVersion, GetVersionInfoRailControlVersion()); |
| 95 |
- logger->Info(Languages::TextCompileDate, Utils::Utils::TimestampToDate(GetVersionInfoCompileTimestamp())); |
| 96 |
- logger->Info(Languages::TextGitHash, GetVersionInfoGitHash()); |
| 97 |
- logger->Info(Languages::TextGitDate, Utils::Utils::TimestampToDate(GetVersionInfoGitTimestamp())); |
| 98 |
- |
| 99 |
- const unsigned int changedFiles = GetVersionInfoGitDirty(); |
| 100 |
- if (changedFiles) |
| 101 |
- { |
| 102 |
- logger->Info(Languages::TextGitDirty, changedFiles); |
| 103 |
- } |
| 104 |
|
| 105 |
logger->Info(Languages::TextStartArgument, argv[0]); |
| 106 |
|
| 107 |
Index: railcontrol/Server/Web/WebClient.cpp |
| 108 |
=================================================================== |
| 109 |
--- railcontrol.orig/Server/Web/WebClient.cpp 2026-01-12 04:49:48.008520800 +0100 |
| 110 |
+++ railcontrol/Server/Web/WebClient.cpp 2026-01-12 04:51:47.081344555 +0100 |
| 111 |
@@ -35,7 +35,6 @@ |
| 112 |
#include "Hardware/HardwareHandler.h" |
| 113 |
#include "RailControl.h" |
| 114 |
#include "Utils/Utils.h" |
| 115 |
-#include "Version.h" |
| 116 |
#include "Server/Web/HtmlTagAccessory.h" |
| 117 |
#include "Server/Web/HtmlTagButtonCancel.h" |
| 118 |
#include "Server/Web/HtmlTagButtonCommand.h" |
| 119 |
@@ -167,10 +166,6 @@ |
| 120 |
if (uri.compare("/") == 0) |
| 121 |
{ |
| 122 |
PrintMainHTML(); |
| 123 |
- if (server.UpdateAvailable()) |
| 124 |
- { |
| 125 |
- server.AddUpdate("warning", Languages::TextRailControlUpdateAvailable); |
| 126 |
- } |
| 127 |
} |
| 128 |
else if (arguments["cmd"].compare("askshutdown") == 0) |
| 129 |
{ |
| 130 |
@@ -3116,7 +3111,7 @@ |
| 131 |
} |
| 132 |
struct timeval tv; |
| 133 |
int ret = gettimeofday(&tv, nullptr); |
| 134 |
- if (ret != 0 || tv.tv_sec > GetVersionInfoCompileTimestamp()) |
| 135 |
+ if (ret != 0) |
| 136 |
{ |
| 137 |
ReplyHtmlWithHeaderAndParagraph(Languages::TextTimestampAlreadySet); |
| 138 |
return; |
| 139 |
Index: railcontrol/Server/Web/WebServer.cpp |
| 140 |
=================================================================== |
| 141 |
--- railcontrol.orig/Server/Web/WebServer.cpp 2026-01-12 04:49:48.008520800 +0100 |
| 142 |
+++ railcontrol/Server/Web/WebServer.cpp 2026-01-12 04:52:35.516658587 +0100 |
| 143 |
@@ -37,7 +37,6 @@ |
| 144 |
#include "Languages.h" |
| 145 |
#include "RailControl.h" |
| 146 |
#include "Utils/Network.h" |
| 147 |
-#include "Version.h" |
| 148 |
#include "Server/Web/WebClient.h" |
| 149 |
#include "Server/Web/WebServer.h" |
| 150 |
|
| 151 |
@@ -68,7 +67,6 @@ |
| 152 |
AddUpdate(Languages::TextRailControlStarted); |
| 153 |
|
| 154 |
LogBrowserInfo(webserveraddress, port); |
| 155 |
- updateAvailable = Utils::Network::HostResolves(GetVersionInfoGitHash() + ".hash.railcontrol.org"); |
| 156 |
} |
| 157 |
|
| 158 |
WebServer::~WebServer() |