Prompt for macOS stuff installation path

This commit is contained in:
manongjohn 2022-06-09 08:13:14 -04:00
parent 1b33b630fb
commit 3f54304a10
6 changed files with 33 additions and 10 deletions

1
.gitattributes vendored
View file

@ -1,2 +1,3 @@
*.lib filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text
*.scpt filter=lfs diff=lfs merge=lfs -text

View file

@ -40,8 +40,10 @@ exec_with_assert "cp -r #{APP_BUNDLE} #{VIRTUAL_ROOT}/#{APP}"
PKG_PLIST = "#{BUILD_DIR}/app.plist"
unless File.exist? PKG_PLIST then
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 \"15i <string>pkg-script.sh</string>\" #{PKG_PLIST}"
exec_with_assert "gsed -i -e \"15i <string>postinstall-script.sh</string>\" #{PKG_PLIST}"
end
# Preparing stuff

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3719efe7269e2dd0d3842242fbb09aab58a391d01603e898ac224012fd1607a0
size 3476

View file

@ -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

View 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

View file

@ -0,0 +1,2 @@
#!/bin/sh
osascript getStuffFolderLocation.scpt $HOME/Documents/Tahoma2D_stuff