 #######################################################################
#                            PGEN v1.2                                  #
 #######################################################################

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

GOTO "$CMD$"
RETURN "-1"

:QUERY
    # Change this information to describe the application.
    SET "APP_TITLE" "PGEN"
    SET "APP_VERSION" "v1.2"
    SET "APP_AUTHOR" "Sjeep"
    SET "APP_DESC" "PGEN allows you to run Sega Genesis(aka MegaDrive) ROMs from PS2 HDD, CD or DVD."
    SET "APP_MEDIAS" "GENROM"
    RETURN "0"

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

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

    RETURN "0"

:REMOVE

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

    RETURN "0"

:RUN
    RUNAPP "$SRC_PATH$/PGEN.ELF"
    RETURN "0"
