diff --git a/package/Distribution b/package/Distribution index 435ba41..ab339e5 100644 --- a/package/Distribution +++ b/package/Distribution @@ -7,14 +7,25 @@ + - + - + - #SageMath_bin.pkg - #SageMath_share.pkg + + + + #SageMath_bin.pkg + #SageMath_share.pkg + #SageMath_texlive.pkg diff --git a/package/build_package.sh b/package/build_package.sh index db5d56c..12f7c2e 100755 --- a/package/build_package.sh +++ b/package/build_package.sh @@ -9,6 +9,9 @@ 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 productsign --sign $DEV_ID share.pkg packages/SageMath_share.pkg +pkgbuild --root local_texlive --identifier org.computop.SageMath.$PKG_ID.texlive --version $VERSION --install-location /usr/local/texlive texlive.pkg +productsign --sign $DEV_ID texlive.pkg packages/SageMath_texlive.pkg + productbuild --distribution Distribution --package-path packages --resources resources recommended.pkg productsign --sign $DEV_ID recommended.pkg Recommended_$PKG_ID.pkg diff --git a/package/local_bin/scripts/preinstall b/package/local_bin/scripts/preinstall index 6ed71cd..ac8dc7d 100755 --- a/package/local_bin/scripts/preinstall +++ b/package/local_bin/scripts/preinstall @@ -1,13 +1,22 @@ #!/bin/bash ANSWER=Yes + if [ -e /usr/local/bin/sage ]; then ANSWER=`osascript \ -e 'button returned of (display dialog "May we overwrite your current /usr/local/bin/sage file?" buttons {"No", "Yes"})' \ ` - if [ $ANSWER == "Yes" ]; then - exit 0 - else - osascript -e 'display dialog "Please rerun the installer, but press \"Customize\" and uncheck \"Sage Script\"" buttons {"OK"}' + if [ $ANSWER == "No" ]; then + osascript -e 'display dialog "Please rerun the installer, but press \"Customize\" and uncheck \"Sage Script\"." buttons {"OK"}' + exit 1 + fi +fi + +if [ -e /usr/local/texlive/texmf-local/tex/latex/local/sagetex.sty ]; then + ANSWER=`osascript \ +-e 'button returned of (display dialog "May we overwrite your current sagetex.sty file?" buttons {"No", "Yes"})' \ +` + if [ $ANSWER != "Yes" ]; then + osascript -e 'display dialog "Please rerun the installer, but press \"Customize\" and uncheck \"SageTeX\"." buttons {"OK"}' exit 1 fi fi diff --git a/package/local_texlive/texmf-local/tex/latex/local/sagetex.sty b/package/local_texlive/texmf-local/tex/latex/local/sagetex.sty new file mode 120000 index 0000000..54bc890 --- /dev/null +++ b/package/local_texlive/texmf-local/tex/latex/local/sagetex.sty @@ -0,0 +1 @@ +/var/tmp/sage-9.4-current/local/share/texmf/tex/latex/sagetex/sagetex.sty \ No newline at end of file diff --git a/package/resources/Welcome.rtf b/package/resources/Welcome.rtf index 88c2c72..8bf8982 100644 --- a/package/resources/Welcome.rtf +++ b/package/resources/Welcome.rtf @@ -1,12 +1,13 @@ -{\rtf1\ansi\ansicpg1252\cocoartf2577 +{\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;} -{\colortbl;\red255\green255\blue255;\red0\green0\blue0;} -{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;} +{\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} -{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}} -{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}} -\margl1440\margr1440\vieww11520\viewh8400\viewkind0 +{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2} +{\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid3}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}} +\margl1440\margr1440\vieww20020\viewh10940\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f0\b\fs36 \cf0 The SageMath-9.4 App @@ -17,7 +18,7 @@ \fs28 \ \ -\f1\b0 This installer adds two optional additional features to your SageMath-9.4 app.\ +\f1\b0 This installer adds three optional additional features to your SageMath-9.4 app.\ \ \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 @@ -31,8 +32,17 @@ \ls2\ilvl0\cf0 {\listtext \uc0\u8226 }A directory \f2\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 either feature, press \'93Customize\'94 on the +To disable installation of any of these features, press \'93Customize\'94 on the \f3\i Installation Type \f1\i0 screen.} \ No newline at end of file