1 ifeq ($(TARGET_IS_DARWIN
),y
)
7 HDIUTIL_OPTIONS
+= -quiet
10 DMG_TMPDIR
= $(TARGET_OUTPUT_DIR
)/dmg
11 DMG_TMP
= $(TARGET_OUTPUT_DIR
)/tmp.dmg
13 # These shared libraries are going to be bundled in the DMG file, so
14 # the user doesn't need to install MacPorts. The install_name_tool
15 # command below changes the search path to @executable_path instead of
17 BUNDLED_DYLIBS
= $(shell dyldinfo
-dylibs
$(TARGET_BIN_DIR
)/xcsoar |grep
/opt
/local
/lib
/)
19 $(DMG_TMP
): $(TARGET_BIN_DIR
)/xcsoar build
/Info.plist
$(DATA
)/graphics
/logo_128.icns
21 $(Q
)rm -rf
$(DMG_TMPDIR
)
22 $(Q
)$(MKDIR
) -p
$(DMG_TMPDIR
)/XCSoar.app
/Contents
/MacOS
23 $(Q
)sed
-e
"s,VERSION,$(FULL_VERSION)," <build
/Info.plist
>$(DMG_TMPDIR
)/XCSoar.app
/Contents
/Info.plist
24 $(Q
)cp
$(TARGET_BIN_DIR
)/xcsoar
$(DMG_TMPDIR
)/XCSoar.app
/Contents
/MacOS
/
25 $(Q
)cp
$(BUNDLED_DYLIBS
) $(DMG_TMPDIR
)/XCSoar.app
/Contents
/MacOS
/
26 $(Q
)install_name_tool
$(foreach path
,$(BUNDLED_DYLIBS
),-change
$(path
) @executable_path
/$(notdir $(path
))) $(DMG_TMPDIR
)/XCSoar.app
/Contents
/MacOS
/xcsoar
27 $(Q
)$(MKDIR
) -p
$(DMG_TMPDIR
)/XCSoar.app
/Contents
/Resources
28 $(Q
)cp
$(DATA
)/graphics
/logo_128.icns
$(DMG_TMPDIR
)/XCSoar.app
/Contents
/Resources
/
30 $(Q
)$(HDIUTIL
) create
$(HDIUTIL_OPTIONS
) -fs HFS
+ -volname
"XCSoar" -srcfolder
$(DMG_TMPDIR
) $@
32 $(TARGET_OUTPUT_DIR
)/XCSoar.dmg
: $(DMG_TMP
)
35 $(Q
)$(HDIUTIL
) convert
$(HDIUTIL_OPTIONS
) $< -format UDCO
-o
$@
36 $(Q
)$(HDIUTIL
) internet-enable
$(HDIUTIL_OPTIONS
) -yes
$@
38 dmg
: $(TARGET_OUTPUT_DIR
)/XCSoar.dmg