File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -167,9 +167,19 @@ $(APP)/Contents/Resources/%.icns: $(OSXDIR)/%.icns
167167 @mkdir -p $(APP)/Contents/Resources
168168 cp -p $< $(APP)/Contents/Resources
169169
170+ # Make sure that the executable contains a loader_path for Frameworks and all
171+ # its subdirectories. If Frameworks does not exist still add an rpath for it.
170172pathapp:
171173 install_name_tool -add_rpath @executable_path/../Frameworks $(VMEXE)
172- install_name_tool -add_rpath @loader_path/../Frameworks $(VMEXE)
174+ if [ -d "$(APP)/Contents/Frameworks" ]; then \
175+ for d in `cd "$(APP)/Contents" >/dev/null; find Frameworks -type d`; do \
176+ echo install_name_tool -add_rpath @loader_path/../$$d $(VMEXE); \
177+ install_name_tool -add_rpath @loader_path/../$$d $(VMEXE); \
178+ done \
179+ else \
180+ echo install_name_tool -add_rpath @loader_path/../Frameworks $(VMEXE); \
181+ install_name_tool -add_rpath @loader_path/../Frameworks $(VMEXE); \
182+ fi
173183
174184# To sign the app, set SIGNING_IDENTITY in the environment, e.g.
175185# export SIGNING_IDENTITY="Developer ID Application: Eliot Miranda"
Original file line number Diff line number Diff line change @@ -167,9 +167,19 @@ $(APP)/Contents/Resources/%.icns: $(OSXDIR)/%.icns
167167 @mkdir -p $(APP)/Contents/Resources
168168 cp -p $< $(APP)/Contents/Resources
169169
170+ # Make sure that the executable contains a loader_path for Frameworks and all
171+ # its subdirectories. If Frameworks does not exist still add an rpath for it.
170172pathapp:
171173 install_name_tool -add_rpath @executable_path/../Frameworks $(VMEXE)
172- install_name_tool -add_rpath @loader_path/../Frameworks $(VMEXE)
174+ if [ -d "$(APP)/Contents/Frameworks" ]; then \
175+ for d in `cd "$(APP)/Contents" >/dev/null; find Frameworks -type d`; do \
176+ echo install_name_tool -add_rpath @loader_path/../$$d $(VMEXE); \
177+ install_name_tool -add_rpath @loader_path/../$$d $(VMEXE); \
178+ done \
179+ else \
180+ echo install_name_tool -add_rpath @loader_path/../Frameworks $(VMEXE); \
181+ install_name_tool -add_rpath @loader_path/../Frameworks $(VMEXE); \
182+ fi
173183
174184# To sign the app, set SIGNING_IDENTITY in the environment, e.g.
175185# export SIGNING_IDENTITY="Developer ID Application: Eliot Miranda"
You can’t perform that action at this time.
0 commit comments