Skip to content

Commit 67ee92f

Browse files
committed
macOS: refresh app bundles before notarization
Refresh the app bundle after every build, without requiring -p.
1 parent a143fa7 commit 67ee92f

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎src/Build/build_veracrypt_macosx.sh‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ if [ "$brew" = true ]; then
105105
make
106106
if [ "$package" = true ]; then
107107
make package
108+
else
109+
make bundle
108110
fi
109111
exit 0
110112
fi
@@ -159,6 +161,9 @@ make WXSTATIC=FULL clean
159161
make WXSTATIC=FULL
160162
if [ "$package" = true ]; then
161163
make WXSTATIC=FULL package
164+
else
165+
# Notarization consumes the app bundle, not the standalone executable.
166+
make WXSTATIC=FULL bundle
162167
fi
163168

164169
echo "VeraCrypt build completed successfully."

‎src/Main/Main.make‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,12 @@ endif
222222
endif
223223

224224
ifeq "$(PLATFORM)" "MacOSX"
225-
prepare: $(APPNAME)
225+
.PHONY: bundle prepare
226+
227+
# Keep bundle assembly available to builds that do not have signing credentials.
228+
bundle: $(APPNAME)
226229
mkdir -p $(APPNAME).app/Contents/MacOS $(APPNAME).app/Contents/Resources/doc
230+
rm -rf $(APPNAME).app/Contents/_CodeSignature
227231
rm -rf $(APPNAME).app/Contents/Resources/doc/HTML
228232
mkdir -p $(APPNAME).app/Contents/Resources/doc/HTML
229233
mkdir -p $(APPNAME).app/Contents/MacOS $(APPNAME).app/Contents/Resources/languages
@@ -258,6 +262,8 @@ else
258262
sed -e 's/_VERSION_/$(patsubst %a,%.1,$(patsubst %b,%.2,$(TC_VERSION)))/' ../Build/Resources/MacOSX/Info.plist.xml >$(APPNAME).app/Contents/Info.plist
259263
endif
260264
chmod -R go-w $(APPNAME).app
265+
266+
prepare: bundle
261267
ifneq ("$(LOCAL_DEVELOPMENT_BUILD)","true")
262268
codesign -s "Developer ID Application: Mounir Joseph IDRASSI (HLTN5GLG99)" --timestamp $(APPNAME).app
263269
endif

‎src/Makefile‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#------ Targets ------
3232
# all
3333
# clean
34+
# bundle: Assemble the macOS app bundle without signing or packaging
3435
# wxbuild: Configure and build wxWidgets - source code must be located at $(WX_ROOT)
3536

3637

@@ -714,6 +715,12 @@ all clean:
714715
export LIBS="$(BASE_DIR)/$$DIR/$$PROJ.a $$LIBS"; \
715716
done
716717

718+
ifeq "$(PLATFORM)" "MacOSX"
719+
.PHONY: bundle
720+
bundle:
721+
$(MAKE) -C Main -f Main.make NAME=Main bundle
722+
endif
723+
717724
install:
718725
$(MAKE) -C Main -f Main.make NAME=Main install
719726

0 commit comments

Comments
 (0)