Prompt for macOS stuff installation path
This commit is contained in:
parent
1b33b630fb
commit
3f54304a10
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1,2 +1,3 @@
|
||||||
*.lib filter=lfs diff=lfs merge=lfs -text
|
*.lib filter=lfs diff=lfs merge=lfs -text
|
||||||
*.dll filter=lfs diff=lfs merge=lfs -text
|
*.dll filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.scpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|
|
@ -40,8 +40,10 @@ exec_with_assert "cp -r #{APP_BUNDLE} #{VIRTUAL_ROOT}/#{APP}"
|
||||||
PKG_PLIST = "#{BUILD_DIR}/app.plist"
|
PKG_PLIST = "#{BUILD_DIR}/app.plist"
|
||||||
unless File.exist? PKG_PLIST then
|
unless File.exist? PKG_PLIST then
|
||||||
exec_with_assert "pkgbuild --root #{VIRTUAL_ROOT} --analyze #{PKG_PLIST}"
|
exec_with_assert "pkgbuild --root #{VIRTUAL_ROOT} --analyze #{PKG_PLIST}"
|
||||||
|
exec_with_assert "gsed -i -e \"14i <key>BundlePreInstallScriptPath</key>\" #{PKG_PLIST}"
|
||||||
|
exec_with_assert "gsed -i -e \"15i <string>preinstall-script.sh</string>\" #{PKG_PLIST}"
|
||||||
exec_with_assert "gsed -i -e \"14i <key>BundlePostInstallScriptPath</key>\" #{PKG_PLIST}"
|
exec_with_assert "gsed -i -e \"14i <key>BundlePostInstallScriptPath</key>\" #{PKG_PLIST}"
|
||||||
exec_with_assert "gsed -i -e \"15i <string>pkg-script.sh</string>\" #{PKG_PLIST}"
|
exec_with_assert "gsed -i -e \"15i <string>postinstall-script.sh</string>\" #{PKG_PLIST}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Preparing stuff
|
# Preparing stuff
|
||||||
|
|
3
toonz/installer/osx/scripts/getStuffFolderLocation.scpt
Normal file
3
toonz/installer/osx/scripts/getStuffFolderLocation.scpt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3719efe7269e2dd0d3842242fbb09aab58a391d01603e898ac224012fd1607a0
|
||||||
|
size 3476
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
STUFF_DIR="Tahoma2D_stuff"
|
|
||||||
tar xzvf stuff.tar.bz2
|
|
||||||
mv stuff $STUFF_DIR
|
|
||||||
mkdir /Applications/Tahoma2D
|
|
||||||
cp -nr $STUFF_DIR /Applications/Tahoma2D
|
|
||||||
chmod -R 777 /Applications/Tahoma2D
|
|
||||||
rm -rf $STUFF_DIR
|
|
||||||
|
|
24
toonz/installer/osx/scripts/postinstall-script.sh
Normal file
24
toonz/installer/osx/scripts/postinstall-script.sh
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
INIFILE=/Applications/Tahoma2D.app/Contents/Resources/SystemVar.ini
|
||||||
|
STUFF_DIR="/Applications/Tahoma2D/Tahoma2D_stuff"
|
||||||
|
if [ -f tahoma2dstuffdirloc ]
|
||||||
|
then
|
||||||
|
STUFF_DIR=`cat tahoma2dstuffdirloc`
|
||||||
|
fi
|
||||||
|
|
||||||
|
tar xzvf stuff.tar.bz2
|
||||||
|
|
||||||
|
if [ ! -f $STUFF_DIR ]
|
||||||
|
then
|
||||||
|
mkdir -p $STUFF_DIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -rf stuff/* $STUFF_DIR/
|
||||||
|
rm -rf stuff
|
||||||
|
|
||||||
|
chmod -R 777 $STUFF_DIR
|
||||||
|
|
||||||
|
xxx=`echo $STUFF_DIR | sed -e"s/\//|/g"`
|
||||||
|
sed -e"s/.Applications.*Tahoma2D_stuff/$xxx/" $INIFILE | sed -e"s/|/\//g" >| temp.ini
|
||||||
|
sudo mv -f temp.ini $INIFILE
|
||||||
|
|
2
toonz/installer/osx/scripts/preinstall-script.sh
Normal file
2
toonz/installer/osx/scripts/preinstall-script.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
osascript getStuffFolderLocation.scpt $HOME/Documents/Tahoma2D_stuff
|
Loading…
Reference in a new issue