diff --git a/RELEASE.md b/RELEASE.md index f2ddfaa3..39ac214d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -238,8 +238,6 @@ Make the Apple Silicon app bundle: ```sh /Library/Frameworks/Python.framework/Versions/3.11/bin/poetry run python ./setup-freeze.py bdist_mac -rm -rf build/OnionShare.app/Contents/Resources/lib -mv build/exe.macosx-10.9-universal2-3.11/lib build/OnionShare.app/Contents/Resources/ /Library/Frameworks/Python.framework/Versions/3.11/bin/poetry run python ./scripts/build-macos.py cleanup-build ``` diff --git a/desktop/scripts/build-macos.py b/desktop/scripts/build-macos.py index c998eb0d..4200b6af 100644 --- a/desktop/scripts/build-macos.py +++ b/desktop/scripts/build-macos.py @@ -167,12 +167,15 @@ def cleanup_build(): "QtWebEngineQuick", "QtWebEngineQuickDelegatesQml", ]: - shutil.rmtree( - f"{app_path}/Contents/MacOS/lib/PySide6/Qt/lib/{framework}.framework" - ) - print( - f"Deleted: {app_path}/Contents/MacOS/lib/PySide6/Qt/lib/{framework}.framework" - ) + try: + shutil.rmtree( + f"{app_path}/Contents/MacOS/lib/PySide6/Qt/lib/{framework}.framework" + ) + print( + f"Deleted: {app_path}/Contents/MacOS/lib/PySide6/Qt/lib/{framework}.framework" + ) + except FileNotFoundError: + pass try: os.remove(f"{app_path}/Contents/MacOS/lib/PySide6/{framework}.abi3.so") print(f"Deleted: {app_path}/Contents/MacOS/lib/PySide6/{framework}.abi3.so")