#!/usr/bin/perl use version $APPSUPPORT_PATH="/Library/Application Support/MakeMusic/Finale"; $PKG_RECORD_PATH="/Library/Application Support/MakeMusic/Finale/InstallerComponents/FinaleAppCore"; $PKG_RECORD_VERSION="25.0.0.0"; $PKG_RECORD_FAILURE_MESSAGE="Failed writing package record."; $REWIRE_SUPPORT_PATH="/Library/Application\ Support/Propellerhead\ Software/ReWire"; $REWIRE_TEMP_SUPPORT_PATH="/Library/Application\ Support/Propellerhead\ Software/ReWire/Finale\ Install\ Temp"; $REGFILE_PATH="/Library/Application Support/MakeMusic/.regdata25.txt"; $REGFILE_FAILURE_MESSAGE="Failed writing version 25 file."; $QUICKLOOK_PATH="/Applications/Finale.app/Contents/Library/QuickLook/Finale.qlgenerator"; $SPOTLIGHT_PATH="/Applications/Finale.app/Contents/Library/Spotlight/Finale64.mdimporter"; ################################################################################ # # Move Swedish User's files so app will update those files # ################################################################################ ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year = $year + 1900; $mon = $mon + 1; $timeStampString = sprintf("%04u.%02u.%02u_%02u.%02u.%02u", $year, $mon, $mday, $hour, $min, $sec); $userFileBackupDir = $ENV{"HOME"}."/Desktop/Finale User Backup/".$PKG_RECORD_VERSION."_Backup_".$timeStampString; foreach $relativeFilePath (@MOVE_USER_FILES_FOR_UPDATES) { $existingPath = $ENV{"HOME"}."/".$relativeFilePath; print "checking: $existingPath\n"; if ( -e $existingPath ) { $backupPath = $userFileBackupDir."/".$relativeFilePath; makeDirAtPath_(parentDirOfPath_($backupPath)); print " moving: $backupPath\n"; rename($existingPath, $backupPath); } }