Path: Add tools README.md file to tools working directory on install
This code copies all files in the default (program install location) Path\Tools folder to the user's working tools folder when they setup the ToolBit working directories for the first time.
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user