// Detect It Easy: detection rule file
// Author: BJNFNE <bjnfne@web.de>

// https://en.wikipedia.org/wiki/Roxio_Toast
meta("tool", "Roxio Toast");

function detect() {
    if (ISO9660.compare("'TOAST 2.5 Partition'", 0x00000410)) {
        sVersion = "2.5";
        bDetected = true;
    } else if (ISO9660.compare("..'Toast 3.0 PPC HFS Optimizer'", 0x0000040f)) {
        sVersion = "3.0";
        sOptions = "PowerPC HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 3.0.2 PPC HFS Optimizer'", 0x00000410)) {
        sVersion = "3.0.2";
        sOptions = "PowerPC HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 3.0.5 PPC HFS Optimizer'", 0x00000410)) {
        sVersion = "3.0.5";
        sOptions = "PowerPC HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("....'Toast 3.5 PPC HFS Optimizer'", 0x0000040e)) {
        sVersion = "3.5";
        sOptions = "PowerPC HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 3.5.3 PPC Partition'", 0x00000410)) {
        sVersion = "3.5.3";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 3.5.4 PPC HFS Optimizer'", 0x00000410)) {
        sVersion = "3.5.4";
        sOptions = "PowerPC HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 3.5.5 PPC HFS Optimizer'", 0x00000410)) {
        sVersion = "3.5.5";
        sOptions = "PowerPC HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("....'Toast 3.5.6 PPC Partition'", 0x0000040e)) {
        sVersion = "3.5.6";
        sOptions = "PowerPC";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 3.5.6 PPC HFS Optimizer'", 0x00000410)) {
        sVersion = "3.5.6";
        sOptions = "PowerPC HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 3.5.7 PPC HFS Optimizer'", 0x00000410)) {
        sVersion = "3.5.7";
        sOptions = "PowerPC HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 3.5.7 PPC Partition'", 0x00000410)) {
        sVersion = "3.5.7";
        sOptions = "PowerPC";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 4.0 PPC HFS Optimizer'", 0x00000410)) {
        sVersion = "4.0";
        sOptions = "HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("....'Toast 4.1 Partition'", 0x0000040e)) {
        sVersion = "4.1";
        bDetected = true;
    } else if (ISO9660.compare("....'Toast 4.1.3 Partition'", 0x0000040e)) {
        sVersion = "4.1.3";
        bDetected = true;
    } else if (ISO9660.compare("'Toast F-4.1.3 Partition'", 0x00000410)) {
        sVersion = "F-4.1.3";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 5.0 HFS Optimizer'", 0x00000410)) {
        sVersion = "5.0";
        sOptions = "HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 5.0.2 HFS/Joliet Builder'", 0x00000410)) {
        sVersion = "5.0.2";
        sOptions = "HFS/Joliet Builder";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 5.0.2 HFS Optimizer'", 0x00000410)) {
        sVersion = "5.0.2";
        sOptions = "HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 5.1.1 HFS Optimizer'", 0x00000410)) {
        sVersion = "5.1.1";
        sOptions = "HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 5.2.3 HFS Optimizer'", 0x00000410)) {
        sVersion = "5.2.3";
        sOptions = "HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 6.0 HFS Optimizer'", 0x00000410)) {
        sVersion = "6.0";
        sOptions = "HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("..'Toast 6.0.7 HFS Optimizer'", 0x0000040f)) {
        sVersion = "6.0.7";
        sOptions = "HFS Optimizer";
        bDetected = true;
    } else if (ISO9660.compare("'Toast 9.0.2 HFS Optimizer'", 0x00000410)) {
        sVersion = "9.0.2";
        sOptions = "HFS Optimizer";
        bDetected = true;
    }

    return result();
}