I need a scripting master for a custom script!

Hi everyone, i’m sorry if i will sound a total idiot to the most of you. Thanks to everyone who will have the patience to read the whole message. i bought this software called ivory for mac -which is a great piano plugin- and i found that the installer is not working properly on OS X Yosemite. I emailed the customer service and they told me the problem is in the installer of the dvd and they’re working on developing a new installer, but they don’t know exactly when. Now, i don’t have any experience in scripting or programming, so I’m desperately searching for someone who wants to have a look at this script and understand why it is not working. The problem is in the end of the installation when the program executes its scripts: the first one asks for a folder where i will put all the sound libraries
that’s the message:
Ivory library files will be installed in your current Ivory Items folder here:

/Users/lucavincenzocappelli/Desktop/ivory/Ivory Items/

Press OK to proceed (recommended).

and then, after i click on it, it will open another script called NoIvoryItems which gives me this message:
The installer could not locate your Ivory Items folder. Please make sure that you have Ivory properly installed and the hard drive that contains your Ivory Items folder is turned on and try again.
I checked the content of the installer app, in resources folder i found a “preflight” file which i can open with text edit, that should give all the instructions about running the different scripts:

 #!/bin/sh

    # Preflight script for Ivory (main product).

    # First, remove any stale links that might exist from a crashed install
    echo ""
    echo "Remove stale links"
    rm /private/tmp/IvoryInstallVol
    rm /private/tmp/IvoryItemsTmp

    rm /private/tmp/IvoryAU
    rm /private/tmp/IvoryVST
    rm /private/tmp/IvoryRTAS

    # $0 contains the script path, including the script name
    # so we can extract the path from that
    RESOURCE_PATH=`dirname "$0"`
    echo "Resource path is" "$RESOURCE_PATH"
    cd "$RESOURCE_PATH"

    echo ""
    SRC="/Volumes/Ivory II Grands 1"
    echo "Look for the Ivory II Grands 1 volume at" "$SRC"
    if cd "$SRC"
      then
	echo "Found it!"
      else
	echo "Failed!"
	./NoIvoryDVD.app/Contents/MacOS/applet
	#open "./NoIvoryDVD.app"
	exit 1
      fi

    PREFS_PATH="${HOME}/Library/Preferences/Ivory Preferences"
    echo "Preferences Path: ${PREFS_PATH}"

    echo ""
    echo "Removing InstallData files"
    rm -f "${PREFS_PATH}"/InstallData14*
    rm -f "${PREFS_PATH}"/InstallData15*
    rm -f "${PREFS_PATH}"/InstallData16*
    rm -f "${PREFS_PATH}"/InstallData17*
    echo ""


    cd "$RESOURCE_PATH"
    echo ""
    echo "Find or create Ivory Items folder, Ivory Preferences folder, Ivory Items alias"

    # "open" seems to fork a separate process, which does not complete before the
    # script continues. So we cannot use it here
    #if open "./CreateIvoryItemsFolder.app"

    createIvoryItemsFolder()
    {
	# run this script to create a new alias to II folder, or confirm the existing one
	./CreateIvoryItemsFolder.app/Contents/MacOS/applet
	
	# check to see if it exists
	cd "$RESOURCE_PATH"
	echo ""
	echo "Resolving Ivory Items alias in " "$HOME"
	./ResolveIvoryItemsTool -v "${HOME}"
	if ./ResolveIvoryItemsTool "${HOME}"
	then
		echo ""
		echo "Found it!"
		ALIAS=$(./ResolveIvoryItemsTool "${HOME}")
		echo "Ivory Items alias reolved to " "$ALIAS"
	else
		# already gave the use a chance to create one, so we exit with an error
		echo ""
		echo "Failed!"
		./NoIvoryItems.app/Contents/MacOS/applet
		exit 1
	
	fi
    }

    createIvoryItemsFolder


    # fix preset filenames
    echo "Look for problems with Presets filenames"
    echo ""
    if ./PresetsTool -e "${ALIAS}" -y
      then
	echo "No problems found!"
      else
	echo "Problems found with Presets filenames"
	./PresetsTool -e "${ALIAS}" -y | grep INCOMPATIBLE
	
	# run  an Applescript app that asks the user if they want to fix
	# and if so calls PresetsTool again with the -z option
	./FixPresets.app/Contents/MacOS/applet
    fi

    # now that we've found both the source and destination,
    # create the symbolic links in /private/tmp

    echo ""
    echo "Create symbolic link to Install Volume"
    if ln -s "$SRC" /private/tmp/IvoryInstallVol
      then
	echo "Success"
      else
	echo "Failed"
	exit 1
    fi

    DST_PARENT=`dirname "$ALIAS"`
    DST_FOLDER=`basename "$ALIAS"`
    echo "DST_PARENT is ${DST_PARENT}"
    echo "DST_FOLDER is ${DST_FOLDER}"
    echo ""
    echo "Ivory Items located at" "$ALIAS"
    echo "Create symbolic link to Ivory Items"
    if ln -s "$ALIAS" /private/tmp/IvoryItemsTmp
      then
	echo "Success"
      else
	echo "Failed"
	# clean up
	rm /private/tmp/IvoryInstallVol	
	exit 1
    fi

    echo ""
    echo "Set owner of Ivory Items to root:admin"
    cd "${DST_PARENT}"
    chown -R root:admin "${DST_FOLDER}"
    chmod a=rwx "${DST_FOLDER}"
    cd "${DST_FOLDER}"
    ls -lad

    exit 0

After that it should begin copying the contents. The program has over 70 Gb of files so there’s 11 DVD, and the installation file comes in the first one obviously. I’m pretty sure that there’s something inside one single file somewhere that stops the whole process and stops the installation, but i don’t really know what to do. If you need the content of one of the scripts named in the preflight just tell me, i will upload it! Do you think there’s a way to create a script that can bypass this folder check telling the program the exact location of my Ivory Item folder and allow me to continue the installation process?
Thanks in advance to all of you!

Hi Luke,

You’re talking about processing gigabytes with applescript? I don’t think so.

gl,
kel

Hi Luke,

You know what you could do is incorporate some objective c. AppleScript is not made to work with gigabytes.

That’s what I think.

gl,
kel

It’s just a bash script… the command line utilities written in C can handle infinite amounts of data.

@TS: It could be solved by you, you could run the script in the terminal with your own variables and see what it returns. Because the error messages does not match with the echo messages of the script there is no telling from this side where the error occurs or if this script is even executed at all. To me it seems the error occurs before this script is called because we don’t see messages like “Removing InstallData files”.

Hi,

Something like this may be of some help to you:

http://www.charlessoft.com

I have used Pacifist in the past where either the installer failed or I only needed certain components out of the installer. Another option, though I have no idea if it would work, is trying to edit/modify/recreate the installer with Iceberg (or Apple’s PackageMaker):

http://s.sudre.free.fr/Software/Iceberg.html
https://developer.apple.com/downloads/index.action (Included in Auxiliary Tools disk image)

the error occurs after the installer runs the script called createIvoryItemsfolder, and it echoes the script NoIvoryItems which is just a message error that will stop the installation saying that “The installer could not locate your Ivory Items folder-Please make sure that you have Ivory properly installed and the hard drive that contains your Ivory Items folder is turned on and try again.”

that’s the content of the resources folder in the installer

and that’s the link to all the scripts that are listed:
https://www.mediafire.com/?py9gac8rzs98c2q

thanks a lot to all of you !!