You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Duplicate the cwd directory, the original will be renamed to -compiled and the new one will be renamed to the original. For the new one, go through every lua descendant file in the current directory and delete it and create a new file with the same name but .py
155
158
confirm=input(warn("Are you sure? This will duplicate the current directory and compile the files in the new directory.\n\nType 'yes' to continue."))
156
-
ifconfirm=="yes":
159
+
ifconfirm=="yes"anduname().system=="Windows":
160
+
# check if cwd/default.project.json exists, if it does, then use that as the default project file
# duplicate the directory, remove the -compiled from the end
167
+
shutil.copytree(path_name, path_name+"-compiled")
168
+
# now we have 2 identical directories, one with -compiled and one without. for the one without, go through every lua descendant file in the current directory and delete it and create a new file with the same name but .py
print(info("Completed! You may need to modify the default.package.json or any other equivalent file to make it use the -compiled directory rather than the original."))
191
+
elifconfirm=="yes":
192
+
# note by CataclysmicDev -> i left this old code here just to make sure its stable on unix but you can delete it and see if the above code works on unix too
157
193
path=os.path.join(os.getcwd(), "src")
158
194
# check if cwd/default.project.json exists, if it does, then use that as the default project file
# duplicate the directory, remove the -compiled from the end
164
-
shutil.copytree(path+"-compiled", path)
200
+
shutil.copytree(path_name+"-compiled", path_name)
165
201
# now we have 2 identical directories, one with -compiled and one without. for the one without, go through every lua descendant file in the current directory and delete it and create a new file with the same name but .py
0 commit comments