Skip to content

Commit 42b47aa

Browse files
committed
fix example not being copied
1 parent 0eb9358 commit 42b47aa

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packaging/build_exe.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,19 @@ def build_exe():
100100
shutil.rmtree(work_path)
101101

102102
# Copy resources into installer directory
103-
resources = ["static/images", "static/style.css", "../examples"]
103+
resources = ["static/images", "static/style.css"]
104+
if IS_MAC:
105+
# on macOS, examples have to go into resources
106+
resources.append("../examples")
104107
shutil.copy(PROJECT_PATH / "LICENSE", dist_path / "LICENSE")
105108
for resource in resources:
106-
if resource == "../examples" and not IS_MAC:
107-
# on macOS, examples have to go into resources
108-
continue
109-
109+
src_path = PROJECT_PATH / "rascal2" / resource
110+
dest_path = dist_path / resource
110111
if IS_MAC:
112+
if resource == "../examples":
113+
resource = resource[3:]
111114
dest_path = dist_path / "rascal.app" / "Contents" / "Resources" / resource
112-
else:
113-
dest_path = dist_path / resource
114-
src_path = PROJECT_PATH / "rascal2" / resource
115+
115116
if src_path.is_file():
116117
shutil.copy(src_path, dest_path)
117118
else:

0 commit comments

Comments
 (0)