]> git.lizzy.rs Git - rust.git/commitdiff
dist: Tweak the OSX pkg installer
authorAlex Crichton <alex@alexcrichton.com>
Fri, 28 Mar 2014 21:35:43 +0000 (14:35 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 29 Mar 2014 01:29:29 +0000 (18:29 -0700)
This performs a few touch-ups to the OSX installer:

* A rust logo is shown during installation
* The installation happens to /usr/local by default (instead of /)
* A new welcome screen is shown that's slightly more relevant

.gitattributes
mk/dist.mk
src/etc/pkg/Distribution.xml
src/etc/pkg/rust-logo.png [new file with mode: 0644]
src/etc/pkg/welcome.rtf [new file with mode: 0644]

index 3e368ce70e92883acc94aaac012fdbe35b858ed2..052341b5845bef97fccbba7667a1d686625b4875 100644 (file)
@@ -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
index cd6aedc6e89921fbb4f44ba6cc1c1d6b88e07dd0..d0990dfd720735afe205fba52f727dd1eaa9daee 100644 (file)
@@ -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))))
index 9c2e5d658843386fa019d2c5fabe56f1010a57cc..c7383c0bb1a9fdfd91eaa480401f9cc33a365478 100644 (file)
             <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>
diff --git a/src/etc/pkg/rust-logo.png b/src/etc/pkg/rust-logo.png
new file mode 100644 (file)
index 0000000..2c3de30
Binary files /dev/null and b/src/etc/pkg/rust-logo.png differ
diff --git a/src/etc/pkg/welcome.rtf b/src/etc/pkg/welcome.rtf
new file mode 100644 (file)
index 0000000..2433348
--- /dev/null
@@ -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}