@@ -1,17 +1,15 @@
2# Run the following command to create an installer:
2# Run the following command to create an installer:
4−# bash make-installer.sh 0.13
4+# bash make-installer.sh
6−# This will work iff the version you give is defined in BuildFromSource.hs
6+
9#### SETUP ####
9#### SETUP ####
15# Create directory structure for new pkgs
13# Create directory structure for new pkgs
16pkg_root=$(mktemp -d -t package-artifacts)
14pkg_root=$(mktemp -d -t package-artifacts)
17pkg_binaries=$pkg_root
15pkg_binaries=$pkg_root
@@ -23,20 +21,10 @@ mkdir -p $pkg_scripts
23usr_binaries=/usr/local/bin
21usr_binaries=/usr/local/bin
26−#### BUILD ELM PLATFORM ####
24+#### BUILD ASSETS ####
28−runhaskell ../BuildFromSource.hs $version
30−platform=Elm-Platform/$version
33−#### COPY BINARIES ####
35−# Copy executables into pkg_binaries directory
26+(cd ../.. ; cabal sandbox init ; cabal install)
36−for exe in elm elm-package elm-make elm-repl elm-reactor
38− cp $platform/.cabal-sandbox/bin/$exe $pkg_binaries/$exe
27+cp ../../.cabal-sandbox/bin/elm $pkg_binaries/elm
41cp $(pwd)/preinstall $pkg_scripts
29cp $(pwd)/preinstall $pkg_scripts
42cp $(pwd)/postinstall $pkg_scripts
30cp $(pwd)/postinstall $pkg_scripts
@@ -50,15 +38,15 @@ pkgbuild \
50 binaries.pkg
38 binaries.pkg
53−#### CREATE PACKAGE ####
41+#### BUNDLE ASSETS ####
55−rm -f Elm-Platform-$version.pkg
43+rm -f Elm-Platform.pkg
57productbuild \
45productbuild \
58 --distribution Distribution.xml \
46 --distribution Distribution.xml \
59 --package-path . \
47 --package-path . \
60 --resources Resources \
48 --resources Resources \
61− Elm-Platform-$version.pkg
49+ Elm-Platform.pkg
64#### CLEAN UP ####
52#### CLEAN UP ####