Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.h rust
*.rs rust
src/etc/pkg/rust-logo.ico binary
src/etc/pkg/rust-logo.png binary
src/rt/msvc/* -whitespace
src/rt/vg/* -whitespace
src/rt/jemalloc/**/* -whitespace
19 changes: 17 additions & 2 deletions mk/dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,27 @@ dist-prepare-osx-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
dist-prepare-osx-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
dist-prepare-osx-$(1): prepare-base-osx-$(1)

dist/$(PKG_NAME)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt dist-prepare-osx-$(1)
dist/$(PKG_NAME)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt \
dist-prepare-osx-$(1) \
tmp/dist/pkgres-$(1)/LICENSE.txt \
tmp/dist/pkgres-$(1)/welcome.rtf \
tmp/dist/pkgres-$(1)/rust-logo.png
@$$(call E, making OS X pkg)
$(Q)pkgbuild --identifier org.rust-lang.rust --root tmp/dist/pkgroot-$(1) rust.pkg
$(Q)productbuild --distribution $(S)src/etc/pkg/Distribution.xml --resources . dist/$(PKG_NAME)-$(1).pkg
$(Q)productbuild --distribution $(S)src/etc/pkg/Distribution.xml \
--resources tmp/dist/pkgres-$(1) dist/$(PKG_NAME)-$(1).pkg
$(Q)rm -rf tmp rust.pkg

tmp/dist/pkgres-$(1)/LICENSE.txt: $(S)/LICENSE.txt
@$$(call E,pkg resource LICENSE.txt)
$(Q)mkdir -p $$(@D)
$(Q)cp $$< $$@

tmp/dist/pkgres-$(1)/%: $(S)src/etc/pkg/%
@$$(call E,pkg resource $$*)
$(Q)mkdir -p $$(@D)
$(Q)cp -r $$< $$@

endef

$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host))))
Expand Down
6 changes: 5 additions & 1 deletion src/etc/pkg/Distribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
<line choice="org.rust-lang.rust"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="default"
customLocation="usr/local"/>
<choice id="org.rust-lang.rust" visible="false">
<pkg-ref id="org.rust-lang.rust"/>
</choice>
<pkg-ref id="org.rust-lang.rust" version="0" onConclusion="none">rust.pkg</pkg-ref>
<welcome file="welcome.rtf" mime-type="text/enriched"/>
<background file="rust-logo.png" mime-type="image/png"
alignment="bottomleft"/>
</installer-gui-script>
Binary file added src/etc/pkg/rust-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/etc/pkg/welcome.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww10800\viewh6300\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\fs28 \cf0 \
\
You will be guided through the steps necessary to\
install this software.\
\
This will install Rust to /usr/local}