Packaging & Deploying the TI-SmartView CE 84 Emulator

This is based on a post I made on Jamfnation back in March.

I recently started testing some of our existing software on the latest version of macOS Sierra (10.12.5) and ran into an issue with the TI-SmartView CE emulator software for Mac when trying to activate with our institution’s license that was a result of a change Texas Instruments had made to the software installer that wasn’t communicated and is somewhat buried line in their software installation and activation knowledge base article.

See the details below.

The Problem

When TI-SmartView CE is installed via its install PKG, a deployment.properties file gets created in /Library/Application Support/TI-SmartView CE 84/res/. This file is essentially a template in order to automatically activate a perpetual serial number when the software was launched for the first time. As a result, you could run the TI-SmartView PKG installer and then install a separately packaged deployment.properties file to this directory so that when a user launched the application for the first time it became activated.

However, in the most recent version of the software while the deployment.properties file still gets created through the installer in the directory specified above, the PKG installer as part of its install process now actively looks for a deployment.properties file in the same directory as the PKG installer.

The Solution

Create a PKG installer and put both the standard TI-SmartView CE install PKG and the deployment.properties file in the same directory – I use /private/tmp/.

I created a postinstall script to log the install and remove both files afterward.

#!/bin/sh
## postinstall

INSTALL_DIR="/path/to/base/directory"
INSTALLER="${INSTALL_DIR}/TI-SmartView-CE-84-5.2.1.283.pkg"
LICENSE="${INSTALL_DIR}/deployment.properties"
LOG="/path/to/TI-SmartViewInstall.log"

writelog () {
    /bin/echo $(date) "${1}" >> "$LOG"
}

# Function to remove all install files after successful install
removeallfiles () {
    rm "$INSTALLER"
    if [ $? = 0 ]; then
        writelog "TI-SmartView installer deletion successful!"
    else
        writelog "TI-SmartView installer deletion failed."
    fi

    rm "$LICENSE"
    if [ $? = 0 ]; then
        writelog "TI-SmartView license deletion successful!"
    else
        writelog "TI-SmartView license deletion failed."
    fi
}

# Checks for both the PKG & License, and installs if both exist
if [ -f "$INSTALLER" ] && [ -f "$LICENSE" ]; then
    writelog "CHECK: TI-SmartView installer and deployment.properties detected. Installing ..."

    sudo installer -pkg "$INSTALLER" -target /

    if [ $? = 0 ]; then
        writelog "TI-SmartView installation successful!"
        removeallfiles
    else
        writelog "TI-SmartView installation failed."
        exit 1
    fi
else
    writelog "ERROR: TI-SmartView installer and/or deployment.properties file not detected."
    exit 1
fi

exit

deployment.properties

Below is the standard deployment.properties file.

 

# deployment.properties for TI-SmartView CE for the TI-84 Plus Family 5.1 and TI-SmartView pour la famille TI-83 5.1
# Creates an empty file immediately after activation. The file name indicates success or failure using the following format: <AppName>-<Success/Failure>- <Host name>-<Date>-<Time>.log
# Example, if TI-SmartView CE for the TI-84 Plus Family Software were installed successfully on the ClassDesktop01 computer on August 15, 2011, at 2:30 p.m., this entry would appear: TISmartViewCE84-Success- ClassDesktop01-20110815-1430.log
# Accepted values: A valid Unix, UNC, or Windows path.
deploy.log.dir=
# License Number of the TI software to be activated on the client computer.
# Accepted Values: A valid 31-digit license number.
license.number=
# When ACTIVATE is set to YES, the software chooses a random value between 1 and the specified value to wait before the activation Volume attempt and between attempts. This prevents a large number of clients from attempting to communicate with the activation server at the same time.
# The system tries automatically to activate up to three times.
# Accepted Values: 0 - 600 (Default: 600)
activation.time.limit=

To build your own deployment.properties file, you’ll need a valid 31-digit license number in the format of XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXXX (dashes must be included).

While you can leave the deploy.log.dir value blank, you must have a value for activation.time.limit.  I just put 1.

Deployment

When you deploy your package, it will copy both the standard TI-SmartView CE install PKG and deployment.properties file to your chosen directory and then run the postinstall script which installs the software and applies your license.

When the software is run for the first time it should automatically activate and not prompt the user to manually enter a license.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s