Skip to content

Commit

Permalink
Merge pull request #36 from danielbair/master
Browse files Browse the repository at this point in the history
Update Mac installer to latest package versions
  • Loading branch information
danielbair authored Aug 18, 2019
2 parents d8e9d32 + 2c172b2 commit 8eac3cf
Show file tree
Hide file tree
Showing 22 changed files with 86 additions and 56 deletions.
30 changes: 15 additions & 15 deletions Mac_OSX_Installer/Aeneas_Installer.pkgproj
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<key>LOCATION</key>
<integer>0</integer>
<key>NAME</key>
<string>ffmpeg-3.2.4</string>
<string>ffmpeg-4.1.4_1</string>
</dict>
<key>PATH</key>
<dict>
<key>PATH</key>
<string>./ffmpeg-3.2.4.pkg</string>
<string>./aeneas-mac-installer-packages/ffmpeg-4.1.4_1.pkg</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
Expand All @@ -35,7 +35,7 @@
<key>PATH</key>
<dict>
<key>PATH</key>
<string>./espeak-1.48.04_1.pkg</string>
<string>./aeneas-mac-installer-packages/espeak-1.48.04_1.pkg</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
Expand All @@ -50,12 +50,12 @@
<key>LOCATION</key>
<integer>0</integer>
<key>NAME</key>
<string>python-2.7.13</string>
<string>python-2.7.16</string>
</dict>
<key>PATH</key>
<dict>
<key>PATH</key>
<string>python-2.7.13.pkg</string>
<string>./aeneas-mac-installer-packages/python-2.7.16.pkg</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
Expand All @@ -75,7 +75,7 @@
<key>PATH</key>
<dict>
<key>PATH</key>
<string>numpy-1.11.2.pkg</string>
<string>./aeneas-mac-installer-packages/numpy-1.11.2.pkg</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
Expand All @@ -95,7 +95,7 @@
<key>PATH</key>
<dict>
<key>PATH</key>
<string>lxml-3.6.0.pkg</string>
<string>./aeneas-mac-installer-packages/lxml-3.6.0.pkg</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
Expand All @@ -115,7 +115,7 @@
<key>PATH</key>
<dict>
<key>PATH</key>
<string>bs4-4.5.1.pkg</string>
<string>./aeneas-mac-installer-packages/bs4-4.5.1.pkg</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
Expand All @@ -135,7 +135,7 @@
<key>PATH</key>
<dict>
<key>PATH</key>
<string>aeneas-1.7.3.pkg</string>
<string>./aeneas-mac-installer-packages/aeneas-1.7.3.pkg</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
Expand Down Expand Up @@ -533,7 +533,7 @@
<key>VALUE</key>
<dict>
<key>PATH</key>
<string>INFO.txt</string>
<string>./INFO.txt</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
Expand Down Expand Up @@ -608,7 +608,7 @@
<key>IC_REQUIREMENT_DISKSPACE_MINIMUM_SIZE_UNIT</key>
<integer>0</integer>
<key>IC_REQUIREMENT_DISKSPACE_MINIMUM_SIZE_VALUE</key>
<integer>373</integer>
<integer>755</integer>
</dict>
<key>IC_REQUIREMENT_CHECK_TYPE</key>
<integer>1</integer>
Expand All @@ -620,7 +620,7 @@
<key>LANGUAGE</key>
<string>English</string>
<key>VALUE</key>
<string>This installer needs a minimum of 373MB of disk space available.</string>
<string>This installer needs a minimum of 755MB of disk space available.</string>
</dict>
</array>
<key>NAME</key>
Expand All @@ -638,7 +638,7 @@
<key>IC_REQUIREMENT_OS_DISTRIBUTION_TYPE</key>
<integer>0</integer>
<key>IC_REQUIREMENT_OS_MINIMUM_VERSION</key>
<integer>100705</integer>
<integer>100905</integer>
</dict>
<key>IC_REQUIREMENT_CHECK_TYPE</key>
<integer>1</integer>
Expand All @@ -650,7 +650,7 @@
<key>LANGUAGE</key>
<string>English</string>
<key>VALUE</key>
<string>Minimum OS X version 10.7.5 is required</string>
<string>Minimum OS X version 10.9.5 is required</string>
</dict>
</array>
<key>NAME</key>
Expand Down Expand Up @@ -850,7 +850,7 @@
</dict>
</array>
<key>NAME</key>
<string>aeneas-mac-setup-1.7.3</string>
<string>aeneas-mac-setup-1.7.3_1</string>
</dict>
</dict>
<key>TYPE</key>
Expand Down
Empty file modified Mac_OSX_Installer/INFO.txt
100755 → 100644
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 3 additions & 9 deletions Mac_OSX_Installer/build_dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,20 @@ export PATH=/usr/local/bin:/usr/local/sbin:$PATH

CURDIR=`dirname $0`
cd $CURDIR
VERSION="1.7.3"
VERSION="1.7.3_1"

brew install danielbair/tap/create-dmg

productsign --timestamp=none --sign "Developer ID Installer" aeneas-mac-setup-$VERSION.pkg aeneas-mac-setup-$VERSION-signed.pkg
cp -v aeneas-mac-setup-$VERSION.pkg aeneas-mac-setup-$VERSION-unsigned.pkg
cp -v aeneas-mac-setup-$VERSION-signed.pkg aeneas-mac-setup-$VERSION.pkg

mkdir -p aeneas-mac-uninstall-scripts
cp _*.sh aeneas-mac-uninstall-scripts
DMGFILE="Aeneas_Tools-$VERSION.dmg"
BUILDTMP="$(mktemp -d -t createdmg.tmp.XXXXXXXX)"
rm -f "$DMGFILE"
create-dmg --volname Aeneas_Tools \
--window-pos 20 20 \
--icon-size 80 \
--add-file aeneas-mac-setup-$VERSION.pkg aeneas-mac-setup-$VERSION.pkg 144 144 \
--add-file aeneas-mac-setup-$VERSION.pkg aeneas-mac-setup-$VERSION.pkg 244 4 \
--add-folder aeneas-mac-uninstall-scripts aeneas-mac-uninstall-scripts 344 144 \
--add-folder aeneas-mac-installer-packages aeneas-mac-installer-packages 144 144 \
$DMGFILE $BUILDTMP
rm -rf aeneas-mac-uninstall-scripts
rm -rf "$BUILDTMP"
open -R "$DMGFILE"
open "$DMGFILE"
Expand Down
25 changes: 25 additions & 0 deletions Mac_OSX_Installer/build_installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

#export PATH=/usr/libexec/git-core/:$PATH
export PATH=/usr/local/bin:/usr/local/sbin:$PATH

CURDIR=`dirname $0`
cd $CURDIR

echo Running brew update
brew update

echo cd $CURDIR
cd $CURDIR

VERSION="1.7.3_1"

bash ./sign_packages.sh
packagesbuild -v Aeneas_Installer.pkgproj
[ $? = 0 ] || exit 1
if [ -f "aeneas-mac-setup-$VERSION.pkg" ]; then
echo -e "Resulting Installer program filename is:\n$(pwd)/aeneas-mac-setup-$VERSION.pkg"
productsign --timestamp=none --sign "Developer ID Installer" aeneas-mac-setup-$VERSION.pkg /tmp/aeneas-mac-setup-$VERSION.pkg
cp -v /tmp/aeneas-mac-setup-$VERSION.pkg ./
fi

44 changes: 18 additions & 26 deletions Mac_OSX_Installer/build_packages.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export PATH=/usr/libexec/git-core/:$PATH
#export PATH=/usr/libexec/git-core/:$PATH
export PATH=/usr/local/bin:/usr/local/sbin:$PATH

CURDIR=`dirname $0`
Expand All @@ -12,82 +12,74 @@ echo Running brew update
brew update

#if [ -d "/usr/local/Cellar/python" ]; then
#brew uninstall --ignore-dependencies -force python
#brew uninstall --ignore-dependencies --force python@2
#fi

brew uninstall --ignore-dependencies -force aeneas bs4 lxml numpy python
brew uninstall --ignore-dependencies --force aeneas bs4 lxml numpy python@2

brew reinstall danielbair/tap/numpy
brew reinstall numpy
brew reinstall danielbair/tap/aeneas

python -m aeneas.diagnostics
python -m aeneas.tools.synthesize_text list "This is a test|with two lines" eng -v /tmp/test.wav

if [ ! -f "ffmpeg-3.2.4.pkg" ]; then
if [ ! -f "ffmpeg-4.1.4_1.pkg" ]; then
echo ""
brew pkg --with-deps --without-kegs --postinstall-script ./install_ffmpeg.sh ffmpeg
brew pkg --with-deps --without-kegs --postinstall-script="./postinstall-scripts/postinstall_ffmpeg.sh" ffmpeg
[ $? = 0 ] || exit 1
else
echo "Found ffmpeg-3.2.4.pkg"
echo "Found ffmpeg-4.1.4_1.pkg"
fi
if [ ! -f "espeak-1.48.04_1.pkg" ]; then
echo ""
sudo install_name_tool -id /usr/local/lib/libespeak.dylib /usr/local/lib/libespeak.dylib
sudo install_name_tool /usr/local/lib/libportaudio.2.dylib -id /usr/local/lib/libportaudio.2.dylib
sudo install_name_tool /usr/local/lib/libespeak.dylib -change /usr/local/opt/portaudio/lib/libportaudio.2.dylib /usr/local/lib/libportaudio.2.dylib
brew pkg --with-deps --without-kegs --postinstall-script ./install_espeak.sh danielbair/tap/espeak
brew pkg --with-deps --without-kegs --postinstall-script="./postinstall-scripts/postinstall_espeak.sh" danielbair/tap/espeak
[ $? = 0 ] || exit 1
else
echo "Found espeak-1.48.04_1.pkg"
fi
if [ ! -f "aeneas-1.7.3.pkg" ]; then
echo ""
sudo install_name_tool /usr/local/lib/python2.7/site-packages/aeneas/cew/cew.so -change /usr/local/opt/espeak/lib/libespeak.dylib /usr/local/lib/libespeak.dylib
brew pkg --identifier-prefix org.python.python --with-deps --without-kegs --postinstall-script ./install_aeneas.sh aeneas
brew pkg --identifier-prefix="org.python.python" --with-deps --without-kegs --postinstall-script="./postinstall-scripts/postinstall_aeneas.sh" danielbair/tap/aeneas
mv -v aeneas-1.7.3.pkg aeneas-full-1.7.3.pkg
brew pkg --identifier-prefix org.python.python --without-kegs --postinstall-script ./install_aeneas.sh danielbair/tap/aeneas
brew pkg --identifier-prefix="org.python.python" --without-kegs --postinstall-script="./postinstall-scripts/postinstall_aeneas.sh" danielbair/tap/aeneas
[ $? = 0 ] || exit 1
else
echo "Found aeneas-1.7.3.pkg"
fi
if [ ! -f "numpy-1.11.2.pkg" ]; then
if [ ! -f "numpy-1.16.4.pkg" ]; then
echo ""
brew pkg --identifier-prefix org.python.python --without-kegs --postinstall-script ./install_numpy.sh danielbair/tap/numpy
brew pkg --identifier-prefix="org.python.python" --without-kegs --postinstall-script="./postinstall-scripts/postinstall_numpy.sh" numpy
[ $? = 0 ] || exit 1
else
echo "Found numpy-1.11.2.pkg"
echo "Found numpy-1.16.4.pkg"
fi
if [ ! -f "lxml-3.6.0.pkg" ]; then
echo ""
brew pkg --identifier-prefix org.python.python --without-kegs --postinstall-script ./install_lxml.sh danielbair/tap/lxml
brew pkg --identifier-prefix="org.python.python" --without-kegs --postinstall-script="./postinstall-scripts/postinstall_lxml.sh" danielbair/tap/lxml
[ $? = 0 ] || exit 1
else
echo "Found lxml-3.6.0.pkg"
fi
if [ ! -f "bs4-4.5.1.pkg" ]; then
echo ""
brew pkg --identifier-prefix org.python.python --without-kegs --postinstall-script ./install_bs4.sh danielbair/tap/bs4
brew pkg --identifier-prefix="org.python.python" --without-kegs --postinstall-script="./postinstall-scripts/postinstall_bs4.sh" danielbair/tap/bs4
[ $? = 0 ] || exit 1
else
echo "Found bs4-4.5.1.pkg"
fi

brew install python
brew install python@2

if [ ! -f "python-2.7.13.pkg" ]; then
if [ ! -f "python@2-2.7.16.pkg" ]; then
echo ""
brew pkg --identifier-prefix org.python --with-deps --without-kegs --postinstall-script ./install_python.sh python
brew pkg --identifier-prefix="org.python" --with-deps --without-kegs --postinstall-script="./postinstall-scripts/postinstall_python.sh" python@2
[ $? = 0 ] || exit 1
fi

echo cd $CURDIR
cd $CURDIR

packagesbuild -v Aeneas_Installer.pkgproj
[ $? = 0 ] || exit 1
if [ -f "aeneas-mac-setup-1.7.3.pkg" ]; then
echo -e "Resulting Installer program filename is:\n$(pwd)/aeneas-mac-setup-1.7.3.pkg"
fi

#productsign --timestamp=none --sign "Developer ID Installer" ~/build/10.7/aeneas-mac-setup-1.7.3.pkg ~/build/10.7/aeneas-mac-setup-1.7.3_signed.pkg

5 changes: 3 additions & 2 deletions Mac_OSX_Installer/build_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH=/usr/local/bin:/usr/local/sbin:/usr/libexec/git-core/:$PATH
CURDIR=`dirname $0`
cd $CURDIR

./install_homebrew.sh
#./install_homebrew.sh
brew install binutils git
brew tap danielbair/tap
echo Running brew update
brew update
brew install danielbair/tap/brew-pkg
brew install gettext

mkdir -p $HOME/Library/Python/2.7/lib/python/site-packages
touch $HOME/Library/Python/2.7/lib/python/site-packages/homebrew.pth
Expand All @@ -20,6 +20,7 @@ fi

if [ ! -f "/usr/local/bin/packagesbuild" ]; then
brew cask install packages
brew cask install homebrew/cask-versions/adoptopenjdk8
fi

echo -e "\n\nNow run build_packages.sh\n\n"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ if [ ! -n "$(grep 'PATH=/usr/local/bin:/usr/local/sbin:$PATH' $HOME/.bash_profil
chown $USER $HOME/.bash_profile
fi

mkdir -p /usr/local/Cellar/python/2.7.12/Frameworks/
ln -s /usr/local/Frameworks/Python.framework /usr/local/Cellar/python/2.7.12/Frameworks/
#mkdir -p /usr/local/opt/
#ln -s /usr/local/Cellar/python/2.7.12 /usr/local/opt/python
mkdir -p /usr/local/Cellar/python/
ln -s /usr/local/Frameworks/Python.framework/Versions/2.7/ /usr/local/Cellar/python/2.7.13
ln -s /usr/local/Frameworks /usr/local/Cellar/python/2.7.13/
mkdir -p /usr/local/Cellar/python/
ln -s /usr/local/Frameworks/Python.framework/Versions/3.7/ /usr/local/Cellar/python/3.7.4
ln -s /usr/local/Frameworks /usr/local/Cellar/python/3.7.4/
mkdir -p /usr/local/opt
ln -s /usr/local/Frameworks/Python.framework/Versions/2.7 /usr/local/opt/python

chown -R $USER:admin /usr/local/*

13 changes: 13 additions & 0 deletions Mac_OSX_Installer/sign_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

CURDIR=`dirname $0`
cd $CURDIR

cd aeneas-mac-installer-packages
for file in *.pkg; do
productsign --timestamp=none --sign "Developer ID Installer" $file /tmp/$file
cp -v /tmp/$file $file
done

0 comments on commit 8eac3cf

Please sign in to comment.