diff --git a/src/Mod/Path/CMakeLists.txt b/src/Mod/Path/CMakeLists.txt index 6b78b5ea38..4c6589a9ad 100644 --- a/src/Mod/Path/CMakeLists.txt +++ b/src/Mod/Path/CMakeLists.txt @@ -164,6 +164,10 @@ SET(PathScripts_post_SRCS PathScripts/post/uccnc_post.py ) +SET(Tools_SRCS + Tools/README.md +) + SET(Tools_Bit_SRCS Tools/Bit/45degree_chamfer.fctb Tools/Bit/5mm-thread-cutter.fctb @@ -254,6 +258,7 @@ SET(Path_Data SET(all_files ${PathScripts_SRCS} ${PathScripts_post_SRCS} + ${Tools_SRCS} ${Tools_Bit_SRCS} ${Tools_Library_SRCS} ${Tools_Shape_SRCS} @@ -306,6 +311,13 @@ INSTALL( Mod/Path/PathScripts/post ) +INSTALL( + FILES + ${Tools_SRCS} + DESTINATION + Mod/Path/Tools +) + INSTALL( FILES ${Tools_Bit_SRCS} diff --git a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py index 7a70425944..2a7b8ed182 100644 --- a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py +++ b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py @@ -85,6 +85,14 @@ def checkWorkingDir(): PathPreferences.setLastPathToolBit("{}{}Bit".format(workingdir, os.path.sep)) PathLog.debug('setting workingdir to: {}'.format(workingdir)) + # Copy only files of default Path\Tools folder to working directory (targeting the README.md help file) + src_toolfiles = os.listdir(defaultdir) + for file_name in src_toolfiles: + if file_name in ["README.md"]: + full_file_name = os.path.join(defaultdir, file_name) + if os.path.isfile(full_file_name): + shutil.copy(full_file_name, workingdir) + subdirlist = ['Bit', 'Library', 'Shape'] mode = 0o777 for dir in subdirlist.copy():