Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FormerLurker/ArcWelderLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFormerLurker <hochgebe@gmail.com>2020-11-28 19:46:31 +0300
committerFormerLurker <hochgebe@gmail.com>2020-11-28 19:46:31 +0300
commitf89e30660e82df0d9ea2f704aafce833d413ff13 (patch)
tree5337344c06c167972af56963f50eea701d81887f
parent7da85eb0a6d659885b4a16fce7a0ba15ecbe0e39 (diff)
Fix version for plugin
-rw-r--r--ArcWelderConsole/CMakeLists.txt1
-rw-r--r--ArcWelderInverseProcessor/CMakeLists.txt1
-rw-r--r--GcodeProcessorLib/CMakeLists.txt6
-rw-r--r--GcodeProcessorLib/deploy/version.h13
-rw-r--r--GcodeProcessorLib/version.generated.h.in21
-rw-r--r--GcodeProcessorLib/version.h15
-rw-r--r--PyArcWelder/py_arc_welder_extension.cpp12
7 files changed, 44 insertions, 25 deletions
diff --git a/ArcWelderConsole/CMakeLists.txt b/ArcWelderConsole/CMakeLists.txt
index 19588a7..6ce4b2c 100644
--- a/ArcWelderConsole/CMakeLists.txt
+++ b/ArcWelderConsole/CMakeLists.txt
@@ -4,6 +4,7 @@ project(ArcWelderConsole C CXX)
# add definitions from the GcodeProcessorLib and ArcWelder libraries
add_definitions(${GcodeProcessorLib_DEFINITIONS} ${ArcWelder_DEFINITIONS})
+add_definitions("-DHAS_GENERATED_VERSION")
# Include the GcodeProcessorLib and ArcWelder's directories
include_directories(${GcodeProcessorLib_INCLUDE_DIRS} ${ArcWelder_INCLUDE_DIRS} ${TCLAP_INCLUDE_DIRS})
diff --git a/ArcWelderInverseProcessor/CMakeLists.txt b/ArcWelderInverseProcessor/CMakeLists.txt
index b6b4938..d12b33f 100644
--- a/ArcWelderInverseProcessor/CMakeLists.txt
+++ b/ArcWelderInverseProcessor/CMakeLists.txt
@@ -4,6 +4,7 @@ project(ArcWelderInverseProcessor C CXX)
# add definitions from the GcodeProcessorLib and ArcWelder libraries
add_definitions(${GcodeProcessorLib_DEFINITIONS} ${ArcWelder_DEFINITIONS})
+add_definitions("-DHAS_GENERATED_VERSION")
# Include the GcodeProcessorLib and ArcWelder's directories
include_directories(${GcodeProcessorLib_INCLUDE_DIRS} ${ArcWelder_INCLUDE_DIRS} ${TCLAP_INCLUDE_DIRS})
diff --git a/GcodeProcessorLib/CMakeLists.txt b/GcodeProcessorLib/CMakeLists.txt
index 52d1d3a..8cc89bf 100644
--- a/GcodeProcessorLib/CMakeLists.txt
+++ b/GcodeProcessorLib/CMakeLists.txt
@@ -51,6 +51,10 @@ configure_file(
)
include_directories("${CMAKE_BINARY_DIR}/GcodeProcessorLib/generated/")
+# copy version.h file to the source folder for later deployment
+file(COPY "${CMAKE_BINARY_DIR}/GcodeProcessorLib/version.generated.h" DESTINATION "${PROJECT_SOURCE_DIR}/deploy")
+file(RENAME "${PROJECT_SOURCE_DIR}/deploy/version.generated.h" "${PROJECT_SOURCE_DIR}/deploy/version.h")
+
option(USE_CXX_EXCEPTIONS "Enable C++ exception support" ON)
# include sourcelist.cmake, which contains our source list and exposes it as the
@@ -64,7 +68,7 @@ add_library(${PROJECT_NAME} STATIC ${GcodeProcessorLibSources})
install(
TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib # <-- Add this line
+ LIBRARY DESTINATION lib
COMPONENT library
)
diff --git a/GcodeProcessorLib/deploy/version.h b/GcodeProcessorLib/deploy/version.h
new file mode 100644
index 0000000..b418130
--- /dev/null
+++ b/GcodeProcessorLib/deploy/version.h
@@ -0,0 +1,13 @@
+
+// In version.h.in
+#ifndef VERSION_GENERATED_H
+#define VERSION_GENERATED_H
+ #define GIT_BRANCH "devel"
+ #define GIT_COMMIT_HASH "7da85eb"
+ #define GIT_TAGGED_VERSION "0.1.0-11-g7da85eb"
+ #define GIT_TAG "0.1.0"
+ #define BUILD_DATE "2020-11-28T16:09:44Z"
+ #define COPYRIGHT_DATE "2020"
+ #define AUTHOR "Brad Hochgesang"
+#endif
+// end of version.h.in
diff --git a/GcodeProcessorLib/version.generated.h.in b/GcodeProcessorLib/version.generated.h.in
index ec3cd38..1b6066b 100644
--- a/GcodeProcessorLib/version.generated.h.in
+++ b/GcodeProcessorLib/version.generated.h.in
@@ -1,12 +1,13 @@
+
+// In version.h.in
#ifndef VERSION_GENERATED_H
-#define VERSION_GENERATED_H
+ #define VERSION_GENERATED_H
+ #define GIT_BRANCH "@GIT_BRANCH@"
+ #define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
+ #define GIT_TAGGED_VERSION "@GIT_TAGGED_VERSION@"
+ #define GIT_TAG "@GIT_TAG@"
+ #define BUILD_DATE "@BUILD_DATE@"
+ #define COPYRIGHT_DATE "@BUILD_YEAR@"
+ #define AUTHOR "Brad Hochgesang"
#endif
-
-#define GIT_BRANCH "@GIT_BRANCH@"
-#define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
-#define GIT_TAGGED_VERSION "@GIT_TAGGED_VERSION@"
-#define GIT_TAG "@GIT_TAG@"
-#define BUILD_DATE "@BUILD_DATE@"
-#define COPYRIGHT_DATE "@BUILD_YEAR@"
-#define AUTHOR "Brad Hochgesang"
-
+// end of version.h.in \ No newline at end of file
diff --git a/GcodeProcessorLib/version.h b/GcodeProcessorLib/version.h
index 9226f12..5653329 100644
--- a/GcodeProcessorLib/version.h
+++ b/GcodeProcessorLib/version.h
@@ -1,14 +1,15 @@
#ifndef VERSION_H
#define VERSION_H
#ifndef HAS_GENERATED_VERSION
- #define GIT_BRANCH "Unknown"
- #define GIT_COMMIT_HASH "Unknown"
- #define GIT_TAGGED_VERSION "Unknown"
- #define GIT_TAG "Unknown"
- #define BUILD_DATE "Unknown"
- #define COPYRIGHT_DATE "2020"
- #define AUTHOR "Brad Hochgesang"
+ #define GIT_BRANCH "Unknown"
+ #define GIT_COMMIT_HASH "Unknown"
+ #define GIT_TAGGED_VERSION "Unknown"
+ #define GIT_TAG "Unknown"
+ #define BUILD_DATE "Unknown"
+ #define COPYRIGHT_DATE "2020"
+ #define AUTHOR "Brad Hochgesang"
#else
#include "version.generated.h"
+
#endif
#endif \ No newline at end of file
diff --git a/PyArcWelder/py_arc_welder_extension.cpp b/PyArcWelder/py_arc_welder_extension.cpp
index e9d85ca..25eb9d9 100644
--- a/PyArcWelder/py_arc_welder_extension.cpp
+++ b/PyArcWelder/py_arc_welder_extension.cpp
@@ -48,10 +48,10 @@ int main(int argc, char* argv[])
// Initialize the Python interpreter. Required.
Py_Initialize();
// We are not using threads, do not enable.
- std::cout << "Initializing threads...";
- if (!PyEval_ThreadsInitialized()) {
- PyEval_InitThreads();
- }
+ //std::cout << "Initializing threads...";
+ //if (!PyEval_ThreadsInitialized()) {
+ // PyEval_InitThreads();
+ //}
// Optionally import the module; alternatively, import can be deferred until the embedded script imports it.
PyImport_ImportModule("PyArcWelder");
PyMem_RawFree(program);
@@ -159,9 +159,7 @@ extern "C" void initPyArcWelder(void)
logger_levels.push_back(log_levels::CRITICAL);
p_py_logger = new py_logger(logger_names, logger_levels);
p_py_logger->initialize_loggers();
- std::string message = "PyArcWelder V0.1.0rc1.dev2 imported - Copyright (C) 2019 Brad Hochgesang...";
- p_py_logger->log(GCODE_CONVERSION, INFO, message);
- p_py_logger->set_log_level(ERROR);
+ p_py_logger->set_log_level(INFO);
std::cout << " Initialization Complete\r\n";
#if PY_MAJOR_VERSION >= 3