Skip to content

Commit

Permalink
Make the package installer clean up and call mktexlsr.
Browse files Browse the repository at this point in the history
  • Loading branch information
culler committed Sep 30, 2021
1 parent 0f2a59b commit 78bc6e6
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ TclTk_frameworks/Frameworks/
TclTk_frameworks/Tcl
TclTk_frameworks/Tk
package/IDs.sh
package/Recommended.pkg
package/bin.pkg
package/*.pkg
package/local
package/packages
package/share.pkg

6 changes: 3 additions & 3 deletions package/build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source IDs.sh
PKG_ID=9_4
VERSION=1.0

pkgbuild --root local_bin --scripts local_bin/scripts --identifier org.computop.SageMath.$PKG_ID.bin --version $VERSION --install-location /usr/local/bin bin.pkg
pkgbuild --root local_bin --scripts local_bin/sage_install/scripts --identifier org.computop.SageMath.$PKG_ID.bin --version $VERSION --install-location /usr/local/bin bin.pkg
productsign --sign $DEV_ID bin.pkg packages/SageMath_bin.pkg

pkgbuild --root local_share --identifier org.computop.SageMath.$PKG_ID.share --version $VERSION --install-location /usr/local/share share.pkg
Expand All @@ -18,7 +18,7 @@ productsign --sign $DEV_ID recommended.pkg Recommended_$PKG_ID.pkg

xcrun altool --notarize-app --primary-bundle-id "SageMath-$VERSION" --username "marc.culler@gmail.com" --password $ONE_TIME_PASS --file Recommended_$PKG_ID.pkg

echo Waiting one minute ...
sleep 60
echo Waiting 90 seconds ...
sleep 90

xcrun stapler staple Recommended_$PKG_ID.pkg
11 changes: 11 additions & 0 deletions package/local_bin/sage_install/scripts/postinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

SAGETEX_DIR=/usr/local/texlive/texmf-local/tex/latex/local

# Run mktexlsr if SAGETEX_DIR changed in the last 10 minutes.
if [ -e /Library/TeX/texbin/mktexlsr ] && [ `date -j -r $SAGETEX_DIR -v +10M +%s` -ge `date +%s` ]; then
/Library/TeX/texbin/mktexlsr;
fi

# Remove the install scripts.
rm -rf /usr/local/bin/sage_install
File renamed without changes.
27 changes: 11 additions & 16 deletions package/resources/Welcome.rtf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{\rtf1\ansi\ansicpg1252\cocoartf2580
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fnil\fcharset0 Menlo-Regular;
\f3\fswiss\fcharset0 Helvetica-Oblique;}
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fswiss\fcharset0 Helvetica-Oblique;
\f3\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;\csgray\c0;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}
Expand All @@ -18,31 +18,26 @@
\fs28 \
\
\f1\b0 This installer adds three optional additional features to your SageMath-9.4 app.\
\f1\b0 This installer adds three optional additional features to your SageMath-9.4 app. Press \'93Customize\'94 on the
\f2\i Installation Type
\f1\i0 screen to disable features.\
\
\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\sl288\slmult1\pardirnatural\partightenfactor0
\ls1\ilvl0\cf0 {\listtext \uc0\u8226 }A script
\f2\fs24 \cf2 /usr/local/bin/sage
\f3\fs24 \cf2 /usr/local/bin/sage
\f1\fs28 \cf0 which starts Sage from any terminal window or from a script. This requires that you add
\f2\fs24 \cf2 /usr/local/bin
\f3\fs24 \cf2 /usr/local/bin
\f1\fs28 \cf0 to your path.\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\sl288\slmult1\pardirnatural\partightenfactor0
\cf0 \
\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\sl288\slmult1\pardirnatural\partightenfactor0
\ls2\ilvl0\cf0 {\listtext \uc0\u8226 }A directory
\f2\fs24 \cf2 /usr/local/share/jupyter/
\f3\fs24 \cf2 /usr/local/share/jupyter/
\f1\fs28 \cf0 which enables JupyterLab to detect the SageMath kernel.\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\sl288\slmult1\pardirnatural\partightenfactor0
\cf0 \
\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\sl288\slmult1\pardirnatural\partightenfactor0
\ls3\ilvl0\cf0 {\listtext \uc0\u8226 }A symbolic link
\f2\fs24 \cf3 \CocoaLigature0 /usr/local/texlive/texmf-local/tex/latex/local/sagetex.sty
\f1 which makes the sagetex.sty file distributed with this app available to texlive. You must run
\f2 sudo mktexlsr
\f1 after installing SageMath to complete the installation of sagetex.sty.
\fs28 \cf0 \CocoaLigature1 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\cf0 \
To disable installation of any of these features, press \'93Customize\'94 on the
\f3\i Installation Type
\f1\i0 screen.}
\f3\fs24 \cf3 \CocoaLigature0 /usr/local/texlive/texmf-local/tex/latex/local/sagetex.sty
\f1 which makes the sagetex.sty file distributed with this app available to texlive.\
}

0 comments on commit 78bc6e6

Please sign in to comment.