 #######################################################################
#                            USBADVN v1.0                             #
 #######################################################################

SET "CMD" "$ARG1$"
SET "SRC_PATH" "$ARG2$/USBADVN"
SET "DST_PATH" "$ARG3$/USBADVN"

GOTO "$CMD$"
RETURN "-1"

:QUERY
    # Change this information to describe the application.
    IFNOT EXISTS "$SRC_PATH$/USBADVN.ELF"
    RETURN "-1"
    ENDIF
    SET "APP_TITLE" "USBadvance"
    SET "APP_VERSION" "v1.0"
    SET "APP_AUTHOR" "Success HK"
    SET "APP_DESC" "USBAdvance allows you to run full games from any USB Pen or hard drive"
    SET "APP_MEDIAS" "CDROM"
    RETURN "0"

:INSTALL
    # Change this to create the directories and copy the files needed for the application.
    MKDIR "$DST_PATH$"
    COPY "$SRC_PATH$/USBADVN.ELF" "$DST_PATH$/USBADVN.ELF"
    COPY "$SRC_PATH$/APPINFO.PBT" "$DST_PATH$/APPINFO.PBT"

    COPY "$SRC_PATH$/CDROM.PBT" "$BM.MEDIA_PATH$/CDROM.PBT"

    RETURN "0"

:REMOVE

    # Change this to remove all files or directories copied during the installation.
    RM "$SRC_PATH$/USBADVN.ELF"
    RM "$SRC_PATH$/APPINFO.PBT"
    RMDIR "$SRC_PATH$/USBADVN"

    RETURN "0"

:RUN
    SHUTDOWN "MM"
    RUNAPP "$SRC_PATH$/USBADVN.ELF"
    RETURN "0"
