Skip to content

Commit 59ea717

Browse files
committed
[RFR] : Refacto of the package generation
1 parent a20ae16 commit 59ea717

7 files changed

Lines changed: 59 additions & 51 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ if (EXISTS ${CMAKE_BINARY_DIR}/current_build_type)
288288

289289
install(TARGETS ${PROJECT} RUNTIME DESTINATION . COMPONENT APP_BINARY)
290290
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION . COMPONENT APP_FILES)
291-
install(FILES ${CMAKE_SOURCE_DIR}/VERSION DESTINATION . COMPONENT APP_FILES OPTIONAL)
292-
install(FILES ${CMAKE_SOURCE_DIR}/CHANGELOG DESTINATION . COMPONENT APP_FILES OPTIONAL)
291+
# install(FILES ${CMAKE_SOURCE_DIR}/VERSION DESTINATION . COMPONENT APP_FILES OPTIONAL)
292+
# install(FILES ${CMAKE_SOURCE_DIR}/CHANGELOG DESTINATION . COMPONENT APP_FILES OPTIONAL)
293293

294294
#############################################################
295295
### PACKAGE #################################################

bin/log_parsing.lua

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
-- logInfo(infos_string) -- will log a message with level INFOS in the in app console
2-
-- logWarning(warning_string) -- will log a message with level WARNING in app console
3-
-- logError(error_string) -- will log a message with level ERROR in app console
4-
5-
-- getRowIndex() -- return the row number of the file
6-
-- getRowCount() -- return the number of rows of the file
7-
8-
9-
-- stringToEpoch(string epoch, double hour_offset) -- epoch_sring must be in format '%Y-%m-%d %H:%M:%S'
10-
-- epochToString(Epoch epoch_time, double hour_offset)
11-
12-
-- add a signal tag with date, color a name. the help will be displayed when mouse over the tag
13-
-- addSignalTag(Epoch date, double r, double g, double b, double a, string name, string help)
14-
15-
-- addSignalStatus(string signal_category, string signal_name, Epoch signal_epoch_time, string signal_status)
16-
-- addSignalValue(string signal_category, string signal_name, Epoch signal_epoch_time, double signal_value)
17-
-- addSignalStartZone(string signal_category, string signal_name, Epoch signal_epoch_time, string signal_string)
18-
-- addSignalEndZone(string signal_category, string signal_name, Epoch signal_epoch_time, string signal_string)
19-
20-
function startFile()
21-
ltg:logInfo(" --- Start of file parsing ---");
1+
-- UserDatas ltg (LogToGraph valid only from LogToGraph)
2+
-- ltg:logInfo(infos_string) : will log the message in the in app console
3+
-- ltg:logWarning(infos_string) : will log the message in the in app console
4+
-- ltg:logError(infos_string) : will log the message in the in app console
5+
-- ltg:logDebug(infos_string) : will log the message in the in app console
6+
-- ltg:addSignalTag(date, r, g, b, a, name, help) : add a signal tag with date, color a name (color is linear [0:1]. the help will be displayed when mouse over the tag
7+
-- ltg:addSignalStatus(signal_category, signal_name, signal_epoch_time, signal_status) : will add a signal string status
8+
-- ltg:addSignalValue(signal_category, signal_name, signal_epoch_time, signal_value, description_string_optional) : will add a signal numerical value
9+
-- ltg:addSignalStartZone(signal_category, signal_name, signal_epoch_time, signal_string) : will add a signal start zone
10+
-- ltg:addSignalEndZone(signal_category, signal_name, signal_epoch_time, signal_string) : will add a signal end zone
11+
-- get/set epoch time from datetime in format "YYYY-MM-DD HH:MM:SS,MS" or "YYYY-MM-DD HH:MM:SS.MS" with hour offset in second param
12+
-- double ltg:stringToEpoch("2023-01-16 15:24:26,464", 0)
13+
-- string ltg:epochToString(18798798465465.546546, 0)
14+
-- regex (boost::regex engine, PCRE-like syntax — supports |, {m,n}, lookahead, etc.):
15+
-- local re = ltg:regex(pattern) -- compile once at script init, reuse on every row
16+
-- re:test(input) -> bool
17+
-- re:match(input) -> captures (multiple values), or nil
18+
-- re:find(input) -> start, end (1-based), or nil
19+
-- re:gsub(input, repl) -> result, count (mirrors string.gsub)
20+
-- re:gmatch(input) -> iterator (for use in `for cap in re:gmatch(s) do ... end`)
21+
22+
function startFile(filepath)
23+
ltg:logInfo(" --- Start parsing of file '" .. filepath .. "'");
2224
end
2325

2426
function parse(buffer)
@@ -28,6 +30,6 @@ function parse(buffer)
2830
end
2931
end
3032

31-
function endFile()
32-
ltg:logInfo(" --- End of file parsing ---");
33+
function endFile(filepath)
34+
ltg:logInfo(" --- End parsing of file '" .. filepath .. "'");
3335
end

cmake/glad.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
FetchContent_Declare(glad
44
URL ${CMAKE_SOURCE_DIR}/3rdparty/libs/glad.tar.gz
55
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
6+
EXCLUDE_FROM_ALL
67
)
78
FetchContent_MakeAvailable(glad)
89

cmake/glfw.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ set(GLFW_BUILD_X11 ${GLFW_BUILD_X11} CACHE BOOL "" FORCE)
1919
FetchContent_Declare(glfw
2020
URL ${CMAKE_SOURCE_DIR}/3rdparty/libs/glfw-3.4.tar.gz
2121
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
22+
EXCLUDE_FROM_ALL
2223
)
2324
FetchContent_MakeAvailable(glfw)
2425
set_target_properties(glfw PROPERTIES FOLDER 3rdparty)

cmake/imguipack.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set(USE_IM_GUIZMO OFF CACHE BOOL "" FORCE)
1818
set(USE_IMGUI_MARKDOW OFF CACHE BOOL "" FORCE)
1919
set(USE_IM_GRADIENT_HDR OFF CACHE BOOL "" FORCE)
2020

21-
add_subdirectory(${IMGUIPACK_SOURCE_DIR})
21+
add_subdirectory(${IMGUIPACK_SOURCE_DIR} EXCLUDE_FROM_ALL)
2222

2323
set_target_properties(imguipack PROPERTIES FOLDER 3rdparty)
2424
set_target_properties(freetype PROPERTIES FOLDER 3rdparty)

doc/log_parsing.lua

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
-- logInfo(infos_string) -- will log a message with level INFOS in the in app console
2-
-- logWarning(warning_string) -- will log a message with level WARNING in app console
3-
-- logError(error_string) -- will log a message with level ERROR in app console
1+
-- UserDatas ltg (LogToGraph valid only from LogToGraph)
2+
-- ltg:logInfo(infos_string) : will log the message in the in app console
3+
-- ltg:logWarning(infos_string) : will log the message in the in app console
4+
-- ltg:logError(infos_string) : will log the message in the in app console
5+
-- ltg:logDebug(infos_string) : will log the message in the in app console
6+
-- ltg:addSignalTag(date, r, g, b, a, name, help) : add a signal tag with date, color a name (color is linear [0:1]. the help will be displayed when mouse over the tag
7+
-- ltg:addSignalStatus(signal_category, signal_name, signal_epoch_time, signal_status) : will add a signal string status
8+
-- ltg:addSignalValue(signal_category, signal_name, signal_epoch_time, signal_value, description_string_optional) : will add a signal numerical value
9+
-- ltg:addSignalStartZone(signal_category, signal_name, signal_epoch_time, signal_string) : will add a signal start zone
10+
-- ltg:addSignalEndZone(signal_category, signal_name, signal_epoch_time, signal_string) : will add a signal end zone
11+
-- get/set epoch time from datetime in format "YYYY-MM-DD HH:MM:SS,MS" or "YYYY-MM-DD HH:MM:SS.MS" with hour offset in second param
12+
-- double ltg:stringToEpoch("2023-01-16 15:24:26,464", 0)
13+
-- string ltg:epochToString(18798798465465.546546, 0)
14+
-- regex (boost::regex engine, PCRE-like syntax — supports |, {m,n}, lookahead, etc.):
15+
-- local re = ltg:regex(pattern) -- compile once at script init, reuse on every row
16+
-- re:test(input) -> bool
17+
-- re:match(input) -> captures (multiple values), or nil
18+
-- re:find(input) -> start, end (1-based), or nil
19+
-- re:gsub(input, repl) -> result, count (mirrors string.gsub)
20+
-- re:gmatch(input) -> iterator (for use in `for cap in re:gmatch(s) do ... end`)
421

5-
-- getRowIndex() -- return the row number of the file
6-
-- getRowCount() -- return the number of rows of the file
7-
8-
-- stringToEpoch(string epoch, double hour_offset)
9-
-- epochToString(Epoch epoch_time, double hour_offset)
10-
11-
-- add a signal tag with date, color a name. the help will be displayed when mouse over the tag
12-
-- addSignalTag(Epoch date, double r, double g, double b, double a, string name, string help)
13-
14-
-- addSignalStatus(string signal_category, string signal_name, Epoch signal_epoch_time, string signal_status)
15-
-- addSignalValue(string signal_category, string signal_name, Epoch signal_epoch_time, double signal_value)
16-
-- addSignalStartZone(string signal_category, string signal_name, Epoch signal_epoch_time, string signal_string)
17-
-- addSignalEndZone(string signal_category, string signal_name, Epoch signal_epoch_time, string signal_string)
18-
19-
function startFile()
20-
--RecursPrint(ltg)
21-
ltg:logInfo(" --- Start of file parsing ---");
22+
function startFile(filepath)
23+
ltg:logInfo(" --- Start parsing of file '" .. filepath .. "'");
2224
end
2325

2426
function parse(buffer)
2527
_section, _time, _name, _value = string.match(buffer, "<profiler section=\"(.*)\" epoch_time=\"(.*)\" name=\"(.*)\" render_time_ms=\"(.*)\">")
2628
if _section ~= nil and _time ~= nil and _name ~= nil and _value ~= nil then
27-
ltg:addSignalValue(_section, _name, ltg:stringToEpoch(_time, 0), tonumber(_value))
29+
ltg:addSignalValue(_section, _name, tonumber(_time), tonumber(_value))
2830
end
2931
end
3032

31-
function endFile()
32-
ltg:logInfo(" --- End of file parsing ---");
33+
function endFile(filepath)
34+
ltg:logInfo(" --- End parsing of file '" .. filepath .. "'");
3335
end

plugins/LuaScripting/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ set(CMAKE_CXX_STANDARD 17)
2020
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2121
set(CMAKE_CXX_EXTENSIONS OFF)
2222

23-
2423
if (uninstall)
2524
set_target_properties(uninstall PROPERTIES FOLDER "CmakeTargets")
2625
endif()
@@ -111,7 +110,10 @@ set_target_properties(${PROJECT} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBI
111110
set_target_properties(${PROJECT} PROPERTIES FOLDER Plugins/Scripting)
112111

113112
install(IMPORTED_RUNTIME_ARTIFACTS ${PROJECT} DESTINATION plugins COMPONENT PLUGIN_BINARY_${PROJECT})
114-
install(TARGETS ${LUA_JIT_LIBRARIES} RUNTIME DESTINATION plugins COMPONENT APP_LIBS_${LUA_JIT_LIBRARIES})
113+
114+
if (${BUILD_SHARED_LIBS})
115+
install(TARGETS ${LUA_JIT_LIBRARIES} RUNTIME DESTINATION plugins COMPONENT APP_LIBS_${LUA_JIT_LIBRARIES})
116+
endif()
115117

116118
target_include_directories(${PROJECT} PRIVATE
117119
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty

0 commit comments

Comments
 (0)