From 67ee92f5081ed39b0c1025a573bb1b6f421b83cc Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 17 Oct 2026 11:33:31 +0200 Subject: [PATCH] macOS: refresh app bundles before notarization Refresh the app bundle after every build, without requiring -p. --- src/Build/build_veracrypt_macosx.sh | 5 +++++ src/Main/Main.make | 8 +++++++- src/Makefile | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Build/build_veracrypt_macosx.sh b/src/Build/build_veracrypt_macosx.sh index 35420c30..17db2c7c 100755 --- a/src/Build/build_veracrypt_macosx.sh +++ b/src/Build/build_veracrypt_macosx.sh @@ -105,6 +105,8 @@ if [ "$brew" = true ]; then make if [ "$package" = true ]; then make package + else + make bundle fi exit 0 fi @@ -159,6 +161,9 @@ make WXSTATIC=FULL clean make WXSTATIC=FULL if [ "$package" = true ]; then make WXSTATIC=FULL package +else + # Notarization consumes the app bundle, not the standalone executable. + make WXSTATIC=FULL bundle fi echo "VeraCrypt build completed successfully." diff --git a/src/Main/Main.make b/src/Main/Main.make index d15c2c8b..abed9824 100755 --- a/src/Main/Main.make +++ b/src/Main/Main.make @@ -222,8 +222,12 @@ endif endif ifeq "$(PLATFORM)" "MacOSX" -prepare: $(APPNAME) +.PHONY: bundle prepare + +# Keep bundle assembly available to builds that do not have signing credentials. +bundle: $(APPNAME) mkdir -p $(APPNAME).app/Contents/MacOS $(APPNAME).app/Contents/Resources/doc + rm -rf $(APPNAME).app/Contents/_CodeSignature rm -rf $(APPNAME).app/Contents/Resources/doc/HTML mkdir -p $(APPNAME).app/Contents/Resources/doc/HTML mkdir -p $(APPNAME).app/Contents/MacOS $(APPNAME).app/Contents/Resources/languages @@ -258,6 +262,8 @@ else sed -e 's/_VERSION_/$(patsubst %a,%.1,$(patsubst %b,%.2,$(TC_VERSION)))/' ../Build/Resources/MacOSX/Info.plist.xml >$(APPNAME).app/Contents/Info.plist endif chmod -R go-w $(APPNAME).app + +prepare: bundle ifneq ("$(LOCAL_DEVELOPMENT_BUILD)","true") codesign -s "Developer ID Application: Mounir Joseph IDRASSI (HLTN5GLG99)" --timestamp $(APPNAME).app endif diff --git a/src/Makefile b/src/Makefile index c3fb6a71..ffce978c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -31,6 +31,7 @@ #------ Targets ------ # all # clean +# bundle: Assemble the macOS app bundle without signing or packaging # wxbuild: Configure and build wxWidgets - source code must be located at $(WX_ROOT) @@ -714,6 +715,12 @@ all clean: export LIBS="$(BASE_DIR)/$$DIR/$$PROJ.a $$LIBS"; \ done +ifeq "$(PLATFORM)" "MacOSX" +.PHONY: bundle +bundle: + $(MAKE) -C Main -f Main.make NAME=Main bundle +endif + install: $(MAKE) -C Main -f Main.make NAME=Main install