Restore File Manager ISO9660 functionality.

This commit is contained in:
TomAwezome 2022-04-14 00:57:40 -04:00
parent 5bd83cd4a7
commit aa911b9a0f
4 changed files with 39 additions and 10 deletions

View file

@ -51,6 +51,9 @@ $ID,-2$
$FG,2$'m'$FG$
$ID,2$Make CD/DVD ISO.C file. This creates a $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ ISO file image of the dir the cursor is on. The name of the ISO file is $FG,2$$TX,"\"::/Tmp/CDDVD.ISO.C\"",D="DEFAULT_ISO_C_FILENAME"$$FG$ $LK,"blkdev.default_iso_c_filename",A="MN:CBlkDevGlobals"$ and can be redefined in your start-up scripts. You may wish to place it on a different drive.
$ID,-2$
$FG,2$'M'$FG$
$ID,2$Make CD/DVD ISO file. This creates a ISO9660 file image of the dir the cursor is on. The name of the ISO file is$FG,2$$TX,"",D="DFT_ISO_FILENAME"$$FG$ $LK,"blkdev.dft_iso_filename",A="MN:CBlkDevGlbls"$ and can be redefined in your start-up scripts. You may wish to place it on a different drive.
$ID,-2$
$FG,2$'B'$FG$
$ID,2$Burn CD/DVD ISO file. This burns a CD/DVD using the image file, $FG,2$$TX,"\"::/Tmp/CDDVD.ISO\"",D="DEFAULT_ISO_FILENAME"$$FG$ $LK,"blkdev.default_iso_filename",A="MN:CBlkDevGlobals"$ to the drive the cursor is on.
$ID,-2$

View file

@ -464,10 +464,11 @@ U0 FMFormatDrive(CDoc *doc)
Free(st);
}
U0 FMMakeISO(CDoc *doc)
U0 FMMakeISO(CDoc *doc, I64 type)
{
CDocEntry *doc_ce = doc->cur_entry;
CDirEntry *tmpde;
U8 *st;
if (doc_ce->type_u8 == DOCT_TREE || doc_ce->type_u8 == DOCT_MENU_VAL)
tmpde = doc_ce->user_data;
@ -480,7 +481,20 @@ U0 FMMakeISO(CDoc *doc)
if (tmpde && *tmpde->full_name)
{
Silent;
RedSeaISO(, tmpde->full_name);
switch (type)
{
case FSt_REDSEA:
RedSeaISO(, tmpde->full_name);
break;
case FSt_ISO9660:
if (tmpde->full_name[StrLen(tmpde->full_name) - 1] == '/')
st = MStrPrint("%s*", tmpde->full_name);
else
st = MStrPrint("%s/*", tmpde->full_name);
ISO9660ISO(, st);
Free(st);
break;
}
Silent(OFF);
}
}
@ -570,8 +584,9 @@ U0 FMCopy(CDoc *doc)
#define FMR_MOUNT_REDSEA_ISO_C 8
#define FMR_UNMOUNT 9
#define FMR_MAKE_REDSEA_ISO_C 10
#define FMR_BURN_ISO 11
#define FMR_HELP 12
#define FMR_MAKE_ISO9660 11
#define FMR_BURN_ISO 12
#define FMR_HELP 13
I64 PopUpFMRight(U8 *header=NULL, U8 *footer=NULL)
{
@ -592,9 +607,10 @@ I64 PopUpFMRight(U8 *header=NULL, U8 *footer=NULL)
"$$CM+LX,1,3 $$$$BT,\"MOUNT ISO.C FILE \",LE=FMR_MOUNT_REDSEA_ISO_C$$"
"$$CM+LX,29,0$$$$BT,\"UNMOUNT \",LE=FMR_UNMOUNT$$"
"$$CM+LX,1,3 $$$$BT,\"MAKE ISO.C (CD/DVD) FILE\",LE=FMR_MAKE_REDSEA_ISO_C$$"
"$$CM+LX,29,0$$$$BT,\"BURN ISO (CD/DVD) FILE \",LE=FMR_BURN_ISO$$"
"$$CM+LX,1,3 $$$$BT,\"HELP \",LE=FMR_HELP$$"
"$$CM+LX,29,0$$$$BT,\"CANCEL \",LE=DOCM_CANCEL$$\n");
"$$CM+LX,29,0$$$$BT,\"MAKE ISO (CD/DVD) FILE \",LE=FMR_MAKE_ISO9660$$"
"$$CM+LX,1,3 $$$$BT,\"BURN ISO (CD/DVD) FILE \",LE=FMR_BURN_ISO$$"
"$$CM+LX,29,0$$$$BT,\"HELP \",LE=FMR_HELP$$"
"$$CM+LX,1,3 $$$$BT,\"CANCEL \",LE=DOCM_CANCEL$$\n");
if (footer)
DocPrint(doc, "%s", footer);
@ -652,12 +668,16 @@ U0 FMRightClick()
Message(MESSAGE_KEY_DOWN, 'm', 0);
break;
case FMR_MAKE_ISO9660:
Message(MESSAGE_KEY_DOWN, 'M', 0);
break;
case FMR_BURN_ISO:
Message(MESSAGE_KEY_DOWN, 'B', 0);
break;
case FMR_HELP:
Message(MESSAGE_KEY_DOWN, CH_CTRLM, 0x43200000432);
PopUpEd("::/Doc/FileMgr.DD");
break;
}
}
@ -841,7 +861,11 @@ public U8 *FileMgr(I64 mode=FM_NORMAL, CTask *mem_task=NULL)
break;
case 'm':
FMMakeISO(doc);
FMMakeISO(doc, FSt_REDSEA);
break;
case 'M':
FMMakeISO(doc, FSt_ISO9660);
break;
case 'B':

View file

@ -340,7 +340,7 @@ public I64 ISO9660ISO(U8 *_filename = NULL, U8 *src_files_find_mask,
//See $LK,"::/Misc/DoDistro.ZC"$
//Use "C:/Distro/*" if you want all files in the C:/Distro directory.
//Default flags are "+r" recurse.
CISOPriDesc *iso_pri = CAlloc(DVD_BLK_SIZE),
CISOPriDesc *iso_pri = CAlloc(DVD_BLK_SIZE),
*iso_boot = CAlloc(DVD_BLK_SIZE),
*iso_sup = CAlloc(DVD_BLK_SIZE),
*iso_term = CAlloc(DVD_BLK_SIZE);

View file

@ -47,6 +47,7 @@ extern I64 ExeDoc(CDoc *doc, I64 ccf_flags=0);
extern I64 FindWiz();
extern I64 I64Get(U8 *message=NULL, I64 default=0, I64 lo=I64_MIN, I64 hi=I64_MAX);
extern Bool GrPlot0(CDC *dc, I64 x, I64 y);
extern I64 ISO9660ISO(U8 *_filename = NULL, U8 *src_files_find_mask, U8 *fu_flags = NULL, U8 *_stage2_filename = NULL);
extern CMenuEntry *MenuEntryFind(CMenu *haystack_menu, U8 *needle_full_name);
extern CMenu *MenuFilePush(U8 *filename);
extern U0 MenuPop();
@ -58,6 +59,7 @@ extern Bool PopUpCancelOk(U8 *header=NULL, U8 *footer=NULL);
extern I64 PopUpColor(U8 *header=NULL, Bool allow_transparent=TRUE, Bool allow_default=TRUE);
extern I64 PopUpColorDither(U8 *header=NULL);
extern I64 PopUpColorLighting(U8 *header=NULL);
extern I64 PopUpEd(U8 *filename=NULL, CTask *parent=NULL, CTask **_pu_task=NULL);
extern I64 PopUpFile(U8 *filename, Bool warn_ext=TRUE, CTask *parent=NULL, CTask **_pu_task=NULL);
extern Bool PopUpForm(U8 *_d, U8 *class_name=lastclass, I64 dof_flags=DOF_SIZE_MIN, U8 *header=NULL, U8 *footer=NULL);
extern I64 PopUpI64Get(U8 *message, I64 default, I64 lo=I64_MIN, I64 hi=I64_MAX);