diff --git a/amalgamate.py b/amalgamate.py index cb7e68c4..57604c97 100644 --- a/amalgamate.py +++ b/amalgamate.py @@ -58,8 +58,9 @@ os.system("rm pocketpy") os.system("cp amalgamated/pocketpy.h plugins/flutter/src/pocketpy.h") os.system("cp amalgamated/pocketpy.h plugins/macos/pocketpy/pocketpy.h") -unity_ios_header = 'plugins/unity/PocketPyUnityPlugin/Assets/PocketPy/Plugins/iOS/pocketpy.h' -os.system(f'cp amalgamated/pocketpy.h "{unity_ios_header}"') +if os.path.exists("plugins/unity/PocketPyUnityPlugin"): + unity_ios_header = 'plugins/unity/PocketPyUnityPlugin/Assets/PocketPy/Plugins/iOS/pocketpy.h' + os.system(f'cp amalgamated/pocketpy.h "{unity_ios_header}"') if os.path.exists("plugins/godot/godot-cpp/pocketpy"): os.system("cp amalgamated/pocketpy.h plugins/godot/godot-cpp/pocketpy/src/pocketpy.h") \ No newline at end of file