Skip to content

Commit

Permalink
Fix build tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daylily-Zeleen committed Jul 29, 2023
1 parent 74766d6 commit 820370b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def main():
for arg in sys.argv:
if arg == "-h" or arg == "--help":
os.system("scons -h")
print('\nIf you have not specify "target" argument, this tool will build both debug and relaese.')
print(
'\nIf you have not specify "target" argument, this tool will build both debug and relaese.')
return

if arg.startswith("python"):
Expand Down Expand Up @@ -60,7 +61,8 @@ def main():

# Copy readme and license.
shutil.copyfile("README.md", path_join(plugin_dir, "README.md"))
shutil.copyfile("README_zh_cn.md", path_join(plugin_dir, "README_zh_cn.md"))
shutil.copyfile("README_zh_cn.md", path_join(
plugin_dir, "README_zh_cn.md"))
shutil.copyfile("LICENSE", path_join(plugin_dir, "LICENSE"))

shutil.copyfile("README.md", path_join("demo", "README.md"))
Expand All @@ -84,9 +86,10 @@ def zip_files_recursively(zip_file: zipfile.ZipFile, dir: str):
if os.path.isdir(path):
zip_files_recursively(zip_file, path)
else:
if path.startswith("demo/"):
path = path.replace("demo/", "", 1)
zip_file.write(path, path)
src_path = path
if src_path.startswith("demo/"):
src_path = src_path.replace("demo/", "", 1)
zip_file.write(path, src_path)


if __name__ == "__main__":
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 820370b

Please sign in to comment.